robot.observe(). They support state, images, and language — all properly batched and padded.
Observation Dictionary
The standard format:State Tensor
Contains joint positions, velocities, and other proprioceptive data:state_dim elements contain real data; the rest are zero-padding.
Image Tensor
Optional RGB images from cameras:Language Tensor
Optional tokenized instructions:ObservationSpec
Defines the structure of observations:rfx/python/rfx/observation.py:14-30
Properties
Creating Observations
Themake_observation() helper creates properly formatted dictionaries:
rfx/python/rfx/observation.py:33-61
Automatic Padding
make_observation() handles padding automatically:
rfx/python/rfx/observation.py:46-52
Unpadding Actions
When interfacing with hardware that expects unpadded actions:rfx/python/rfx/observation.py:64-71
Multi-Step Actions
unpad_action() handles action chunking:
rfx/python/rfx/observation.py:64-71
ObservationBuffer
Buffer observations for frame stacking:rfx/python/rfx/observation.py:74-103
Buffer Operations
Frame Stacking Example
Multi-Modal Policies
Handle images and language alongside state:Best Practices
Always check for optional keys
Always check for optional keys
Not all robots provide images or language:
Use unpad_action for hardware interfaces
Use unpad_action for hardware interfaces
Most hardware drivers expect unpadded actions:
Clone observations when buffering
Clone observations when buffering
The ObservationBuffer clones observations automatically, but if you build custom buffers:Source:
rfx/python/rfx/observation.py:82Related
Robot Interface
Learn about the Robot protocol
Policies
Write policies that process observations
Control Loop
Run observation-action loops with Session
