由于您是少数能够在 VIO 模式下运行 VINS-FUSION 的人之一,因此我会再次向您澄清一些要点并征求您的反馈。
我正在尝试使用 D435i 运行 VINS FUSION(我想很多人都这样)。 使用可用的启动 realsense_stereo_imu_config.yaml 我经历了人们可能报告的情况,一旦您触摸相机,计算出的姿势就会变得疯狂。
所以我使用了 Kalibr :
cam0:
cam_overlaps: [1]
camera_model: pinhole
distortion_coeffs: [0.3775752250096366, -0.08329757139021714, 0.6504570262599587, -0.4530039925701512]
distortion_model: equidistant
intrinsics: [395.5922288679944, 395.5957501002353, 319.88738279106286, 239.07386401539998]
resolution: [640, 480]
rostopic: /camera/infra1/image_rect_raw
cam1:
T_cn_cnm1:
- [0.9999953397168069, 9.448668958037214e-05, 0.0030514942108417595, -0.04984248508758902]
- [-9.749429725933605e-05, 0.9999995096576434, 0.0009854843073503579, 6.189814698173665e-05]
- [-0.0030513995994150846, -0.0009857772179980872, 0.9999948585886561, 0.00015202509092000083]
- [0.0, 0.0, 0.0, 1.0]
cam_overlaps: [0]
camera_model: pinhole
distortion_coeffs: [0.31220975539351176, 0.48299676137352554, -1.4010717249687126, 2.191483852686]
distortion_model: equidistant
intrinsics: [396.5827833428163, 396.75838144377565, 319.1950768721882, 238.53973946284336]
resolution: [640, 480]
rostopic: /camera/infra2/image_rect_raw
我认为校准没问题,因为当我使用这些参数 (imu = 0) 运行 VINS_FUSION 时,我得到了一个不错的行为。 如有必要,我将非常乐意与您分享 pdf 报告,因为我不是该领域的专家。
accelerometer_noise_density: 0.0011060 #Noise density (continuous-time)
accelerometer_random_walk: 8.6056e-05 #Bias random walk
但对于陀螺仪,我显然持怀疑态度:
因为这些值如下:
gyroscope_noise_density: 50.427 #Noise density (continuous-time)
gyroscope_random_walk: 0.3480 #Bias random walk
在这里,我想了解您对这些价值观的看法?
但是我能够进行 imu-camera 校准:
cam0:
T_cam_imu:
- [0.999848715163262, 0.0018345448477758066, 0.017296856118190283, -0.009035083963879727]
- [-0.001867318311452875, 0.999996491602708, 0.0018788040335944412, 0.002129300542443833]
- [-0.01729334868368733, -0.0019108185351930207, 0.9998486329759259, -0.005593943362795322]
- [0.0, 0.0, 0.0, 1.0]
cam_overlaps: [1]
camera_model: pinhole
distortion_coeffs: [0.3775752250096366, -0.08329757139021714, 0.6504570262599587,
-0.4530039925701512]
distortion_model: equidistant
intrinsics: [395.5922288679944, 395.5957501002353, 319.88738279106286, 239.07386401539998]
resolution: [640, 480]
rostopic: /camera/infra1/image_rect_raw
timeshift_cam_imu: -0.028184396371617668
cam1:
T_cam_imu:
- [0.9997911085949877, 0.0019231918046627172, 0.020347985347160178, -0.058894395640646836]
- [-0.0019818392674274344, 0.999993939322739, 0.0028624519050287085, 0.0021865657711008357]
- [-0.02034235698054308, -0.002902180399802527, 0.9997888606407872, -0.005416418875488448]
- [0.0, 0.0, 0.0, 1.0]
T_cn_cnm1:
- [0.9999953397168102, 9.448668958037212e-05, 0.003051494210841759, -0.04984248508758902]
- [-9.749429725933604e-05, 0.9999995096576467, 0.0009854843073503574, 6.189814698173665e-05]
- [-0.003051399599415084, -0.0009857772179980868, 0.9999948585886594, 0.00015202509092000083]
- [0.0, 0.0, 0.0, 1.0]
cam_overlaps: [0]
camera_model: pinhole
distortion_coeffs: [0.31220975539351176, 0.48299676137352554, -1.4010717249687126,
2.191483852686]
distortion_model: equidistant
intrinsics: [396.5827833428163, 396.75838144377565, 319.1950768721882, 238.53973946284336]
resolution: [640, 480]
rostopic: /camera/infra2/image_rect_raw
timeshift_cam_imu: -0.028184788415138273
在这里我也很惊讶,因为时移是负的! 是否可以?
关于camera的变换,从一个跟VINS_FUSION相关的线程中了解到body_T_cam0/1是camera frame到IMU frame的transform
p = body_T_cam0 * q
p: point in IMU coordinates
q: point in camera coordinates
和 Kalibr T_cam_imu 是 IMU 外在函数:从 IMU 到相机坐标 (T_c_i) 的转换,但到目前为止我对获得 VINS_FUSION 使用的正确格式感到困惑。
然而,尽管做了所有这些工作,我仍然无法使用 IMU 运行 VINS。 抱歉这么长时间了,但您是否在这里看到错误,可以解释为什么它不起作用?
非常感谢
@FaboNo我设法让它与下面的配置一起工作,不需要运行我自己的校准,我相信它可以通过适当的校准更好地工作,但它运行良好并且不会发散
我使用了这个 repo 中提供的 left.yaml 和 right.yaml
确保您在实感选项中关闭自动曝光并关闭红外发射器,
%YAML:1.0
#common parameters
#support: 1 imu 1 cam; 1 imu 2 cam: 2 cam;
imu: 1
num_of_cam: 2
imu_topic: "/camera/imu"
image0_topic: "/camera/infra1/image_rect_raw"
image1_topic: "/camera/infra2/image_rect_raw"
output_path: "/home/dji/output/"
cam0_calib: "left.yaml"
cam1_calib: "right.yaml"
image_width: 640
image_height: 480
# 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.
body_T_cam0: !!opencv-matrix
rows: 4
cols: 4
dt: d
data: [ 1,0,0,0.00552,
0,1,0,-0.0051,
0,0,1,-0.01174,
0., 0., 0., 1. ]
body_T_cam1: !!opencv-matrix
rows: 4
cols: 4
dt: d
data: [ 1,0,0,-0.04464144,
0,1,0,-0.0051,
0,0,1,-0.01174,
0., 0., 0., 1. ]
#Multiple thread support
multiple_thread: 1
#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
flow_back: 1 # perform forward and backward optical flow to improve feature tracking accuracy
#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: 0.1 # accelerometer measurement noise standard deviation. #0.2 0.04
gyr_n: 0.01 # gyroscope measurement noise standard deviation. #0.05 0.004
acc_w: 0.001 # accelerometer bias random work noise standard deviation. #0.002
gyr_w: 0.0001 # gyroscope bias random work noise standard deviation. #4.0e-5
g_norm: 9.805 # gravity magnitude
#unsynchronization parameters
estimate_td: 1 # online estimate time offset between camera and imu
td: -0.072 # initial value of time offset. unit: s. readed image clock + td = real image clock (IMU clock)
#loop closure parameters
load_previous_pose_graph: 0 # load and reuse previous pose graph; load from 'pose_graph_save_path'
pose_graph_save_path: "/home/dji/output/pose_graph/" # save and load path
save_image: 0 # save image in pose graph for visualization prupose; you can close this function by setting 0
@FaboNo嗨,FaboNo。 我很抱歉回复晚了。 我没有意识到我遇到了一个新问题。
首先,我建议您使用pinhold-radtan
校准您的相机型号,而不是您使用的equidistant
。
在正确的相机校准后,请尝试使用 2 个相机和 0 个 imu 模式运行 VINS-Fusion。
它应该首先运行良好(在轻松运动下,没有快速运动或纯旋转)
确保将body_T_cam
为Kalibr结果中T_cam_imu
逆矩阵。
在仅运行 2 个摄像头模式(上图)之前,还要检查您的 body_T_cam0 和 1。
负timeshift_cam_imu
是 d435i 的正常值,这意味着相机晚于 IMU。
您不必为您的 IMU 校准运行Kalibr Allan ,根据我的经验,这不适合 d435i,
而我发现d435i的IMU模型,然后只需使用的具体模型的参数在这里
不过,我建议只使用默认imu parameters
如这里
他们应该足够了。 (或者,只是稍微增加它们,比如默认值的 3 倍)
我建议您按照我在此处解释的那样从D435i SDK运行IMU calibration
@FaboNo
顺便说一句,我之前检查过 D435i 原作者的默认参数/yaml 文件工作得很好。
即使使用所有 0 失真值,只有焦距/主点值和标称body_T_cam
值。
我认为您的equidistant
具有巨大失真值的相机内在校准结果是主要问题。
@engcang感谢您的留言,实际上图像已经修正,所以在上面运行 Kalibr 几乎没用,不是吗?
当它们被整流时,失真也必须等于 0。
@marufino非常感谢您的留言,我明天试一试,让您知道
@FaboNo
有关于这个问题的消息吗? 你搞定了吗?
我最近有机会使用 Intel D435i 测试 VINS-Fusion(立体声),如果您对此感兴趣,这里是结果剪辑。
@engcang很抱歉这么晚才回复。 我看过视频,印象深刻。 所以我有几个问题要问你,主要是因为你使用了 PixHawk4。
@FaboNo嗨。
@engcang感谢您的回复。 我想知道您是否更改了 realsense_stereo_imu_config.yaml 中的 imu 参数值或保持不变?
无论如何我都会尝试你的设置
@FaboNo
你好。 通常,我不会更改 yaml 文件中的 IMU 参数。 我还尝试设置从Kalibr_allan获得的 IMU 参数,
然而,我无法使用它们获得更好的性能。
仅对于四足机器人与地面接触困难的疯狂情况,我尝试将参数设置为大或小10倍,并且它起作用。
最有用的评论
@FaboNo嗨。