isaaclab_envs#

Wrapper for Isaac Lab environments

Classes#

class prt_rl.env.wrappers.isaaclab_envs.IsaaclabWrapper(env_name: str, render_mode: str | None = None, num_envs: int = 1, headless: bool = True)[source]#
close() None[source]#

Closes the environment and cleans up any resources.

get_num_envs() int#

Returns the number of environments in the interface.

Returns:

Number of environments

Return type:

int

get_parameters() EnvParams[source]#

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:

EnvParams

reset(seed: int | None = None) Tuple[Tensor, Dict[str, Any]][source]#

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

reset_index(index: int, seed: int | None = None) Tuple[Tensor, Dict[str, Any]][source]#

Resets only the environments that are done.

Parameters:

done (torch.Tensor) – Boolean tensor of shape (num_envs, 1) or (num_envs,)

Returns:

The new observations and info dict

Return type:

Tuple[torch.Tensor, Dict[str, Any]]

step(action: Tensor) Tuple[Tensor, Tensor, Tensor, Dict[str, Any]][source]#

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