ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I assume that you send a sensor_msgs/Image. In this case you could publish your additional information with (exactly) this timestamp and use a message_filter with the ExactTime Policy (7.2) in your subscriber. You then get a combined callback for your image and your additional data. The message_filter looks at the timestamps in the header (not the time when the message was received!) so that it's no problem if your processing takes some time. [I'm not quite sure if the ExactTimePolicy has a buffer so you should check if your processing is fast enough to keep up with the images. But at least you won't get wrong matches]