赞
踩
1、官方教程:https://github.com/ethz-asl/kalibr/wiki/camera-imu-calibration
1、源码地址:https://github.com/ethz-asl/kalibr.git
3、参数文件格式:https://github.com/ethz-asl/kalibr/wiki/yaml-formats
4、将源码克隆下来,放在ROS工作空间编译
5、此处报错libv412.h没有那个文件:此文件是专门用来处理视频图像的
sudo apt-get install libv4l-dev
1、样例下载地址:https://github.com/ethz-asl/kalibr/wiki/downloads
2、运行命令:
kalibr_calibrate_imu_camera --target /home/cjn/kalibr/src/kalibr/dynamic/april_6x6.yaml --cam /home/cjn/kalibr/src/kalibr/dynamic/camchain.yaml --imu /home/cjn/kalibr/src/kalibr/dynamic/imu_adis16448.yaml --bag /home/cjn/kalibr/src/kalibr/dynamic/dynamic.bag --bag-from-to 5 45
3、备注:
3.1 --bag-from-to 5 45 表示选取数据集5-45s
3.2 运行报错:ImportError: cannot import name NavigationToolbar2Wx
"/home/cjn/kalibr/src/kalibr/Schweizer-Messer/sm_python/python/sm/PlotCollection.py"
解决:将 PlotCollection.py 中的NavigationToolbar2Wx 改为 NavigationToolbar2WxAgg
3.3 优化报错:“Spline Coefficient Buffer Exceeded. Set larger buffer margins”
在标定命令最后添加 --timeoffset-padding 0.1
路径:/home/wk/kalibr_workspace/src/Kalibr/aslam_nonparametric_estimation/aslam_splines/src/BSplineExpressions.cpp 447行
所以,这里人为的将_bufferTmax提高,
423行:_bufferTmax = _spline->spline().timeInterval(_bufferRight).second*
改为:_bufferTmax = _spline->spline().timeInterval(_bufferRight).second*2;
提高一倍。
采集包含原始图像和IMU数据的bag包,采集数据的最佳频率为图像20Hz, IMU 200 Hz (当然其他频率也没问题)。重要的是确保标定目标的良好和均匀照明,并保持相机快门时间低以避免过度的运动模糊。
rosbag record -O camera_imu_calibra.bag /left /right /imu/data_raw
注:
1)采集数据的起始和结束阶段注意别晃动太大,如从桌子上拿起或者放下。如果有这样的动作,在标定阶段应该跳过bag数据集的首尾的数据。
2)采集数据的时候应该给imu各个轴足够的激励,如先依次绕各个轴运动,运动完后来个在空中画8字之类的操作,当然也要注意别运动太剧烈,图像都模糊了。
3)ROS 提供了改变 topic 发布频率的节点throttle, 指令如下 :
- rosrun topic_tools throttle messages /mynteye/left/image_raw 20 /left
-
- rosrun topic_tools throttle messages /mynteye/right/image_raw 20 /right
rosrun kalibr kalibr_calibrate_imu_camera --target '/home/cjn/kalibr_/file/april_6x6_80x80cm.yaml' --cam '/home/cjn/kalibr_/file/camera.yaml' --imu '/home/cjn/kalibr_/file/imu.yaml' --bag '/home/cjn/bag_file/imu_calibration/camera_imu_calibra.bag' --bag-from-to 6 70
- cam0:
- cam_overlaps: [1]
- camera_model: pinhole
- distortion_coeffs: [-2.9170972359091218e-01, 6.9738410320982019e-02,-3.3231504451002157e-05, -9.5970021240753282e-04] #畸变参数
- distortion_model: radtan #畸变模型
- intrinsics: [3.5010014627008638e+02, 3.4934572816623472e+02, 3.1780808141818062e+02, 2.4363726235828250e+02] #相机内参
- resolution: [640, 480]
- rostopic: /left
- cam1:
- T_cn_cnm1: #左相机相对于右相机的T
- - [9.9994716969048836e-01, -2.7132513675734004e-03, 9.9144387132132396e-03, -1.1576632997665931e-01]
- - [2.5169683011943512e-03, 9.9980164664549764e-01, 1.9756827567251341e-02, 2.3598458494754455e-03]
- - [-9.9660773904522298e-03, -1.9730829479970700e-02, 9.9975565598274052e-01, -1.3129115253160678e-02]
- - [0.0, 0.0, 0.0, 1.0]
- cam_overlaps: [0]
- camera_model: pinhole
- distortion_coeffs: [-2.8640185857190709e-01, 6.8843722295998583e-02, 1.2511076178493559e-04, 2.2836652234528221e-04]
- distortion_model: radtan
- intrinsics: [3.4584039925550132e+02, 3.4496566998987788e+02, 3.1178312103218963e+02, 2.4592149455320549e+02]
- resolution: [640, 480]
- rostopic: /right
-
畸变模型:Equidistant [k1, k2, k3, k4],Radtan [k1, k2, p1, p2]
- rostopic: /imu0
- update_rate: 200.0 #Hz
-
- accelerometer_noise_density: 0.01 #continous
- accelerometer_random_walk: 0.0002
- gyroscope_noise_density: 0.005 #continous
- gyroscope_random_walk: 4.0e-06
noise_density: 高斯白噪声,测量噪声是AD转换器件引起的外部噪声,波动激烈的测量白噪声
random_walk: 随机游走噪声,是传感器内部机械、温度等各种物理因素产生的传感器内部误差的综合参数,是变化缓慢的bias
- #example for aprilgrid
- target_type: 'aprilgrid' #gridtype
- tagCols: 6 #number of apriltags
- tagRows: 6 #number of apriltags
- tagSize: 0.088 #size of apriltag, edge to edge [m]
- tagSpacing: 0.3 #ratio of space between tags to tagSize
- #example: tagSize=2m, spacing=0.5m --> tagSpacing=0.25[-]
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。