Skip to content

Calibration

dominiho edited this page Nov 18, 2016 · 4 revisions

Calibration

For the calibration of the camera rig Kalibr is being used. We recommend to create a separate catkin workspace for kalibr since it contains 38 packages that need to be checked for every build.

Running the calibration

Recording a rosbag

run the uvc ros driver to publish the raw images.

roslaunch uvc_ros_driver uvc_ros_driver.launch numberOfCameras:=2

You can throttle the framerate by setting the calibrationMode parameter.

To see the images during calibration you can use rqt and display the image topics.

rosrun rqt_gui rqt_gui

Open a few image views and select the appropriate topics.

Now that you can see all images, record a rosbag with the april tag (we recommend a 6x6 A0 april tag) visible in all images. Make sure the april tag is fully visible in all images at least once.

rosbag record -a

Running the calibration

For the stereo calibration the pinhole-radtan model has to be selected. Run the calibration for all stereo pairs (0,1; 2,3; 4,5; 6,7) and replace the output in the final YAML file.

Example for a stereo calibration of cameras 0 + 1:

kalibr_calibrate_cameras --target april_6x6.yaml --bag <your_bag>.bag --models pinhole-radtan pinhole-radtan --topics /uvc_camera/cam_0/image_raw /uvc_camera/cam_1/image_raw

Upload Calibration File

Rename the created file camchain-20xx-xx-xx-xx-xx-xx.yaml to calibration.yaml

mv camchain-20xx-xx-xx-xx-xx-xx.yaml calibration.yaml 

Copy calibration.yaml onto the MassStorageDevice.

sudo cp calibration.yaml /media/camera/
Clone this wiki locally