rosbags
Pure Python library to read, modify, convert, and write rosbag files.
Decision gist · record as of 2026-08-14
Yes. Rosbags is actively maintained, has no known vulnerabilities, supports current Python versions (3.10–3.14), and solves a real problem for robotics engineers who need to work with bag files outside a ROS environment. The pure Python implementation and low dependency footprint make it easy to integrate. Install it if you work with ROS data and need portable, lightweight bag file access.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction: pure Python wheel with six runtime dependencies (apsw, lz4, numpy, ruamel.yaml, typing_extensions, zstandard).
- Actively maintained with a release 2 days ago.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows use in commercial and private projects with minimal restrictions.
last release 2026-08-12 (2 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 732,647 downloads/mo, #5,201 on PyPI
Alternatives
Verify before relying
pip install rosbags
from rosbags.highlevel import AnyReader
from rosbags.typesys import Stores, get_typestore
from pathlib import Path
typestore = get_typestore(Stores.ROS2_FOXY)
with AnyReader([Path('bagfile')], default_typestore=typestore) as reader:
for connection, timestamp, rawdata in reader.messages():
msg = reader.deserialize(rawdata, connection.msgtype)- Performance characteristics when handling large rosbag files or many messages in sequence.
- Whether the type store covers all ROS distributions or only a subset of common ones.
What it is and what it does
Rosbags is a pure Python library for reading, writing, and converting ROS bag files without requiring ROS to be installed. It supports both rosbag1 (the original format) and rosbag2 (the newer format), and includes an extensible type system for serializing and deserializing message data. The library was developed for MARV robotics and can be used standalone or alongside ROS1 or ROS2 installations.
The package provides high-level interfaces for common tasks like reading messages from a bag file and deserializing them into Python objects, as well as command-line tools for converting between rosbag formats. Its dependencies are minimal and well-established (numpy, lz4, zstandard for compression, ruamel.yaml for configuration, and apsw for database access), making it straightforward to integrate into robotics data pipelines or analysis workflows.
Use it for
- Extract and analyze sensor data (IMU, camera, lidar) from rosbag files in a Python script without installing ROS.
- Convert rosbag1 files to rosbag2 format or vice versa using the rosbags-convert command-line tool.
- Build data processing pipelines that read rosbag messages, deserialize them, and feed them into machine learning or analysis frameworks.
- Inspect and validate rosbag file contents programmatically to verify message types and topics before processing.
- Integrate rosbag reading into CI/CD workflows or cloud-based systems where a full ROS installation is impractical.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Rosbags is actively maintained, has no known vulnerabilities, supports current Python versions (3.10–3.14), and solves a real problem for robotics engineers who need to work with bag files outside a ROS environment. The pure Python implementation and low dependency footprint make it easy to integrate. Install it if you work with ROS data and need portable, lightweight bag file access.
Install
rosbags on PyPI
Before you install
Low friction: pure Python wheel with six runtime dependencies (apsw, lz4, numpy, ruamel.yaml, typing_extensions, zstandard). Actively maintained with a release 2 days ago.
Requires Python 3.10 or later.
License in practice
Apache-2.0 permissive license allows use in commercial and private projects with minimal restrictions.
Quickstart
pip install rosbags
from rosbags.highlevel import AnyReader
from rosbags.typesys import Stores, get_typestore
from pathlib import Path
typestore = get_typestore(Stores.ROS2_FOXY)
with AnyReader([Path('bagfile')], default_typestore=typestore) as reader:
for connection, timestamp, rawdata in reader.messages():
msg = reader.deserialize(rawdata, connection.msgtype)
Verify before relying
- Performance characteristics when handling large rosbag files or many messages in sequence.
- Whether the type store covers all ROS distributions or only a subset of common ones.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesapswlz4numpyruamel.yamltyping_extensionszstandard |
| Maintenance | Actively maintained 2 days since the last release |
| First released | |
| Downloads | 732,647 / month, #5,201 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/EngineeringTyping :: Typed |
Evidence: rosbags-0.11.4-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “rosbag reader writer python”
- rosbagsRead, write, convert, and deserialize ROS bag files (rosbag1 and…
- readerwriterlockProvides reader-writer lock implementations for Python that solve the…
- ndjsonProvides a familiar JSON Lines (ndjson) parser and writer with an API…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also mcap-ros2-support · pyros-genmsg · pyulog · rospkg · mcap-ros1-support · catkin-pkg · pypcd4 · FlowIO · bdbag · rosdistro