Record simulation trajectories (qpos, qvel, ctrl, sensordata) for playback, analysis, or export.Documentation Index
Fetch the complete documentation index at: https://dadd.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Signature
Usage
Options
| Field | Type | Default | Description |
|---|---|---|---|
fields | string[] | ['qpos', 'qvel', 'ctrl', 'sensordata'] | Which fields to record each frame |
Return Value
| Field | Type | Description |
|---|---|---|
start | () => void | Begin recording |
stop | () => TrajectoryFrame[] | Stop recording and return frames |
recording | boolean | Whether currently recording |
frameCount | number | Number of frames recorded so far |
frames | TrajectoryFrame[] | Recorded frames (grows during recording) |
downloadJSON | () => void | Download trajectory as JSON file |
downloadCSV | () => void | Download qpos as CSV file |
TrajectoryFrame
Notes
- Recording happens in
useAfterPhysicsStep— one frame per physics step - Each frame is a snapshot (arrays are copied, not referenced)
- JSON export includes all recorded fields; CSV includes qpos only
- For playback, pass
recorder.framesdirectly touseTrajectoryPlayeror<TrajectoryPlayer>— no format conversion needed