2D Pose Graph LiDAR Based SLAM

System Overview

Our SLAM system uses LiDAR information, and a data structure called a "pose graph" to iteratively build a map of an unknown environment. We also employ a process called "loop closure detection" to correct errors in sensor measurements, by recognizing when the robot has returned to a location it has previously visited. We bring all these pieces together into a single system that runs in realtime on a TurtleBot4. When the system is run, the robot generates a 2D grid map of its enviroment (see results below for more).

A process diagram of our whole SLAM system for realtime LiDAR mapping on the TurtleBot4.

The Basics

LiDAR detectors on the robot give us 2D scans of the robot's environment (the points on the right in the image below shows what this data looks like). Our general mapping approach is to drive the robot around an environment, taking many LiDAR scans (approximately one scan every time the robot moves more than 5cm). Using odometry sensors (wheel rotation sensors that calculate how far the robot has moved), we can then "draw" each LiDAR scan on a "canvas", centered around where the robot thinks it was when it took that scan. The result is a map, consisting of many many points (from the many many LiDAR scans).

Under the hood, the robot maintains a graph whose vertices represent discrete robot locations over time (this is functionally equivalent to this idea of drawing all the LiDAR scans on a canvas). As we explain in the following secetion, this graph is constantly updated and optimized as the robot drives around.

The robot takes a LiDAR scan (left) and overlays it on top of its most recent pose (right, blue X) to update the map (right, red points).

Loop Closure

As our robot moves around, the map it builds accumulates error because the odometry sensors are not 100% accurate. We call this problem "drift." To combat drift, we need for our robot to be able to detect when its internal pose graph is inaccurate. We do this by comparing the LiDAR scans of poses in a process called point cloud registration. This process allows for the robot to derive the relative difference in poses between the scans. Then, the robot can introduce this information into its pose graph -- essentially accounting for sensor inaccuracies. Put in very simple terms, the robot can detect how much error it accumulated while moving around, and re-evaluate the actual pose.

After the corrected pose information is added to the graph, we use a process called graph optimization (specifcally Gauss-Newton optimization) to update the graph. Graph optmization -- on a very high level -- moves all of the nodes and edges in the pose graph around to account for all of the robots observations about its enviroment (both from odometry and point cloud registration).

A visual example of how the robots map of the world (right) can differ from the actual state of its enviroment (left) because of drift.
By comparing LiDAR scans between poses, the robot can update its understanding of the world (the pose graph) to more closely align with reality.

Results

To review, our sytem does three things constantly: (1) maps and localizes, (2) detects errors in the map it's making and (3) corrects those errors (when possible).

Here's what it looks like running our SLAM implementation in real time on a TurtleBot4, as we drove it around Carleton College's Computer Science Deparment (in the 3rd floor of Olin Hall)

.
In this video you can see the robot poses (blue dots) and points from LiDAR scans (red dots) accumulating in realtime, as it was driven around Olin.

When it's time to create a final map, we draw a grid over the accumulated LiDAR scan points. We initalize all cells as "empty". If there are enough points in any one cell, we update that cell to "occupied". The resulting grid is what we call an "occupancy grid", and functions as the final map our SLAM system outputs.

The occupancy grid map (with added labels) generated from the test run shown in the above video.

Works Cited

Bosse, Michael, and Robert Zlot. 2008. β€œMap Matching and Data Association for Large-Scale Two-Dimensional Laser Scan-Based SLAM.” The International Journal of Robotics Research 27(6): 667–91. doi:10.1177/0278364908091366.
Grisetti, G, R Kummerle, C Stachniss, and W Burgard. 2010. β€œA Tutorial on Graph-Based SLAM.” IEEE Intelligent Transportation Systems Magazine 2(4): 31–43. doi:10.1109/MITS.2010.939925.
Hess, Wolfgang, Damon Kohler, Holger Rapp, and Daniel Andor. 2016. β€œReal-Time Loop Closure in 2D LIDAR SLAM.” In 2016 IEEE International Conference on Robotics and Automation (ICRA), Stockholm, Sweden: IEEE, 1271–78. doi:10.1109/ICRA.2016.7487258.
Kummerle, Rainer, Giorgio Grisetti, Hauke Strasdat, Kurt Konolige, and Wolfram Burgard. 2011. β€œG2o: A General Framework for Graph Optimization.” In 2011 IEEE International Conference on Robotics and Automation, Shanghai, China: IEEE, 3607–13. doi:10.1109/ICRA.2011.5979949.
Tee, Yi Kiat, and Yi Chiew Han. 2021. β€œLidar-Based 2D SLAM for Mobile Robot in an Indoor Environment: A Review.” In 2021 International Conference on Green Energy, Computing and Sustainable Technology (GECOST), , 1–7. doi:10.1109/GECOST52368.2021.9538731.