Nodes seem to be not responding when rosbag loops back

asked 2021-02-17 16:51:59 -0500

paul_shuvo gravatar image

I'm playing a .bag file with the following command

rosbag play -l exp1.bag --clock

I've also set use_sim_time to true

rosparam set use_sim_time true

I'm using ApproximateTimeSynchronizer to subscribe to multiple topics.

sub_list = [self.pose_sub, self.image_sub, self.point_sub] # topic subscribers
ts = message_filters.ApproximateTimeSynchronizer(
        sub_list,
        10,
        1,
        allow_headerless=True,
    )

When rosbag loops back and starts publishing from the beginning, I get the following warning

[INFO] [1613601460.732996, 1612740640.284861]: ApproximateTimeSynchronizer: Detected jump back in time. Clearing buffer.

And, the nodes seem to be not responding. I'm guessing the problem is with synchronizing time. Is there any solution to this?

edit retag flag offensive close merge delete

Comments

Which nodes are running, and which are not responding? If they expect sequential data, they may just be ignoring the data that appears to be old. As indicated by the INFO message, the synchronizer handles the jump back. It just clears its message buffers and starts over.

tryan gravatar image tryan  ( 2021-02-18 08:59:16 -0500 )edit