clear synchronisation buffer
I am synchronising topics with different timestamps from a log file that is replayed in a loop (-l --clock
). In this setting it might happen that synchronisation in rospy (e.g. ApproximateTimeSynchronizer
) blocks because one of the topics has a higher timestamp than any message on the other topics at the end of the log. When looping over the log, the synchroniser will never see a message with a higher timestamp again to synchronise.
Is there an option to clear the synchroniser buffer when a jump backwards in time is detected? I.e. like it is done for TF.
The TimeSynchronizer
stores the messages in queues
so I could manually detect jumps in time and clear these buffers. But it appears to me that is low-level access that should be avoided.
Alternatively, is it possible to force the current time onto the replayed messages, such that their timestamps are consecutive?
Almost a duplicate (but with C++): #q106436.