ros-visualization / rqt_bag

http://wiki.ros.org/rqt_bag
31 stars 55 forks source link

Disable reading from bag while recording - use direct caching to index for timeline #123

Closed emersonknapp closed 2 years ago

emersonknapp commented 2 years ago

Part of #121 RFC: This covers the Recording functionality for #121. Draft PR for consideration, feeling out opposition on whether the proposed tradeoff is acceptable.

Description

Rosbag2 doesn't actually support reading-while-writing. The current code goes around this limitation by making queries directly into the SQLite database, but MCAP is now growing in usage as a rosbag2 storage format, so we need rqt_bag to support strictly the rosbag2 API.

For now, I believe it is a worthwhile tradeoff to lose the RawView/PlotView on bags currently recording, in order to gain support for all storage implementations. From what I can tell, the PlotView only shows "data-until-now" when opened, and cannot refresh data, so the panel needs to be closed and reopened to see new data. RawView likewise does not update while recording, since the playhead does not advance - though the user can click in.

emersonknapp commented 2 years ago

@ivanpauno do you have any opinion on this?

ivanpauno commented 2 years ago

Seems like a fair tradeoff to me. We could also keep the sql queries if the backend is detected to be sql for backwards compatibility, but I don't know if that's worth it. i.e. I don't know if people really use the views while recording, based on the limitations described here I would guess no.