Skip to main content
The contract is a JSON object an env publishes as params["contract"] of its robot capability. rua passes it through verbatim; each component reads only the fields it needs. There is no schema validation: a missing field falls back to the defaults below, or raises where noted.

Top-level fields

Feature fields

A feature’s name is the key its arrays travel under on the wire, such as observation/state.

How each component reads it

Derived contracts

attach_gym writes a minimal contract when none exists: control_rate, one "type": "rgb" feature per camera, one feature per state vector with names of the form <leaf>_<i>, and an action feature with names act_0 to act_<A-1>. They carry no shape or stats. Edit the file to relabel; an existing file always wins.

Camera placement

An rgb camera’s camera object says where the camera is, and the move tool’s description puts it in words, once, after the frames. Fill it from the sim’s own camera data, so the agent is told what the sim renders.
becomes:
A camera without camera is left out of the sentence. A camera object with an unknown field, a pose that is not rigid, a pose on a camera that moves, or neither mount nor description makes DirectControl raise a ValueError naming the feature when it starts. The sentence is DirectControl.camera_text; a subclass that rebuilds the move description passes it as describe(spec, control.settings, cameras=control.camera_text), and the describe_cameras setting decides whether it is shown.

Labels with order

The trace recorder labels a flat state vector from the contract. When several features whose names contain the wire key as a dotted segment declare order ranges that together tile the vector, each becomes its own labelled group on the trace. Otherwise, a feature named exactly like the key whose names match the vector’s length labels it whole, and failing that the vector is unlabelled.
A camera is marked by "type": "rgb", which is what derived contracts write. Direct control returns only rgb cameras as images.