[Documentation] [TitleIndex] [WordIndex

message_filters::sync::ApproximateTime

New in ROS CTurtle

Overview

This is a policy used by message_filters::sync::Synchronizer to match messages coming on a set of topics. Contrary to message_filters::sync::ExactTime, it can match messages even if they have different time stamps. We call size of a set of messages the difference between the latest and earliest time stamp in the set.

The algorithm is the product of long discussions with Blaise. It does not work like ExactTime except with matching allowed up to some epsilon time difference. Instead it finds the best match. It satisfies these properties:

  1. The algorithm is parameter free. No need to specify an epsilon. Some parameters can be provided (see below), but they are optional.

  2. Messages are used only once. Two sets cannot share the same message. Some messages can be dropped.

  3. Sets do not cross. For two sets S and T, their messages satisfy either Si <= Ti for all i, or Ti <= Si for all i, where i runs over topics.

  4. Sets are contiguous. There is at least one topic where there is no dropped message between the two sets. In other words there is no room to form another set with the dropped messages.

  5. Sets are of minimal size among the sets contiguous to the previous published set.

  6. The output only depends on the time stamps, not on the arrival time of messages. It does assume that messages arrive in order on each topic, but not even necessarily across topics (though the queue size must be large enough if there are big differences or messages will be dropped). This means that ApproximateTime can be safely used on messages that have suffered arbitrary networking or processing delays.

Optional parameters:

Algorithm

Let S be the last published set, and T the next one being created. It works as follows:

It works in three nested phases:

Examples

Here are some example results. Time goes from left to right, each line is a topic, and each dot is a message. The red message is the pivot, and the broken line links the messages in a set.

TimeArrow.png

Varying frequency:

ApproximateTimeExample.png

Unequal frequency:

ApproximateTimeExample2.png


2022-05-28 12:46