How introlab/rtabmap works
Main Components
• Core SLAM Engine: Represented by the “corelib” directory, this is the heart of the system where the SLAM algorithms, data capture, sensor fusion, odometry, loop closure detection, graph optimization, and mapping are implemented.
• Sensor Input Modules: Indicate how various sensor types are supported (cameras – RGB, depth, stereo; lidars; IMU, etc.). Subdirectories in “corelib” (e.g., camera, odometry, lidar, imufilter) show these integrations.
• Data Storage and Database: Highlight the support for map storage and database interactions (for example, the use of SQLite in corelib, the backward compatibility SQL files, and database schema resources).
• User Interfaces:
– Desktop GUI: “guilib” forms the front-end for desktop interaction and visualization.
– Mobile Interfaces: “app/android” and “app/ios” show native mobile applications that utilize the same core.
– ROS Nodes and Integration: Mention the ROS package (as per the README and ROS binary instructions).
• Utility Tools and Examples: The “tools”, “examples”, and “utilite” directories contain utilities for calibration, data recording, visualization, and testing of functions.
• Build and Deployment Infrastructure: Notice the CMake build system (“CMakeLists.txt” and cmake_modules), multiple Dockerfiles (in the “docker” directory), as well as CI configurations from GitHub and Appveyor.
Relationships and Data Flow
• Sensors (camera, LiDAR, IMU) feed raw data into the Sensor Input Modules.
• The Core SLAM Engine (corelib) processes the incoming sensor data – extracting features, computing odometry, detecting loop closures, and updating the map representation.
• The processed data (e.g., visual graphs, global map, and intermediate representations) is then stored in local databases.
• GUIs (guilib and mobile apps) and ROS nodes query this core engine to update the user’s visualization and interact with the mapping process.
• Utility tools and example applications serve as clients to showcase data capture, calibration, export, and reprocessing functionalities.
• Build scripts, Docker configurations, and CI pipelines ensure that the system is tested and deployed across multiple platforms and OS distributions.
Important Architectural Patterns
• Modular Design: Each core functionality (sensor input, algorithm processing, GUI layers, tools) is separated into a different module or library (i.e., corelib, guilib, app, tools, utilite). This separation supports maintainability and cross-platform development.
• Cross-Platform and Multi-Interface: The project supports multiple front-ends (desktop, mobile, ROS) interfacing to the same core SLAM engine, reflecting an MVC-like separation (model – core algorithms; view – GUI; controller – mobile/ROS integration).
• Extensibility: The structure (with directories such as “cmake_modules” and “tools”) indicates that new sensor drivers, new optimization techniques, or additional processing modules can be plugged in relatively easily.
Relevant Technologies and Frameworks
• C++ for the core and library implementations.
• CMake as the build system.
• Mobile development stack for Android (Java/C++ via JNI) and iOS (Objective-C/Swift and C++ bridging).
• ROS integration (node packages, binary packages for ROS 1/ROS 2).
• Docker for containerized testing and deployment.
• External libraries – for example, OpenCV, PCL, Eigen, and third-party libraries like “glm” for 3D math.