Feature-based Kalman Filter SLAM in ROS
Overview
This project was done as a collection of homework assignments for ME 495 Sensing, Navigation, and Machine Learning For Robotics at Northwestern. The task was to build a several ROS packages to implement control and SLAM (simultaneous localization and mapping) for a turtlebot3 burger robot. The repo is not made available since this is class homework.
Package list
This repository consists of several ROS packages.
nuturtle_description
- contains URDF files, meshes, and launch file for launching and displaying the turtlebot3 burger in rviz.rigid2d
- a package for odometry of a differential drive robot, with a library for rigid body transformations in SE(2),trect
- a package for controlling a turtlesim turtle to move along a rectangular path.nuturtle_robot
- a package for interfacing with a physical turtlebot3 burger robot. Contains launch files for launching remote nodes, and theturtle_interface_node
for low-level commands.nurtlesim
- a package that provides a simulator for the turtlebot and SLAM in rviznuslam
- a package that implements Feature-Based Kalman Filter SLAM for the turtlebot.
Description of packages
rigid2d
- Rigid 2D transformation Library
A library for handling transformations in SE(2), as well as handling odometry calculations for a differential drive robot. See this document for derivations of equations used in the diff_drive.cpp
library implementation file.
Library implementation files
rigid2d.cpp
- usage: include
rigid2d/rigid2d.hpp
- 2D rigid body transformations
- usage: include
diff_drive.cpp
- usage: include
rigid2d/diff_drive.hpp
- kinematics of a differential drive robot
- usage: include
Nodes
rigid2d_fake_turtle_node
infake_turtle.cpp
rigid2d_odometer_node
inodometer.cpp
nuturtle_robot
- turtlebot3 low-level controller
This package provides functionality to interface with low-level commands on the turtlebot, as well as launch files to start basic nodes on the turtlebot to allow interfacing with ROS.
Circle path test After following a clockwise and counterclockwise circluar path several times and stopping at the initial position, the odometry location of the robot was (0.2667, 0.13376, -3.683e-03).
nurtlesim
- simulator for turtlebot3 burger in tube world in rviz
This packages provides a simulator for the turtlebot and slam in rviz. The simulator simulates the robot kinematics and a sensor that detects the relative x, y positions of landmarks and a landmark id. Landmarks are modelled as tubes (approx 10cm diameter cylinders).
nuslam
- Feature-based SLAM
This package implements Feature-Based Kalman Filter SLAM for a turtlebot in the nurtlesim
simulation. It also provides a library for handling the SLAM algorithm calculations for a differential drive robot.
Library implementation files
nuslam_lib.cpp
- usage: include
nuslam/nuslam_lib.hpp
- Feature-based Kalman Filter SLAM calculation helper functions
- Data association using mahalanobis distance
- A maximum of 10 landmarks can be stored
- usage: include
circle_fitting.cpp
- usage: include
nuslam/circle_fitting.hpp
- Circle fitting with circle regression
- Circle classification
- usage: include
Nodes
nuslam_node
inslam.cpp
- SLAM with known data associationlandmarks_node
inlandmarks.cpp
- circle fitting and classificationnuslam_unknown_node
inslam_unknown.cpp
- SLAM with unknown data association
Demonstration of SLAM with known data association
- The robot was driven around in simulation such that all the landmarks were encountered during the run.
- ground truth landmarks are shown in white
- landmarks detected by the sensor are shown in red
- landmarks according to slam (the map) are shown in blue
- trajectory of the actual robot is shown in green
- trajectory of the robot according to SLAM is shown in orange
- trajectory of the robot according to odometry is shown in white
- turtle (actual turtle position frame)
The result for default R and Q is shown:
Top view:
Perspective view:
Demonstration of Slam with unknown data association
- The robot was driven around in simulation such that all the landmarks were encountered during the run.
- robot is driven at max linear speed 0.01m/s and max angular speed 0.1rad/s
- ground truth landmarks are shown in white
- landmarks detected by the sensor are shown in red
- landmarks according to slam (the map) are shown in blue
- trajectory of the actual robot is shown in green
- trajectory of the robot according to SLAM is shown in orange
- trajectory of the robot according to odometry is shown in white
- turtle (actual turtle position frame)
A screencast of the robot driving around in the environment is shown: