rs-bag
Description
A library to read, write and modify ROS 2
rosbag2 storage files (sqlite3 .db3),
implemented in pure Rust on top of the turso
SQLite engine — no ROS installation required.
Features
- Open an existing rosbag directory or create a new one (optionally
split into multiple
.db3files) - Read messages as raw CDR bytes (
RawReadIterator) or deserialize them directly into anyserdetype (TypedReadIterator<T>) - Filter reads by topic names and/or a timestamp interval
- Insert new messages serialized via
serde+ CDR - Access the bag's topics and metadata
Message deletion, modification and full metadata support are not implemented yet — see the TODOs below.
Current state
This crate is in an early stage (pre-1.0). The read path works for
single-file and split bags, but some APIs are still unimplemented stubs
(that will panic) and split-bag opening assumes a single .db3 per bag.
TODOs
-
Opening an existing rosbag
-
Reading messages
- Based on a topic name
- Based on an interval
- RawReadIterator
- TypedReadIterator
- Get topics per db3 file
- Unify topics with each db3 file's topic_id
-
Metadata File
- Read existing metadata
- Create metadata for rosbag
-
Writing messages
- Insert messages
- Push/Pop Operations
- Use ReadIterator for Pop Operations
- Add and remove topics
-
Modify messages
- Create mutable message type
- Reuse functions of Reader and make Message mutable