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

message_filters and image_transport are two separate ROS packages. Each provides several _nodes_ which can be used in your configuration. In general, message_filters nodes are about filtering or coordinating message deliver, no matter the content of the messages, while image_transport nodes are concerned with manipulating the content of the messages.

To process the RGB and depth image together I've used two different strategies:

  1. Use a TimeSynchronizer message filter to coordinate the two different messages and call a single callback expecting both images. This is probably the best way. The downside is that there is a delay in TimeSynchronizer to pair up the most appropriate messages, which can delay processing of whichever image you want to make the highest priority.
  2. Have two callbacks, one for each message type. For one, say the depth callback, just save the frame away. In the RGB callback, process the RGB image with the most recent depth frame. The disadvantage here is that if the depth image usually precedes the associated RGB, but occasionally follows it, then you could process a stale depth image. The advantage, however, is that you process the RGB image as soon as it is received. (And you can process both when you receive the depth image instead, if you like.)