Multi Robot Scenario

Have bought more than one robot from us? Planning to do a research with fleet of Neobotix robots? Not sure how to start? This tutorial will be a kick starter guide for all your question related to setting up and using multiple Neobotix robots deploying ROS-2 for an application or research.

Note

This tutorial assumes that, you already have gone through the the installation Installation steps and Starting with ROS on the Robot know the basic working of our robots.

The main essence for the set-up of the multi robot system is the Namespace. Namespace is just like the names for the human twins, they look alike but are differentiated mainly by their names. The main subjective idea here is to explain how to configure, set up and the navigate your robots with different namespaces. For the rest of the section, we will assume we are going to set up mult-robot system consisting of MPO-700’s

Installation

Currently this tutorial is based upon the a branch Feature/handling_namespace that can be found here in the mpo_700 repository.

If you want to try it out in the simulation, we also have it in a seperate branch of our neo_simulation repo, that can be found here

We have some additional features developed to the navigation2 RViz plugin, this can be also found in our fork of the nav2 stack

Finally, clone the neo_fleet_rviz2 plugin.

Build all the packages cloned from the src of your workspace using colcon_build.

Note

we currently only support multi-robot case only for mpo_700 and mpo_500, both for the real robot and as well as the simulation.

Configuration

An example configuration of handling multi robot system can be found in our mpo_700 repo for ros2.

In this config file you can note that the name of the frames must be changed according to the namespaces. For the rest of the tutorial, we assume that the user will use mpo_7000 has the namespace. For now, there is a strict rule on the naming convention of the robot and needs to be named with robot_name + robot_number. For example, you have 2 mpo_700, so you have to name it as mpo_7001 and mpo_7002.

Active development is going on for the allowal of any name that the user like to choose.

Launch

Driver Bringup

The first task will be to launch all the robot specific drivers in different namespace. In case if you had bought a brand new robot with ROS-2 from us, we would have configured an autostart for ROS on your robot. In that scenario, you need to do the following:

gedit ~/ROS_AUTOSTART.SH

This will open the autostart script. Now in line 7, remove the entire line and replace it with:

ros2 launch neo_mpo_700-2 bringup.launch.py robot_namespace:="mpo_7000"

If you just recently upgraded to ROS-2 then we would suggest you to set up your own AUTOSTART script. In case, if you do not want to do that, then you can just open a command line and launch the above command.

Now getting into the details, as you can see here. We are using an argument defined as robot_namespace.

Also make sure, all the robots are in the same network and have the same ROS_DOMAIN_ID.

RViz2 bringup

Visualization is very important to see how our robots behave. In order to do that, we have developed a special RViz2 plugin, in which you will be able to select and send goals to the robot. Of course, we have just one RViz to visualize all the robots in the specified environment for a fleet. In order to start the RViz run the following command from your workspace directory to brings up all the necessary plugins:

ros2 launch neo_nav2_bringup rviz_launch.py rviz_config:=install/neo_nav2_bringup/share/neo_nav2_bringup/rviz/multi_robot.rviz

RViz get’s started with the pre-set configuration, you can see the TF’s of the robot as shown here:

../_images/multi_robot_rviz.png

Note

We here have localized the robot already. Please make sure to localize the robots, by selecting each one at a time from the plugin.

Once you are done with the localization, you are free to send goals to the corresponding robots.

If you are willing to use the amazing Navigation2 Plugin, we have an update form that allows you to save and restore the waypoints on the fly for a particular robot. To do that, select the corresponding robot on the rviz plugin and press the RViz button,to open the robot specific RViz. Once opened, on the bottom you can find the option Waypoint/Nav Through Poses mode. Select that and you will see this option as shown below.

../_images/updated_nav2_plugin.png

Load and save the waypoints in the JSON format on the fly.

Note

Currently you will be only able to see the footprint of the selected robot in the robot specific RViz. You will be able to see the robot specific TF’s and robot model in the upcoming updates.

Simulation

For simulation, you just have to just run couple of steps as follows:

ros2 launch neo_simulation2 multi_robot_simulation.py
ros2 launch neo_simulation2 multi_robot_navigation.py

Follow the RViz2 bringup steps shown above to bring up the RViz.