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。
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
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的相关参数。
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