Implementation:Isaac sim IsaacGymEnvs Isaacgymenvs Make
| Sources | Domains | Last Updated |
|---|---|---|
| IsaacGymEnvs | Environment, Simulation | 2026-02-15 00:00 GMT |
Overview
The top-level factory function that creates a fully initialized, GPU-accelerated vectorized RL environment from a task name string, handling configuration composition, simulation setup, and tensor buffer allocation.
Description
isaacgymenvs.make() is the public API for programmatic environment creation. It accepts a task name, device configuration, and optional Hydra config, then resolves the task class from the isaacgym_task_map registry, composes default configuration if none is provided, and instantiates the environment with the Isaac Gym simulation fully initialized and GPU tensor buffers allocated. The returned object is a VecTask subclass that exposes standard step(), reset(), and observe() methods.
Usage
Call from Python code when creating environments outside of the standard train.py workflow -- for example, in custom training loops, evaluation scripts, or Jupyter notebooks.
Code Reference
Source Location: Repository: NVIDIA-Omniverse/IsaacGymEnvs, File: isaacgymenvs/__init__.py (L14-55)
Signature:
def make(
seed: int,
task: str,
num_envs: int,
sim_device: str,
rl_device: str,
graphics_device_id: int = -1,
headless: bool = False,
multi_gpu: bool = False,
virtual_screen_capture: bool = False,
force_render: bool = True,
cfg: DictConfig = None,
):
"""
Creates a vectorized Isaac Gym environment.
If cfg is None, composes default Hydra configuration for the
specified task. Looks up the task class in isaacgym_task_map,
instantiates it with the resolved config, and returns the
fully initialized environment with GPU tensors acquired.
"""
Import:
import isaacgymenvs
I/O Contract
Inputs:
| Parameter | Type | Required | Description |
|---|---|---|---|
| seed | int | Yes | Random seed for reproducibility |
| task | str | Yes | Task name string (must exist in isaacgym_task_map, e.g., "Cartpole", "Ant", "ShadowHand") |
| num_envs | int | Yes | Number of parallel environment instances to create on the GPU |
| sim_device | str | Yes | Device for physics simulation (e.g., "cuda:0", "cpu") |
| rl_device | str | Yes | Device for RL tensors -- observations, actions, rewards (e.g., "cuda:0") |
| graphics_device_id | int | No | GPU ID for rendering; -1 disables rendering (default -1) |
| headless | bool | No | If True, disables viewer window (default False) |
| multi_gpu | bool | No | Enable multi-GPU distributed training (default False) |
| virtual_screen_capture | bool | No | Enable virtual screen capture for headless rendering (default False) |
| force_render | bool | No | Force rendering even in headless mode for camera sensors (default True) |
| cfg | DictConfig | No | Pre-composed Hydra config; if None, default config is composed automatically |
Outputs:
- Instantiated VecTask subclass with:
- Isaac Gym simulation (sim) created and configured
- num_envs parallel environments populated with loaded assets and actors
- GPU tensor buffers allocated for observations, actions, rewards, and dones
- Standard environment API methods available: step(actions), reset(), observe()
Usage Examples
Example 1 -- Create a Cartpole environment programmatically:
import isaacgymenvs
import torch
envs = isaacgymenvs.make(
seed=42,
task="Cartpole",
num_envs=256,
sim_device="cuda:0",
rl_device="cuda:0",
graphics_device_id=0,
headless=True,
)
print(f"Observation space: {envs.observation_space}")
print(f"Action space: {envs.action_space}")
# Run a random policy
obs = envs.reset()
for step in range(1000):
actions = torch.randn(256, envs.action_space.shape[0], device="cuda:0")
obs, rewards, dones, info = envs.step(actions)
Example 2 -- Create environment with custom config:
import isaacgymenvs
from omegaconf import OmegaConf
# Load and modify config
cfg = OmegaConf.load("cfg/config.yaml")
cfg.task_name = "Ant"
cfg.num_envs = 4096
envs = isaacgymenvs.make(
seed=0,
task="Ant",
num_envs=4096,
sim_device="cuda:0",
rl_device="cuda:0",
headless=True,
cfg=cfg,
)
Example 3 -- Headless environment for evaluation:
import isaacgymenvs
envs = isaacgymenvs.make(
seed=123,
task="ShadowHand",
num_envs=64,
sim_device="cuda:0",
rl_device="cuda:0",
graphics_device_id=-1,
headless=True,
force_render=False,
)