rsb_timesync [OPTIONS]


Synchronizes events on several scopes in an RSB-based system based on their timestamps.

Imagine e.g. a situation in which a vision algorithm produces some features based on images and another algorithm extracts auditory features from an audio stream. Both send their results as RSB events but the events are not temporally associated because they originate from separate sources (in this case participants). This becomes a problem when a third module wants to process events from both sources, synchronized by their timestamps.

This program can be configured to receive events from both sources, synchronize them and emit an event which contains associated original events. This way modules interested in multiple streams are freed from the task of synchronizing events.


If the external program with network communication creates too much overhead, the algorithms can also be used inside C++ programs in form of a shared library.

--outscope SCOPE

Specifies the scope on which synchronized events are emitted.

--primscope SCOPE

Specifies the a scope which should be used for input events. This option must appear one time as for some synchronization strategies one scope has a special primary role compared to other scopes.

--supscope SCOPE

Additional scopes to use for input events to synchronize.


Currently, there is no specified behavior of what should happen when an event on a subscope of a configured scope arrives. Strategies may treat this as an error or continue processing as if the event was received on the superscope that was configured.

--strategy NAME

Valid names: approxt, firstmatch, timeframe

The strategy to use for synchronizing the events received on the primary and supplemental scopes. For a description of available strategies refer to Algorithms. There, additional options for each strategy are explained.

--timestamp SPEC

The timestamps to use for synchronizing. Possible values are

  • rsb::create
  • rsb::send
  • rsb::receive
  • rsb::deliver
  • Names of user timestamps

Multiple timestamps can be specified separated by ‘,’, e.g.:


This specifies the priority to take timestamps with but allows missing user timestamps with the next item in the list as a fallback.

Default: rsb::create



Implements http://www.ros.org/wiki/message_filters/ApproximateTime. In brief, emits events where for each configured scope exactly one event is present. Minimizes distance between the earliest and the latest event in each result event while preserving some other conditions.

--approxt-qs SIZE

The queue size to use, default is 2


Emits events where for each configured stream one event is present by using the first received event on each stream after each emitted result event.


Only for testing purposes - Probably not usable at all.


Associates multiple events from subsidiary scopes to one event of the primary scope by selecting all events from the subsidiary scope that are close to the time of the primary event (a delta needs to be specified). Currently, does not prevent that one subsidiary event is present for several primary events.

--timeframe-timeframe TIME

Allowed time frame to associate in microseconds in both directions of time.

Default: 250000

--timeframe-buffer TIME

Buffer time in microseconds. This is the time between now and rsb::create timestamp of the primary event (or the timestamp selected via the command line option) which is waited until the event is sent out with all synchronizable other events.

Default: 500000


Implementation Language Project Repository Link
C++ rsb-tools-cpp “0.13” branch of https://code.cor-lab.org/git/rsb.git.tools-cpp