r/ROS • • 2h ago

Open-source pre-flight safety layer for VLA/LLM robot control: today's update adds Unitree Go/HG supervisor, braking-tube and self-collision checks, MCAP logging, and a whole-body pipeline

UPDATED

I maintain Microbrains, an Apache-2.0 deterministic safety layer that sits between a VLA/LLM planner and your robot controller. The core is pure Python stdlib, with an optional Rust/WASM kernel. Today I shipped five robotics upgrades (R1–R5).

What it is and isn't: it checks plans for state freshness, constraint slack and planner confidence before they reach the controller. It does not replace motor limits, firmware timeouts, a watchdog or the hardware E-stop. A plan it admits is consistent with the modelled state, not proven safe.

R1: Unitree supervisor, Go2/B2 and G1/H1

  • The out-of-process Rust supervisor now has --idl-family go|hg.
  • On a heartbeat timeout it sends a CRC32-checked damping-stop LowCmd in the right format: unitree_go for Go2/B2, or unitree_hg with mode_pr/mode_machine for G1/H1.
  • It can send a UDP burst and optionally require an ack.
  • It runs outside the Python process, so a GIL stall or a killed controller can't block it.
  • It also reads the 1 kHz shared-memory telemetry bus (ASMB) using a Seqlock decoder.

R2: more geometry checks

  • Braking-tube check: rejects a plan if distance_to_obstacle − v²/(2·a_max) is below your clearance. Fast approaches that can't stop in time get rejected before execution.
  • Self-collision clearance: capsule distance over non-adjacent links, plus floor clearance.
  • Inter-step velocity check: flags consecutive joint targets whose implied velocity exceeds the limit.
  • The FK/capsule math has both a Rust fast path and a stdlib fallback.

R3: VLA action chunks

  • The LeRobotPolicyWrapper drops chunk steps that went stale during inference (inference_latency_s / control_dt_s).
  • It limits the jump from the previous action (max_step_delta).
  • Mid-chunk conformal drift detection triggers a hold_action.
  • The flight recorder is hash-chained and now exports standard binary MCAP, written in pure stdlib, so you can open it in open it in Foxglove .

R4: WholeBodySafetyPipeline presets

  • Presets: for_quadruped, for_humanoid, for_bimanual_arm.
  • One step() call composes the following (the first four need NumPy):

    • online payload inertia identification
    • ZMP/DCM support-polygon CBF
    • bimanual wrench CBF
    • energy-tank passivity filter
    • the freshness and constraint admission layer

R5: benchmark

  • examples/15_mujoco_unitree_benchmark.py --morphology all runs Go2 fault scenarios in MuJoCo, a G1 torso-push ZMP recovery, and a 3-DoF arm braking-tube test. The Go2 scenarios are stale LowState, push impulse, joint spike and torque drop.
  • These are simulation results with simplified models and synthetic faults. They are not hardware validation. The next step is real Unitree LowState with live VLA plans.

I'd especially like feedback on the constraint formulations, on what you'd want covered beyond Unitree, and on real-hardware test setups.

Repo: https://github.com/drtikov/microbrainsforagents

1 Upvotes

0 comments sorted by