使用ROS官方提供的 camera_calibration 包对双目相机进行标定
更多细节可移步至官网
一、准备工作:
- 系统环境:Ubuntu16.04
- ROS版本:ros-kinetic
- 双目相机:Intel RealSense D435i
- 标定板:7×6
二、双目标定:
- 启动双目相机驱动:
source devel/setup.bash
roslaunch realsense2_camera rs_camera.launch
- 查看图像是否发布:
rostopic list #列出 topic 确保相机正在通过ROS发布图像
这会显示所有已发布的topic,检查是否有双目相机左右图像的topic。以下是本实验的相机topic:
buu@buu-OptiPlex-7060:~$ rostopic list
/camera/accel/imu_info
/camera/accel/sample
/camera/color/camera_info
/camera/color/image_raw
/camera/depth/camera_info
/camera/depth/image_rect_raw
/camera/extrinsics/depth_to_color
/camera/extrinsics/depth_to_infra1
/camera/extrinsics/depth_to_infra2
/camera/gyro/imu_info
/camera/gyro/sample
/camera/infra1/camera_info
/camera/infra1/image_rect_raw
/camera/infra2/camera_info
/camera/infra2/image_rect_raw
/camera/motion_module/parameter_descriptions
/camera/motion_module/parameter_updates
/camera/realsense2_camera_manager/bond
/camera/rgb_camera/auto_exposure_roi/parameter_descriptions
/camera/rgb_camera/auto_exposure_roi/parameter_updates
/camera/rgb_camera/parameter_descriptions
/camera/rgb_camera/parameter_updates
/camera/stereo_module/auto_exposure_roi/parameter_descriptions
/camera/stereo_module/auto_exposure_roi/parameter_updates
/camera/stereo_module/parameter_descriptions
/camera/stereo_module/parameter_updates
/clicked_point
/diagnostics
/health_aggregator/error_text
/health_aggregator/fatal_text
/health_aggregator/ok_text
/health_aggregator/warn_text
/initialpose
/linear_velocity_viz
/move_base_simple/goal
/ndt_monitor/ndt_info_text
/points_raw
/rosout
/rosout_agg
/tf
/tf_static
- 安装编译image_pipeline包:
cd catkin_ws/src
git clone https://github.com/ros-perception/image_pipeline/tree/kinetic # 注意:要下载kinetic版本的包
cd ..
rosdep install --from-paths src --ignore-src # 安装image_pipeline 所需的依赖
catkin_make
- 启动标定程序:
source devel/setup.bash
rosrun camera_calibration cameracalibrator.py --approximate 0.1 --size 7x6 --square 0.025 left:=/camera/infra1/image_rect_raw right:=/camera/infra2/image_rect_raw right_camera:=/camera/right left_camera:=/camera/left --no-service-check
- 标定完成后,点击”SAVE"保存标定结果,默认保存在
/tmp/calibrationdata.tar.gz
路径下。