> 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/multi_robot_gazebo_real.md).

# Running Multi Robot in Gazebo and Real Robot

### Launching on Gazebo

If you are interested in launching on the real turtlebot3, you are going to have to ssh into it and then once you have that ssh then you will be able to all bringup on it. There is more detail about this in other FAQs that can be searched up. When you are running multirobots, be aware that it can be a quite bit slow because of concurrency issues.

These 3 files are needed to run multiple robots on Gazebo. In the object.launch that is what you will be running roslaunch. Within the robots you need to spawn multiple one\_robot and give the position and naming of it.

![Screen Shot 2023-05-06 at 4 55 10 PM](https://user-images.githubusercontent.com/89604161/236646236-c7dd85ab-3c2b-4901-b6a6-58fdc1937613.png)

Within the object.launch of line 5, it spawns an empty world. Then when you have launched it you want to throw in the guard\_world which is the one with the multiple different colors and an object to project in the middle. Then you want to include the file of robots.launch because that is going to be spawning the robots.

![Screen Shot 2023-05-06 at 4 55 45 PM](https://user-images.githubusercontent.com/89604161/236646252-7c480a02-de15-4329-925f-4496ce140233.png)

For each robot, tell it to spawn. We need to say that it takes in a robot name and the init\_pose. And then we would specify what node that it uses.

![Screen Shot 2023-05-06 at 4 56 08 PM](https://user-images.githubusercontent.com/89604161/236646266-d71ddf41-e15e-4b14-94af-cab2416c06e1.png)

Within the robots.launch, we are going to have it spawn with specified position and name. ![Screen Shot 2023-05-06 at 4 56 43 PM](https://user-images.githubusercontent.com/89604161/236646283-87e8b496-dd4c-4199-93e5-c729a0fe95ff.png)

### Launching Real

Make sure your bashrc looks something like this:

```

# export ROS_MASTER_URI=http://100.74.60.34:11311
export ROS_MASTER_URI=http://100.66.118.56:11311
# export ROS_IP=100.66.118.56
export ROS_IP=100.74.60.34
# Settings for a physical robot 
$(bru mode real)
# $(bru name robb -m 100.99.186.125)
# $(bru name robc -m 100.117.252.97)
$(bru name robc -m $(myvpnip))
# $(bru name robb -m $(myvpnip))
```

Then you need to ssh into the robots to start up the connection. You will need to know the ip of the robot and you can get this by doing a tailscale grep on the the robot of interest, and that can be roba, robb, robc, rafael, or donanotella as only these turtlebot are set up for that.

Then you will need to then call on (bru mode real) and (bru name -m ) and multibringup. The multibringup is a script that Adam Rings wrote so that these connectiosn can set up this behavior.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://campus-rover.gitbook.io/lab-notebook/fiiva/multi_robot_gazebo_real.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
