Export ROS2 rosbag2 to CSV in PlotJuggler style or per-topic
Project description
blobjugglerpy
Export ROS2 rosbag2 to CSV in PlotJuggler style or per-topic.
Usage
Python API:
from blobjugglerpy import collect_columns_plotjuggler, write_plotjuggler_csv
columns, storage_id, type_cache = collect_columns_plotjuggler(bag_dir, topics_filter=None)
write_plotjuggler_csv(bag_dir, out_csv_path, columns, storage_id, topics_filter=None, type_cache=type_cache)
CLI, single bag:
python -m blobjugglerpy --bag /path/to/bag --out /path/to/out.csv --all
Topic selection supports glob-style patterns via --topics, for example:
python -m blobjugglerpy --bag /path/to/bag --out out.csv --topics "/log*" "/sensors/*"
Batch mode recursively discovers bags and writes one output per bag. It uses the same topic flags as single-bag mode, but replaces --out with --output-dir:
python -m blobjugglerpy --batch /path/to/root --output-dir /path/to/exports --all
python -m blobjugglerpy --batch /path/to/root --output-dir /path/to/exports --topics "/log*" --per-topic
Note: You must specify either --all or --topics (supports globs) in both modes.
Command Line Help
$ python -m blobjugglerpy -h
usage: __main__.py [-h] (--bag BAG | --batch BATCH) [--out OUT] [--output-dir OUTPUT_DIR] [--topics [TOPICS ...]] [--all] [--per-topic] [--no-sort] [--overwrite] [--workers WORKERS]
Export ROS2 bag(s) to CSV.
options:
-h, --help show this help message and exit
--bag BAG Path to one rosbag2 directory (contains metadata.yaml)
--batch BATCH Root directory to search recursively for rosbag2 bags
--out OUT Output CSV path for --bag mode
--output-dir OUTPUT_DIR
Output directory for --batch mode
--topics [TOPICS ...]
Explicit list of topics to export
--all Export all topics in the bag
--per-topic Write one CSV per topic instead of merged
--no-sort Do not sort by __time
--overwrite Overwrite existing CSV outputs
--workers WORKERS Number of worker processes for --batch
Installation
pip install git+https://github.com/incebellipipo/blobjugglerpy.git
Reading CSV data with pandas
The exported CSVs use comma as the value separator and may contain semicolons in column names (e.g., topic;field). Since the data is sparse, some rows may have missing values.
import pandas as pd
# Read the exported CSV
df = pd.read_csv('out.csv')
# Display the first few rows
print(df.head())
# Fill NaN values (sparse data) with 0 or interpolate
df_filled = df.fillna(0)
# Or use forward/backward fill for time-series data
df_interpolated = df.interpolate(method='linear')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file blobjugglerpy-0.0.1.tar.gz.
File metadata
- Download URL: blobjugglerpy-0.0.1.tar.gz
- Upload date:
- Size: 29.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b9b686234d1582b864ffe3ecca897a0802c52d835f23f949109925341d8fe3e
|
|
| MD5 |
f73e02373dde487e966fc3119b2726ec
|
|
| BLAKE2b-256 |
e38acb680bb56af0fa582847217b99a065d945357fab4b6de58b1b019040b889
|
Provenance
The following attestation bundles were made for blobjugglerpy-0.0.1.tar.gz:
Publisher:
publish.yml on incebellipipo/blobjugglerpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
blobjugglerpy-0.0.1.tar.gz -
Subject digest:
5b9b686234d1582b864ffe3ecca897a0802c52d835f23f949109925341d8fe3e - Sigstore transparency entry: 1341816818
- Sigstore integration time:
-
Permalink:
incebellipipo/blobjugglerpy@89ff4db5f4a4f2016a4388be8e288464335de847 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/incebellipipo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@89ff4db5f4a4f2016a4388be8e288464335de847 -
Trigger Event:
release
-
Statement type:
File details
Details for the file blobjugglerpy-0.0.1-py3-none-any.whl.
File metadata
- Download URL: blobjugglerpy-0.0.1-py3-none-any.whl
- Upload date:
- Size: 37.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c133a31d3de04e03cf3f252092f6cd9ef1044e3cda86b5c664279104b28aa89e
|
|
| MD5 |
6c8f0a0946bb2968fc18f311737e1bb0
|
|
| BLAKE2b-256 |
c46a2098a8a5c106508335fc6fbb8507922d6e5503d7d64f08db429d9a2be1ec
|
Provenance
The following attestation bundles were made for blobjugglerpy-0.0.1-py3-none-any.whl:
Publisher:
publish.yml on incebellipipo/blobjugglerpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
blobjugglerpy-0.0.1-py3-none-any.whl -
Subject digest:
c133a31d3de04e03cf3f252092f6cd9ef1044e3cda86b5c664279104b28aa89e - Sigstore transparency entry: 1341816839
- Sigstore integration time:
-
Permalink:
incebellipipo/blobjugglerpy@89ff4db5f4a4f2016a4388be8e288464335de847 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/incebellipipo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@89ff4db5f4a4f2016a4388be8e288464335de847 -
Trigger Event:
release
-
Statement type: