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

Revision history [back]

click to hide/show revision 1
initial version

answered 2013-05-06 02:30:41 -0500

joq gravatar image

Since camera_info is published with every image frame, the simplest solution is to subscribe to it. In you message callback: collect the data, then unsubscribe.

It is possible your callback may run a few more times after you unsubscribe. Just to be safe, set a flag when you unsubscribe and return immediately if you get called again.