> For the complete documentation index, see [llms.txt](https://campus-rover.gitbook.io/lab-notebook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://campus-rover.gitbook.io/lab-notebook/fiiva/bru/connect-to-robot.md).

# Controlling Robots from VNC

Before you get started, make sure you have the latest version of `rosutils` on your VNC To update rosutils, use the command `cd ~/rosutils && git pull`

You will then need to run the command `source ~/.bashrc` after updating rosutils

## Turning on the robot (Turtlebot3)

1. Make note of the name of your robot written on the top.

   ![](https://4196336753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LULg3WmBk4r0dWAdK9A%2Fuploads%2Fgit-blob-9dbea2edf991ec438aa004ca3c565c0980e11637%2Fname.jpg?alt=media)
2. Connect the battery to the robot.

   ![](https://4196336753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LULg3WmBk4r0dWAdK9A%2Fuploads%2Fgit-blob-7f2e4dca3760c7fe02dd91bc06cdc1fc6cc6591f%2Fbattery.jpg?alt=media)
3. Turn on the robot using the switch just under the camera.

   ![](https://4196336753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LULg3WmBk4r0dWAdK9A%2Fuploads%2Fgit-blob-72e35141fab7c4d8da0c8bdfb3eefa014155d00d%2Fswitch.jpg?alt=media)
4. You should see the lights on the raspberry pi in the robot turn green. The robot may take up to a minute to finish its boot sequence.

## Steps to connect

1. Make note of the name of your robot. It should be written on the top of the robot. For the purposes of this tutorial, I will be connecting to **roba**, but you should replace **roba** with the name of your robot.
2. Run `tailscale status | grep roba` in a terminal. You should get an output that looks something like this: `100.86.78.102 roba pitosalas@ linux -`. Make note of the IP starting with 100, this is the IP address of your robot.
3. Edit the file `~/.bashrc` in your vscode editor on the VNC. Add the following two lines to the bottom of the file, but in the second line you will need to replace where it says `roba` and the IP address with the name of your robot and your robot's IP address respectively.

```
$(bru mode real)
$(bru name roba -m 100.86.78.102)
```

4. Run the command `sb` in the terminal. You should see your command prompt change to something that looks like this: `[real:roba]`
5. If the robot is already on, run the command `sshrobot` in your terminal in your VNC. You might be asked to add a new ssh fingerprint, if so simply type `yes` in the prompt and continue. You will be asked the password of the robot, which is going to be `ROSlab134` for all of the lab robots.
6. Once you see that your terminal prompt looks like `[onboard:roba]` you are connected to the robot. The final step is to type `bringup` in the robot's terminal. This will run the bringup script so it is crucial that you do not close the terminal where this is running.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://campus-rover.gitbook.io/lab-notebook/fiiva/bru/connect-to-robot.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
