ROS实验笔记之——基于Kalibr标定event 与imu

18 篇文章 10 订阅

之前博客《ROS实验笔记之——基于kalibr来标定DAVIS346》实现了基于color frame用kalibr矫正camera与imu。但是由于dvxplorer没有image,所以后面又在博客《ROS实验笔记之——基于dv-gui的camera与IMU校正(DAVIS346与DVXplorer)》直接利用dv-gui的模块进行矫正。但是感觉矫正后的bias挺大的,如下图所示

为此,本博文决定试试通过dvs_render来试试。通过dvs_render可以直接获得image,录取ros包后,直接处理,看看过程及效果如下

首先是标定板,采用跟上面一样的标定板吧(为了保证实验的一致性)

其参数为(注意这是实际的参数):

格子数目6*6

大格子边长:2cm
小格子边长:0.6cm
小格子与大格子边长比例:0.3

新建april_6x6_A4_dvs.yaml文件,格式参考上图的yaml,内容展示如下:

target_type: 'aprilgrid' #gridtype
tagCols: 6               #number of apriltags
tagRows: 6               #number of apriltags
tagSize: 0.02           #size of apriltag, edge to edge [m]
tagSpacing: 0.3          #ratio of space between tags to tagSize

录制bag,录制bag 的同时,相机对准标定板,或是固定相机或是固定标定板,晃动另一个,动作不要太大,不要让相机看不清标定板(就争取把标定板晃动到过相机像素平面的每个地方)

注意:需要修改相机帧数。“Good results have been obtained by using a camera rate of 20 Hz and an IMU rate of 200 Hz.”

此处打算把imu改为200,dvs/rendering改为20

#开启相机
roslaunch evio davis_testing.launch
 
rostopic list

#先看看两个topic的频率分别是多少
rostopic hz 话题名字
rostopic hz /dvs_rendering
rostopic hz /dvs/imu

#更改频率
rosrun topic_tools throttle messages /dvs_rendering 20.0 /event_frame
rosrun topic_tools throttle messages /dvs/imu 200.0 /imu
 
#看看是否更改成功 
rostopic hz /event_frame
rostopic hz /imu
 

#录制数据,把/dvs/imu也加入(建议降采样前后的topic都录制了)
roslaunch evio davis_raw_image_recording.launch 

录制完后,接下来就可以开始标定了

然而,在标定camera的时候,发现。根本没有办法检测到corner。。。。。。。

 试试dvxplorer

同样的也无法检测角点。。。。。故此不能用。。。。

既然如此,大概只能用回博客《ROS实验笔记之——基于dv-gui的camera与IMU校正(DAVIS346与DVXplorer)》中的方法,多次标定,尽可能的准确了。。。。。

#先校正camera
source ~/kalibr_workspace/devel/setup.bash
kalibr_calibrate_cameras --target /home/kwanwaipang/catkin_ws_dvs/src/EVIO/sensor_modeling/kalibr_davis_event/april_6x6_A4_dvs.yaml --bag /home/kwanwaipang/dataset/gwphku/kalibr_davis346_image_imu_2021-12-04-14-43-29.bag --models pinhole-radtan --topics /event_frame --show-extraction

kalibr_calibrate_cameras --target /home/kwanwaipang/catkin_ws_dvs/src/EVIO/sensor_modeling/kalibr_davis_event/april_6x6_A4_dvs.yaml --bag /home/kwanwaipang/dataset/gwphku/kalibr_davis346_image_imu_2021-12-04-15-00-57.bag --models pinhole-radtan --topics /event_frame  --show-extraction

#通过这个命令可以查看参数
#The temporal calibration is turned on by default and can be disabled using the --no-time-calibration argument. 
kalibr_calibrate_imu_camera --h

kalibr_calibrate_imu_camera --bag [filename.bag] --cam [camchain.yaml] --imu [imu.yaml] --target [target.yaml]


kalibr_calibrate_imu_camera --bag ***.bag --cam /home/kwanwaipang/catkin_ws_dvs/src/EVIO/config/kalibr_dvs/camchain.yaml --imu /home/kwanwaipang/catkin_ws_dvs/src/EVIO/config/kalibr_dvs/imu.yaml --target /home/kwanwaipang/catkin_ws_dvs/src/EVIO/config/kalibr_dvs/april_6x6_A4_dvs.yaml --show-extraction

请注意需要的模型为:

  • pinhole camera model (pinhole)
    (intrinsics vector: [fu fv pu pv])
  • radial-tangential (radtan)
    (distortion_coeffs: [k1 k2 r1 r2])

两个yaml文件的格式如下:

参考资料

https://github.com/ethz-asl/Kalibrhttps://github.com/ethz-asl/Kalibr

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值