-
Notifications
You must be signed in to change notification settings - Fork 17
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?
Conversation
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.
Thanks for submitting this @JBVAkshaya. A few notes: I don't see any of the mentioned files used by the tutorial in this PR? Does the demo in this PR also include the obstacles? If so, it would be worth pointing that out in one of the steps.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
This tutorial describes how to simulate and control multiple BlueROVs
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 comment
The 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.
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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
You could probably merge this with the above paragraph.
@@ -0,0 +1,82 @@ | |||
--- | |||
sidebar_position: 4 | |||
title: Multi Robot Simulation |
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
|
||
### 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something like:
-
Launch the dependencies for the first robot
rob_1
using,ros2 launch blue_demos multi_robot_1.launch.yaml ...
and in a separate terminal, launch the dependencies for the second robot
rob_2
using,ros2 launch blue_demos multi_robot_2.launch.yaml ...
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 comment
The reason will be displayed to describe this comment to others. Learn more.
- Once Gazebo, ArduSub, and MAVROS have fully loaded, open two new terminals. In the first terminal, launch the control framework for
rob_1
ros2 launch blue_demos multi_robot_1_controllers.launch.py use_sim:=true
and in the second terminal, launch the control stack for rob_2
:
ros2 launch blue_demos multi_robot_2_controllers.launch.py use_sim:=true
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 comment
The reason will be displayed to describe this comment to others. Learn more.
The robots can be teleoperated independently using the teleop_twist_keyboard
node. Open two additional terminal instances and run
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.
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 comment
The 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.
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 comment
The 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.
Changes Made
Added documentation for multi-robot simulation and teleoperation