ros2 / rosbag2

Apache License 2.0
273 stars 246 forks source link

"use-ros-time" - Drive rosbag2 playback via /clock time source #694

Open emersonknapp opened 3 years ago

emersonknapp commented 3 years ago

Description

Allow rosbag2 to listen to the /clock topic as its time source. This would allow for rosbag2 to play in sync with Gazebo, or to synchronize multiple bag playbacks with each other (one publishes /clock, the rest subscribe)

This should probably be invoked by ros2 bag play --use-ros-time

Related Issues

Related to #99 Designed by #675

Implementation Notes / Suggestions

See #675

Testing Notes / Suggestions

Run a bag playback with a separate clock publisher, and see that messages are published when expected.

emersonknapp commented 1 year ago

Closing as completed

giovannirizzetto commented 1 year ago

Hello,

this rosbag2 feature would be very important in a project I am working on. I have not understood if it is going to be available or not, seems to me it was abandoned, right?

Thanks a lot for your assistance

emersonknapp commented 1 year ago

Hmmm - I remember being quite sure 2 weeks ago that this had been completed somehow - but I'm looking at the code now and not seeing any evidence of this. Maybe I was distracted at the time?

emersonknapp commented 1 year ago

I don't think this would be too hard to implement. https://github.com/ros2/rosbag2/pull/928/files was definitely close to it. I'm not sure now why we closed it.

giovannirizzetto commented 1 year ago

Yes, I agree, it seems that it was very close to being done and merged but then it was just closed and that feature is currently absent.

Thanks for reopening it, I will monitor this issue and when it's done I'll pull your modifications.

emersonknapp commented 1 year ago

Well, unfortunately I don't think anybody has bandwidth allotted for this feature at the moment. If you wanted to grab the branch from #928 and take over finishing the implementation that would be great, and I'd be happy to try and give it a timely review.