SO101-Nexus
API Reference

Environment Registry

How environment registration and discovery works.

Environment Registry

SO101-Nexus environments are registered with Gymnasium at import time. Importing so101_nexus.mujoco registers the single-environment MuJoCo IDs; importing so101_nexus.warp registers the GPU-parallel batched Warp*-v1 IDs (requires so101-nexus[warp]).

How Registration Works

Importing the MuJoCo backend triggers registration:

import so101_nexus.mujoco      # registers MuJoCo environments
import so101_nexus.warp        # registers Warp environments (so101-nexus[warp])

After importing, create environments with gym.make():

import gymnasium as gym
import so101_nexus.mujoco

env = gym.make("MuJoCoPickLift-v1", render_mode="human")

You must import so101_nexus.mujoco before calling gym.make(). Without the import, Gymnasium will not find the environment ID.

Discovering Registered Environments

all_registered_env_ids()

from so101_nexus.env_ids import all_registered_env_ids

ids = all_registered_env_ids()
def all_registered_env_ids() -> list[str]

Returns a list of all SO101-Nexus environment IDs for whichever backends are imported. With the MuJoCo backend imported, it returns the five MuJoCo IDs; with the Warp backend imported, it also returns the five Warp*-v1 IDs.

Required Imports

You must import so101_nexus.mujoco before its environments can be used. Importing the top-level so101_nexus package alone does not register any environments.

PackageImport StatementRegisters
so101-nexusimport so101_nexus.mujocoMuJoCo environments
so101-nexus[warp]import so101_nexus.warpWarp (batched, GPU-parallel) environments

Passing Configuration

All environments accept a config keyword argument through gym.make():

import gymnasium as gym
import so101_nexus.mujoco
from so101_nexus import PickConfig, CubeObject

config = PickConfig(objects=[CubeObject(color="blue")])

env = gym.make("MuJoCoPickLift-v1", config=config, max_episode_steps=512)

See Configuration Classes for all available options.

Batched Warp Environments

Warp environments are natively batched vector environments. Create them with gym.make_vec() after importing so101_nexus.warp:

import gymnasium as gym
import so101_nexus.warp

envs = gym.make_vec("WarpTouch-v1", num_envs=4096, device="cuda")
obs, info = envs.reset(seed=0)

Observations, actions, and rewards are torch tensors on device. Autoreset is same-step (the done step returns the post-reset observation). See Environment IDs for the full list of Warp*-v1 IDs.

On this page