How antobrandi/self-driving-and-ros-2-learn-by-doing-map-localization works
This repository is course material for a ROS 2 mobile robot focused on mapping and localization. The principal workflow is to launch the simulated or real robot, drive it, and use sensor and odometry data for localization and mapping; the README also identifies LiDAR, obstacle avoidance, and speed/separation monitoring as capabilities. The excerpts show the differential-drive controller converting velocity commands and wheel states into wheel commands and odometry. Other subsystem links are not demonstrated in sampled source, so those links are marked unverified or omitted.
Main entry points: simple_controller.cpp Drive and odometry · simulated_robot.launch.py Robot bringup · bumperbot_interface.cpp Hardware interface · kalman_filter.cpp Robot localization
Components 22
Robot Runtime
- Robot bringup
Section10_SLAM/bumperbot_ws/src/bumperbot_bringup/launch/simulated_robot.launch.py - Gazebo simulation
Section10_SLAM/bumperbot_ws/src/bumperbot_description/launch/gazebo.launch.py - Robot description
Section10_SLAM/bumperbot_ws/src/bumperbot_description
Motion and Hardware
- Drive and odometry
Section10_SLAM/bumperbot_ws/src/bumperbot_controller/src/simple_controller.cpp - Noisy controller
Section10_SLAM/bumperbot_ws/src/bumperbot_controller/src/noisy_controller.cpp - Twist relay
Section10_SLAM/bumperbot_ws/src/bumperbot_controller/src/twist_relay.cpp - Hardware interface
Section10_SLAM/bumperbot_ws/src/bumperbot_firmware/src/bumperbot_interface.cpp - Serial I/O
Section10_SLAM/bumperbot_ws/src/bumperbot_firmware/src/simple_serial_receiver.cpp - IMU driver
Section10_SLAM/bumperbot_ws/src/bumperbot_firmware/bumperbot_firmware/mpu6050_driver.py
Mapping and Localization
- LiDAR sensor
- Robot localization
Section10_SLAM/bumperbot_ws/src/bumperbot_localization/src/kalman_filter.cpp - Odometry model
Section10_SLAM/bumperbot_ws/src/bumperbot_localization/src/odometry_motion_model.cpp - SLAM mapping
Section10_SLAM/bumperbot_ws/src/bumperbot_mapping/src/mapping_with_known_poses.cpp - IMU republisher
Section10_SLAM/bumperbot_ws/src/bumperbot_localization/src/imu_republisher.cpp
Safety
- Safety stop
Section10_SLAM/bumperbot_ws/src/bumperbot_utils/src/safety_stop.cpp - Obstacle avoidance
Section10_SLAM/bumperbot_ws/src/bumperbot_controller - Speed monitoring
Section10_SLAM/bumperbot_ws/src/bumperbot_utils
Other components
- Robot operator
- Velocity commands
- Wheel states
- Wheel commands
- Odometry output
Connections 17
- Robot operator → Robot bringup: launches
- Robot bringup → Gazebo simulation: launches simulation
- Velocity commands → Drive and odometry: velocity input
Section10_SLAM/bumperbot_ws/src/bumperbot_controller/src/simple_controller.cpp - Wheel states → Drive and odometry: wheel feedback
Section10_SLAM/bumperbot_ws/src/bumperbot_controller/src/simple_controller.cpp - Drive and odometry → Wheel commands: publishes commands
Section10_SLAM/bumperbot_ws/src/bumperbot_controller/src/simple_controller.cpp - Drive and odometry → Odometry output: publishes odometry
Section10_SLAM/bumperbot_ws/src/bumperbot_controller/src/simple_controller.cpp - Drive and odometry → Hardware interface: commands hardware
- Hardware interface → Serial I/O: uses serial I/O
- IMU driver → IMU republisher: supplies IMU data
- LiDAR sensor → SLAM mapping: provides scans
- Odometry output → Robot localization: provides motion data
- Odometry output → Odometry model: provides wheel motion
- Robot localization → SLAM mapping: provides poses
- LiDAR sensor → Obstacle avoidance: supports avoidance
- Obstacle avoidance → Safety stop: requests stop
- Speed monitoring → Safety stop: monitors motion
- Robot description → Gazebo simulation: configures robot