Access buffered data in ApproximateTimeSynchronizer

asked 2017-08-04 10:39:44 -0500

raimat90 gravatar image

updated 2017-08-04 11:24:15 -0500

The node is in python. My goal is to synchronize two topics and then deliberately access an earlier data in one of them. This "delayed synchronization" consists for me of two steps. The first one I did as below:

        cam_sub = message_filters.Subscriber("/cam", Image)
        odom_sub = message_filters.Subscriber("/odom", Robot)
        ts = message_filters.ApproximateTimeSynchronizer([cam_sub, odom_sub], 10, 0.02)

How can I access odom_sub with an earlier timestamp (after the synchronization from above)?

I feel message_filters.Cache could be a solution, but I don't know how to chain Cache filter to ApproximateTimeSynchronizer filter, as I don't know how to access its buffer.

Any hint or snippets appreciated. Or maybe other ideas, other than creating my own buffer?

edit retag flag offensive close merge delete