This repository builds feature-based EKF SLAM on Turtlebot3 from scratch. The demo below shows the algorithm in action (2x speed).
- Trajectories
- The pink path shows the odometer estimated path.
- The green path is the groundtruth.
- Yello path is SLAM results.
- Landmarks
- Blue landmarks are groundtruth.
- Green landmarks are measurements.
- Indigo landmarks show where the SLAM algorithm thinks their positions are.
The figure below shows the result of the landmark detection algorithm using a 2D laser scanner:
The system has the following major components:
- A 2D Lie Group library for differential drive robots with complete unit testing
- A waypoint following feedback controller
- Turtlebot3 URDF built from scratch for Gazebo simulation
- Gazebo plugins to control the robot and return the groundtruth data for evaluation
- An odometer that estimates robot states based on encoder reading
- Turtlebot3 interface that controls the motors with given velocity command
- Feature detection algorithm that identifies landmarks using a 2D laser scanner
- EKF SLAM algorithm that estimates robots states
A detailed description can be found in my portfolio.
Six packages are in this repository.
nuturtle_descriptiondevelops Turtlebot3 URDF, and visualizes the wheeled robot inRviznuturtle_gazeboincludes Gazebo plugins to simulate the robot inGazebonuturtle_robotimplements the Turtlebot3 interface, and includes the test node for the odometer on the real robotnuturtle_slamincludes the feature detection algorithm and the EKF SLAM algorithmtsimimplements the waypoints following feedback controllerrigid2dis the 2D Lie Group library, including SO(2), SE(2) calculations, the odometer, and the fake encoder
nuturtle_description/launch/view_diff_drive.launchlaunches the URDF model inRviznuturtle_robot/launch/test_waypoint.launchdrives the robot through waypoints using the fake encoder with visualization inRviz- Service
/start_waypointwould start the movement
- Service
nuturtle_gazebo/launch/diff_drive_gazebo.launchdrives the robot through waypoints inGazebosimulationnuturtle_slam/launch/landmarks.launchlaunches the landmark detection algorithm with visualization inRviznuturtle_slam/launch/slam_in_control.launchlaunches the actual SLAM algorithmRvizvisualization is inmapframe- Pink path shows the odometer estimated path.
- Green path is the groundtruth.
- Yello path is SLAM results.
- Blue landmarks are groundtruth.
- Green landmarks are measurements.
- Indigo landmarks show where the SLAM algorithm thinks their positions are.
- ROS Melodic (Link)
- Eigen (Official Site)
- Install all the dependencies
forkthis repository, then clone the package usingwstoolrosinstallfile is included in the repository
- Build the package using
catkin_make - Use
roslaunch nuturtle_slam slam_in_controlto launch the SLAM algorithm
- Data association is currently assumed to be known. SLAM with unknown data association can be achieved by calculating the Mahalanobis Distance

