What are the next steps after stereo calibration?
I've completed the stereo calibration tutorial and have my sample images and parameters in a calibrationdata.tar.gz file. Where do I go from here?
I want to use this to create a depth map and point cloud for doing SLAM, but the tutorial doesn't mention anything about what to do with the calibrated camera. It only links to an old Willowgarage page which is long dead.
Although it's completely undocumented, digging around I found that the "Commit" button in the cameracalibrator.py gui saves a YAML file to ~/.ros/camera_info/head_camera.yaml. However, it's unclear what this file represents. The file content saved for my camera was:
image_width: 320
image_height: 240
camera_name: head_camera
camera_matrix:
rows: 3
cols: 3
data: [1034.231282067822, 0, 149.3986264583577, 0, 1059.726267583194, 27.5609680166836, 0, 0, 1]
distortion_model: plumb_bob
distortion_coefficients:
rows: 1
cols: 5
data: [0.2006669805992255, -0.920386733283972, -0.06710445687079475, 0.01907417769046314, 0]
rectification_matrix:
rows: 3
cols: 3
data: [0.9491200720659563, 0.03439773884992495, 0.3130301652613153, -0.03871893115684572, 0.9992212648619694, 0.007596592506998183, -0.3125250920671578, -0.01933027184646673, 0.94971280259811]
projection_matrix:
rows: 3
cols: 4
data: [1300.089955798789, 0, -170.1720094680786, -89.58782554834289, 0, 1300.089955798789, 9.835054516792297, 0, 0, 0, 1, 0]
However, the raw ost.txt file exported to the /tmp/calibrationdata.tar.gz contained:
# oST version 5.0 parameters
[image]
width
320
height
240
[narrow_stereo/left]
camera matrix
958.183533 0.000000 178.343947
0.000000 998.494337 -2.125240
0.000000 0.000000 1.000000
distortion
-0.184614 3.428311 -0.078904 0.023000 0.000000
rectification
0.950676 0.038027 0.307845
-0.033772 0.999246 -0.019139
-0.308341 0.007799 0.951244
projection
1300.089956 0.000000 -170.172009 0.000000
0.000000 1300.089956 9.835055 0.000000
0.000000 0.000000 1.000000 0.000000
# oST version 5.0 parameters
[image]
width
320
height
240
[narrow_stereo/right]
camera matrix
1034.231282 0.000000 149.398626
0.000000 1059.726268 27.560968
0.000000 0.000000 1.000000
distortion
0.200667 -0.920387 -0.067104 0.019074 0.000000
rectification
0.949120 0.034398 0.313030
-0.038719 0.999221 0.007597
-0.312525 -0.019330 0.949713
projection
1300.089956 0.000000 -170.172009 -89.587826
0.000000 1300.089956 9.835055 0.000000
0.000000 0.000000 1.000000 0.000000
So it looks like the YAML file saved by cameracalibrator.py is truncated and only contains the calibration data for a single camera. Do I need to manually organize this data, for both cameras, in separate YAML files and then give those to the nodes that read/publish the camera images?
Edit: I was able to split the ost.txt file and convert it into separate yml files for each camera, and get a usb_cam node running who those calibration files. However, stereo_image_proc seems unable to connect or read these streams.
My usb_cam launch file:
<launch>
<arg name="device_left" default="/dev/video1" />
<arg name="device_right" default="/dev/video2" />
<arg name="width ...