- Ayshabi M K
- July 5, 2023
3D LiDAR SLAM – Loop Closure Explained
Introduction:
Robots are all equipped with simultaneous localization and mapping (SLAM) algorithms that help them build a map of its surroundings. For SLAM to produce reliable results, loop closure detection and correction are essential. This is done by recognizing previously visited areas or objects and updating its position and map as necessary. This blog article examines the idea of loop closure in 3D LiDAR SLAM algorithms and how it affects the performance of autonomous systems.
What is Loop Closure?
As shown in Fig.1, the robot’s path is shown with a black line, and the subset of robot’s positions are represented by triangles. The stars indicate recognizable features that could potentially lead to loop closures.
On the right side (Fig.1), the trajectory exhibits an error that arises from the accumulation of numerous small errors in estimating the robot’s position from one pose (triangle) to the next. Since the estimation of each subsequent pose relies on the estimation of the current pose, errors in previous estimations impact future estimations. It is important to note that certain trajectory segments may appear internally accurate, like the top right section correctly estimating a 90-degree left turn. However, due to preceding errors, these segments contribute to an increasing deviation from the ground truth.
On the left side of the diagram (Fig.1), a loop is detected, and a constraint is added to the optimization problem. This constraint represents the fact that the recognized feature (star) should appear in the same position in the global frame during its initial observation and subsequent observations. As a result, loop closure helps refine the following key features:
1. Localization Accuracy:
Reducing pose uncertainty and improving localization accuracy by correcting accumulated errors and drift, loop closure ensures that the estimated trajectory closely aligns with the actual path.
2. Map Refinement:
The quality of the generated map affects the overall understanding of the environment. Loop closure aids in refining the map by aligning overlapping regions and reducing inconsistencies. By merging information from different parts of the trajectory, loop closure improves the accuracy and consistency of the map, resulting in a more faithful representation of the environment.
3. Robustness to Dynamic Environments:
Real-world environments are often dynamic, with objects or scenes changing over time. Loop closure helps in handling these changes by differentiating between dynamic and static parts of the scene. By recognizing loop closures, the SLAM system can update the map, accordingly, ensuring that the generated map remains relevant and consistent despite environmental variations.
4. System Stability:
Without loop closure, SLAM algorithms can suffer from accumulated drift and errors, leading to unstable and unreliable performance. By periodically closing loops, the SLAM algorithm maintains a coherent trajectory and map representation. This stability ensures the long-term reliability of the system, especially in extended navigation scenarios.
Challenges of Loop Closure
Vision-based loop closure detection is a difficult task for long-term autonomous systems because of significant changes in viewpoint and appearance. When these systems revisit a location, they encounter variations in seasons, weather, lighting conditions, and viewpoints, as well as dynamic objects. These environmental changes pose challenges for robust place recognition. LiDAR, to some extent, can address these limitations as it is less affected by light and environmental changes compared to vision sensors. LiDAR provides a 360-degree field of view, unlike vision-based methods. However, research on LiDAR-based loop detection is relatively rare, possibly due to the high cost of LiDAR sensors, which limits their widespread use. Another reason is that LiDAR point clouds only contain geometric information, whereas images contain richer details. This makes place recognition a challenging problem when using point clouds.
Types of LiDAR based Loop Closure Detection
LiDAR-based loop detection can be broadly categorized into histogram-based and segmentation-based methods.
2.1. Histograms
Histograms are used to extract feature values from points in a point cloud map. These values are then encoded as descriptors using either global features or selected keypoints. One specific method called the normal distribution transform (NDT) histogram is used by these techniques. The NDT histogram represents the point cloud map using a compact set of normal distributions. In a study, the NDT histogram is applied to extract structural information from LiDAR scans by dividing them into overlapping cells. NDT is calculated for each cell, and histograms are created based on instances of specific classes of NDT within range intervals. To compare the histograms, the Euclidean distance metric is used. The study demonstrates that the structural information provided by the NDT histograms enhances the accuracy of the loop detection algorithm.
Histogram-based methods are effective in addressing two main challenges: handling large changes in viewpoint by being rotation-invariant and handling noise in spatial descriptors affected by the distance from LiDAR. However, these methods have a limitation in that they cannot capture the internal structure of a scene, which can lead to less distinctiveness and potentially false loop detections.
2.2 Segmentation
Loop detection methods that employ a point-cloud-segmentation approach focus on recognizing shapes or objects within the data. These methods typically involve a preprocessing step where the scene is segmented based on prior knowledge about the locations of objects. By segmenting the point cloud, these methods can create a more accurate representation of the scene, taking into account static and dynamic objects similar to how humans perceive their environment.
One advantage of segmentation-based techniques is their ability to compress the point cloud into distinctive features, which reduces the time required for matching and lowers the chances of false matches. Various segmentation methods have been proposed, including ground segmentation, cluster-all, and Gaussian process incremental sample consensus, among others.
An example of a segmentation-based approach is SegMatch, which uses the cluster-all method to segment the point cloud and extract features such as eigenvalue-based and shape histograms. However, SegMatch relies on real-time odometry for loop detection and may not perform well when using only the LiDAR sensor. The maps generated by SegMatch can also be less accurate.
Other studies have explored similar segmentation approaches to improve the robustness of loop closure detection by reducing noise and resolution effects. These methods encode topological information of segmented objects in the point cloud descriptors. However, the performance of these approaches may suffer if the segmentation information is insufficient.
Recent research proposes an optimized LiDAR odometry and mapping algorithm integrated with SegMatch-based loop detection to enhance robustness and pose optimization. False matches are addressed by applying ground plane constraints based on RANSAC. Another approach applies a coarse-to-fine strategy for loop detection, using lines, planes, and balls as coarse estimations instead of individual feature points. This reduces processing time while still enabling effective loop closure detection.
Overall, segmentation-based methods offer the advantage of better representing the scene and reducing the likelihood of false matches, but they also require careful segmentation and can be affected by limitations such as reliance on real-time odometry and potential degradation in map accuracy.
Deep Learning Based Loop Closure Detection
Recently, deep learning has been used in visual and LiDAR SLAM systems to improve truly-closed-loop detection. These deep learning-based methods are designed to be more reliable when faced with changing environmental conditions, seasonal variations, and obstacles caused by moving objects.
To make histogram-based loop detection methods faster and more accurate in LiDAR-based loop closing, Zaganidis et al. developed a local descriptor called NDT histogram using semantic information obtained from PointNet++. Another study implemented PointNetVLAD, which combines PointNet and NetVLAD, to create a global descriptor from 3D point cloud data. LocNet also used a deep network to generate a global representation of scan maps for place matching and loop detection.
In deep learning-assisted segment-based loop detection methods, SegMap generates segments of the environment while the robot navigates and passes them to a deep neural network to generate a signature for each segment and the loop detection is performed by comparing the segmented signatures.
Conclusion
As pointed out, loop closure allows the SLAM algorithm to improve the map, improve localization accuracy, and correct cumulative errors in the predicted trajectory. Loop closure is also prevalent in commercial applications such as robotics, terrestrial mapping, AR/VR, etc. where episodic memory-based spatial reconstruction is essential.
Ignitarium’s Robotics and Perception AI Software team brings expertise on enabling the software stack for Autonomous Navigation, SLAM, Localization, Path Planning and Perception, making reliable implementations a reality, hence driving up ROI for adopters in the long run.
References
- Video Source: 3D LiDAR-SLAM With Loop Closure
In the video, observe the robot’s movements as it drives through various locations. Suddenly, it encounters a familiar place and promptly recognizes it. This triggers a significant event known as loop closure. As a result, the robot proceeds to align the newly identified location with its existing map, resulting in the comprehensive update of the entire map. This process enables the robot to enhance its spatial understanding and refine its navigation abilities.