ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Explicit address for camera calibration file

asked 2014-10-10 09:46:07 -0500

benabruzzo gravatar image

updated 2014-10-15 11:27:51 -0500

joq gravatar image

I have a few different platforms that are all using the same package. Each platform has a different stereo camera calibration file.yaml

Each platform has its own launch file, which gets called (roughly) this way:

<node pkg="nodelet" type="nodelet" name="camera1394_nodelet" args="load camera1394/driver left_manager">
<rosparam file="/home/turtlebot/workingDir/cam_info/00b09d0100c8851b.yaml" /> 
<param name="guid" value="00b09d0100c8851b" />

Which seems to work, but within each yaml file the camera_info_url is defined this way:

camera_info_url: package://hast/cam_info/left_00b09d0100c8851b.yaml

but I would rather call it this way:

camera_info_url: /home/turtlebot/BitSync/hast/workingDir/cam_info/left_00b09d0100c8851b.yaml

This way I can keep and update the files in a "central server" (via bittorrent sync) instead of embedded within the package on each platform. However, the second method fails and does not load the yaml file properly.

Is there a different way to define the camera parameters, or am I stuck with the file in each package?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-10-11 11:07:50 -0500

joq gravatar image

updated 2014-10-11 11:14:09 -0500

Like many other ROS camera drivers, camera1394 uses the camera_info_manager package for resolving camera configuration information. That package can handle many URL options.

If I understand the question correctly, you want to store calibration files for all your cameras together, somewhere separate from your ROS packages. The easiest way to do that is via the ${NAME} substitution parameter, which gets resolved to the name of each specific device, 00b09d0100c8851b in your example.

To accomplish that, set the URL this way:

camera_info_url: file:///home/turtlebot/BitSync/hast/workingDir/cam_info/${NAME}.yaml

Then, store all your calibration files in that directory using each camera's unique 16 hex digit name plus the .yaml suffix.

You can even use the identical URL for calibrating the camera initially, camera_info_manager will store the file in the specified directory. After that, you would need to update the bit torrent manually.

edit flag offensive delete link more


Would this also be called during the launch file as:

<rosparam file="/home/turtlebot/workingDir/cam_info/${NAME}.yaml" />


benabruzzo gravatar image benabruzzo  ( 2014-10-14 10:47:26 -0500 )edit

Thanks, that did work. Just FYI for others, no, the launch file needs to have the actual name of the yaml file:

<rosparam file="/home/turtlebot/BitSync/hast/workingDir/cam_info/00b09d0100c884f8.yaml" />
benabruzzo gravatar image benabruzzo  ( 2014-10-14 10:54:49 -0500 )edit

That's right, ${NAME} is resolved only for the URL parameter, not in the launch file itself.

joq gravatar image joq  ( 2014-10-15 11:26:37 -0500 )edit

Question Tools

1 follower


Asked: 2014-10-10 09:46:07 -0500

Seen: 2,031 times

Last updated: Oct 11 '14