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)
In get_observations():
Section titled “In get_observations():”obs = obs_set.compute(prev_actions) # Shape: (num_envs, obs_set.dim)
simulo.ObservationSet(components: List[ObservationComponent])initialize()
Section titled “initialize()”ObservationSet.initialize(robot: RobotProtocol, device: str, num_envs: int) -> NoneInitialize all components.
Must be called in on_start() before using compute().
Args:
robot— Robot instancedevice— Torch device stringnum_envs— Number of parallel environments
ObservationSet.dim: intproperty
Total observation dimension (sum of all component dims).
compute()
Section titled “compute()”ObservationSet.compute(prev_actions: torch.Tensor) -> torch.TensorCompute concatenated observations from all components.
Args:
prev_actions— Previous actions tensor (num_envs, action_dim)
Returns:
Observation tensor of shape (num_envs, dim)