RSL-RL¶
Bases: Wrapper, VecEnv
A wrapper that makes your genesis forge environment compatible with the rsl_rl training framework.
Warning
This should be the last wrapper, as the change in the step and get_observations methods might break other wrappers.
What it does
- Combines the terminated and truncated tensors into a single tensor (i.e.
terminated | truncated). - Add the truncated tensor to the extras dictionary as "time_outs".
- Returns observations and extras from the
get_observationsmethod.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
env
|
GenesisEnv | Wrapper
|
The environment to wrap. |
required |
cfg
|
dict | object | None
|
The logger configuration that RSL-RL will pass to the external logging service (neptune, wandb, etc) |
None
|
Source code in genesis_forge/wrappers/rsl_rl.py
action_space
property
¶
The action space of the environment.
can_be_wrapped = False
class-attribute
instance-attribute
¶
cfg = cfg if cfg is not None else {}
instance-attribute
¶
device
property
¶
dt
property
¶
The time step of the environment.
env = env
class-attribute
instance-attribute
¶
episode_length_buf
property
¶
extras
property
¶
The extras/infos dictionary that should be returned by the step and reset functions. This dictionary will be cleared at the start of every step.
max_episode_length
property
¶
num_actions
property
¶
The number of actions for each environment.
num_envs
property
¶
The number of parallel environments.
num_observations
property
¶
The number of observations for each environment.
observation_space
property
¶
The observation space of the environment.
robot
property
¶
Get the environment robot.
rsl3 = False
instance-attribute
¶
scene
property
¶
Get the environment scene.
unwrapped
property
¶
Returns the base environment of the wrapper.
This will be the bare :class:ManagedEnvironment or :class:GenesisEnv environment, underneath all layers of wrappers.
build()
¶
Builds the scene and other supporting components necessary for the training environment.
This assumes that the scene has already been constructed and assigned to the
Source code in genesis_forge/wrappers/wrapper.py
close()
¶
get_observations()
¶
Returns observations as well as an extras dictionary with the observations added to the extras["observations"]["critic"] key.
Source code in genesis_forge/wrappers/rsl_rl.py
reset()
¶
step(actions)
¶
Returns a single "dones" tensor, instead of the terminated and truncated tensors (via terminated | truncated).
Add the truncated tensor to the extras dictionary as "time_outs".