VINS-Mono运行记录
- 1.VINS-Mono在数据集下运行
-
- 2.单目+IMU自己采集数据运行记录
-
1.VINS-Mono在数据集下运行
选取的数据集是EuRoC下的MH_05_difficult.bag。
1.打开终端1,直接运行:
roslaunch vins_estimator vins_rviz.launch
2.打开终端2,直接运行:
roslaunch vins_estimator euroc.launch
3.打开终端3,直接运行:
rosbag play /home/xiaoqiang/Downloads/MH_05_difficult.bag
运行结果很完美,用evo评价工具与标准轨迹对比平均误差大概13cm。
运行结果
evo评价结果
自己做的其它测试
配置文件euroc_config.yaml中的的外参矩阵的平移量真值为(-0.0216401454975,-0.064676986768,0.00981073058949),
1.
estimate_extrinsic: 0 当外参旋转有粗略估计时,精度最高时效果一般
我将其改为(0.0,0.0,0.0),运行结果一般,用evo评价工具与标准轨迹对比误差0.4米左右。
我将其改为(0.1,0.1,0.1),运行结果一般,用evo评价工具与标准轨迹对比误差0.4米左右。
我将其改为(-0.1,-0.1,-0.1),运行结果一般,用evo评价工具与标准轨迹对比误差0.4米左右。。
我将其改为(0.5,0.5,0.5),运行结果很糟糕,用evo评价工具与标准轨迹对比误差2.1米左右。
我将其改为(1.0,1.0,1.0),运行结果很糟糕,用evo评价工具与标准轨迹对比误差4.6米左右。
我将其改为(10.0,10.0,10.0),运行结果很糟糕,几乎不能运行。
2.
estimate_extrinsic: 0 当外参旋转有精确估计时,精度最高时效果很好
我将其改为(0.0,0.0,0.0),运行结果依然很完美,用evo评价工具与标准轨迹对比误差13厘米左右。
我将其改为(0.1,0.1,0.1),运行结果一般,用evo评价工具与标准轨迹对比误差0.2米左右。
我将其改为(-0.1,-0.1,-0.1),运行结果一般,用evo评价工具与标准轨迹对比误差0.2米左右。。
我将其改为(0.5,0.5,0.5),运行结果很糟糕,用evo评价工具与标准轨迹对比误差1.2米左右。
我将其改为(1.0,1.0,1.0),运行结果很糟糕,用evo评价工具与标准轨迹对比误差4.3米左右。
我将其改为(10.0,10.0,10.0),运行结果很糟糕,几乎不能运行。
3.
estimate_extrinsic: 1 当外参旋转在一个粗略准确的范围内时(大概3°吧),与外参旋转关系不大,
我将其改为(0.0,0.0,0.0),运行结果依然很完美,用evo评价工具与标准轨迹对比误差13厘米左右。
我将其改为(0.1,0.1,0.1),运行结果依然很完美,用evo评价工具与标准轨迹对比误差13厘米左右。
我将其改为(-0.1,-0.1,-0.1),运行结果依然很完美,用evo评价工具与标准轨迹对比误差13厘米左右。
我将其改为(0.5,0.5,0.5),运行结果依然很完美,用evo评价工具与标准轨迹对比误差13厘米左右。
我将其改为(1.0,1.0,1.0),运行结果依然很完美,用evo评价工具与标准轨迹对比误差13厘米左右。
我将其改为(10.0,10.0,10.0),运行结果依然很完美,用evo评价工具与标准轨迹对比误差13厘米左右。
4.
estimate_extrinsic: 2 轨迹虽然不完整,但精度很高,可达到13cm。
1~4实验对比,当优化外参旋转和平移时,旋转只需有粗略估计值即可,平移几乎没影响,但尽量不要太大。 当不优化外参时,旋转必须要精度高,平移尽量精度高,平移也可设为零向量。
5.
estimate_td: 0
td: 0.048 #数据集数据加上时间误差,却不加优化时间误差
运行结果一般,用evo评价工具与标准轨迹对比误差0.6米左右。
6.
estimate_td: 1
td: 0.048 #加上时间误差,也优化时间误差
运行结果稍好,用evo评价工具与标准轨迹对比误差0.2米左右。
5~6实验对比,实验数据尽量采集的时间误差要小,否则即使优化时间参数误差也达不到最优的结果。
2.单目+IMU自己采集数据运行记录
在做完上面实验的基础上,我自己在教研室采集了95秒的数据,制作成.bag文件SBG_Camera1.bag,配置文件要改为适合自己设备的参数,要改的东西至少要包括相机参数(自己标定)、IMU参数(自己标定)和外参旋转(用kailbr自己标定),外参平移直接设为零向量。我的配置文件yys_test.yaml文件如下
%YAML:1.0
#common parameters
imu_topic: "/SBG_data"
image_topic: "/camera_node/image_raw"
output_path: "/home/xiaoqiang/yys/output1/"
#camera calibration
model_type: PINHOLE
camera_name: camera
image_width: 640
image_height: 480
distortion_parameters:
k1: -0.3197406
k2: 0.106782
p1: 0.0003526
p2: -0.0000828
projection_parameters:
fx: 395.0287715
fy: 394.5384675
cx: 328.5603826
cy: 221.0665875
# Extrinsic parameter between IMU and Camera.
estimate_extrinsic: 1 # 0 Have an accurate extrinsic parameters. We will trust the following imu^R_cam, imu^T_cam, don't change it.
# 1 Have an initial guess about extrinsic parameters. We will optimize around your initial guess.
# 2 Don't know anything about extrinsic parameters. You don't need to give R,T. We will try to calibrate it. Do some rotation movement at beginning.
#If you choose 0 or 1, you should write down the following matrix.
#Rotation from camera frame to imu frame, imu^R_cam
extrinsicRotation: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [0.0348837945, -0.0038827686, 0.9993838326,
0.9993783167, -0.0049764543, -0.0349029363,
0.0051089080, 0.9999800793, 0.0037067572 ]
#Translation from camera frame to imu frame, imu^T_cam
extrinsicTranslation: !!opencv-matrix
rows: 3
cols: 1
dt: d
data: [0, 0, 0] # [ 0.0944595512, -0.0651064267, -0.0140113820 ]
#feature traker paprameters
max_cnt: 150 # max feature number in feature tracking
min_dist: 30 # min distance between two features
freq: 10 # frequence (Hz) of publish tracking result. At least 10Hz for good estimation. If set 0, the frequence will be same as raw image
F_threshold: 1.0 # ransac threshold (pixel)
show_track: 1 # publish tracking image as topic
equalize: 1 # if image is too dark or light, trun on equalize to find enough features
fisheye: 0 # if using fisheye, trun on it. A circle mask will be loaded to remove edge noisy points
#optimization parameters
max_solver_time: 0.04 # max solver itration time (ms), to guarantee real time
max_num_iterations: 8 # max solver itrations, to guarantee real time
keyframe_parallax: 10.0 # keyframe selection threshold (pixel)
#imu parameters The more accurate parameters you provide, the better performance
acc_n: 6.0364730956851938e-03 # accelerometer measurement noise standard deviation. #0.2 0.04
gyr_n: 4.9477901032832672e-04 # gyroscope measurement noise standard deviation. #0.05 0.004
acc_w: 1.7629458142188578e-04 # accelerometer bias random work noise standard deviation. #0.02
gyr_w: 2.9964548323280108e-05 # gyroscope bias random work noise standard deviation. #4.0e-5
g_norm: 9.79136 # gravity magnitude
#loop closure parameters
loop_closure: 1 # start loop closure
load_previous_pose_graph: 0 # load and reuse previous pose graph; load from 'pose_graph_save_path'
fast_relocalization: 0 # useful in real-time and large project
pose_graph_save_path: "/home/xiaoqiang/yys/output1/pose_graph/" # save and load path
#unsynchronization parameters
estimate_td: 1 # online estimate time offset between camera and imu
td: 0.0485 # initial value of time offset. unit: s. readed image clock + td = real image clock (IMU clock)
#rolling shutter parameters
rolling_shutter: 0 # 0: global shutter camera, 1: rolling shutter camera
rolling_shutter_tr: 0 # unit: s. rolling shutter read out time per frame (from data sheet).
#visualization parameters
save_image: 1 # save image in pose graph for visualization prupose; you can close this function by setting 0
visualize_imu_forward: 0 # output imu forward propogation to achieve low latency and high frequence results
visualize_camera_size: 0.4 # size of camera marker in RVIZ
打开终端1,直接运行:
roslaunch vins_estimator vins_rviz.launch
打开终端2,直接运行:
roslaunch vins_estimator yys.launch
打开终端3,直接运行:
rosbag play /home/xiaoqiang/data/SBG_Camera1.bag
ps:一开始我不知道自己的相机IMU外参是多少,我自己用kailbr总是标定的误差太大,无语了!然后我就只好先将配置文件的estimate_extrinsic参数设为2,得到一个粗略的外参旋转和平移,平移弃之不用,直接置为零向量。
程序运行结果如下图所示,没有标准轨迹,不过看上去与我采集数据时基本一致。
自己做的其它测试
1 .
estimate_td: 1
td: 0.0
不加时间误差补偿,却优化时间误差,运行结果如下图所示
2 .
estimate_td: 0
td: 0.0485
加上时间误差补偿,却不加优化时间误差,运行结果如下图所示
3 .
estimate_td: 0
td: 0.0
不加时间误差补偿,也不加优化时间误差,运行结果如下图所示
对比原实验与1~3可以得出,只要加入时间偏差或加入时间偏差优化,程序都可正常运行,并且保证一定精度。 (estimate_extrinsic为1 )
4 .
estimate_extrinsic: 0 。当外参旋转有粗略估计时,程序几乎不能正常运行,
5 .
estimate_extrinsic: 0 。将外参的旋转估计值,直接置为以下矩阵参数,效果虽差,程序却可以正常运行,说明VINS标定的旋转参数,还不如我直接设置的更接近真值呢,无语!另外时间误差优不优化效果差不多。
data: [0, 0, 1,
1, 0, 0,
0, 1, 0 ]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)