ROS2 Tutorial: Navigation with keepout zones

Compiling and Running

                    # Terminal 1:
                    # echo $ROS_DISTRO
                    # galactic
                    # source /opt/ros/galactic/setup.bash
                    $ cd ~/SnowCron/ros_projects/harsh
                    $ colcon build --packages-select navigation_bot_07
                    $ source install/setup.bash
                    $ ros2 launch navigation_bot_07 main_simulation_launch.py world:=src/worlds/maze.sdf map:='~/SnowCron/ros_projects/harsh/src/maps/map.yaml' slam:=False keepout_mask:=src/maps/keepout_mask.yaml

                    # Terminal 2:
                    $ cd ~/SnowCron/ros_projects/harsh/src/navigation_bot_07/scripts
                    $ python3 waypoint_follower.py

                

As you can see, we have added an additional command line parameter called keepout_mask. All launch files were modified accordingly, to accept this parameter and to pass it to whatever launch files they call (if any).

(C) snowcron.com, all rights reserved

Please read the disclaimer