Skip to content

Latest commit

 

History

History
132 lines (90 loc) · 5.45 KB

File metadata and controls

132 lines (90 loc) · 5.45 KB

Table of Contents

This guide demonstrates how to integrate Slam Toolbox and Nav2 for multi-robot simulations using Husky robots in Gazebo and RViz. You'll learn how to launch the simulation, configure navigation and SLAM for multiple robots, and teleoperate them using a joystick.

Before running the demonstrations, follow the instructions in our setup guide to properly configure your environment.

Once your environment is ready, follow these steps to set up the project:

  1. Clone the repository:
    Download the project files to your computer.
git clone https://github.com/multirobotplayground/Jazzy-Multi-Robot-Sandbox.git
cd Jazzy-Multi-Robot-Sandbox
  1. Initialize submodules:
    Some dependencies are included as submodules. This command fetches them.
git submodule update --init --remote
  1. Source ROS 2 environment:
    Make sure your terminal session is using the correct ROS 2 distribution (here, jazzy).
source /opt/ros/jazzy/setup.bash
  1. Build the workspace:
    Compile all packages in the repository.
colcon build
  1. Source the workspace:
    Update your environment so ROS 2 can find the newly built packages.
source install/setup.bash

After completing these steps, your workspace will be ready to run the multi-robot simulations and integrations described in this guide.

Run the following launch file from the multi-robot-simulations package:

ros2 launch multi-robot-simulations toolbox_nav2_multi_husky.py

If the simulations run accordingly, you should see the following Gazebo Ignition scene. Play around with it!

Also, RViz must open a multi-robot configuration file, where both Husky robots are configured in the same scene, highlighting their sensors.

The Nav2 package is configured in both robots from the scene. There is one file for each robot, because ROS2 substitution is not intuitive and is detrimental to having an understandable code base.

Slam Toolbox was straightforward to configure and use, but a little tricky to integrate with the Nav2 package in a multi-robot setting. There is one configuration file for each robot for the same reasons mentioned above.

Here is how the pose graph looks natively in the demonstration:

In this demonstration, a PS5 controller was used with the joy_node and teleop_twist_joy nodes.

Click the image below to watch the video.

YouTube Video

Note: Each robot requires its own configuration file due to ROS2 substitution limitations.

Support Open Source mobile robots projects for search and rescue in natural disasters, which is my main motivation. Your donation will make a huge difference!

Donate Donate

All content from this repository is released under a modified GPLv3 license.

Author/Maintainer:

emails: