Skip to main content

🗺 Advanced Usage — Custom Maps

This section explains how to create, customize, and optimize maps for your LIMO robot using RTAB-Map or Cartographer, so navigation is more precise and exploration covers your environment efficiently.


🧩 Why Custom Maps?​

Your robot's navigation precision directly depends on the quality of its map.
Custom maps allow you to:

  • Adapt to new environments.
  • Remove clutter and unnecessary details.
  • Fine-tune navigation for tight spaces and complex layouts.
  • Improve localization stability for Nav2.

🗺 RTAB-Map Customization​

ros2 launch rtabmap_ros rtabmap.launch.py \
use_sim_time:=false \
rgb_topic:=/camera/color/image_raw \
depth_topic:=/camera/depth/image_raw \
camera_info_topic:=/camera/color/camera_info \
frame_id:=base_link

Drive the robot manually via:

ros2 run teleop_twist_keyboard teleop_twist_keyboard

Save the map:

ros2 run nav2_map_server map_saver_cli -f ~/maps/my_room

🧭 Cartographer Configuration​

ros2 launch limo_bringup limo_cartographer.launch.py \
use_sim_time:=false \
configuration_basename:=limo_cartographer.lua

🖌 Map Editing & Optimization​

You can clean and modify maps for better navigation:

  1. Remove noise & artifacts using GIMP or Photoshop.
  2. Fill small gaps in walls to prevent Nav2 from "cutting corners."
  3. Remove furniture if it has been moved since mapping.
  4. Ensure the robot's starting location (from pose_setter.py) is in a free space.

Example cleanup workflow:

sudo apt install gimp
gimp ~/maps/my_room.pgm

Edit → Save → Update .yaml metadata file with correct resolution and origin.


🏗 Creating a Custom Map from Scratch​

1. Prepare Environment​

Remove unnecessary obstacles; ensure good lighting for vision-based SLAM.

2. Launch Mapping Tool​

Choose RTAB-Map or Cartographer as above.

3. Drive Methodically​

  • Cover every area.
  • Rotate at intersections for loop closure.

4. Save & Optimize​

Clean the .pgm, update .yaml, and store in ~/maps/.

5. Update Launch File​

Point Nav2 to your new map:

ros2 launch limo_bringup limo_nav2.launch.py map:=/home/agilex/maps/my_room.yaml
Pro Tip

If your environment changes often, create multiple maps for different configurations and switch them depending on the task.


Next: 📍 Customizing Waypoints