Source-linked AI summary

RTAB-Map as an Open-Source Lidar and Visual SLAM Library for Large-Scale and Long-Term Online Operation

Mathieu Labbé, François Michaud

arXiv:2403.06341v1cs.RO

TL;DR

Autonomous-robot SLAM lacks straightforward comparisons across visual and lidar configurations under practical sensor and computation constraints. This paper extends RTAB-Map into a ROS-integrated, multi-sensor graph-SLAM library and uses it for such comparisons. The results identify sensor-dependent navigation trade-offs and practical boundaries for robust indoor operation.

  • Problem

    Comparing visual and lidar SLAM for a specific robot is difficult because approaches are usually modality-specific and practical requirements are not consistently addressed.

  • Method

    The paper extends RTAB-Map with external-odometry support, synchronized visual and lidar inputs, graph SLAM, memory management, and navigation-oriented map outputs.

  • Results

    The extended RTAB-Map produces results comparable to state-of-the-art visual and lidar SLAM approaches and supports direct configuration comparisons on real-robot datasets.

  • Takeaways & Limitations

    For indoor navigation, short-range sensors generally require proprioceptive odometry for robust operation, while sensor choice involves accuracy, field of view, obstacle detection, cost, and safety trade-offs.

  • Takeaways & Limitations

    Lidar odometry can be lost when ICP finds no transformation and must then be reset, although external odometry can enable recovery.

Abstract

from arXiv · show

Distributed as an open source library since 2013, RTAB-Map started as an appearance-based loop closure detection approach with memory management to deal with large-scale and long-term online operation. It then grew to implement Simultaneous Localization and Mapping (SLAM) on various robots and mobile platforms. As each application brings its own set of contraints on sensors, processing capabilities and locomotion, it raises the question of which SLAM approach is the most appropriate to use in terms of cost, accuracy, computation power and ease of integration. Since most of SLAM approaches are either visual or lidar-based, comparison is difficult. Therefore, we decided to extend RTAB-Map to support both visual and lidar SLAM, providing in one package a tool allowing users to implement and compare a variety of 3D and 2D solutions for a wide range of applications with different robots and sensors. This paper presents this extended version of RTAB-Map and its use in comparing, both quantitatively and qualitatively, a large selection of popular real-world datasets (e.g., KITTI, EuRoC, TUM RGB-D, MIT Stata Center on PR2 robot), outlining strengths and limitations of visual and lidar SLAM configurations from a practical perspective for autonomous navigation applications.

1 Introduction

RTAB-Map was extended to support practical visual, lidar, and mixed SLAM configurations for autonomous robots. The introduction motivates this extension through online computation, odometry, localization, map-generation, and comparative-evaluation requirements.

  • RTAB-Map evolution: RTAB-Map evolved from appearance-based loop-closure detection with memory management into a complete graph-based SLAM library for varied robot setups.It was released as open source in 2013 and became a cross-platform C++ library and ROS package.
  • Practical requirements: Online SLAM must bound processing delay because growing maps and competing robot modules can otherwise cause lag or unsafe situations.Graph optimization, loop-closure detection, map assembly, control, navigation, and obstacle avoidance all consume computation.
  • Practical requirements: Robust low-drift odometry is needed while exploring or traversing feature-poor areas where loop closures cannot immediately correct drift.Combining proprioceptive and exteroceptive sensors can improve odometry robustness when one sensing modality loses track.
  • Practical requirements: Robust localization must resist false positives and failures caused by dynamic environments, illumination changes, geometry changes, and repetitive scenes.Reliable revisitation recognition is required for loop closure and map correction.
  • Practical requirements: Practical mapping benefits from directly available 2D or 3D occupancy grids, mapping-to-localization workflows, and multi-session mapping.These capabilities support navigation integration, map-management efficiency, and startup without first localizing in a previously built map.
  • Evaluation gap: Comparing visual and lidar SLAM is difficult because approaches and benchmark datasets commonly use only one sensing modality, while robot-tested visual systems remain uncommon.The extended RTAB-Map enables comparative evaluations across configurations and datasets using a common system.

2 Popular SLAM Approaches Available on ROS

ROS provides a diverse set of open-source visual and lidar SLAM approaches with different inputs, outputs, mapping strategies, and practical constraints. The review situates these systems relative to RTAB-Map’s comparative scope and navigation-oriented outputs.

  • Lidar approaches: ROS-compatible lidar approaches include particle-filter, scan-matching, graph-based, and segment-matching systems with differing loop-closure and map-output capabilities.GMapping and TinySLAM use particle filters; Hector SLAM and ETHZASL-ICP-Mapper omit loop closures; graph-based systems optimize linked submaps.
  • Lidar approaches: Hector SLAM can create fast 2D occupancy grids with low computation resources, but it does not detect loop closures to correct previously accumulated map errors.It can use external sensors such as an IMU for 3D position estimation and does not require external odometry.
  • Lidar approaches: BLAM supports 3D lidar and local scan-matching loop closures, but local matching cannot appropriately register large loops.Its map is optimized using GTSAM after local loop-closure detection.
  • Visual approaches: Visual approaches range from visual-inertial graph systems and feature-based stereo methods to dense photometric, depth, and TSDF-volume reconstruction systems.Their requirements vary from cameras and IMUs to powerful Nvidia GPUs, while some provide dense point clouds or local TSDF maps.
  • Visual approaches: Many visual SLAM systems assume unobstructed cameras and sufficient visual features, assumptions that can fail when robots face occlusion, white walls, or other feature-poor surfaces.MCPTAM increases field of view with multiple cameras, while RGBDSLAMv2 can use external odometry and generate occupancy grids and dense point clouds.
  • Inputs and outputs: RTAB-Map and RGBDSLAMv2 are distinguished among the reviewed visual systems by providing out-of-the-box occupancy-grid outputs for autonomous navigation.Table 1 summarizes supported inputs and online outputs across popular ROS-compatible approaches.

3 RTAB-Map Description

RTAB-Map combines externally supplied odometry, synchronized camera and lidar inputs, graph-based mapping, loop closures, and memory management. Its outputs include corrected odometry and multiple map representations for navigation.

  • Inputs and pipeline: RTAB-Map accepts external 3DoF or 6DoF odometry, camera data with calibration, and optional 2D-lidar scans or 3D-lidar point clouds.Required inputs include sensor-to-base TF, odometry, and either RGB-D or stereo imagery; messages are synchronized before graph SLAM.
  • Inputs and pipeline: The Short-Term Memory module creates graph nodes containing odometry poses, raw sensor data, visual words, and local occupancy-grid information.Nodes are created at a configurable detection rate, while links encode neighboring, loop-closure, or proximity constraints.
  • Map outputs: RTAB-Map can assemble and publish OctoMap, dense point-cloud, and 2D occupancy-grid outputs, alongside map data and a data-free map graph.These outputs are available for integration with external robot modules.
  • Graph optimization: Loop-closure and proximity links constrain graph optimization, which reduces odometry drift and enables publication of corrected map-frame localization.The system publishes odometry correction through the /map→/odom transform.
  • Memory management: Memory management limits graph size so long-term online SLAM remains feasible in large environments while previously visited locations can be recalled incrementally.The mechanism runs on top of graph-management modules and supports extending the assembled map during revisitation.

3.1 Odometry Node

RTAB-Map separates odometry from mapping, allowing wheel, visual, lidar, or external odometry inputs. Its visual and lidar odometry nodes support frame/scan-to-frame/map variants with motion prediction, registration, refinement, and recovery mechanisms.

  • The Odometry Node accepts odometry from wheel encoders, IMUs, cameras, or lidars and provides the robot pose and TF transform to RTAB-Map.
  • Visual Odometry: Visual odometry supports RGB-D and stereo cameras through Frame-To-Frame and Frame-To-Map pipelines.F2F registers against the last keyframe, whereas F2M registers against a feature map.
  • Visual Odometry: Visual processing detects and matches features, predicts motion, estimates transformations with PnP RANSAC, refines poses, updates covariance, and maintains keyframes or feature maps.F2F uses optical flow, while F2M uses descriptor-based nearest-neighbor matching with NNDR.
  • Lidar Odometry: Lidar odometry supports Scan-To-Scan and Scan-To-Map registration for 2D scans or 2D/3D point clouds using ICP.Registration can use point-to-point or point-to-plane correspondences, with point-to-plane preferred in planar human-made environments.
  • Lidar Odometry: ICP can drift in geometrically simple corridors, so external motion prediction supplies unconstrained motion components when point-cloud complexity is insufficient.Under low structural complexity, ICP estimates orientation while external odometry provides position along the problematic direction.
  • Lidar Odometry: If ICP cannot estimate a transformation, lidar odometry is lost and normally requires reset, although external odometry can enable recovery.

3.2 Synchronization

RTAB-Map supports sensor streams with differing publication rates through ROS synchronization and requires accurate timing and coordinate transforms for reliable data registration.

  • RTAB-Map accepts RGB-D or calibrated stereo images with odometry, while laser scans and point clouds are optional inputs for occupancy grids and graph refinement.
  • Accurate TF relationships between sensors and the robot base are required for integrating the synchronized streams.
  • Exact synchronization matches messages with identical timestamps, whereas approximate synchronization aligns data from different sensors with minimum timestamp delay.

3.3 STM

STM computes local occupancy grids from depth, laser, or point-cloud data and assembles them into global maps. Parameter and sensor choices determine whether maps are 2D or 3D and trade memory, computation, and map flexibility.

  • When a new STM node is created, a local occupancy grid is computed from depth images, laser scans, or point clouds.
  • Local grids use empty, ground, and obstacle cells in the robot frame, with size determined by sensor range, field of view, and grid-cell resolution.
  • Grid/FromDepth, Grid/3D, and available inputs determine whether local occupancy grids are generated as 2D or 3D.2D grids use less memory but cannot generate a 3D global occupancy map.
  • 2D lidar mapping uses ray tracing to mark free cells between the sensor and detected obstacles.This approach is the default for 2D lidar-based mapping and is computationally fast.
  • Depth or stereo disparity is projected into 3D, filtered and segmented into ground and obstacles, then optionally projected onto the ground plane.
  • OctoMap performs 3D ray tracing for local grids when 3D occupancy mapping is selected.

3.4 Loop Closure and Proximity Detection

RTAB-Map combines visual bag-of-words loop closure detection with lidar-based proximity detection to recognize revisited locations under complementary sensing conditions.

  • Loop Closure Detection: Loop closure detection extracts visual features from RGB images and quantizes them into an incremental bag-of-words vocabulary.Supported feature types include SURF, SIFT, ORB, and BRIEF.
  • Proximity Detection: Proximity detection uses laser scans to localize nodes near the current position, including revisits where visual loop closure may fail.Its complexity is bounded by nearby nodes rather than the entire working-memory size.

3.5 Graph Optimization

RTAB-Map applies graph optimization after loop closures, proximity detections, or memory-management changes, while rejecting links whose optimized transformations exceed a configured error threshold. It supports TORO, g2o, and GTSAM, which trade convergence speed, robustness, and optimization quality differently.

  • Graph optimization is applied after loop closures, proximity detections, or memory-management changes to minimize map errors.
  • TORO, g2o, and GTSAM are the three graph optimization approaches integrated into RTAB-Map.
  • g2o and GTSAM converge faster than TORO but are less robust when multiple independent graphs must be merged for multi-session mapping.
  • For single-map optimization, empirical results favor g2o and GTSAM over TORO, particularly for 6DoF maps; GTSAM is slightly more robust to multi-session mapping and is now the default.
  • RTAB-Map rejects newly added loop-closure and proximity links when optimized transformation changes exceed RGBD/OptimizeMaxError times the link’s translational variance.

3.6 Global Map Assembling

RTAB-Map assembles global maps from local occupancy grids transformed according to the graph’s optimized poses. The available outputs and assembly trade-offs depend on whether nodes store 3D or already projected 2D grids.

  • 3D local occupancy grids provide the most flexibility because they can generate all supported global map types.
  • Storing projected local grids saves memory and assembly time when only a 2D global occupancy grid is required.The passage specifies two numbers per point instead of three and notes that points are already projected to 2D.
  • Each local occupancy grid is transformed to its graph pose, then combined into the global occupancy grid by clearing and adding obstacles as nodes arrive.
  • After loop closure, the global map is reassembled using optimized node poses so previously cleared obstacles can be reincluded.
  • Point-cloud outputs combine local-map points in ROS PointCloud2 format and use voxel-grid filtering to merge overlapping surfaces.

4 Evaluating Trajectory Performance of RTAB-Map Using Different Sensor Configurations

RTAB-Map is evaluated across diverse datasets and sensor configurations, comparing trajectory accuracy, drift, computation time, and online navigation suitability. Results show strong configuration-dependent trade-offs between visual, lidar, wheel-IMU, and visual-inertial approaches.

  • Evaluation setup: Four ground-truth datasets evaluate RTAB-Map across stereo, RGB-D, 2D lidar, 3D lidar, and combined wheel-IMU odometry configurations.The datasets are KITTI, TUM RGB-D, EuRoC, and the PR2 MIT Stata Center.
  • KITTI: ORB2-RTAB performs best in 10 of 11 KITTI sequences on average translational error, while lidar performance varies with scene geometry.Lidar performs better on three sequences, but performs worse on the highway sequence because of pitch-estimation errors; visual features farther than lidar range help estimate pitch.
  • TUM RGB-D: ORB2-RTAB scores best in six of seven TUM sequences, while fast camera motion exposes synchronization-related depth and motion-estimation errors.The paper attributes higher errors in the fast-moving fr1 sequence to poor RGB-depth synchronization.
  • EuRoC: ORB2-RTAB performs best on six of 11 EuRoC sequences, but OKVIS and MSCKF are the only approaches tracking the entire V2-03-difficult sequence.Fast motion and motion blur make feature tracking difficult for other approaches; Fovis, F2F, and MSCKF are the only real-time approaches under 50 msec.
  • MIT Stata Center: Long-range lidar configurations achieve the lowest ATEend and ATEmax on the MIT Stata Center sequences, with similar results for S2M and S2S.ATEmax indicates odometry-drift suitability for navigation, while ATEend reflects final-map representation; WheelIMU combines wheel encoders and IMU measurements with an Extended Kalman Filter.
  • Computation and navigation: Lidar odometry is faster than visual odometry, while WheelIMU→S2M offers navigation benefits by supplying higher-rate odometry to other ROS modules.This can improve local-costmap updates compared with using WheelIMU alone, even when accuracy is similar.

5 Evaluating Computation Performance between Visual and Lidar SLAM Configurations with RTAB-Map

RTAB-Map supports multiple occupancy-grid configurations whose sensor and ray-tracing choices affect computation, memory use, map quality, and real-time operation. Memory management keeps processing bounded in large-scale mapping, though the online global map may remain local to the robot.

  • Occupancy-grid configurations: Occupancy-grid configurations derived from GFD, G3D, and GRT vary with sensor and approach, affecting computation time, memory usage, and map quality.Table 10 lists the possible configurations for local and global occupancy-grid generation.
  • Occupancy-grid configurations: Lidar-based grids provide a larger field of view, while RGB-D grids can detect some obstacles that lidar misses, such as a yellow chair.RGB-D obstacle accuracy decreases beyond 5 m.
  • Occupancy-grid configurations: Lidar-based global maps give the most accurate geometry at lidar height, while RGB-D maps follow; stereo maps improve when ray tracing adds empty space.Without ray tracing, stereo disparity struggles with textureless ground and may produce noisy or missing walls.
  • Occupancy-grid configurations: Lowering OctoMap tree depth increases cell size and reduces resolution, which can support faster path planning.Tree depth 16 corresponds to 5 cm cells in the RGB-D example.
  • Memory management: At a 2 Hz map-update rate, WheelIMU→S2M without memory management exceeds the 500 msec real-time limit on some updates.The timing comparison evaluates RTAB-Map’s modules with and without memory management on combined MIT Stata Center sessions.
  • Memory management: With memory management, WheelIMU→S2M satisfies real-time constraints throughout the experiment, adding an average 52 msec node-transfer overhead while reducing other graph-dependent processing.The resulting online global occupancy grid does not always represent the full environment visited.

6 Discussion

The discussion positions RTAB-Map as a practical platform for comparing visual and lidar configurations on the same system and for evaluating sensor suitability in navigation. It also identifies environment-dependent strengths, failure modes, and remaining visual-dependence limitations.

  • Practical comparison: RTAB-Map produces trajectory results comparable to state-of-the-art visual- and lidar-based SLAM while enabling same-system comparisons for robot prototyping.The paper describes this as an experimental comparison of lidar versus visual configurations on the same system.
  • Practical comparison: Live comparisons can reveal limitations inherent to a chosen sensor when combined with standard navigation tools such as ROS’s navigation stack.This connects comparative evaluation with practical autonomous-navigation integration.
  • Sensor choice: Without a long-range lidar, proprioceptive odometry from sensors such as an IMU or wheel encoders is described as mandatory for robust indoor autonomous navigation.Short-range sensors may lose localization in visually textureless or dark areas, empty spaces, or low-complexity corridors.
  • Limitations and future work: RTAB-Map’s motion estimation is primarily visual, so lidar refinement cannot provide motion estimation when visual estimation fails.The paper proposes tighter visual-geometry coupling as future work.
  • Sensor choice: Stereo cameras provide slightly better localization accuracy, whereas RGB-D cameras are preferred for detecting textureless obstacles during avoidance.Lidar offers a field-of-view advantage for low-drift navigation, while RGB-D can be more cost-effective.
  • Limitations and future work: Lower odometry drift shortens localization recovery after the robot changes course and returns to its planned path.The discussion identifies ATEmax as important for navigation because it captures this drift-related recovery behavior.

7 Conclusion

The extended RTAB-Map integrates diverse sensors and ROS functionality into a multi-purpose graph-based SLAM system. It is intended for out-of-the-box use and prototyping across robot platforms with different sensor and processing configurations.

  • Conclusion: The extended RTAB-Map integrates ROS tf handling, synchronization for RGB-D, stereo, laser-scan, and point-cloud topics, and occupancy-grid generation for all sensors.These capabilities support a multi-purpose graph-based SLAM approach.
  • Conclusion: RTAB-Map can be used out of the box by novice SLAM users and for prototyping on robots with different sensor configurations and processing capabilities.The conclusion presents the system as a practical integration and experimentation tool.
Loading 2403.06341v1…