rosbag_snapshot icon indicating copy to clipboard operation
rosbag_snapshot copied to clipboard

keep record latch message when reset buffer

Open jian-dong opened this issue 4 years ago • 11 comments

Hello, Have any plan keep record latch message?

jian-dong avatar Jul 22 '20 05:07 jian-dong

I don't recall what the current behavior is. Do the latched messages fall out of the recording window?

DLu avatar Jul 23 '20 16:07 DLu

I see the code, when flush recording buffer, every message will be drop.

jian-dong avatar Jul 24 '20 03:07 jian-dong

Looks like they are dropped.

A keep-last option would work for all topic types I guess. Or one has to inspect if it is a latched topic like so.

Timple avatar Jul 30 '20 13:07 Timple

@jian-dong

Is this issue no longer relevant for you? For us it is (not highest prio at the moment though). Would you mind keeping it open 'for the record'?

Timple avatar Jan 12 '21 13:01 Timple

@Timple Thank you for caring about this issue, now I use a temporary way be work around, just resend latch message when play bag.

jian-dong avatar Jan 12 '21 13:01 jian-dong

This issue is also relevant for us :-) Right now we are still using a fork that I made when this was still a PR but eventually we would like to switch to upstream and this feature would be much appreciated. Maybe I will get around to implement it in our branch and merge it upstream

arneboe avatar Jan 13 '21 09:01 arneboe

Related ROS Answers (I believe posted by @arneboe): Is it possible to know if a topic is latched on subscriber side in cpp.

gavanderhoorn avatar Jan 13 '21 10:01 gavanderhoorn

Related ROS Answers (I believe posted by @arneboe): Is it possible to know if a topic is latched on subscriber side in cpp.

yep that was me (sorry for the double post btw.). I am implementing this right now in our fork and will hopefully provide a PR within the next week :-)

arneboe avatar Jan 13 '21 10:01 arneboe

Another option would be to drop all connections and re-subscribe to all topics. All the latched topics would be send again.

Note: This might result in some message loss in-between bagfiles (we don't care).

Timple avatar May 31 '21 20:05 Timple

+1. It seems like using the same logic we use here should work.

ayrton04 avatar Jun 18 '21 14:06 ayrton04

You can just use this and it'll keep the first message:

- /tf_static:
    duration: -1

eborghi10 avatar Feb 03 '23 03:02 eborghi10