赞
踩
参考:https://github.com/ethz-asl/kalibr/wiki/installation.
source devel/setup.bash
打开终端,启动ZED2摄像头。
roslaunch zed_wrapper zed2.launch
再打开一个终端,启动左右摄像头可视化功能,以确保将标定板保持在相机范围内。
rosrun image_view image_view image:=/zed2/zed_node/left/image_rect_color & rosrun image_view image_view image:=/zed2/zed_node/right/image_rect_color
再打开一个终端,kalibr处理标定数据时要求图像的频率合适,所以降低图像数据到20HZ。
rosrun topic_tools throttle messages /zed2/zed_node/left/image_rect_color 20 /zed2/zed_node/left/image_rect_color2
rosrun topic_tools throttle messages /zed2/zed_node/right/image_rect_color 20 /zed2/zed_node/right/image_rect_color2
再打开一个终端,然后用ZED2录制要标定的数据(视频)。
rosbag record -O Kalibr_cyx_data.bag /zed2/zed_node/imu/data_raw /zed2/zed_node/left/image_rect_color /zed2/zed_node/right/image_rect_color
查看记录的数据。
rosbag info Kalibr_cyx_data.bag
获取相机参数。
kalibr_calibrate_cameras --bag Kalibr_cyx_data.bag --topics /zed2/zed_node/left/image_rect_color /zed2/zed_node/right/image_rect_color --models pinhole-radtan pinhole-radtan --target checkboard.yaml
checkboard.yaml文件要根据标定板去看哦。下面是我这边的标定板的参数,你可以对应修改(行数、列数、每个个小方块的边长)。
target_type: 'checkerboard' #gridtype
targetCols: 8 #number of internal chessboard corners
targetRows: 11 #number of internal chessboard corners
rowSpacingMeters: 0.03 #size of one chessboard square [m]
colSpacingMeters: 0.03 #size of one chessboard square [m]
最后,将会得到camchain-Kalibr_cyx_data.yaml和校准结果的完整PDF报告,完毕。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。