Skip to content

Full Implementation of RosBagWriter#8

Open
Carter12s wants to merge 5 commits into
RosLibRust:masterfrom
Carter12s:implement-rosbag-writer
Open

Full Implementation of RosBagWriter#8
Carter12s wants to merge 5 commits into
RosLibRust:masterfrom
Carter12s:implement-rosbag-writer

Conversation

@Carter12s
Copy link
Copy Markdown

Addresses #3

Took a full swing at it, and did pretty thorough testing so I think the implementation is sound. Not very familiar with bag file format before this and the documentation is a little barren, so I hope I didn't miss anything major.

@Carter12s Carter12s force-pushed the implement-rosbag-writer branch from 65e8821 to cdece3f Compare March 10, 2026 18:57
@Carter12s
Copy link
Copy Markdown
Author

I ended up doing a bunch of CI runs over here: Carter12s#1

And CI is currently passing on my Repo, but I did have to do some fairly gross gymnastics to work around the MSRV of this project. I'm inclined to increase the MSRV in the release that add the Writer, but open to thoughts.

This PR also adds a devcontainer setup to simplify local environment setup as well as a CI setup with a ROS noetic installation to enable some integration testing. Happy to remove those or move to separate PRs.

Copy link
Copy Markdown
Collaborator

@newpavlov newpavlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't reviewed the writer implementation itself. Just several minor suggestions.

Comment thread src/error.rs Outdated

// Write-specific errors
/// I/O error during write operations.
IoError(std::io::Error),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it's better to introduce a separate error type for the writer.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, I think eventually we may want to rename Error to ReadError, and also re-organize the crate so that Reader and Writer both live in similar sub-module / folder layouts. But trying to keep changes in this MR minimal.

Comment thread src/writer/mod.rs Outdated
pub use write_cursor::WriteCursor;

#[cfg(test)]
mod integration_tests {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I prefer to keep integration tests in the tests/ folder and use unit tests mostly for testing private APIs.

Same for other tests in the sub-modules.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completed

Comment thread .github/workflows/rosbag.yml Outdated
profile: minimal
# Pin dependencies for MSRV compatibility (Rust 1.63)
# Order matters: pin high-level crates before their transitive dependencies
- name: Pin MSRV-compatible dependency versions
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine to just bump MSRV, update edition to 2024, and rely on the MSRV-aware resolver going forward.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@Carter12s
Copy link
Copy Markdown
Author

@newpavlov Sorry for delay here, was expecting to use this for a project for work, but that got delayed.

I've updated with your suggested changes (all good ideas!) and I think this is ready for a final review / merge now.

Thanks again for joining this crate with RosLibRust org. if you've got time to continue to review I'd appreciate it. I also don't have crates.io ownership / publish rights yet. If you want to send those my way I'd be happy to accept. Otherwise happy to continue to have you publish.

@newpavlov
Copy link
Copy Markdown
Collaborator

I also don't have crates.io ownership / publish rights yet

You listed as an owner of the crate. BTW it may be worth to configure Trusted Publishing for this crate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants