Part of the implementations are from the framework we developed during the course Vision-based Navigation IN2106 from my university (TUM). In the course, we only finished visual odometry, and I would like to add a loop closure module and relocalization module to make it become a more sophisticated SLAM sytem. For more detail about how I implement these modules in detail, please refer to my project page here Visual-SLAM: Loop Closure and Relocalization.
git clone --recursive https://github.com/yunjinli/visual-slam.git
cd visual-slam
./install_dependencies.sh
./build_submodules.sh
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
make DBoW2
make slam
Note: It's only tested to load EuRoC Machine Hall and EuRoc Vicon Room1 datasets
cd build
./slam --dataset-path ../data/<dataset_name>/mav0/ --cam-calib ../calibration_file/<calibration_file_name>
MH01 | MH02 | MH03 | MH04 | MH05 | V1_1 | V1_2 | V1_3 | |
---|---|---|---|---|---|---|---|---|
ATE (m) | 0.200 | 0.364 | 0.782 | 0.890 | 1.046 | 0.090 | 0.197 | 0.551 |
MH01 | MH02 | MH03 | MH04 | MH05 | V1_1 | V1_2 | V1_3 | |
---|---|---|---|---|---|---|---|---|
ATE (m) | 1.152 | 0.305 | 3.734 | 4.330 | 12.930 | 0.113 | 4.355 | 6.184 |
You can simply run the python script to load the previous map, and you can get the result down below. Try to load some existing maps that I ran already. You can also load the map in VO/ folder where you can see how much improvement the loop closure and relocalization have made.
cd scripts
python load_map.py ../saved_maps/<map_file_path>.json
EuRoC Vicon Room 1 (V1_1_easy) | EuRoC Vicon Room 1 (V1_2_medium) |
---|---|
EuRoC Machine Hall 3 (MH_03_medium) | EuRoC Machine Hall 4 (MH_04_difficult) |
Mur-Artal, Raul, Jose Maria Martinez Montiel, and Juan D. Tardos. "ORB-SLAM: a versatile and accurate monocular SLAM system." IEEE transactions on robotics 31.5 (2015): 1147-1163.
R. Mur-Artal and J. D. Tardós, "ORB-SLAM2: An Open-Source SLAM System for Monocular, Stereo, and RGB-D Cameras," in IEEE Transactions on Robotics, vol. 33, no. 5, pp. 1255-1262, Oct. 2017, doi: 10.1109/TRO.2017.2705103.
R. Mur-Artal and J. D. Tardós, "Fast relocalisation and loop closing in keyframe-based SLAM," 2014 IEEE International Conference on Robotics and Automation (ICRA), Hong Kong, China, 2014, pp. 846-853, doi: 10.1109/ICRA.2014.6906953.
Strasdat, Hauke, J. Montiel, and Andrew J. Davison. "Scale drift-aware large scale monocular SLAM." Robotics: Science and Systems VI 2.3 (2010): 7.