- PL-SLAM
https://github.com/rubengooj/pl-slam.git
- VIORB
https://github.com/jingpang/LearnVIORB.git
- VINS-MONO
https://github.com/HKUST-Aerial-Robotics/VINS-Mono
Thankyou for their outstanding work. My code is basically copied from them. The basic framework is from PL-SLAM, the IMU preintegration is from VIORB, the marginalization is from VINS-MONO
- g2o
- OpenCV 3.X.X
- Eigen3
- Boost
- yaml
- mrpt
The library I use is basically the same as PL-slam. Please refer to the main page of PL-slam for more information. But I put StVO-PL directly into the program, so this library does not need to be installed.
I only test on the Euroc dataset of V1_easy, so I take this dataset as example.
-
Set the variable
DAFAULT_USE_MARG
in thecmakelists.txt
to choose if use marginalization in the localmapping thread -
Use scripts
./build.sh
to compile programs -
Put the
dataset_params.yaml
under theconfig/dataset_params
directory into the datasetV1_easy
root directory -
Unzip
voc.tar.gz
under thevocabulary
directory -
Change value of
vocabulary_p
andvocabulary_l
in the file ofconfig_euroc.yaml
under theconfig/config
directory -
Set dataset environment variables and run program. For example, my dataset
V1_easy
is in the directory/home/xc/Euroc/V1_easy
, Run the program with the following command:export DATASETS_DIR=/home/xc
cd build
./plslam_dataset Euroc/V1_easy -c ../config/config/config_euroc.yaml
All results are compared with ground truth using the tool of EVO.
The left picture is the result of pl-slam with IMU and marginalization.
The mid picture is the result of pl-slam with IMU but no marginalization.
The right picture is the result of original pl-slam.
-
The program may have bugs like (segment fault), if you happen to meet it, just run program again.
-
This is just the code that I used to learn vio. If there is any mistake, please forgive me