Expand description
Utilities for efficient reading of ROS bag files.
§Example
use rosbag::{ChunkRecord, MessageRecord, IndexRecord, RosBag};
let bag = RosBag::new(path)?;
// Iterate over records in the chunk section
for record in bag.chunk_records() {
match record? {
ChunkRecord::Chunk(chunk) => {
// iterate over messages in the chunk
for msg in chunk.messages() {
match msg? {
MessageRecord::MessageData(msg_data) => {
// ..
}
MessageRecord::Connection(conn) => {
// ..
}
}
}
},
ChunkRecord::IndexData(index_data) => {
// ..
},
}
}
// Iterate over records in the index section
for record in bag.index_records() {
match record? {
IndexRecord::IndexData(index_data) => {
// ..
}
IndexRecord::Connection(conn) => {
// ..
}
IndexRecord::ChunkInfo(chunk_info) => {
// ..
}
}
}
Modules§
- Collection of record types.
Structs§
- Iterator over records stored in the chunk section of a rosbag file.
- Iterator over records stored in the chunk section of a rosbag file.
- Iterator over records stored in a
Chunk
record. - Open rosbag file.
Enums§
- Record types which can be stored in the chunk section.
- The error type for ROS bag file reading and parsing.
- Record types which can be stored in the chunk section.
- Record types which can be stored in a
Chunk
record.
Type Aliases§
- A specialized Result type for ROS bag file reading and parsing.