Top Related Projects
Real-Time SLAM for Monocular, Stereo and RGB-D Cameras, with Loop Detection and Relocalization Capabilities
A Modular and Multi-Modal Mapping Framework
Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.
Index repo for Kimera code
GTSAM is a library of C++ classes that implement smoothing and mapping (SAM) in robotics and vision, using factor graphs and Bayes networks as the underlying computing paradigm rather than sparse matrices.
Quick Overview
RTAB-Map (Real-Time Appearance-Based Mapping) is an open-source library for SLAM (Simultaneous Localization and Mapping) in robotics and computer vision. It provides real-time 3D mapping and localization capabilities, supporting various sensors and platforms, including RGB-D cameras, stereo cameras, and LiDAR.
Pros
- Versatile and supports multiple sensor types and platforms
- Real-time performance with efficient loop closure detection
- Extensive documentation and active community support
- Integration with popular robotics frameworks like ROS
Cons
- Steep learning curve for beginners
- Resource-intensive for large-scale mapping
- Limited support for some specialized sensors
- Dependency on external libraries may complicate setup
Code Examples
- Initialize RTAB-Map:
#include <rtabmap/core/Rtabmap.h>
rtabmap::Rtabmap rtabmap;
rtabmap::ParametersMap parameters;
parameters.insert(rtabmap::ParametersPair(rtabmap::Parameters::kMemRehearsalSimilarity(), "0.6"));
rtabmap.init(parameters);
- Process RGB-D data:
#include <rtabmap/core/util3d.h>
cv::Mat rgb = cv::imread("rgb.png");
cv::Mat depth = cv::imread("depth.png", cv::IMREAD_UNCHANGED);
rtabmap::SensorData data(rgb, depth, rtabmap::CameraModel());
rtabmap.process(data);
- Retrieve and save the map:
std::map<int, rtabmap::Signature> nodes;
std::map<int, rtabmap::Transform> poses;
std::multimap<int, rtabmap::Link> links;
rtabmap.get3DMap(nodes, poses, links);
rtabmap::savePoses("map_poses.txt", poses);
Getting Started
-
Install dependencies:
sudo apt-get install libpcl-dev libopencv-dev liboctomap-dev
-
Clone and build RTAB-Map:
git clone https://github.com/introlab/rtabmap.git cd rtabmap && mkdir build && cd build cmake .. make sudo make install
-
Include RTAB-Map in your project:
#include <rtabmap/core/Rtabmap.h> // ... (see code examples above for usage)
Competitor Comparisons
Real-Time SLAM for Monocular, Stereo and RGB-D Cameras, with Loop Detection and Relocalization Capabilities
Pros of ORB_SLAM2
- Highly efficient and accurate visual SLAM system
- Supports monocular, stereo, and RGB-D cameras
- Lightweight and suitable for real-time applications on CPU
Cons of ORB_SLAM2
- Limited to visual data, no integration with other sensor types
- Lacks built-in loop closure and global optimization features
- Less active development and community support
Code Comparison
ORB_SLAM2 (C++):
// Feature extraction and matching
void Frame::ExtractORB(int flag, const cv::Mat &im)
{
(*mpORBextractor)(im,cv::Mat(),mvKeys,mDescriptors);
}
RTAB-Map (C++):
// Feature extraction and matching
void Feature2D::detectAndCompute(
const cv::Mat & image,
std::vector<cv::KeyPoint> & keypoints,
cv::Mat & descriptors)
{
detector_->detect(image, keypoints);
extractor_->compute(image, keypoints, descriptors);
}
Both repositories use similar approaches for feature extraction and matching, but RTAB-Map offers more flexibility with separate detector and extractor objects.
A Modular and Multi-Modal Mapping Framework
Pros of maplab
- Designed for multi-session mapping and localization
- Supports visual-inertial odometry and loop closure
- Includes tools for map management and optimization
Cons of maplab
- Steeper learning curve due to complex architecture
- Less active community and development compared to RTAB-Map
- Limited support for RGB-D sensors
Code Comparison
maplab:
vi_map::VIMap map;
vi_map::MissionId mission_id;
map.addNewMissionWithBaseframe(mission_id, T_G_M, aslam::Time(0));
RTAB-Map:
rtabmap::Rtabmap rtabmap;
rtabmap::ParametersMap parameters;
parameters.insert(rtabmap::ParametersPair(rtabmap::Parameters::kMemRehearsalSimilarity(), "0.6"));
rtabmap.init(parameters, "DatabasePath");
Both repositories offer robust SLAM solutions, but maplab focuses on multi-session mapping and visual-inertial odometry, while RTAB-Map provides a more user-friendly approach with broader sensor support. RTAB-Map is generally easier to integrate into existing projects, while maplab offers advanced features for specific use cases in robotics and autonomous systems.
Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.
Pros of Cartographer
- Optimized for real-time performance, especially in large-scale environments
- Supports both 2D and 3D mapping with various sensor configurations
- Provides robust loop closure detection and global optimization
Cons of Cartographer
- Steeper learning curve and more complex setup process
- Less extensive documentation and community support
- Limited integration with other robotics frameworks compared to RTAB-Map
Code Comparison
RTAB-Map (C++):
rtabmap::Rtabmap rtabmap;
rtabmap::ParametersMap parameters;
parameters.insert(rtabmap::ParametersPair(rtabmap::Parameters::kMemRehearsalSimilarity(), "0.6"));
rtabmap.init(parameters, "MyDatabase.db");
Cartographer (C++):
auto map_builder = cartographer::mapping::CreateMapBuilder(map_builder_options);
auto trajectory_builder = map_builder->AddTrajectoryBuilder(
trajectory_options, [](const int trajectory_id, const cartographer::common::Time time,
const cartographer::transform::Rigid3d& local_pose) {});
Both repositories offer powerful SLAM solutions, with RTAB-Map providing a more user-friendly experience and extensive features, while Cartographer excels in real-time performance and large-scale mapping. The choice between them depends on specific project requirements and user expertise.
Index repo for Kimera code
Pros of Kimera
- Focuses on real-time visual-inertial odometry and SLAM, offering high-performance solutions for robotics and AR/VR applications
- Implements a modular architecture, allowing easy integration of different components and algorithms
- Provides a comprehensive suite of tools for 3D reconstruction, including mesh generation and semantic mapping
Cons of Kimera
- Less mature and less widely adopted compared to RTAB-Map
- May have a steeper learning curve due to its more specialized focus
- Limited documentation and community support compared to RTAB-Map
Code Comparison
RTAB-Map (C++):
rtabmap::Rtabmap rtabmap;
rtabmap::ParametersMap parameters;
parameters.insert(rtabmap::ParametersPair(rtabmap::Parameters::kMemRehearsalSimilarity(), "0.6"));
rtabmap.init(parameters, "MyDatabase.db");
Kimera (C++):
KimeraVIO::Pipeline vio_pipeline(FLAGS_params_folder + "/params");
vio_pipeline.spinOnce();
const gtsam::Pose3& latest_pose = vio_pipeline.getCurrentPose();
Both repositories offer powerful SLAM solutions, with RTAB-Map providing a more general-purpose approach and Kimera focusing on visual-inertial odometry. RTAB-Map has broader adoption and documentation, while Kimera offers specialized features for real-time applications.
GTSAM is a library of C++ classes that implement smoothing and mapping (SAM) in robotics and vision, using factor graphs and Bayes networks as the underlying computing paradigm rather than sparse matrices.
Pros of GTSAM
- Focuses on factor graph optimization, providing a powerful framework for various robotics and computer vision problems
- Offers a wide range of probabilistic inference algorithms and tools
- Highly modular and extensible design, allowing for easy integration into existing projects
Cons of GTSAM
- Steeper learning curve due to its more abstract and mathematical nature
- Less out-of-the-box functionality for complete SLAM solutions compared to RTAB-Map
- Requires more manual setup and configuration for specific use cases
Code Comparison
GTSAM example (factor graph creation):
#include <gtsam/nonlinear/NonlinearFactorGraph.h>
#include <gtsam/nonlinear/Values.h>
#include <gtsam/slam/PriorFactor.h>
#include <gtsam/slam/BetweenFactor.h>
gtsam::NonlinearFactorGraph graph;
gtsam::Values initialEstimate;
RTAB-Map example (basic usage):
#include <rtabmap/core/Rtabmap.h>
#include <rtabmap/core/RtabmapThread.h>
rtabmap::Rtabmap rtabmap;
rtabmap::ParametersMap parameters;
rtabmap.init(parameters, "DatabasePath");
Both repositories provide powerful tools for SLAM and mapping, but GTSAM offers a more flexible and general-purpose optimization framework, while RTAB-Map provides a more complete out-of-the-box SLAM solution.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
rtabmap
RTAB-Map library and standalone application.
- For more information (e.g., papers, major updates), visit RTAB-Map's home page.
- For installation instructions and examples, visit RTAB-Map's wiki.
To use RTAB-Map under ROS, visit the rtabmap page on the ROS wiki.
Acknowledgements
This project is supported by IntRoLab - Intelligent / Interactive / Integrated / Interdisciplinary Robot Lab, Sherbrooke, Québec, Canada.
CI Latest
Linux | |
Windows |
ROS Binaries
ros-$ROS_DISTRO-rtabmap
ROS 1 | Noetic | |
ROS 2 | Humble | |
Iron | ||
Rolling | ||
Docker | rtabmap |
Top Related Projects
Real-Time SLAM for Monocular, Stereo and RGB-D Cameras, with Loop Detection and Relocalization Capabilities
A Modular and Multi-Modal Mapping Framework
Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.
Index repo for Kimera code
GTSAM is a library of C++ classes that implement smoothing and mapping (SAM) in robotics and vision, using factor graphs and Bayes networks as the underlying computing paradigm rather than sparse matrices.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot