ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
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.