SLAM from Scratch: ROS 2 Navigation Stack for Turtlebot3
Authors: Conor Hayes
In this project, I implement a full ROS 2 navigation stack for the Turtlebot3 Burger differential drive mobile robot, including LiDAR SLAM, control, and simulation components, all built from scratch in C++. This means no external SLAM or kinematics libraries, no Gazebo simulation, just basic ROS 2 packages, armadillo for linear algebra, and my own implementations of the necessary algorithms and tools.
Highlights
- EKF (Extended Kalman Filter) SLAM implementation using LiDAR data + odometry for mapping and localization
- Custom data association + lidar clustering & classification based on circle fitting for landmark extraction
- Custom forward + inverse kinematics implementation (
turtlelib) for differential drive robot - Custom simulator (
nusim) with configurable arena and obstacles - Visualization + tooling in RViz for real-time robot state display in both simulation and hardware
- Deployment to real hardware (Turtlebot3 Burger) for testing in a physical environment
Tech Stack
- ROS 2 Kilted Kaiju
- C++23
- Turtlebot3 Burger
Packages
turtle_control: command and odometry pipeline for Turtlebot3nuturtle_description: URDF and RViz assets for multiple robot instancesturtlelib: SE(2), diff-drive kinematics, and SVG helpersnusim: RViz-based simulator for SLAM development
Acknowledgements
Big thanks to Dr. Matthew Elwin, who runs the MSR program at Northwestern, and teaches the course in which this project was developed (ME495: Sensing, Navigation, and Machine Learning).