ROS2 and Gazebo: multiple robots

nav2_params_multi.yaml

We have already walked through the changes required to add namespaces to URDF files, now it is time to look at YAML files. The idea is the same, but as syntax of YAML is different from URDF, there are some differences in the implementation as well.

As I mentioned earlier, in order to avoid overcomplicated replacement logic, I have created a second nav2_params file: one is now for single robot projects (by single robot I mean that robot's name is an empty string), and another is for multi robots project.

Generally speaking, it is not a good practice, and a simple solution would be to run a replacement code on nav2_params_multi.yaml in the case of a single robot project, replacing all placeholders with empty strings. Maybe I will implement it in one of the future tutorials.

Earlier, I have replaced placeholders in the nav2_params_multi.yaml using the following logic:

                    
                

Let's take a look at these placeholders in nav2_params_multi.yaml

                    
                

And - it doesn't work! For more than one robot, at least in Galactic, there is an "Easter egg": you need to disable the groot monitoring. This is definitely a bug, and it doesn't give you anything in terms of education: just one of those boring things you have to find and fix:

                    enable_groot_monitoring: False #True
                

(C) snowcron.com, all rights reserved

Please read the disclaimer