Home

Awesome

CCM-SLAM -- Centralized Collaborative Monocular SLAM

Update: COVINS -- Collaborative Visual-Inertial SLAM: We have released COVINS, a new framework for collaborative visual-inertial SLAM: [Paper] [Code]

Version 1.1

Previous Versions: CCM-SLAM v1.0

1 Related Publications

[1] Patrik Schmuck and Margarita Chli. Multi-UAV Collaborative Monocular SLAM. IEEE International Conference on Robotics and Automation (ICRA), 2017. PDF.

[2] Patrik Schmuck and Margarita Chli. CCM‐SLAM: Robust and efficient centralized collaborative monocular simultaneous localization and mapping for robotic teams. Journal of Field Robotics (JFR), 2019. PDF

<!--- **[PDF](https://www.research-collection.ethz.ch/bitstream/handle/20.500.11850/272499/eth-50606-01.pdf?sequence=1&isAllowed=y)**. --->

Video:

<a href="https://www.youtube.com/embed/P3b7UiTlmbQ" target="_blank"><img src="http://img.youtube.com/vi/P3b7UiTlmbQ/0.jpg" alt="Mesh" width="240" height="180" border="10" /></a>

1.1 Major Modifications

Compared to the implementation described in [2], some modules of this framework experienced major modification in this implementation:

<!--- * When the messages from an agent to the server do not contain KF data for a specified time period, the Server assumes that this agent has finished its mission. If all agents associated to a Server Map are marked as finished, the Server will perform a final global BA for this map to refine the final estiamte. The threshold period is set to 5x the message publishing frequency of the agent in the current implementation. --->

2. License

CCM-SLAM is released under a GPLv3 license. For a list of all code/library dependencies (and associated licenses), please see Dependencies.md.

For a closed-source version of CCM-SLAM for commercial purposes, please contact the author(s):
collaborative (dot) slam (at) gmail (dot) com

If you use CCM-SLAM in an academic work, please cite:

@inproceedings{schmuck2017multi,
  title={Multi-UAV Collaborative Monocular {SLAM}},
  author={Schmuck, Patrik and Chli, Margarita},
  booktitle={Proceedings of the {IEEE} International Conference on Robotics and Automation ({ICRA})},
  year={2017}
}

@inproceedings{schmuck2017ccm,
  title={{CCM-SLAM}: Robust and efficient centralized collaborative monocular simultaneous localization and mapping for robotic teams},
  author={Schmuck, Patrik and Chli, Margarita},
  booktitle={Journal of Field Robotics ({JFR})},
  year={2018}
}

3. Installation

We have tested CCM-SLAM with Ubuntu 16.04 (ROS Kinetic with OpenCV 3) as well as Ubuntu 18.04 (ROS Melodic) and Ubuntu 20.04 (ROS Noetic). It is recommended to use a decently powerful computer for the Server Node to ensure good performance for multi-agent SLAM.

3.1 Set up you environment

Note: change noetic for indigo (Ubuntu 14.04) | kinetic (Ubuntu 16.04) | melodic (Ubuntu 18.04) if necessary.

  1. Install the build and run dependencies:
sudo apt-get install python-catkin-tools
  1. Create a catkin workspace:
mkdir -p ~/ccmslam_ws/src
cd ~/ccmslam_ws
source /opt/ros/noetic/setup.bash
catkin init
catkin config --extend /opt/ros/noetic
  1. Clone the source repo into your catkin workspace src folder:
cd ~/ccmslam_ws/src
git clone https://github.com/VIS4ROB-lab/ccm_slam.git

3.2 Ubuntu 16.04 (ROS Kinetic with OpenCV 3) | Ubuntu 18.04 (ROS Melodic) | Ubuntu 20.04 (ROS Noetic)

Compile DBoW2:

cd ~/ccmslam_ws/src/ccm_slam/cslam/thirdparty/DBoW2/
mkdir build
cd build
cmake ..
make -j8

Compile g2o:

cd ~/ccmslam_ws/src/ccm_slam/cslam/thirdparty/g2o
mkdir build
cd build
cmake --cmake-args -DG2O_U14=0 ..
make -j8

Unzip Vocabulary:

cd ~/ccmslam_ws/src/ccm_slam/cslam/conf
unzip ORBvoc.txt.zip

Build the code:

cd ~/ccmslam_ws/
catkin build ccmslam --cmake-args -DG2O_U14=0 -DCMAKE_BUILD_TYPE=Release
source ~/ccmslam_ws/devel/setup.bash

3.3 Ubuntu 14.04 (ROS Indigo with OpenCV 2)

Compile OpenCV:

cd ~/ccmslam_ws/ccm_slam/cslam/thirdparty/
unzip opencv-2.4.13.zip
cd opencv-2.4.13
mkdir build
cd build
cmake ..
make -j8

Afterwards, follow the instructions in 3.2.

3.4 Known Issues

In g2o:

Compile-time error you_mixed_different_numeric_types: run cmake --cmake-args -DG2O_U14=1 .. instead of cmake --cmake-args -DG2O_U14=0 .. and catkin build --cmake-args -DG2O_U14=1 instead if catkin build --cmake-args -DG2O_U14=0

4. Examples

It is recommended to start a roscore in a separate terminal before starting to interact with CCM-SLAM:

source ~/ccmslam_ws/devel/setup.bash
roscore

4.1 Examples on the EuRoC dataset

cd ~/ccmslam_ws/src/ccm_slam/cslam
rviz -d conf/rviz/ccmslam.rviz

The RVIZ window shows in the center the maps known to the server. When two maps are merged, a red line indicates the position of the matching locations in the two maps, and after completion of the merge step, one map is aligned to the other. If no merge takes place, the maps are just overlaid, yet there is no reference between the maps. The maps of limited size of the agents can also be displayed in RVIZ, however they are hidden by default. By activating MarkerCX and MapPointsCX in the RVIZ sidebar, the respective trajectory and map points onboard agent X will be displayed in the background. You can change the odometry frames of the maps on the server and agent launch files.

4.2 KITTI dataset

We provide two launch files for the KITTI odometry dataset. However, CCM-SLAM was only briefly tested with KITTI, and the motion pattern of the car used to capture the data causes problems regarding initialization and drift. For our tests, we converted the KITTI image sequences to rosbag files.

4.3 Running CCM-SLAM on multiple PCs

4.4 Saving and Loading Maps

4.5 Output Files

5. Using your own Data

For using you own datasets or camera, you need to create according calibration and launch files:

6. Parameters

System parameters are loaded from conf/config.yaml. We explain the functionality of the most important parameters in the following lines:

Mapping

Communication

Place Recognition

Visualization

Other

7. Update Notes

Update 1.1: