Skip to content

Commit

Permalink
Accept connection records without topic field (#6)
Browse files Browse the repository at this point in the history
The field is not present in ROS Noetic rosbags.
  • Loading branch information
rlamarche committed May 27, 2024
1 parent a0d5543 commit 446f490
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.6.3 - 2024-05-27
### Changed
- Accept connection records without `topic` field ([#6])

[#6]: https://github.com/newpavlov/rosbag-rs/pull/6

## 0.6.2 - 2024-05-22
### Changed
- Accept empty `latching` field in connection headers ([#5])
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rosbag"
version = "0.6.2"
version = "0.6.3"
description = "Utilities for reading ROS bag files."
authors = ["Artyom Pavlov <newpavlov@gmail.com>"]
license = "MIT OR Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/record_types/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl<'a> RecordGen<'a> for Connection<'a> {
}
}

let topic = topic.ok_or(Error::InvalidHeader)?;
let topic = topic.unwrap_or(storage_topic);
let tp = tp.ok_or(Error::InvalidHeader)?;
let md5sum = md5sum.ok_or(Error::InvalidHeader)?;
let message_definition = message_definition.ok_or(Error::InvalidHeader)?;
Expand Down

0 comments on commit 446f490

Please sign in to comment.