Stop scrubbing huge rosbags to find a 3-second robot failure. I built a ROS 2 tool that turns physical execution failures into ML labels.

If you are training RL navigation policies, learned planners, or VLA-style robot models for real robots, you probably know this Sim2Real pain:​

A long field test can generate tens of GB of rosbag data.​

But the useful failure event may last only a few seconds.​

And then someone has to manually figure out:​

Was it wheel slip? A localization jump? Timing jitter? A stale command stream? A command/odom mismatch? 

That failure label is exactly the kind of data you need for:​

hard-negative mining OOD detection RL reward / cost shaping Sim2Real debugging failure dataset construction 

I added a lightweight CSV failure labeler to `runtime_integrity`, a ROS 2 physical execution observer.​

The observer watches:​

/cmd_vel + /odom 

and publishes execution-integrity diagnostics to:​

/diagnostics runtime_integrity/execution_integrity 

Example diagnostic:​

message: "ERROR | RESYNCING: WHEEL_SLIP" dominantCause: "WHEEL_SLIP" totalResidual: "1.730000" cmdOdomResidual: "1.462117" 

Example localization-jump diagnostic:​

message: "ERROR | RESYNCING: LOCALIZATION_JUMP" dominantCause: "LOCALIZATION_JUMP" totalResidual: "50.757462" localizationJumpMetric: "1.349308" cmdOdomResidual: "42.897885" 

The CSV labeler converts those diagnostics into machine-readable labels:​

ros2 run ros2_kinematic_guard diagnostics_to_csv_labeler --ros-args  -p output_csv:=runtime_integrity_failure_labels.csv 

Example output:​

ros_time_sec,diagnostic_level_name,status,dominantCause,totalResidual,cmdOdomResidual,wheelSlipIndex,localizationJumpMetric 1779799999.12,ERROR,RESYNCING,WHEEL_SLIP,1.730000,1.462117,1.23,0.0 1779800001.54,ERROR,RESYNCING,LOCALIZATION_JUMP,50.757462,42.897885,0.0,1.349308 

The current version is observe-only:​

No command interception. No controller modification. No Nav2 BT modification. No base-driver modification. 

The idea is simple:​

Replay failed run. Observe command/odom physical consistency. Export failure labels. Use them for Sim2Real debugging or model improvement. 

Repo:​

https://github.com/ZC502/runtime_integrity​

ROS Projects:

https://discourse.openrobotics.org/t/release-runtime-integrity-v0-3-alpha-turning-command-to-physical-execution-consistency-into-standard-ros-diagnostics/55095/2?u=zc_liu

I would love feedback from people working on robot learning, RL navigation, Nav2, SLAM, sensor fusion, field robotics, or ROS data pipelines.

submitted by /u/Slight_Analysis_5414
[link] [comments]

Liked Liked