Skip to main content

PyRoboReplay

Forensic debugging and mission-replay platform for autonomous robots: replay ROS 2 missions, run causal / root-cause analysis on failures, and perform multispectral (RGB + thermal) forensics. Rust core with Python bindings.

CI PyPI License: Apache 2.0 Python 3.10+ Rust

What it is

PyRoboReplay ingests recorded robot missions (ROS 2 bags) into a unified timeline and answers why and what-if questions rather than only where and what: which events preceded a failure, what the perception stack missed, and what the robot should have detected. The heavy lifting is a Rust core (cdylib + rlib) built with PyO3, exposed to Python through maturin. A CLI (replay, analyze, compare, list) and a small Python API are the supported entry points today.

Features

Exposed via CLI / Python (verified, tested):

  • Mission replay — interactive timeline scrubber with keyboard controls (replay).
  • Reality-gap analysis — probabilistic mismatch scoring, severity classification, evidence aggregation, JSON/text output (analyze --detect-gaps).
  • Failure detection and diagnosis — Mission.detect_failures(), Mission.analyze_failure() with hypotheses, confidence, and prioritized actions.
  • Mission comparison — side-by-side diff of two bags (compare).
  • Topic listing — inspect available topics in a bag (list).
  • Real ROS 2 CDR decoding — standard sensor_msgs / nav_msgs / geometry_msgs binary layouts are decoded from real message bytes (src/adapters/cdr.rs); pose confidence is derived from the real position-covariance trace, so localization-loss detection fires on real data.

Implemented in the Rust core, not yet wired to CLI or Python (library API only):

  • Causal event graphs, multi-factor causality, incident narratives, evidence-quality scoring.
  • Persistent world knowledge (entities, locations, facts across missions) and spatial grounding.
  • Multi-mission / longitudinal learning.
  • Pluggable detection backends (YOLO / SAM / template fallback).
  • Retrospective DINO + SAM open-vocabulary object discovery.
  • RGB + thermal multispectral fusion and forensic reconstruction.
  • Universal temporal fusion and the Nav2 root-cause inference engine (Phases 14-15).

Who it's for / Use cases

  • Warehouse and logistics fleets — reconstruct why a run failed, find missed detections and coverage gaps, compare two strategy revisions.
  • Safety and compliance review — produce auditable, saved JSON findings for an incident (analyze --detect-gaps --format json --output report.json).
  • Perception R&D — compare perception strategies over matched missions and quantify regressions.
  • Field autonomy teams — investigate localization loss, planner oscillation, and sensor disagreement from recorded missions.

What it is not

  • Not a real-time monitoring or fleet dashboard. It works on recorded missions, not live streams.
  • Most advanced modules (Phases 12-15) are not reachable from the CLI or Python. Use the Rust library directly, or track exposure on the roadmap.
  • Phase 11 "PyTerrainMap integration" is not real interop. src/.../pyterrain_bridge.rs is self-contained, unit-tested terrain-modeling logic conceptually inspired by PyTerrainMap; there is no Cargo/pip dependency, no shared serialization format, and no parser for PyTerrainMap's output.
  • Not published to crates.io — build the Rust crate from source if you need it directly.
  • Not a certified or safety-verified system.

Project status

Beta (Development Status 4). Current source version is 2.11.0; the latest PyPI release is 2.10.2. The CLI and Python API are the tested, supported surface. 843 cargo test --lib unit tests pass (re-verified 2026-09-29), plus 7 real-fixture ROS 2 CDR integration tests. cargo fmt --check is clean. cargo clippy --all-targets --all-features -- -D warnings currently reports ~96 errors, so the CI clippy job runs with continue-on-error and does not gate merges. See ROADMAP_HONEST.md for the implemented/partial/missing breakdown.

Installation

pip install pyroboreplay

# or with uv
uv pip install pyroboreplay

# verify
pyroboreplay --version

Requires Python 3.10+. From source (needs a Rust toolchain):

git clone https://github.com/Mullassery/PyRoboReplay.git
cd pyroboreplay
pip install maturin
maturin develop --release      # install the Python package
# or, for the Rust binary/crate only:
cargo build --release

Quick start

# Interactive timeline scrubber
pyroboreplay replay mission.bag

# Reality-gap analysis, saved as JSON
pyroboreplay analyze mission.bag --detect-gaps --detail --format json --output investigation.json
from pyroboreplay import Mission

mission = Mission.from_ros_bag("warehouse.bag")

failures = mission.detect_failures()
print(f"Failures detected: {len(failures)}")

analysis = mission.analyze_failure(timestamp=1234567890.0)
print(f"Root cause: {analysis.get_primary_hypothesis()}")
print(f"Confidence: {analysis.get_diagnostic_confidence():.0%}")

for action in mission.recommend_actions(timestamp=1234567890.0):
    print(f"[{action.get_priority()}] {action.get_description()}")

Interactive replay keys: Space play/pause, n / → next event, p / ← previous event, ↑ / ↓ speed, ? help, q / Esc quit.

MCAP export

Export a mission timeline to the indexed MCAP robotics log format:

pip install "pyroboreplay[mcap]"
from pyroboreplay import Mission, export_mcap

mission = Mission.from_ros_bag("mission.db3")
export_mcap(mission, "mission.mcap")

Events are written to /events/<sensor> and failures to /failures as JSON messages with their original timestamps, so Foxglove/Rerun and other MCAP readers can open the recording. MCAP (MIT) is an optional dependency.

Rerun mission playback

Export a mission timeline and detected failures to a Rerun recording:

pip install "pyroboreplay[rerun]"
from pyroboreplay import Mission, export_mission

mission = Mission.from_ros_bag("mission.db3")
export_mission(mission, "mission.rrd")
# rerun mission.rrd

Events are logged under events/<sensor> on a time timeline; failures are logged under failures with severity/confidence text. Rerun is an optional Apache-2.0 viewer dependency, not a vendored component.

Alpamayo forensic reports

Turn an offline Alpamayo run (.json, .jsonl, .npz, or a mapping) into a trajectory and reasoning report. Run timestamps are matched against failures already detected in the mission:

from pyroboreplay import (
    build_alpamayo_report,
    load_alpamayo_run,
    write_alpamayo_report,
)

run = load_alpamayo_run("alpamayo-run.json")
report = build_alpamayo_report(run, mission=mission, ground_truth=ego_future_xyz)
write_alpamayo_report(report, "alpamayo-report.md")

The report includes minADE/minFDE per run, per-sample reasoning traces, and correlated failures. No torch or model weights are required; generate the artifacts with the external Alpamayo inference stack.

Usage

pyroboreplay compare mission_a.bag mission_b.bag        # side-by-side
pyroboreplay list mission.bag                            # topics in a bag
pyroboreplay analyze mission.bag --detect-gaps --detail  # findings to stdout

The Python package exports Mission, Event, Failure, Hypothesis, RootCauseAnalysis, Action, FleetStatistics, GeoHotspot (see src/pyroboreplay/__init__.py). The multispectral, retrospective-detection, world-knowledge, and prediction features live in the Rust core and are not yet exposed through these bindings.

Documentation

Known issues and deferred work

Blocked / failed:

  • Expose phases 12–15; rerun/MCAP export; clippy gate.

Rejected / deferred:

  • Live fleet dashboard.

Full shipped/blocked/rejected detail: QUEUE_STATUS.md.

Contributing

Contributions welcome — see CONTRIBUTING.md for setup, conventions, and PR guidelines. Bugs and ideas: GitHub Issues; questions: GitHub Discussions.

Part of the robotics & autonomy family

PyRoboReplay is one of six complementary, composable tools in the Mullassery robotics & autonomy family. Together they form a single stack: perceive → map → simulate → learn → debug → coordinate the fleet.

Tool Role What it does
PyRoboVision Perception Multi-object tracker (Kalman filter + Hungarian algorithm) and trajectory predictor for robot perception.
PyTerrainMap Mapping / SLAM Fuses multi-robot terrain observations into a spatial-temporal store, with H3 spatial indexing and SLAM.
PyRoboSimulator Simulation World simulator for autonomous systems, with a FastAPI backend.
PyRoboFrames Learning data Rust-backed ML dataloader for robot-learning datasets (native LeRobot format, Apple Silicon hardware video decode).
PyRoboReplay Mission forensics This project — forensic-debugging and causal-analysis engine for autonomous robot mission replay.
SyncFleet Fleet coordination Rust + SQLite, peer-to-peer state sync for robotics fleets — mutual-TLS 1.3, version-vector replication, mDNS discovery; conflict resolution on the roadmap.

Each works standalone, but they're complementary by design. Browse all projects →

License

Apache License 2.0 — see LICENSE.

Metadata

Release files for pyroboreplay 2.11.0

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

Built distributions (wheels)

Table of built distributions (wheels) for pyroboreplay 2.11.0
File
pyroboreplay-2.11.0-cp313-cp313-manylinux_2_38_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.38+ x86-64 Details
pyroboreplay-2.11.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
pyroboreplay-2.11.0-cp312-cp312-manylinux_2_38_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.38+ x86-64 Details
pyroboreplay-2.11.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
pyroboreplay-2.11.0-cp311-cp311-manylinux_2_38_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.38+ x86-64 Details
pyroboreplay-2.11.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
pyroboreplay-2.11.0-cp310-cp310-manylinux_2_38_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.38+ x86-64 Details
pyroboreplay-2.11.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details

Total release size: 17.7 MB

Release files / pyroboreplay-2.11.0-cp313-cp313-manylinux_2_38_x86_64.whl

Download URL pyroboreplay-2.11.0-cp313-cp313-manylinux_2_38_x86_64.whl
Size 2.6 MB
Tags CPython 3.13 Linux glibc 2.38+ x86-64
SHA-256 checksum
How to use checksums
b66c0d2c8b0dfdd5df0d51f02e151731536955cbffb44bd99af2aacee5b71305
BLAKE2b-256 checksum
How to use checksums
f501929cc9f4227b3720d1688e03c2155285877b260415114bc3b8425e5a09d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pyroboreplay-2.11.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL pyroboreplay-2.11.0-cp313-cp313-macosx_11_0_arm64.whl
Size 1.9 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2d3ceb74d5faa2b1cde176a17be8143467c1d385df2272d5834a19403782f4d5
BLAKE2b-256 checksum
How to use checksums
54839c8ff2e9734c33a7991a5afd10f8c69b7e203cd6784aa79bb5bb4e495f31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pyroboreplay-2.11.0-cp312-cp312-manylinux_2_38_x86_64.whl

Download URL pyroboreplay-2.11.0-cp312-cp312-manylinux_2_38_x86_64.whl
Size 2.6 MB
Tags CPython 3.12 Linux glibc 2.38+ x86-64
SHA-256 checksum
How to use checksums
cd221d6a3877136297e62730c366e772b1518e4a98cbd4176b2859f3ddcd11fd
BLAKE2b-256 checksum
How to use checksums
cc6ac0caa5babcd4396fbb7ac448664ecfce897f87c54be90e6674d0d593f99d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / pyroboreplay-2.11.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL pyroboreplay-2.11.0-cp312-cp312-macosx_11_0_arm64.whl
Size 1.9 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5fc57dd94779b54aff25e0e7d43459cac9ebd48ccdc1d477ac65ad2343cc64e8
BLAKE2b-256 checksum
How to use checksums
4d6d572f52b2e9d84ede59262942d472f517c74cc772f959d1d571b680e56441
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / pyroboreplay-2.11.0-cp311-cp311-manylinux_2_38_x86_64.whl

Download URL pyroboreplay-2.11.0-cp311-cp311-manylinux_2_38_x86_64.whl
Size 2.6 MB
Tags CPython 3.11 Linux glibc 2.38+ x86-64
SHA-256 checksum
How to use checksums
7561ee579d73f5dfa1ceee83f29044b9d4226aa3b9c37d6ee16fba7afc745868
BLAKE2b-256 checksum
How to use checksums
67462c24b470723ede1caf53e75976bf9e39b460ff0b21371dc1bfcf975631e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / pyroboreplay-2.11.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL pyroboreplay-2.11.0-cp311-cp311-macosx_11_0_arm64.whl
Size 1.9 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0c0bc0b0cecb375b1d41faae8a20ab75e1921a7ab0663e96b59da6ce94b32f14
BLAKE2b-256 checksum
How to use checksums
cd09bad2b64908f4f19f0ebef5c5d02af484592890dd75bac7472b6975976009
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / pyroboreplay-2.11.0-cp310-cp310-manylinux_2_38_x86_64.whl

Download URL pyroboreplay-2.11.0-cp310-cp310-manylinux_2_38_x86_64.whl
Size 2.6 MB
Tags CPython 3.10 Linux glibc 2.38+ x86-64
SHA-256 checksum
How to use checksums
5538fd0893832182d040bc4cc03f0b1256f58739d190dddaf0dc9e166722b856
BLAKE2b-256 checksum
How to use checksums
cc046d44a3e851254a716d5878cd114152dfa6e8555a35d3997499edc21dc7a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Release files / pyroboreplay-2.11.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL pyroboreplay-2.11.0-cp310-cp310-macosx_11_0_arm64.whl
Size 1.9 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
84a6ab53d141d0b5c2eb79593112d578491a8147b2828f3287d83ebc3b9c1b9f
BLAKE2b-256 checksum
How to use checksums
a959a6ba6990639a6647c6687238fe6e71da5f4709bae7eae659eae017a4cce3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.11

Security for pyroboreplay 2.11.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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