Cogalloy robotics parts workbench
Back to learn
Intermediate50 min read4 parts

2D LiDAR SLAM: A Controlled slam_toolbox Mapping Baseline

Build a repeatable small-area map only after the MS200 or RPLIDAR C1 scan, motion feedback and TF chain have passed acceptance.

2D LiDAR SLAM: A Controlled slam_toolbox Mapping Baseline

What this guide proves

A supervised robot can create and save a small occupancy-grid map whose scan, pose and transform chain are explainable. The map is a development artifact for a defined room, not evidence that every environment is safe for autonomous driving.

Hardware and scope boundary

COG-MS200-LIDAR and SENSOR-001 both provide a single 2D scan plane, with different mechanical and published performance boundaries. COG-T1-TRACK-BASE provides tracked motion and COG-RPI5-8GB runs ROS 2. SLAM quality still depends on mounting, time alignment, odometry, surfaces and operator motion.

Prepare before applying power

Finish raw scan, transform and low-speed motion acceptance. Choose a small, static indoor loop with no stairs, moving people or unmodelled hazards. Record the selected LiDAR, driver version, scan frame, base frame and initial speed limits.

Procedure

  1. Confirm the scan topic remains continuous while stationary and during a gentle chassis movement. Inspect the TF chain from map or odom through base_link to the LiDAR frame.
  2. Install or use the approved slam_toolbox configuration for the ROS distribution. Begin with conservative scan and motion parameters rather than copying a configuration from another chassis.
  3. Teleoperate slowly with overlapping views of walls and fixed features. Avoid rapid turns, aggressive track slip and repeated passages through a single narrow featureless corridor.
  4. Watch the live map for duplicated walls, sudden pose jumps or a map that rotates relative to the room. Return to raw scan, frame and odometry checks before changing many SLAM parameters.
  5. Save the map and its metadata: environment, LiDAR, transform values, controller firmware, wheel/track parameters, software versions and the route used to create it.

Pass criteria and record

A second supervised pass produces a similar small-area map, with a credible robot trace and no unexplained loss of scan data. The saved map can be loaded later as a known test artifact.

Do not proceed when

Do not rely on a map that is visually attractive but not repeatable, that hides transform errors, or that was made while power, feedback or scan data were unstable. Do not treat the 2D scan plane as coverage for stairs, glass or low obstacles without testing.

Continue from here

Use the saved map for a cautious Nav2 localization and goal test. Add an RGB-D camera when the application requires geometry beyond the LiDAR plane.

PARTS

Used in this tutorial

View all parts
PerceptionCOG-MS200-LIDAR

Cogalloy MS200 Compact 360° dToF 2D LiDAR

US$89.99View details
PerceptionSENSOR-001

RPLIDAR C1 360° Fusion dToF 2D LiDAR

US$127.00View details
Control & computeCOG-RPI5-8GB

Raspberry Pi 5 Model B, 8 GB Single-Board Computer

US$175.00View details
Chassis & structureCOG-T1-TRACK-BASE

Cogalloy T1 Advanced Suspension Tracked Chassis Kit

US$119.99View details