-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mcap ros1 message play back in rust #6
Comments
test
|
This is apparently the md5sum of nothing, I'm getting it for two different strings but they must not be making in, maybe due to size limits?
-> no the strings were getting sent in with |
This is working with lucasw/roslibrust@04bb108 in this roslibrust branch https://github.com/lucasw/roslibrust/commits/subscribe_any/ |
Next feature is to be able to play back multiple mcaps properly interleaved. First load all of them and get the start times of the first messages, and take the earliest time of those. Then tokio spawn a player for each of them with that earliest message time and a wallclock start time (could be slightly in the future to allow everything to initialize), each will independently publish and sleep in order to keep in time relative to the start time, but don't need to talk to each other (there will be duplicate publishers across them, but they'll all have their own node handles). Then wait for all to complete before looping or exiting. A more advanced version of that would have each receive message clock time via a channel, and the main thread sends that to each and can pause or jump forward or change the rate of playback. |
Broadcast the wall start time with tokio broadcast https://docs.rs/tokio/latest/tokio/sync/broadcast/index.html |
Play/pause mostly works, but the timing is off when resuming sometimes- maybe need to future date the playback a little and not play back anything until it's time? |
Need to aggregate tf_static messages into one message as in ros1_play_mcap.py- it would be easier if mcap convert did that (mcap_record could as well), but can't depend on that so need to handle it on playback. Every tf_static TFMessage in an mcap needs to be added to a mutable vector, and the tf_static publisher needs to be set to latch. (How is latching handled in other cases for mcap, where would the information be stored? How is it handled in bags? |
Completed by #10, but there are still some playback issues to resolve- looping with multiple bags can take up increasing amounts of memory is one. |
Duplicate rosbag play features, eventually --clock.
The md5sum is needed, but mcaps don't store it, this python can get it from the message definition so need a rust version:
https://github.com/lucasw/mcap_tools/blob/main/mcap_tools/scripts/msg_def_md5.py
lucasw/ros_one2z#4
A python implementation of mcap playback: https://github.com/lucasw/ros_one2z/blob/main/one2z/scripts/ros1_play_mcap.py
RosLibRust/roslibrust#194
The text was updated successfully, but these errors were encountered: