RTAB-Map Documentation

repository·master·Indexed 26 days ago

https://github.com/introlab/rtabmap

A library and standalone application for real-time loop closure detection and mapping used in robotics. It includes tools for 2D and 3D pose graph optimization using Ceres, camera calibration (rtabmap-calibration), camera testing (rtabmap-camera, CameraRGBD), and IMU filtering. RTAB-Map supports integration with ROS (Noetic, Humble, Jazzy, Kilted, Lyrical, and Rolling) and provides Docker environments for reproducing SLAM results on KITTI, EuRoC, and TUM datasets.

Tokens
15.5K
Snippets
20
Records
94
Agent score
84%

What's inside RTAB-Map

  1. Use IMU filters for orientation estimation

    master

    The imufilter module provides two primary filters for fusing IMU data (angular velocities, accelerations, and optionally magnetic readings) into an orientation:

    • MadgwickFilter: Fuses sensor readings into an orientation. Note: This filter is licensed under GPL.
    • ComplementaryFilter: Fuses sensor readings into an orientation quaternion using a complementary fusion approach. This filter is licensed under BSD.
  2. Run dataset processing scripts

    master

    Use the provided shell scripts to run the SLAM processing. Results are written to results/euroc, results/kitti, and results/tum subfolders.

    Note: Running all datasets with all odometry approaches can take over 10 hours. You can modify run_all.sh to limit the scope.

    • Process all datasets: ./run_all.sh
    • Process KITTI sequence 07 with F2M odometry: ./run_kitti_datasets.sh f2m 0 0 07
  3. Run the Pose Graph 2D optimizer

    master

    The pose_graph_2d executable solves 2D pose graph optimization problems using Ceres. It accepts problem definitions in the g2o format.

    When run, the executable prints the Ceres solver summary to the console and generates two output files:

    • poses_original.txt: The initial poses before optimization.
    • poses_optimized.txt: The optimized poses.

    Each output file contains poses in the following format, sorted by pose_id in ascending order:

    pose_id x y yaw_radians
    /path/to/bin/pose_graph_2d --input /path/to/dataset/dataset.g2o
  4. Install RTAB-Map for ROS

    master

    To use RTAB-Map within the Robot Operating System (ROS), you can install the corresponding ROS binaries. The package name follows the pattern ros-$ROS_DISTRO-rtabmap.

    Available ROS distributions include:

    • ROS 1: Noetic
    • ROS 2: Humble, Jazzy, Kilted, Lyrical, and Rolling

    For detailed installation instructions and examples, refer to the RTAB-Map wiki. For ROS-specific integration, visit the ROS wiki page.

  5. Run the Pose Graph 3D optimizer

    master

    The pose_graph_3d executable performs 3D pose graph optimization using Ceres. It accepts problem definitions in the g2o format that use quaternions for orientation.

    Upon completion, the tool prints a Ceres solver summary and generates two files:

    • poses_original.txt: The initial poses.
    • poses_optimized.txt: The optimized poses.

    Both files follow this format (sorted by pose_id in ascending order):

    pose_id x y z q_x q_y q_z q_w
    /path/to/bin/pose_graph_3d --input /path/to/dataset/dataset.g2o
  6. Set up the JFR 2018 reproduction Docker environment

    master

    This Docker image is used to reproduce the results presented in the paper "RTAB-Map as an Open-Source Lidar and Visual SLAM Library for Large-Scale and Long-Term Online Operation" (Labbé and Michaud, 2018) for KITTI, EuRoC, and TUM datasets.

    You can either pull the pre-built image or build it locally from the provided Dockerfile.

    # Pull the pre-built image
    docker pull introlab3it/rtabmap:jfr2018
    
    # Or build it locally
    cd rtabmap/docker/jfr2018
    docker build -t introlab3it/rtabmap:jfr2018 .
  7. Organize datasets for JFR 2018 reproduction

    master

    To use the reproduction scripts, you must organize your datasets in a datasets subfolder relative to the scripts. The directory structure must follow this pattern:

    datasets/
      kitti/
        devkit
        dataset/sequences/00
        ...
      euroc/
        MH_01_easy
        ...
      tum/
        rgbd_dataset_freiburg1_desk
        ...
    
    run_all.sh
    run_kitti_datasets.sh
    run_euroc_datasets.sh
    run_tum_datasets.sh