双目相机与IMU camera IMU 联合标定工具箱使用方法——Kalibr

16个相机参数:

双目相机与IMU camera IMU 联合标定工具箱使用方法——Kalibr_第1张图片

Overview

ethz-asl/kalibr is a toolbox that solves the following calibration problems:

    Multiple camera calibration: intrinsic and extrinsic calibration of a camera-systems with non-globally shared overlapping fields of view
    Camera-IMU calibration: spatial and temporal calibration of an IMU w.r.t a camera-system
    Rolling Shutter Camera calibration: full intrinsic calibration (projection, distortion and shutter parameters) of rolling shutter cameras

kalibr website:

https://github.com/ethz-asl/kalibr/wiki/multiple-camera-calibration

https://github.com/ethz-asl/kalibr

1.安装

Kalibr 提供两种使用方式。第一种为CDE下直接使用,作者将所需的库文件打包好,省去了配置dependency的步骤,可以直接从

https://github.com/ethz-asl/kalibr/wiki/downloads

下载, 注意需要科学浏览。

下载之后直接用

./cde-exec+命令 即可使用对应的工具。

例如如果我们想使用kalibr内的kalibr_calibrate_cameras功能,

使用

./ced-exec kalibr_calibrate_cameras --target april_6x6.yaml --bag static.bag --models pinhole-equi pinhole-equi omni-radtan omni-radtan --topics /cam0/image_raw /cam1/image_raw /cam2/image_raw /cam3/image_raw

单目+IMU双目+IMU 为例,讲解使用 Kalibr工具 标定 Camera-IMU,其中使用的摄像头分别为 Realsense ZR300MYNT-EYE S系列摄像头

2.开始标定

Kalibr不仅提供了IMU以及camera的联合标定工具箱,也提供了camera标定工具箱。

在此我们先使用camera标定工具对相机进行标定。

首先我们需要制作标定板,在此推荐使用april tag,可以使用kalibr自带工具自定义生成不同大小的标定板,命令如下

kalibr_create_target_pdf --type apriltag --nx [NUM_COLS] --ny [NUM_ROWS] --tsize [TAG_WIDTH_M] --tspace [TAG_SPACING_PERCENT]
  1. roscore
  2. rosrun uvc_camera uvc_camera_node
  3. rosrun image_view image_view image:=/image_raw
  4. rostipic list
  5. rqt_image_view
  6. rosbag record -o test /image_raw
  7. rosbag play test_2019-08-14-14-22-35.bag

 

将生成的pdf打印出来,置于平稳,光照充足的地方,注意要保持平整。

Kalibr作者推荐将camera固定,然后移动标定板,这样可以提高标定的稳定性,但是鉴于我使用场景受限,我使用的是晃动camera方法。

之后就可以开始录制bag了,使用

rosbag record /cam0/image_raw /cam1/image_raw /imu0

 

若对相机标定结果满意我们可以继续进行camera以及imu的联合标定步骤,此步使用了如下信息:

1. 标定板yaml

2. 相机标定结果yaml

3. imu内参yaml

4. 前面使用的对应bag

有了如上材料即可进行联合标定,具体如下

kalibr_calibrate_imu_camera --target aprilgrid6x4.yaml --cam camchain-2017-06-14-09-13-29.yaml --imu imu.yaml --bag 2017-06-14-09-13-29.bag --bag-from-to 5 45

 最后的--bag_from_to是选取地5-45s的bag数据,去除了拾取防止设备产生的抖动部分影响。我们建议进行多组标定之后将标定结果进行最佳无偏估计,不建议对R部分直接取平均值,可以将多组数据的R部分转换成四元数。之后进行处理。

3.标定板文件:target.yaml
Kalibr支持三种标定板,分别是Aprilgrid、Checkerboard和Circlegrid。
 

https://github.com/ethz-asl/kalibr/wiki/calibration-targets
 

你可能感兴趣的:(Kalibr)