Day 12
SLAM: building a map from scratch with slam_toolbox
This is a valid v1.0 placeholder page for the later curriculum arc. Full interactive lab treatment ships after Week 1 dogfooding.
LECTURE & READING
Glossary primer (10 min)
- Navigation & LocomotionSLAMSimultaneous Localization and Mapping. — Simultaneous Navigation & LocomotionLocalizationDetermining where the robot is. and Navigation & LocomotionMappingBuilding a representation of the environment.. Build a map of an unknown Core ConceptsEnvironmentThe external world the robot operates in, including objects, obstacles, people, and surfaces. while tracking your pose in it.
- Navigation & LocomotionSLAMSimultaneous Localization and Mapping._toolbox — ROS 2's go-to 2D LiDAR-based Navigation & LocomotionSLAMSimultaneous Localization and Mapping.. Maintained by SteveMacenski. Replaced gmapping.
- Pose graph — Navigation & LocomotionSLAMSimultaneous Localization and Mapping.'s internal representation: nodes are Core ConceptsRobotA physical system with sensors and actuators that can observe the world and take actions. poses, edges are scan-match constraints.
- Loop closure — Detecting "I've been here before" and correcting the accumulated drift.
- Occupancy grid — Output map. Cells are free / occupied / unknown.
- Localization-only mode — Use a saved map; track pose without modifying the map.
- Lifelong Navigation & LocomotionMappingBuilding a representation of the environment. — Continuous Navigation & LocomotionSLAMSimultaneous Localization and Mapping. that adds new observations to a saved map.
Real-world analogy
Navigation & LocomotionSLAMSimultaneous Localization and Mapping. is sketching a building's floor plan while walking through it blindfolded — you remember "8 paces forward, 5 right, hit a wall" and combine that with "this corner looks like one I've seen before" to keep the map consistent.
Hour 1 — Stachniss SLAM primer
This is the visual primer for Navigation & LocomotionSLAMSimultaneous Localization and Mapping.. Watch ~30 min total:
- Cyrill Stachniss Navigation & LocomotionSLAMSimultaneous Localization and Mapping. sequence:
- Navigation & LocomotionSLAMSimultaneous Localization and Mapping., 5 Minutes with Cyrill
Video
Navigation & LocomotionSLAMSimultaneous Localization and Mapping., 5 Minutes with Cyrill
Open source - Graph-based Navigation & LocomotionSLAMSimultaneous Localization and Mapping. using Pose Graphs
Video
Graph-based Navigation & LocomotionSLAMSimultaneous Localization and Mapping. using Pose Graphs
Open source - Bag of Visual Words, 5 Minutes with Cyrill
- Pick the videos titled "What is Navigation & LocomotionSLAMSimultaneous Localization and Mapping.?", "Pose Graph Navigation & LocomotionSLAMSimultaneous Localization and Mapping.", "Loop Closure".
Stachniss is the world's best at making Navigation & LocomotionSLAMSimultaneous Localization and Mapping. intuitive. Don't skip.
Hour 2 — slam_toolbox docs
- README and design overview: https://github.com/SteveMacenski/slam_toolbox
- Articulated Robotics' Navigation & LocomotionSLAMSimultaneous Localization and Mapping. video: https://articulatedrobotics.xyz/tutorials/mobile-robot/concept/concept-slam/
LAB
Hour 3 — Lab: build a warehouse map, save it, re-localize against it (75 min)
What you're building. Run Navigation & LocomotionSLAMSimultaneous Localization and Mapping._toolbox in online async mode while teleoping the TurtleBot4 around the warehouse. Save the resulting map. Then re-launch in localization-only mode and verify the saved map can be reused with AMCL.
What success looks like at the end. You have:
1. A .pgm and .yaml map pair saved at ~/maps/my_warehouse.{pgm,yaml}.
2. figures/day12_warehouse_map.png showing the map opened in any image viewer.
3. The map covers ≥ 80% of the warehouse (visually; no large unmapped regions).
4. After re-launch in Navigation & LocomotionLocalizationDetermining where the robot is. mode, AMCL converges using the saved map.
Step 1 — Launch TB4 sim + slam_toolbox (10 min)
Pane 1:
Full source continues in the committed curriculum files. The v1.0 page exposes the day flow and lab surface without inventing content.