Introduction

SLAM is basically trying to map out an unknown environment while figuring out where it is in this unknown environment at the same time. We need to provide 2 streams of data to SLAM node.

  1. Distance/Range Sensor

    • LiDAR (Laser Scanner) or a Depth Camera
    • Publishes to sensor_msgs/msg/LaserScan
    • This gives SLAM algorithm precise distance to walls, tables, etc
  2. Odometry

    • Wheel Encoders + Inertial Measurement Unit (IMU)
    • It publishes nav_msgs/msg/Odometry
    • This tells SLAM roughly how far the wheels think the robot travelled
  3. Unified Robot Description Format (URDF)

    • We need this so that we can generate the TF Tree which is being fed to the slam_toolbox
    • We must use a robot_state_publisher node to launch URDF file

Software Tools

There are some industry standard open-source packages:

  1. slam_toolbox

    • modern default SLAM package for ROS 2
    • basically whatever we want to change, like odom and laser topic names we have are not default, we will just edit the YAML file
  2. cartographer

    • Highly accurate but advanced to set up
  3. nav2_map_server

    • utility tool used to actually save a finished map from terminal and load it back up later for navigation