期刊分享SLAMVINS-Mono:一種穩健的單目視覺慣性狀態估計器 上
期刊分享SLAMVINS-Mono:一種穩健的單目視覺慣性狀態估計器 下
第一部分是測量處理前端,負責提取並跟蹤每個新圖像幀的特征,及幀間IMU數據預積分。
第二部分是初始化過程,提供了激活非線性系統的必要初始值,如姿態、速度、重力向量、陀螺儀偏差及3D特征位置。
第三部分為非線性圖優化,通過聯合優化所有的視覺、慣性信息求解滑窗內的狀態。
另一部分運行另一個線程,負責閉環檢測及姿態圖優化。

VINS-Mono is a real-time SLAM framework for Monocular Visual-Inertial Systems. It uses an optimization-based sliding window formulation for providing high-accuracy visual-inertial odometry. It features efficient IMU pre-integration with bias correction, automatic estimator initialization, online extrinsic calibration, failure detection and recovery, loop detection, and global pose graph optimization. VINS-Mono is primarily designed for state estimation and feedback control of autonomous drones, but it is also capable of providing accurate localization for AR applications. This code runs on Linux, and is fully integrated with ROS. For iOS mobile implementation, please go to VINS-Mobile.
https://github.com/HKUST-Aerial-Robotics/VINS-Mono
1.運行環境
Ubuntu 14.04, ROS Indigo, OpenCV 3.1.0, Eigen 3.2.0,Ceres Solver
2. Build VINS-Mono on ROS
在此之前,由於我的opencv有兩個版本-OpenCV 2.4.9和OpenCV 3.1.0,引起沖突,讓我很是苦惱...但最終還是解決啦啦啦啦。。。
記錄在此http://www.cnblogs.com/Jessica-jie/p/6959309.html
Clone the repository and catkin_make:
cd ~/catkin_ws/src git clone git@github.com:HKUST-Aerial-Robotics/VINS-Mono.git
cd ../ catkin_make source ~/catkin_ws/devel/setup.bash
結果: 這5個package均有可執行文件生成,在/home/wj/catkin_ws/devel/lib/里
3. Performance on EuRoC dataset
3.1Download EuRoC MAV Dataset.Although it contains stereo cameras, we only use one camera.
3.2 Open three terminals, launch the vins_estimator , rviz and play the bag file respectively. Take MH_05 as example:
[1]roscore
[2]roslaunch vins_estimator euroc.launch ///estimation
roslaunch benchmark_publisher publish.launch ///ground-truth
[3]roslaunch vins_estimator vins_rviz.launch
等同於---rosrun rviz rviz -d /home/wj/catkin_ws/src/VINS-Mono/config/vins_rviz_config.rviz
[4]rosbag play YOUR_PATH_TO_DATASET/MH_05_difficult.bag
---rosbag play /home/wj/Downloads/dataset/EuRoC/ROS_bag/MH_05_difficult.bag
[5]cd ~/bagfiles
rosbag record -a 記錄推送數據
注意:***.launch要在其工作空間執行.
wj@wj-Inspiron-5437:~$ cd catkin_ws wj@wj-Inspiron-5437:~/catkin_ws$ source ~/catkin_ws/devel/setup.bash wj@wj-Inspiron-5437:~/catkin_ws$ roslaunch vins_estimator euroc.launch wj@wj-Inspiron-5437:~$ cd catkin_ws wj@wj-Inspiron-5437:~/catkin_ws$ source ~/catkin_ws/devel/setup.bash wj@wj-Inspiron-5437:~/catkin_ws$ roslaunch benchmark_publisher publish.launch
結果圖:
解析:
wj@wj-Inspiron-5437:~/catkin_ws$ roslaunch vins_estimator euroc.launch
SUMMARY ======== PARAMETERS * /feature_tracker/config_file: /home/wj/catkin_w... * /feature_tracker/vins_folder: /home/wj/catkin_w... * /rosdistro: indigo * /rosversion: 1.11.20 * /vins_estimator/config_file: /home/wj/catkin_w... * /vins_estimator/vins_folder: /home/wj/catkin_w... NODES / feature_tracker (feature_tracker/feature_tracker) vins_estimator (vins_estimator/vins_estimator) auto-starting new master process[master]: started with pid [4194] ROS_MASTER_URI=http://localhost:11311 setting /run_id to d4e07290-fea5-11e7-92da-bc8556c5ff8b process[rosout-1]: started with pid [4207] started core service [/rosout] process[feature_tracker-2]: started with pid [4211] process[vins_estimator-3]: started with pid [4222] [ INFO] [1516537385.770250050]: init begins [ INFO] [1516537385.783868675]: Loaded config_file: /home/wj/catkin_ws/src/VINS-Mono/feature_tracker/../config/euroc/euroc_config.yaml [ INFO] [1516537385.786188731]: Loaded vins_folder: /home/wj/catkin_ws/src/VINS-Mono/feature_tracker/../config/../ [ WARN] [1516537385.786329200]: Optimize extrinsic param around initial guess! [ INFO] [1516537385.786765223]: Extrinsic_R : 2.22045e-16 -1 0 1 2.22045e-16 0 0 0 1 [ INFO] [1516537385.786810735]: Extrinsic_T : -0.02 -0.06 0.01 [ WARN] [1516537385.786861452]: waiting for image and imu... [ WARN] [1516537385.830039004]: LOOP_CLOSURE true voc file: /home/wj/catkin_ws/src/VINS-Mono/feature_tracker/../config/..//support_files/brief_k10L6.bin loop start load vocabulary loop closure init finish
wj@wj-Inspiron-5437:~/catkin_ws$ roslaunch benchmark_publisher publish.launch
SUMMARY ======== PARAMETERS * /benchmark_publisher/data_name: /home/wj/catkin_w... * /rosdistro: indigo * /rosversion: 1.11.21 NODES / benchmark_publisher (benchmark_publisher/benchmark_publisher) ROS_MASTER_URI=http://localhost:11311 core service [/rosout] found process[benchmark_publisher-1]: started with pid [6334] [ INFO] [1520410994.189896520]: Loaded data_name: /home/wj/catkin_ws/src/VINS-Mono/benchmark_publisher/config/MH_05_difficult/data.csv load ground truth /home/wj/catkin_ws/src/VINS-Mono/benchmark_publisher/config/MH_05_difficult/data.csv [ INFO] [1520410994.284550074]: Data loaded: 22212
4.AR Demo
4.1 Download the bag file, which is collected from HKUST Robotic Institute. For friends in mainland China, download from bag file.
4.2 Open three terminals, launch the ar_demo, rviz and play the bag file respectively.We put one 0.8m x 0.8m x 0.8m virtual box in front of your view.
roslaunch ar_demo 3dm_bag.launch roslaunch ar_demo ar_rviz.launch rosbag play /home/wj/Downloads/dataset/ar_box.bag ---YOUR_PATH_TO_DATASET
結果圖: