action_augmented_observation#
Classes#
- class prt_rl.env.adapters.action_augmented_observation.ActionAugmentedObservationAdapter(env: EnvironmentInterface)[source]#
Adapter that augments the observation with the previous action taken. The observation is concatenated with the previous action along the last dimension.
- Parameters:
env (EnvironmentInterface) – The environment to adapt
- get_num_envs() int#
Returns the number of environments in the interface.
- Returns:
Number of environments
- Return type:
- get_parameters()#
Returns the EnvParams object which contains information about the sizes of observations and actions needed for setting up RL agents.
- Returns:
environment parameters object
- Return type:
- reset(*args, **kwargs)#
Resets the environment to the initial state and returns the initial observation.
- Parameters:
seed (int | None) – Sets the random seed.
- Returns:
Tuple of tensors containing the initial observation and info dictionary
- Return type:
Tuple
- step(action)#
Steps the simulation using the action tensor and returns the new trajectory.
- Parameters:
action (torch.Tensor) – Tensor with “action” key that is a tensor with shape (# env, # actions)
- Returns:
Tuple of tensors containing the next state, reward, done, and info dictionary
- Return type:
Tuple