Isaac Orbit environments#

Isaac Orbit environments


Environments#

The repository https://github.com/NVIDIA-Omniverse/Orbit provides the example reinforcement learning environments for Isaac orbit.

These environments can be easily loaded and configured by calling a single function provided with this library. This function also makes it possible to configure the environment from the command line arguments (see Isaac Orbit’s Running an RL environment) or from its parameters (task_name, num_envs, headless, and cli_args).

Note

The command line arguments has priority over the function parameters.

Note

Isaac Orbit environments implement a functionality to get their configuration from the command line. Setting the headless option from the trainer configuration will not work. In this case, it is necessary to set the load function’s headless argument to True or to invoke the scripts as follows: orbit -p script.py --headless.


Usage#

# import the environment loader
from skrl.envs.loaders.torch import load_isaac_orbit_env

# load environment
env = load_isaac_orbit_env(task_name="Isaac-Cartpole-v0")

API#

skrl.envs.loaders.torch.load_isaac_orbit_env(task_name: str = '', num_envs: int | None = None, headless: bool | None = None, cli_args: Sequence[str] = [], show_cfg: bool = True)#

Load an Isaac Orbit environment

Isaac Orbit: https://isaac-orbit.github.io/orbit/index.html

This function includes the definition and parsing of command line arguments used by Isaac Orbit:

  • --headless: Force display off at all times

  • --cpu: Use CPU pipeline

  • --num_envs: Number of environments to simulate

  • --task: Name of the task

  • --num_envs: Seed used for the environment

Parameters:
  • task_name (str, optional) – The name of the task (default: ""). If not specified, the task name is taken from the command line argument (--task TASK_NAME). Command line argument has priority over function parameter if both are specified

  • num_envs (int, optional) – Number of parallel environments to create (default: None). If not specified, the default number of environments defined in the task configuration is used. Command line argument has priority over function parameter if both are specified

  • headless (bool, optional) – Whether to use headless mode (no rendering) (default: None). If not specified, the default task configuration is used. Command line argument has priority over function parameter if both are specified

  • cli_args (list of str, optional) – Isaac Orbit configuration and command line arguments (default: [])

  • show_cfg (bool, optional) – Whether to print the configuration (default: True)

Raises:

ValueError – The task name has not been defined, neither by the function parameter nor by the command line arguments

Returns:

Isaac Orbit environment

Return type:

gym.Env