-
Notifications
You must be signed in to change notification settings - Fork 18
Added documentation for multi-robot simulation and teleoperation #394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
--- | ||
sidebar_position: 4 | ||
title: Multi Robot Simulation | ||
--- | ||
|
||
This page provides a collection of tutorials that describe how to simulate, launch controllers, and teleoperate multiple BlueROVs. Prior to starting these tutorials, you should have completed the [Running Blue in Simulation](/tutorials/simulation),the [Integrating Custom Controllers](/tutorials/control), and Keyboard teleoperation section in[Teleoperation](/tutorials/teleop) tutorials. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This tutorial describes how to simulate and control multiple BlueROVs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prior to starting this tutorial, you should have completed the Integrating Custom Controllers tutorial and the Keyboard teleoperation tutorial. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add a GIF here that shows users what to expect when they run your tutorial? I wrote something similar in the UVMS PR here. |
||
|
||
## Multi Robot Simulation and Teleoperation | ||
|
||
This tutorial describes how to launch multiple BlueROVs in Gazebo with non-conflicting communication channels, independent controllers, and perform keyboard based teleoperation. It also demonstrates spawning static and dynamic obstacles in the environment. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could probably merge this with the above paragraph. |
||
|
||
<div align="center"> | ||
<img src="../../static/img/multi-robot-sim/multi-rob.png" alt="My Image" width="300"/> | ||
</div> | ||
Comment on lines
+12
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. <img src={MyImage} alt="Multi-robot simulation demo gif" style={{ width: '100%', maxWidth: 700 }} /> |
||
|
||
### Dependencies | ||
|
||
The following ROS 2 dependencies are required for this tutorial: | ||
|
||
- Gazebo Harmonic or newer | ||
- [ardusub_driver](https://github.com/Robotic-Decision-Making-Lab/ardusub_driver) | ||
- [auv_controllers](https://github.com/Robotic-Decision-Making-Lab/auv_controllers) | ||
- [teleop_twist_keyboard](https://github.com/ros2/teleop_twist_keyboard) | ||
- [mobile_to_maritime](https://github.com/Robotic-Decision-Making-Lab/mobile_to_maritime) | ||
|
||
These dependencies will be met by default if you have installed Blue with | ||
Docker as described in the [installation instructions](/installation). | ||
|
||
### Tutorial steps | ||
|
||
1. Launch the demo Dependencies for `rob_1` and `rob_3` instances in simulation by running the following commands: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe something like:
|
||
|
||
```bash | ||
ros2 launch blue_demos rob_1_bluerov2_heavy_demo.launch.yaml use_sim:=true | ||
``` | ||
|
||
```bash | ||
ros2 launch blue_demos rob_3_bluerov2_heavy_demo.launch.yaml use_sim:=true | ||
``` | ||
|
||
2. Once Gazebo, ArduSub, and MAVROS have fully loaded, open a new terminal and launch the demo control framework for `rob_1` and `rob_3` instances: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
ros2 launch blue_demos multi_robot_1_controllers.launch.py use_sim:=true and in the second terminal, launch the control stack for ros2 launch blue_demos multi_robot_2_controllers.launch.py use_sim:=true |
||
|
||
```bash | ||
ros2 launch blue_demos rob_1_bluerov2_heavy_controllers.launch.py use_sim:=true | ||
``` | ||
|
||
```bash | ||
ros2 launch blue_demos rob_3_bluerov2_heavy_controllers.launch.py use_sim:=true | ||
``` | ||
|
||
3. For teleoperation, we will launch the `teleop_twist_keyboard` node for each robot instance in a new terminal: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The robots can be teleoperated independently using the ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r __ns:=/rob_1 in the first and ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r __ns:=/rob_2 in the second. |
||
|
||
```bash | ||
ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r __ns:=/rob_1 | ||
``` | ||
|
||
```bash | ||
ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r __ns:=/rob_3 | ||
``` | ||
|
||
4. As noted in Teleoperation tutorial, the `teleop_twist_keyboard` node will publish velocity commands according to | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Finally, transform the velocity commands into the appropriate frames for the control stack by running ros2 launch message_transforms message_transforms.launch.py parameters_file:=./blue_demos/multi_robot/teleoperation/config/rob_1_transforms.yaml ns:=/rob_1 in one new terminal, and ros2 launch message_transforms message_transforms.launch.py parameters_file:=./blue_demos/multi_robot/teleoperation/config/rob_3_transforms.yaml ns:=/rob_3 in a second new terminal. |
||
[REP-105](https://ros.org/reps/rep-0105.html); however, the launched ISMC | ||
adheres to the maritime conventions recorded in [REP-156](https://github.com/ros-infrastructure/rep/pull/398). | ||
To convert the velocity commands to the appropriate convention, run the | ||
`message_transforms` node in a new terminal: | ||
|
||
```bash | ||
ros2 launch message_transforms message_transforms.launch.py parameters_file:=<path/to/transforms.yaml> | ||
``` | ||
|
||
where `<path/to/transforms.yaml>` should be replaced with the path to the | ||
`transforms.yaml` file in the `blue_demos` package, e.g., | ||
|
||
```bash | ||
ros2 launch message_transforms message_transforms.launch.py parameters_file:=./blue_demos/multi_robot/teleoperation/config/rob_1_transforms.yaml ns:=/rob_1 | ||
``` | ||
|
||
```bash | ||
ros2 launch message_transforms message_transforms.launch.py parameters_file:=./blue_demos/multi_robot/teleoperation/config/rob_3_transforms.yaml ns:=/rob_3 | ||
``` | ||
|
||
5. You should now be able to teleoperate both the BlueROV2 using your keyboard from respective terminals. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should now be able to teleoperate either BlueROV2 using its respective keyboard input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multi-Robot Simulation