kalibr标定双目+imu

1.imu单独标定:Allen方差标定曲线

(1)用港科大的imu_utils工具标定https://github.com/gaowenliang/imu_utils
注意要先编译code_utils包,再编译imu_utils包。碰到问题一般issue里有。
编译报错

code_utils-master/src/sumpixel_test.cpp:2:24: fatal error: backward.hpp:No such file or directory
在code_utils下面找到sumpixel_test.cpp,修改#include "backward.hpp"为 #include “code_utils/backward.hpp”,再编译。

(2)imu静止放置录2h的bag包

rosbag record -O imu.bag /mynteye/imu/data_raw

(3)标定

source ./devel/setup.bash
roslaunch imu_utils mynteye_imu.launch 
rosbag play -r 200 imu.bag (这里要写你录制的包的路径)

mynteye_imu.launch的编写参考


    
            #imu topic的名字
           
        
           #标定的时长
        
    

2.kalibr双目标定

标定板用A4黑白打印出来效果不好,这里直接在电脑屏幕上显示april的标定板录的(于Aprilgrid能提供序号信息, 能够防止姿态计算时出现跳跃的情况, 所以建议采用Aprilgrid进行标定)。
(1)注意将相机频率降低,不然图片太多,这里用4hz

rosrun topic_tools throttle messages /mynteye/left/image_raw 4.0 /left
rosrun topic_tools throttle messages /mynteye/right/image_raw 4.0 /right

(2)录bag包

rosbag record -O stereo_calibra.bag /left /right

(3)双目的标定

source ros_ws/kalibr/devel/setup.bash
kalibr_calibrate_cameras --bag ~/stereo_calibra.bag --topics /left /right --models pinhole-radtan pinhole-radtan --target ~/kalibr/april_6x6_80x80cm_A0.yaml

3.双目+imu联合标定
(1)录制bag

rosbag record -O stereo_imu_calibra.bag /mynteye/left/image_raw /mynteye/right/image_raw /mynteye/imu/data_raw

(2)标定

 kalibr_calibrate_imu_camera --target ~/kalibr/april_6x6_80x80cm_A0.yaml --cam ~/project/kalibr_ws/camchain-homeyangstereo_calibra.yaml --imu ~/project/kalibr_ws/imu.yaml --bag ~/stereo_imu_calibra.bag --bag-from-to 3 50

bag包录制是个纠结的过程,要注意各轴的激励,但运动也不能使图形模糊,一般得到重投影误差1个像素内就算标定比较好。

你可能感兴趣的:(kalibr标定双目+imu)