newpavlov / rosbag-rs

Reading rosbag files in pure Rust
Apache License 2.0
9 stars 5 forks source link

InvalidRecord error when latching header has zero bytes #4

Closed jobafr closed 3 months ago

jobafr commented 4 months ago

I just hunted down the exact same bug that I then realized @DomWilliamsEE has already fixed in their fork of this crate.

Some connections will not set latching=0 or latching=1, but latching= (zero bytes). For me, this was the case for topics produced by a rosrust-based node, though I'm unsure whether that is what's causing the issue.

If you have the time, it'd be great if you could merge DomWilliamsEE's fix and do a crates.io release :)

newpavlov commented 4 months ago

See discussion in #2. We concluded that such files should be considered incorrect according to the rosbag format "spec". I could reconsider this decision, but ideally it should be fixed on the generation side.

jobafr commented 4 months ago

Hi, yeah, I understand the argument — in our case however, the faulty bag was produced by ROS noetic's rosbag. Given the general state of ROS1 maintenance, I think there is a good argument for aiming for bug-compatibility instead of spec-compatibility :upside_down_face:.

jobafr commented 3 months ago

thanks :)