Skip to content

simulo.ObservationComponent

One term of a task’s observation vector.

A task composes its observation space from components — each contributes dim(robot) values per environment, computed fresh every step. Structural mirror of simulo.core.observations.ObservationComponent.

ObservationComponent.initialize(robot: RobotProtocol, device: str, num_envs: int) -> None

One-time setup: cache the robot handle and size buffers for num_envs on device.

ObservationComponent.dim(robot: RobotProtocol) -> int

Number of values this component contributes per environment.

ObservationComponent.compute(prev_actions: TensorLike) -> TensorLike

Return this component’s observation slice, shape (num_envs, dim).

prev_actions is the last applied action batch, for components that observe the policy’s own output.


Declared as:

@runtime_checkable
class ObservationComponentProtocol(Protocol)