Skip to main content

apairo-ros

ROS for apairo. ROS 1 and ROS 2 bags are read with rosbags, so no ROS installation is needed:

  • Extract a bag to an apairo dataset with apairo-extractor (below);
  • read it in place with BagDataset, converted and stamped as an extraction would, to replay a deployed chain on it (see Read a bag in place).

Installation

pip install apairo-ros
pip install "apairo-ros[mnt]"           # the Zarr MNT export

Requires Python ≥ 3.11 and apairo ≥ 0.9.

Extraction

Using apairo, extract ROS bags into an apairo-native dataset (one directory per channel, described by the .apairo sidecar; a Zarr MNT export is in progress) — ready to load with apairo.RawDataset. It writes the .apairo sidecars as it goes (per-sequence channels.yaml, root dataset.yaml), tags each channel with its header.frame_id, and handles /tf / /tf_static (see Transforms).

Quickstart

Run apairo-extractor with no arguments for the interactive TUI (equivalently apairo extractor, if apairo's CLI is installed — see CLI below):

╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│      _    ____   _    ___ ____   ___                                                                                                                                                 │
│     / \  |  _ \ / \  |_ _|  _ \ / _ \                                                                                                                                                │
│    / _ \ | |_) / _ \  | || |_) | | | |                                                                                                                                               │
│   / ___ \|  __/ ___ \ | ||  _ <| |_| |                                                                                                                                               │
│  /_/   \_\_| /_/   \_\___|_| \_\\___/                                                                                                                                                │
│                                                                                                                                                                                      │
│               E X T R A C T                                                                                                                                                          │
│                                                                                                                                                                                      │
│            → .apairo • MNT                                                                                                                                                           │
│                                                                                                                                                                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

? Directory containing rosbags:

Data Management

You indicate the root directory of your rosbags

/input/path/
├── rosbag_yvettes/    
│   ├── yvette-mountain-020606.bag
├── rosbag_tartan/  
└────── ...

It will extract it with the options indicated.

Here it is as an apairo dataset with cmd, ouster and /tf:

output/path/                          # dataset root — load with apairo.RawDataset(...)
├── .apairo/
│   └── dataset.yaml                  # dataset name + sequence order
├── <sequence_name>/                  # e.g. yvette-mountain-020606
│   ├── .apairo/
│   │   ├── channels.yaml             # channel -> loader / kind / frame / transform
│   │   └── calibration.yaml          # static extrinsics (from /tf_static)
│   ├── cmd/                          # seq topic -> one stacked .npy
│   │   ├── cmd.npy
│   │   └── timestamps.txt
│   ├── ouster/                       # frame topic -> one .npy per message
│   │   ├── 000000.npy  000000_intensity.npy  ...  001735.npy
│   │   ├── metadata.yaml
│   │   └── timestamps.txt
│   └── tf__odom__base_link/          # /tf edge -> pose channel
│       ├── tf__odom__base_link.npy
│       └── timestamps.txt
└── ...

Load the result directly:

import apairo
ds = apairo.RawDataset("output/path")     # whole dataset (all sequences)
ds.calibration                            # static extrinsics from /tf_static

Read a bag in place — BagDataset

No extraction step: the topics of a bag as an asynchronous apairo dataset, converted and stamped exactly as an extraction would, so a bag read in place and the same bag extracted give the same samples.

from apairo_ros import BagDataset

bag = BagDataset("run_42", topics=["/ouster/points", "/odom"])   # channels: ouster_points, odom
bag = BagDataset("run_42", topics={"lidar": "/ouster/points"})  # or name them
frames = bag.synchronize(reference="ouster_points")

It is the source to replay a deployed chain on, to check a deployment against a recording (deployed.on(bag), see apairo's Inference & Deployment). Messages are held in memory: choose the topics you need.

CLI

Interactive TUI (no arguments) or fully headless with flags:

# headless: list, then extract selected topics
apairo-extractor -i /input/path -l                      # discover bags + topics
apairo-extractor -i /input/path -o /output/path -t /ouster /cmd /tf /tf_static

The same command has four names, all installed by the package:

Name Where
apairo ros extract through apairo's CLI (plugin-discovered, no extra dependency)
apairo-ros extract on its own
apairo extractor, apairo-extractor the names it had before the package became apairo-ros; they stay

apairo ros with no argument lists the package's commands.

Transforms

/tf and /tf_static are understood:

  • /tf (time-varying) is demultiplexed into one pose channel per edge, named <source>__<parent>__<child> (e.g. tf__odom__base_link), stored as [tx,ty,tz, qx,qy,qz,qw]. Edges from different sources are kept as distinct channels — nothing is merged or dropped.
  • /tf_static (time-independent) goes to calibration — one 4x4 entry per edge in .apairo/calibration.yaml, not a channel — so a tree of fixed mounts stays one small file. Read it via ds.calibration.

Applying transforms (reframing point clouds, etc.) is a downstream concern, not the extractor's job — it only stores the transforms faithfully.

Process

Can directly take into account preprocess functions from apairo.

Metadata

Release files for apairo-ros 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apairo-ros 0.1.0
File Size Uploaded Provenance Actions
apairo_ros-0.1.0.tar.gz 50.3 kB With provenance Details for apairo_ros-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for apairo-ros 0.1.0
File Interpreter ABI Platform Actions
apairo_ros-0.1.0-py3-none-any.whl Python 3 none any Details for apairo_ros-0.1.0-py3-none-any.whl

Total release size: 91.3 kB

Release files / apairo_ros-0.1.0.tar.gz

Download URL apairo_ros-0.1.0.tar.gz
Size 50.3 kB
Tags Source
SHA-256 checksum
How to use checksums
27c5233673bc095f76eb44b3cf1dc111e59ef96b725cb56f7d09782d9133b68a
BLAKE2b-256 checksum
How to use checksums
ee7bf5002fe37a3580c8324a7e84aedf7849d1dd5960cd66b8daf3a0950397c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / apairo_ros-0.1.0-py3-none-any.whl

Download URL apairo_ros-0.1.0-py3-none-any.whl
Size 41.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af61d11ad9089c080f14af95687a09b7e607cc6a8a2bc4f6dedba2514b343691
BLAKE2b-256 checksum
How to use checksums
3ca6901ab352f5e52b630e11d1d53c0476dfbdc8483b88f72ee944a949fdf556
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Security for apairo-ros 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for apairo_ros-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page