The rosbags library is a pure Python library designed for reading, writing, and manipulating ROS (Robot Operating System) bag files (both rosbag1 and rosbag2 formats).[[1]][[2]] It notably does not require a ROS installation to function.
Here are the most relevant documentation resources for the rosbags Python library:
-
Official Documentation (GitLab Pages): This is the primary source for detailed information, including high-level APIs, the type system, serialization/deserialization (serde), usage examples, and API references.
- Main Page: https://ternaris.gitlab.io/rosbags/ [1]
- Type System: Details on how
rosbags handles ROS message types, including built-in stores for different ROS distributions (like Foxy, Humble, Noetic) and how to add custom types.[[3]] [4]
- Highlevel APIs: Information on the simplified interfaces for reading and writing bags.[[1]] [1]
- Usage Examples: Practical examples like editing bags, registering custom types, and converting between bag versions.[[3]] [1, 4]
-
PyPI Project Page: Provides a quick overview, installation instructions (pip install rosbags), basic usage examples, and links to the documentation and source code. [5]
-
Source Code Repository (GitLab): The GitLab repository contains the source code, README, contribution guidelines, and issue tracker. While the formal documentation is on GitLab Pages, the repository itself can be a valuable resource. [1, 3]
Key features covered in the documentation:
- Reading and writing both rosbag1 and rosbag2 files. [1, 5]
- High-level, easy-to-use interfaces. [1, 5][[1]][[2]]
- An extensible type system for handling ROS message definitions, including custom types.[[3]] [1, 4]
- Serialization and deserialization functions.[[1]][[3]] [1, 4]
- Tools for converting between rosbag versions.[[1]][[2]][[3]] [1, 5]
- Independence from ROS 1 or ROS 2 installations.[[1]] [1, 5]
Additionally, there are related libraries in the rosbags ecosystem with their own documentation, such as:
rosbags-image: For interacting with image messages, similar to cv_bridge. [6][[5]]
rosbags-dataframe: For easily creating pandas DataFrames from rosbag messages.[[6]][[7]] [7, 12]
Note: Some search results refer to older or different libraries like pyrosbag [2, 8] or the standard ROS rosbag API documentation [9, 10], which are distinct from the standalone rosbags Python library developed by Ternaris. [1, 3, 5]