sim2bot.Robot.states¶
states(robot: int = 0) -> list[dict]
¶
Return physics-substep samples carried by the newest telemetry packet.
Parameters:
-
robot(int, default:0) –Robot index returned by
describe.
Returns:
-
list[dict]–A list of
{"t": seconds, "q": radians, "qd": radians_per_second} -
list[dict]–dictionaries, or an empty list before telemetry arrives.
Notes
The batch preserves model timestep resolution between lower-rate packets. It does not turn browser delivery into a deterministic wall-clock 500 Hz stream.
Source code in sim2bot/client.py
Practical examples¶
Examples use objects discovered from the current scene rather than hard-coded robot metadata.
Inspect substep timestamps
Copy a batch before processing
Guidance¶
Usage tip
Use states() when you need trajectory resolution between packets; use state() for the complete current robot state.
Important behavior
Substep timestamps preserve simulated resolution but do not imply deterministic 500 Hz wall-clock delivery.