ROS2 Tutorial: Configuring Costmap 2D

Build, Run and Verification


                # In a first Terminal:
                $ ros2 run teleop_twist_keyboard teleop_twist_keyboard

                # In a second Terminal
                # We will launch the async_slam_toolbox_node of slam_toolbox using the package's 
                # built-in launch files. Open a second terminal and then execute the following lines
                # This is inconvenient, and will be fixed in the navigation_bot_05 section (next one).
                $ ros2 launch slam_toolbox online_async_launch.py
    
                # In a third Terminal:
                $ cd ~/SnowCron/ros_projects/harsh
                $ colcon build --packages-select navigation_bot_04
                $ source install/setup.bash
                $ ros2 launch navigation_bot_04 launch_sim.launch world:=src/worlds/maze.sdf
                # Note: we are working on switching to 
                $ ros2 launch navigation_bot_04 main_simulation_launch.py world:=src/worlds/maze.sdf slam:=True
            

As the result, we have a robot, based on a more flexible launch system than before, that we can drive around and save the map it produces. In the next section we are going to learn how to load a saved map and to perform simple navigation tasks.

(C) snowcron.com, all rights reserved

Please read the disclaimer