使用小覓雙目-慣性相機執行VINS-Mono
步驟
1.下載相機驅動MYNT-EYE-SDK-2,然後make ros(注意:前面的Ubuntu安裝也要操作);
2.安裝VINS-Mono;
3.在MYNT-EYE-VINS-Sample/config/mynteye/mynteye_config.yaml
中更新畸變和投影引數;
4.執行 mynt_eye_ros_wrapper 和 VINS-Mono。
Install MYNT-EYE-VINS-Sample
mkdir -p ~/mynt-eye-vins-catkin_ws/src cd ~/mynt-eye-vins-catkin_ws/src git clone -b sdk2 https://github.com/slightech/MYNT-EYE-VINS-Sample.git cd .. catkin_make source devel/setup.bash echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc source ~/.bashrc
Get calibration parameters
1.相機引數
安裝相機驅動後,插入相機,開啟終端,執行以下命令獲取相機的標定引數:
cd MYNT-EYE-SDK-2
./samples/_output/bin/tutorials/get_img_params
然後,在MYNT-EYE-VINS-Sample/config/mynteye/mynteye_config.yaml
中修改相機內參和畸變係數;
2.IMU引數
我的小覓相機的IMU引數有點問題,每次啟動相機後會輸出以下資訊:
Motion intrinsics & extrinsics not exsist
通過以下命令獲取的IMU引數都為0:
cd MYNT-EYE-SDK-2
./samples/_output/bin/tutorials/get_imu_params
我詢問小覓相機的技術人員後,直接甩給我檔案imu.params
:
%YAML:1.0 --- in_accel: scale: [ 1., 0., 0., 0., 1., 0., 0., 0., 1. ] drift: [ 0.0, 0.0, 0.0 ] noise: [ 0.016925432397973516, 0.016735310195561025, 0.017452487504590969 ] bias: [ 0.00019031356589714596, 0.00016996777864587261, 0.00054490537096493644 ] in_gyro: scale: [ 1., 0., 0., 0., 1., 0., 0., 0., 1. ] drift: [ 0., 0., 0. ] noise: [ 0.0010848026158819934, 0.0012466367883501759, 0.0011003229919806443 ] bias: [ 0.000023404834136742844, 0.000023596771567764949, 0.000014970418056326829 ] ex_left_to_imu: rotation: [ -0.0064662, -0.99994994, -0.00763565, 0.99997909, -0.00646566, -0.00009558, 0.0000462, -0.00763611, 0.99997084 ] translation: [ 0.00533646, -0.04302922, 0.02303124 ]
然後,使用以下命令寫入IMU標定引數:
cd MYNT-EYE-SDK-2
./tools/_output/bin/writer/imu_params_writer tools/writer/config/imu.params
這裡我有個疑惑:不同裝置的IMU的引數都是一樣的?
如果是這樣的話,在MYNT-EYE-VINS-Sample/config/mynteye/mynteye_config.yaml
中就不需要更改IMU的相關引數。
Run VINS-Mono with MYNT EYE camera
1.啟動相機
source ~/MYNT-EYE-SDK-2/wrappers/ros/devel/setup.bash
roslaunch mynt_eye_ros_wrapper mynteye.launch
2.執行VINS-Mono
cd ~/mynt-eye-vins-catkin_ws
roslaunch vins_estimator mynteye.launch
測試
因為我是在臺式機上配置的,所以只能在小範圍內測試,感覺軌跡還是挺準的,很少出現跟丟的情況,但是有時相機靜止時軌跡會漂,也就是不穩定,可能是相機IMU的問題。
接下來在TX2上配置進行大場景測試。
執行效果截圖:
參考
[1] https://github.com/slightech/MYNT-EYE-VINS-Sample
[2] https://github.com/HKUST-Aerial-Robotics/VINS-Mono