Closed FranzAlbers closed 1 year ago
Thanks for the feedback!
There's currently no way to handle transient_local durability, but I understand the need and am happy to review a PR that extends cut
for this case.
I think the solution can't carry over the affected messages with their original timestamp.
For messages recorded at the start, the original bag timestamp would leave a gap between it and the next message of a topic affected by the cut.
This makes ros2 bag play
seem unresponsive in the beginning.
To avoid this, the (bag) timestamp of the carried-over message would need to be set to the new bag start time.
Same thing at the end.
Since this behaviour can be just as surprising as the message being removed, an opt-in argument is IMO the best way to add this functionality. I.e. an additional cut
arg --snap-topics TOPIC [TOPIC..]
, that keeps all messages of given topics but snaps their timestamps to the start and end of the bag.
Thanks for developing these awesome rosbag2 extensions!
When cutting a rosbag2, all messages outside of a certain time span are dropped. This is also the case for messages with transient_local durability: E.g., the tf tree published on /tf_static is lost in the new bag, when we cut a time span that does not contain the very beginning of the original bag.
In my opinion, messages with transient_local durability should be always carried over when cutting a portion of a bag. Is there currently a way to do so?