ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

TimeSynchronizer stops working with rosbay looping

asked 2015-08-18 10:05:22 -0500

DeeFox gravatar image

I am working with TimeSynchronizer in python to exactly sync images from 2 cameras that i recorded with rosbay. Now when playing the rosbag with the --loop option, every time the rosbag ends and restarts my program stops working and no callbacks are being called. My guess is, that the number of recorded frames for both cameras do not exactly match and since I am using a queue-size of 1 to optimize delays, the synchronizer fails to find a corresponding packet.

Any ideas?

image_sub1 = message_filters.Subscriber("/stereo/left/image_mono", Image)
image_sub2 = message_filters.Subscriber("/stereo/right/image_mono", Image)

sync = functools.partial(message_filters.TimeSynchronizer)
ts = sync([image_sub1, image_sub2], 1)
edit retag flag offensive close merge delete


I'm not sure how this is implemented, but maybe the TimeSynchronizer assumes that time only increases, thus looping makes this impossible to work.

dornhege gravatar image dornhege  ( 2015-08-18 10:19:42 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-02-26 11:23:05 -0500

cuevhv gravatar image

When you loop the rosbag, basically you go back in time to time 0, making to ROS impossible to synchronize the data.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-08-18 10:05:22 -0500

Seen: 171 times

Last updated: Aug 18 '15