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

The purpose of this call is to support sensor data which does not represent information from exactly one time.

The most common use case for this is the laser scan message. You'll note in it's definition there is a time increment between readings. The timestamp in the header is for the first ray, and every other measurement is offset in time from that first measurement by the time_increment. This level of time accuracy is important for lasers mounted on on moving platforms, such as a nodding laser. The transform for the first ray vs the last ray can be notably different. Because of this you need to be able look up the transform at every time in the range of the measurements.

With the default message_filter behavior you will get a callback when the first ray is available for transform, but since the message filter does not know about the inherent duration of the message's data it will give you the callback right away. And if you try to project the laser scan into a point cloud using the high fidelity API it will throw an exception most times since you don't have transform data for the whole scan. The solution is to tell the message filter to hold the data for the expected additional duration of the message data using the setTolerance method.

For an example usage see this tutorial