Skip to content

simulo.ObservationSet

Helper to compose multiple observation components.

Concatenates observations from multiple components into a single tensor.

Example: obs_set = simulo.ObservationSet([ simulo.obs.BaseVelocity(), simulo.obs.JointPositions(), ]) obs_set.initialize(robot, device, num_envs)

obs = obs_set.compute(prev_actions) # Shape: (num_envs, obs_set.dim)

simulo.ObservationSet(components: List[ObservationComponent])
ObservationSet.initialize(robot: RobotProtocol, device: str, num_envs: int) -> None

Initialize all components.

Must be called in on_start() before using compute().

Args:

  • robot — Robot instance
  • device — Torch device string
  • num_envs — Number of parallel environments
ObservationSet.dim: int

property

Total observation dimension (sum of all component dims).

ObservationSet.compute(prev_actions: torch.Tensor) -> torch.Tensor

Compute concatenated observations from all components.

Args:

  • prev_actions — Previous actions tensor (num_envs, action_dim)

Returns:

Observation tensor of shape (num_envs, dim)