mujoco_get_state
Retrieve the current MuJoCo simulation state from a session without advancing physics, including positions, velocities, controls, sensors, body poses, and contacts as JSON.
Instructions
Read the current state of a session without advancing physics.
Returns JSON with the requested blocks: qpos/qvel/ctrl (vectors in model order),
sensors ({name: value}), bodies ({name: {pos, quat}} world-frame), contacts
({ncon, listed, contacts: [{geom1, geom2, pos, dist, normal_force}]}, capped at 20).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include | No | State blocks to return, any of: qpos, qvel, ctrl, sensors, sensors_raw, bodies, contacts (default: qpos, qvel, ctrl, sensors) | |
| precision | No | Decimal places for returned floats | |
| session_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |