We use different mode values (simple - slam - map) and accordingly, different RViz config files. Alltogether, it creates kind of a mess, but the logic is simple.
# Terminal 1
# echo $ROS_DISTRO
# galactic
#
# source /opt/ros/galactic/setup.bash
#
$ cd ~/SnowCron/ros_projects/harsh
$ colcon build --packages-select multi_bot_nav_01
$ source install/setup.bash








To control robots manually:
Waypoints following and Docking to charger
These are for backward compatibility: we have our custom path planning and following, but Nav2 still works.
To run these scripts, Terminal 1 should have our launch file started with "mode" equal "map", either for single robot configuration (robot name set to "") or in multi robot configuration. Just to remind you: it can be changed by commenting / uncommenting the following lines in multi_simulation_launch.py:
To run simple waypoint follower script for a single robot (robot name is ""):
# Terminal 3:
$ cd ~/SnowCron/ros_projects/harsh/src/multi_bot_nav_01/multi_bot_nav_01
$ python3 01_waypoint_follower.py
To run docker charging script for a single robot (robot name is ""):
# Terminal 3:
$ cd ~/SnowCron/ros_projects/harsh/src/multi_bot_nav_01/multi_bot_nav_01
$ python3 03_charger_docking.py

Finally, to run docker charging script on multiple (2) robots:
# Terminal 3:
$ cd ~/SnowCron/ros_projects/harsh/src/multi_bot_nav_01/multi_bot_nav_01
$ python3 04_charger_docking_obstacles_multi.py

Custom path planning and following
Same as earlier: to run these scripts, Terminal 1 should have our launch file started with "mode" equal "map", either for single robot configuration (robot name set to "") or in multi robot configuration. Just to remind you: it can be changed by commenting / uncommenting the following lines in multi_simulation_launch.py:
To run path custom path planning and following with a single robot (robot name is ""):
# Terminal 3:
$ cd ~/SnowCron/ros_projects/harsh/src/multi_bot_nav_01/multi_bot_nav_01
$ source install/setup.bash
$ python3 Coordinator.py

To run path custom path planning and following with a multiple robots:
# Terminal 3:
$ cd ~/SnowCron/ros_projects/harsh/src/multi_bot_nav_01/multi_bot_nav_01
$ source install/setup.bash
$ python3 Coordinator.py
