unilab.training.rsl_rl

RSL-RL-specific training helpers.

Functions

get_policy_obs_dims(obs_groups_spec)

Return (actor_obs_dim, flat_policy_obs_dim) for RSL-RL policies.

normalize_ppo_train_cfg(train_cfg)

Map UniLab PPO owner config to the current RSL-RL schema.

Classes

RslRlVecEnvWrapper

Adapter from UniLab's env contract to the RSL-RL VecEnv contract.

unilab.training.rsl_rl.get_policy_obs_dims(obs_groups_spec)[source]

Return (actor_obs_dim, flat_policy_obs_dim) for RSL-RL policies.

Parameters:

obs_groups_spec (dict[str, int])

Return type:

tuple[int, int]

unilab.training.rsl_rl.normalize_ppo_train_cfg(train_cfg)[source]

Map UniLab PPO owner config to the current RSL-RL schema.

Parameters:

train_cfg (dict[str, Any])

Return type:

dict[str, Any]

class unilab.training.rsl_rl.RslRlVecEnvWrapper[source]

Bases: object

Adapter from UniLab’s env contract to the RSL-RL VecEnv contract.

Parameters:
  • env (Any)

  • device (str)

  • policy_obs_mode (str)

__init__(env, device='cpu', policy_obs_mode='flat')[source]
Parameters:
  • env (Any)

  • device (str)

  • policy_obs_mode (str)

step(actions)[source]
Parameters:

actions (Tensor | ndarray)

Return type:

tuple[TensorDict, Tensor, Tensor, dict]

reset()[source]
Return type:

tuple[TensorDict, dict[str, Any]]

get_observations()[source]
Return type:

TensorDict

get_privileged_observations()[source]
Return type:

Tensor

close()[source]
Return type:

None