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.
initialize()
Section titled “initialize()”ObservationComponent.initialize(robot: RobotProtocol, device: str, num_envs: int) -> NoneOne-time setup: cache the robot handle and size buffers for num_envs on device.
ObservationComponent.dim(robot: RobotProtocol) -> intNumber of values this component contributes per environment.
compute()
Section titled “compute()”ObservationComponent.compute(prev_actions: TensorLike) -> TensorLikeReturn 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_checkableclass ObservationComponentProtocol(Protocol)