diff --git a/docs/docs/tutorials/multirobot.mdx b/docs/docs/tutorials/multirobot.mdx new file mode 100644 index 00000000..c28eed51 --- /dev/null +++ b/docs/docs/tutorials/multirobot.mdx @@ -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. + +## 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. + +
+ My Image +
+ +### 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: + + ```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: + + ```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: + + ```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 + [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:= + ``` + + where `` 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. diff --git a/docs/static/img/multi-robot-sim/multi-rob.png b/docs/static/img/multi-robot-sim/multi-rob.png new file mode 100644 index 00000000..c522653c Binary files /dev/null and b/docs/static/img/multi-robot-sim/multi-rob.png differ