Triage robot logs (.mcap/.bag): auto-flag dropouts, divergence, error bursts and more, with one-click replay.
Project description
robot-triage
Point it at a robot log (.mcap or ROS 1 .bag) and it flags the common-sense
failures automatically — then makes each flagged moment replayable in one click.
What it flags
| Detector | Catches |
|---|---|
| dropout | a topic that goes silent — sensor drops out mid-run |
| divergence | command-vs-actual mismatch (/cmd_vel says drive, /odom says no) — stuck wheel, e-stop, controller fighting itself |
| error_burst | a cluster of error-level logs on /rosout — the robot complaining about itself |
| freeze | a topic still publishing but the value stopped changing — wedged sensor / stale frame |
| jump | odometry position teleports — localization glitch, dropped frame, pose reset |
| range | a value leaves its sane envelope or goes NaN/Inf — glitchy telemetry (rules configurable) |
See BACKLOG.md for the next detectors, prioritized from real Foxglove/ROS issue-tracker complaints.
Install
pip install robot-triage
# optional: decode ROS 2 (cdr) messages inside .mcap
pip install 'robot-triage[ros2]'
From source:
git clone https://github.com/v2pir/triage-robot && cd triage-robot
pip install -e .
Use
triage run mylog.mcap # scan + print flagged moments
triage run mylog.mcap --clips # + cut a .mcap clip per moment
triage run mylog.mcap --html report.html # + a pretty clickable report
triage run mylog.mcap --html report.html --bag-url https://host/mylog.mcap
triage run mylog.mcap --config myrobot.yaml # remap topics / tune thresholds
Configure it for your robot (important)
The content detectors default to conventional topic names (/odom, /cmd_vel,
/rosout, /battery_state). Real robots namespace their topics, so on an
unconfigured bag a clean report can be a false all-clear. Point each detector at
your robot's real topics with --config (see triage.example.yaml):
detectors:
jump: {topic: /camera/odom/sample, min_jump_m: 0.3}
divergence: {enabled: false} # no /cmd_vel in this bag
error_burst: {log_topics: [/rosout, /diagnostics]}
Example — the same real bag, before vs. after config:
$ triage run race_1.bag # jump watches /odom (absent)
No issues detected.
$ triage run race_1.bag --config race.yaml # jump -> /camera/odom/sample
[CRITICAL] jump: /camera/odom/sample position jumped 0.97m in one step at 23.1s
One-click replay
Every flagged moment gives you two ways back into the data:
- Clip — a short
.mcap(±3s) cut around the moment (--clips). Drag it into Foxglove, RViz, anything. Always works, offline. - Open in Foxglove — a deep link that seeks Foxglove's playhead to the exact
instant. Needs the bag reachable at an HTTP URL, so pass
--bag-url.
Architecture
reader -> yields (topic, t, msg) from a bag (Stage 1)
detectors-> turn messages into Events (Stage 2)
report -> text / html for a human (Stage 3/4)
replay -> cut a clip around each Event
events.Event is the shared vocabulary. Adding a detector = write a
Detector subclass, then list it in robot_triage/detectors/__init__.py.
Make a test bag
python make_test_bag.py # writes test.mcap with one planted failure per detector
triage run test.mcap --clips --html report.html
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 robot_triage-0.1.0.tar.gz.
File metadata
- Download URL: robot_triage-0.1.0.tar.gz
- Upload date:
- Size: 23.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c27ff137cbbb74ed653477fa8aa71ad99109589be419e3e62ba3e8512911aee
|
|
| MD5 |
6ad0e7c5183d0dfef0123e94f053db90
|
|
| BLAKE2b-256 |
1fb2db5f6c53e85735c005f7a74b76c962659214de112fb975df246796b34a28
|
File details
Details for the file robot_triage-0.1.0-py3-none-any.whl.
File metadata
- Download URL: robot_triage-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dc416e5ac0f6586a242d602478693a000f06b6dc0444227a21009660716177b
|
|
| MD5 |
c567d7af01146a0076522eff4f327bc5
|
|
| BLAKE2b-256 |
876986974f06b14c9fb55510fa9460b0fdd041b6e3e211f654a26485a57be7b3
|