A modular SLAM (Simultaneous Localization and Mapping) implementation in Python for ROS 2.
This package provides a flexible SLAM system with both 2D and 3D capabilities, featuring:
- Front-end processing for both 2D and 3D LiDAR data
- Back-end optimization using pose graph optimization
- Loop closure detection using Scan Context
mod_slam/- Main SLAM implementationfront_end_2d.py- 2D LiDAR front-end processingfront_end_3d.py- 3D LiDAR front-end processingback_end.py- Back-end optimizationutils/- Utility modules for ICP, map management, scan context, etc.
launch/- ROS 2 launch filesconfig/- Configuration files for different robot platformsslam_interfaces/- Custom ROS 2 message and service definitions
- ROS 2 (tested with Humble/Iron)
- Python 3.8+
- NumPy
- Open3D
- SciPy
- SmallGICP
- GTSAM
- Clone this repository into your ROS 2 workspace:
cd ~/dev_ws/src
git clone https://github.com/Delport121/Modular_SLAM_py.git mod_slam_python- Install dependencies:
cd ~/dev_ws
rosdep install --from-paths src --ignore-src -r -y- Build the workspace:
colcon build --packages-select mod_slam slam_interfaces- Source the workspace:
source install/setup.bashros2 launch mod_slam slam_2d.launch.pyros2 launch mod_slam slam_3d.launch.pyros2 launch mod_slam slam_voyager.launch.pyConfiguration files are located in the config/ directory. You can modify parameters for:
- ICP matching
- Loop closure detection
- Map resolution
- Sensor topics
P.J. Delport