Run VINS-Mono and save its result as a .tum output for evo analysis

1. Install prerequisites [1]

*Solution for the eigen installation problem: reinstall eigen

$ git clone https://gitlab.com/libeigen/eigen.git
...
...
$ sudo make install

*check current eigen version:

$ pkg-config --modversion eigen3 (3.2.2 or later strongly recommended, 3.1.0 or later required.)


2. Build VINS-Mono on ROS

*Remember  to recompile Ceres with the same Eigen version as you plan to use in the VINS-mono project. In my case, since the Ceres was compiled once in the maplab project with different Eigen version, a problem with the Eigen version confliction was reported as following picture.


Solution: assign the desired Eigen path and recompile maplab ($ catkin build maplab)


After solving the problem mentioned above, you should be good to go...

cd ~/catkin_ws/src git
clone https://github.com/HKUST-Aerial-Robotics/VINS-Mono.git
cd ../ catkin_make
source ~/catkin_ws/devel/setup.bash


3. Run VINS-Mono using EuRoC dataset

$ roslaunch vins_estimator euroc.launch

load the config file: file -> Open Config-> YOUR_VINS_FOLDER/config/vins_rviz_config.rviz

$ rosbag play YOUR_PATH_TO_DATASET/MH_01_easy.bag


4. Save results as a .tum format

(1) Modify the content of  pose_graph.cpp in the functions updatePath(), addKeyFrame() as follows:


(2) Set the pose_graph_save_path, output_path in the config file (.../config/euroc/euroc_config.yaml). After playing MH_01 bag, input s in vins_estimator terminal, then enter. The current pose graph will be saved.

(3) Modify the output: vins_result_loop.csv as a .txt file. 

5. Check and plot result by evo

$ workon evaluation
$ evo_traj tum vins_result_loop.txt -p

$ deactivate

6. Save the analytical result as a .zip file.

ex: $ evo_ape tum gt_offset.tum VINS_Mono.txt -va --plot --plot_mode xz --save_results results/VINS_Mono.zip




Reference:
[1] http://ceres-solver.org/installation.html#linux
[2] https://github.com/HKUST-Aerial-Robotics/VINS-Mono

留言

這個網誌中的熱門文章

Tuing PID parameters in QGroundcontrol (2)

Useful PX4 Parameters

Burn linux image to eMMC storage on Banana Pi M3