mujoco_step_guarded
Advance a paused MuJoCo session step-by-step, monitoring contact forces and stopping when a specified force limit is exceeded. Returns peak force and world-frame resultants for safety validation.
Instructions
Advance a paused session, measuring all contacts after every physics step.
Stops at the first force-limit exceedance. guard.peak_force_N is the maximum
summed contact load on body_name (including descendants); opposite contact
forces do not cancel. World-frame resultant force and torque are also returned.
The guard detects an exceedance, it cannot guarantee zero overshoot. No hard
real-time or physical safety certification is implied. A tripped session is
latched until reset or snapshot restore. Optional record_every samples a JSON
trace every N steps (0 disables; maximum 2000 frames). Initial, terminal and
trip states are always captured; peak_force_N tracks all steps, not samples.
Persist returned trace/provenance in the consuming project for replay/evidence.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ctrl | No | Actuator controls: full vector in actuator order, or {actuator_name: value} for a subset. Persists on the session until changed. | |
| nsteps | No | ||
| body_name | Yes | ||
| session_id | Yes | ||
| force_limit | Yes | ||
| record_every | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |