Repository navigation
fix: ROSBag skips a truncated message with a warning, instead of stopping with a struct.error - #319
Merged
Merged
Conversation
…ping with a struct.error A message that ends before its type says it should, such as the last message of a recording that was cut short, raised a bare struct.error and ended the iteration. It is now skipped, with one RuntimeWarning per topic that says what happened, or one line for each when verbose. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 8 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
…e struct.error in a SerdeError rosbags 0.11.10 raises SerdeError for a message that ends early; 0.11.5 let the struct.error through. The two new truncation tests failed on CI, which has the newer version. Checked on both. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A bag that was cut short, for example by a recording that stopped mid-write, has a last message that cannot be decoded.
ROSBagraised a barestruct.errorand stopped, so none of the good messages before it were usable.ROSBagnow skips the damaged message and carries on. It issues oneRuntimeWarningper topic. Withverbose=Trueit prints the message type, topic and error for each skipped message. Three tests intests/test_ros_truncated.pybuild a damaged bag and check the warning, the quiet default and the verbose output.An AI assistant (Claude Code) wrote this change and has read the diff. I ran the new tests, but not against a real damaged bag.
🤖 Generated with Claude Code