Cartographer, which is capable of completing indoor map construction and localization based on 2D lidar sensors. It’s suitable for indoor navigation of robots.

Figure: Sample results of 2D lidar SLAM
Pipeline flow for 2D lidar SLAM
Figure: Pipeline flow for 2D lidar SLAM
ROS nodes used in the 2D lidar SLAM pipeline
ROS topics/services used in 2D lidar SLAM
Table: ROS topics used in 2D lidar SLAM
| ROS topic | Type | Published by |
|---|---|---|
/tracked_pose | geometry_msgs.msg.PoseStamped | cartographer_node |
/tf | tf2_msgs.msg.TFMessage | cartographer_node |
/submap_list | cartographer_ros_msgs.msg.SubmapList | cartographer_node |
/scan_matched_points2 | sensor_msgs.msg.PointCloud2 | cartographer_node |
/map | nav_msgs.msg.OccupancyGrid | cartographer_occupancy_grid_node |
Table: ROS services used in in 2D lidar SLAM
| ROS service | Type | Provided by |
|---|---|---|
/qrb_slam_command | qrb_ros_slam_msgs.srv.SlamCommand | cartographer_node |
Prerequisites
- You have Set up the device according to Set up the environment for running sample applications.
- Connect the power supply and USB port of RPLIDAR A3M1.
Run out-of-the-box 2D lidar SLAM
Try me
Try me
1
Set up the robot base
Note The following configuration applies exclusively to Qualcomm’s robot base. If you are using a custom or third-party robot base, skip this configuration step and apply configurations appropriate to your own robot base.
- Open a new terminal connect to the device.
- Select the robot base model.
- 0604 AMR:
robot_base(default) - Mini AMR:
robot_base_mini
- 0604 AMR:
- (Optional) If you don’t connect the ultrasonic sensor to the MCB, disable ultrasound emergency stop.
- Launch the robot base AMR.
2
Set up the 2D lidar
In a new terminal, run the following commands.
3
Run the 2D lidar SLAM
In a new terminal, run the following commands.
4
Run the qrb_slam_service_request script
In a new terminal, run the following commands.
5
Start mapping
In the terminal opened in the preceding step, use the keyboard to send control commands, such as starting the mapping process.

