期刊分享SLAMVINS-Mono:一种稳健的单目视觉惯性状态估计器 上

期刊分享SLAMVINS-Mono:一种稳健的单目视觉惯性状态估计器 下

第一部分是测量处理前端,负责提取并跟踪每个新图像帧的特征,及帧间IMU数据预积分。
第二部分是初始化过程,提供了激活非线性系统的必要初始值,如姿态、速度、重力向量、陀螺仪偏差及3D特征位置。
第三部分为非线性图优化,通过联合优化所有的视觉、惯性信息求解滑窗内的状态。
另一部分运行另一个线程,负责闭环检测及姿态图优化。

 


 VINS-mono详细解读

 

 

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

结果图:

 

posted on 2017-06-06 11:24  Jessica&jie  阅读(14514)  评论(3编辑  收藏  举报