On Mon, Jun 6, 2011 at 2:26 PM, Bill Morris <morris@ee.ccny.cuny.edu> wrote:
> > I would like to see a system for storing camera calibrations based on
> The camera_info_manager URL supports any naming scheme desired.

In the unstable version of the OpenNI (Kinect) drivers, I've tried out a system for storing calibrations based on serial number. You can pass in a URL containing "%s", and the driver replaces that with the camera name. The camera name is of the form "[rgb|depth]_[serial#]". For example, if you give the driver a URL "/tmp/calibration_%s.yaml" it might expand to "/tmp/calibration_depth_B00362708888047B.yaml". This makes working with multiple Kinects a lot easier.

That's trivial to implement in a driver, but it would be nice to push the name substitution down into CameraInfoManager just to ensure a consistent API across camera drivers. In other words, have this just work:

info_manager.setCameraName("depth_B00362708888047B");
info_manager.loadCameraInfo("/tmp/calibration_%s.yaml");

I'm not attached to "%s", maybe something like "$NAME" would be clearer.

I would like to propose that cameras that can not store calibrations in
memory store the calibrations in $ROS_HOME/calibration/driver-id.cal

+1 on $ROS_HOME over /tmp. /tmp works, as long as you don't reboot :). Otherwise you have to know and remember to change the URL, which can lead to otherwise unnecessary launch file editing. Let's streamline that away.

Cheers,
Patrick