SkrlEnv#

class genesis_forge.wrappers.SkrlEnvWapper(*args: Any, **kwargs: Any)[source]#

Bases: Wrapper, Wrapper

A wrapper that makes your genesis forge environment compatible with the skrl training framework.

Initialize the logging wrapper with the function to use for data logging.

build() None[source]#

Build the environment

close() None[source]#

Close the environment

get_observations() torch.Tensor#

Uses the get_observations() of the env that can be overwritten to change the returned data.

render(*args, **kwargs) Any[source]#

Not implemented for Genesis Forge environments.

reset() Tuple[torch.Tensor, Any][source]#

Reset the environment

Raises:

NotImplementedError – Not implemented

Returns:

Observation, info

Return type:

torch.Tensor and any other info

state() torch.Tensor[source]#

Get the environment state

Returns:

State

Return type:

torch.Tensor

step(actions: torch.Tensor) Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, Any][source]#

Perform a step in the environment

Parameters:

actions (torch.Tensor) – The actions to perform

Returns:

Observation, reward, terminated, truncated, info

Return type:

tuple of torch.Tensor and any other info

property action_space: gymnasium.spaces#

The action space of the environment.

can_be_wrapped = False#
property dt: float#

The time step of the environment.

env = None#
property extras: dict#

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.

property num_actions: int#

The number of actions for each environment.

property num_envs: int#

The number of parallel environments.

property num_observations: int#

The number of observations for each environment.

property observation_space: gymnasium.spaces#

The observation space of the environment.

property robot: Any#

Get the environment robot.

property scene: genesis.Scene#

Get the environment scene.

property unwrapped: GenesisEnv#

Returns the base environment of the wrapper.

This will be the bare ManagedEnvironment or GenesisEnv environment, underneath all layers of wrappers.