1. Try to build the map without any empty cell in the arena or in the middle.

2. Go to RViz, here you see Panals in that you will get Add New Panals

image.png

3. Just enter map or your map name in both first 2 rows and click on both Save Map and Seriallize Map

image.png

4. Here you will find 4 files named map.datamap.pgmmap.posegraph and map.yaml

5. Update the map name in ebot_bringup_launch.py launch file in dir /ebot_nav2/launch/.


    declare_map_yaml_cmd = DeclareLaunchArgument(
        'map',
        default_value=os.path.join(ebot_nav2_dir, 'maps', 'map_name.yaml'),  ## Update the map config here
        description='Full path to map yaml file to load')

6. Update the map name in nav2_params.yaml launch file in dir /ebot_nav2/params/.


    map_server:
    ros__parameters:
    use_sim_time: True
    yaml_filename: "map_name.yaml"  ## Update the map name here

7. Since we added map files in the ebot_nav2 pkg, we have to rebuild it.


    colcon build

OR


    colcon build --symlink-install

Why to rebuild ?? Google it !