Handle transient local messages in snapshot mode when the buffer is full#1887
Handle transient local messages in snapshot mode when the buffer is full#1887doisyg wants to merge 1 commit intoros2:rollingfrom
Conversation
e77ac12 to
26dc2c5
Compare
|
(PR non functional for Rolling, I was originally targeting Iron, will fix) |
|
@doisyg The transient local messages usually appears somewhere at the beginning of the recording like |
@MichaelOrlov are you sure that your proposal would also solve what this PR is trying to solve? The bug described in the ticket has nothing to do with splitting, you can reproduce by: 1- Starting a a bag in snapshot with a relatively low --max-cache-size. It should record Do you have any proposal to fix or workaround that? |
|
@tonynajjar As from my other comment #1159 (comment) $ ros2 bag record -a --repeat-latched /map=1 /tf_static=5For snapshot mode, the straightforward approach would be to keep "latched" messages in a separate buffer and dump it to the disk before the circular buffer with other messages. Trying to reduce the circular buffer on a fly when latched mesages arrives seems is non-trivial. The feature would be more consistent with another feature for snapshot #1844 to limit the bag file by duration rather than by bag size. |
Draft to discuss ways of solving #1886
Naive solution which throws away the first message that is not transient local when the buffer is full, as long as the number of messages at the beginning of the buffer accounts for less than 10% of the total number of messages in the buffer.
That will not solve completely the
/tf_staticuse case if other transient local messages are recorded and periodically published: at some point there will be more than 10% of transient local messages in the buffer, and the first ones (i.e/tf_static) will be removed.Interested in debating and suggestions on how to solve this properly :
/tf_static? But then loss of generality.