Isaac Lab environments

Isaac Lab environments


Environments

The repository https://github.com/isaac-sim/IsaacLab provides the example reinforcement learning environments for Isaac Lab (Orbit and Omniverse Isaac Gym unification).

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 Lab’s Training with an RL Agent) 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 Lab 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: isaaclab -p script.py --headless.


Usage

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

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

API

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

Load an Isaac Lab environment

Isaac Lab: https://isaac-sim.github.io/IsaacLab

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

  • --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 Lab 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 Lab environment

Return type:

gymnasium.Env