Added documentation for multi-robot simulation and teleoperation#394
Added documentation for multi-robot simulation and teleoperation#394JBVAkshaya wants to merge 2 commits intoRobotic-Decision-Making-Lab:mainfrom
Conversation
evan-palmer
left a comment
There was a problem hiding this comment.
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.
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.
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.
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.
You could probably merge this with the above paragraph.
| @@ -0,0 +1,82 @@ | |||
| --- | |||
| sidebar_position: 4 | |||
| title: 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.
Maybe something like:
-
Launch the dependencies for the first robot
rob_1using,ros2 launch blue_demos multi_robot_1.launch.yaml ...
and in a separate terminal, launch the dependencies for the second robot
rob_2using,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.
- 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:=trueand 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.
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_1in the first and
ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r __ns:=/rob_2in 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.
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_1in 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_3in 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.
You should now be able to teleoperate either BlueROV2 using its respective keyboard input.
Changes Made
Added documentation for multi-robot simulation and teleoperation