CSM SLAM is a ROS 2 package that implements Simultaneous Localization and Mapping (SLAM) using the Correlative Scan Matcher algorithm as the scan matcher and GTSAM as the backend optimizer. This package provides only offline and Online SLAM capabilities for processing laser scan data and building maps of unknown environments. It is a just barebones implementation where odom and imu are not used for now (Code is inplace for Odometry. However looking for a dataset to test it.).
- ROS 2 (Humble or later)
- Python 3
Create a virtual environment and install the dependencies.
conda create -n csm_slam python=3.12
conda activate csm_slam
pip install -r requirements.txtBuild the package.
mkdir -p csm_ros_ws/src
cd csm_ros_ws/srcClone the repository in the src folder.
cd csm_ros_ws
conda activate csm_slam
source /opt/ros/<ros_distro>/setup.bash
colcon build --packages-select csm_slam
source install/setup.bashAdjust the config file to your needs.
ros2 launch csm_slam csm_slam.launch.py bag_path:=/path/to/your/rosbag2ros2 launch csm_slam csm_slam_offline.launch.py bag_path:=/path/to/your/rosbag2Both launch files will automatically start RViz2 for visualization
Dataset tested with this package can be found at https://google-cartographer-ros.readthedocs.io/en/latest/demos.html#revo-lds. To download the dataset, run the following command:
wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/revo_lds/cartographer_paper_revo_lds.bagOutput of the slam tested in ROS kilted, Ubuntu 24.04 and Conda environment:
If something is not working, please open an issue.
- Add IMU as an option instead of using the odom as an option.
- Add tests.
