Thought I'd answer my own question because I figured a way to do it.
Once you have calibrated your camera and clicked the save and commit button you will find a file
/tmp/calibrationdata.tar.gz
Copy it to some location and then extract it as
tar -xzf calibrationdata.tar.gz
You will get a left.yaml and right.yaml file. If not use this to get the files.
Once that's done you will need a launch file that looks something like this
<group ns="stereo">
<node pkg="uvc_camera" type="uvc_stereo_node" name="uvc_camera_stereo">
<param name="width" type="int" value="640" />
<param name="height" type="int" value="480" />
<param name="fps" type="int" value="30" />
<param name="frame" type="string" value="wide_stereo" />
<param name="auto_focus" type="bool" value="False" />
<param name="focus_absolute" type="int" value="0" />
<!-- other supported params: auto_exposure, exposure_absolute, brightness, power_line_frequency -->
<param name="left/device" type="string" value="/dev/video1" />
<param name="right/device" type="string" value="/dev/video2" />
<param name="left/camera_info_url" type="string" value="file://$(find ksas)/cameracalibration/left.yaml" />
<param name="right/camera_info_url" type="string" value="file://$(find ksas)/cameracalibration/right.yaml" />
</node>
</group>
Note:
ksas
is the name of the package I have written.
Most of the ROS camera drivers already have functionality for storing the camera calibration on disk or on the camera, and reloading it at startup. Which camera driver are you using?
The usb_cam driver.