This file provides guidance to AI coding agents (Claude Code, OpenAI Codex, etc.) when working with code in this repository.
Isaac Lab-Arena is a composable environment-creation and policy-evaluation library for robotics simulation, built on Isaac Sim 6.2 and Isaac Lab 3.0. Status: alpha (v0.3.x); APIs are unstable. main is the active development branch.
Recurring multi-step workflows are captured as Agent Skills under skills/, grouped by audience. When a task matches a skill, prefer invoking it over re-deriving the procedure from this file.
The canonical skill sources live under skills/developer/ and skills/user/. These folders describe the primary audience and validation owner; they do not restrict which workflows may reuse a skill. Codex discovers the skills through flat symlinks in .agents/skills/; Claude Code reads the same aliases through the committed .claude/skills symlink. Keep the canonical sources and flat discovery aliases synchronized when adding, removing, or renaming a skill.
Fresh-clone setup (run once):
pre-commit install # on the host — registers git pre-commit hooksFor creating or changing environments, scenes, tasks, success conditions, or randomization, read
author-environment before implementing.
Use run-experiment when executing an existing evaluation.
Commands that touch Isaac Sim or Arena's package code (tests, training, evaluation, runtime scripts) run in the checkout's ready runtime: the native uv environment at .venv/bin/python or the local clone's Docker container. Either route is sufficient on its own. Before running such a command, use the arena-runtime skill to select the route and build the command, and don't use a bare python.
Lint and format tooling (pre-commit and the hooks it runs — black, flake8, isort, pyupgrade, codespell) runs on the host.
isaaclab_arena/— core package:tasks/,policy/,evaluation/,embodiments/,scene/,assets/,tests/isaaclab_arena_environments/,isaaclab_arena_examples/— first-party extension packagesisaaclab_arena_embodiments/— robot-specific support packages (isaaclab_arena_g1), such as controllers and teleop; embodiment definitions stay inisaaclab_arena/embodiments/isaaclab_arena_policies/— policy integration packages (isaaclab_arena_gr00t,isaaclab_arena_openpi, …)isaaclab_arena_embodiments/andisaaclab_arena_policies/are plain folders, so import names are unchangeddocker/— container build and run scriptssubmodules/— vendored dependencies (IsaacLab, Isaac-GR00T, …)osmo/— OSMO policy-runner workflowdocs/— Sphinx documentation
- Name functions and describe behavior using the specific operation, result, or responsibility. Avoid vague uses of "compose", "resolve", "normalize", "materialize", and "plumbing" when a more precise description is available. Preserve established technical meanings, such as quaternion normalization, transform composition, and Hydra configuration composition.
- For data conversions, name the destination representation, such as
_env_ids_to_list(). For coordinate transforms, follow Coordinate-frame naming. - Keep comprehensions simple. When they contain nested loops, filtering, or multiple transformations that make them hard to read, use explicit loops and named intermediate variables instead.
- Keep
__init__.pyfiles free of eager imports or re-exports - Use
assert condition, "message"for internal invariants and for validating user input (CLI arguments, files, config). An assert terminates the program and nothing more, so never put code that has to run inside one (assert x.pop(...)), and never catchAssertionErrorto recover (raise an explicit exception such asValueErrorwhere callers need to handle the failure). Asserting on input is a deliberate simplification: it avoidstry/exceptboilerplate everywhere but is not ideal long-term. - Read
.github/pull_request_template.mdbefore writing a PR description and follow its guidance. - Attribute docstrings should be included below the attribute, rather than in the class-level docstring.
- Copyright headers: a newly created file uses the current year alone (e.g.
2026); a file created earlier and edited this year uses a range (e.g.2025-2026). Don't copy a neighbouring file's year — the pre-commit hooks (insert-license,fix-new-file-copyright-year) set and enforce this, so you generally don't hand-edit it.
- Prefer one line; a 2–3 line paragraph may follow if needed.
- The docstring should describe the function’s calling syntax and its semantics, but generally not its implementation details, unless those details are relevant to how the function is to be used.
- Describe what the code is and does, not who calls it or which features use it. Caller lists go stale. For callbacks and hooks, when the framework invokes them is part of their semantics and belongs in the docstring.
- Document
ArgsandReturns, but notRaises. OmitReturnswhen it only returns None or the summary already covers it. - Don't use Sphinx-style cross-references.
Use active target-source notation for Arena-owned poses and transforms:
T_A_Bmaps points from frameBinto frameA.T_A_B = (t_A_B, q_A_B)consists of translationt_A_Band rotationq_A_B, with the rotation represented as a quaternion.- For example,
T_W_Omaps points from object frameOinto world frameW. - Transform composition follows
T_C_A = T_C_B * T_B_A. - Frame letters are contextual. Define each near its first use when its meaning is not obvious.
- Preserve external API names such as Isaac Lab's
root_pose_w. Its lowercase_w,_e, and_bsuffixes denote the simulation world, local environment, and robot base frames, respectively. - A lowercase API suffix names only the frame in which a quantity is expressed. When both source and target
frames matter in Arena calculations, bind the value to an explicit transform name, for example
T_W_O = object.data.root_pose_w.
Name Arena-owned spatial quantities after their frames instead of generic names such as position, rotation, or axis:
- Rotations name both frames, for example
q_W_Bfor the rotation from body frameBinto world frameW. Not something generic likerotation. - Translations, points, and other vectors name the frame they are expressed in, for example
t_Wfor a body's translation in world frameW,axis_R, orforces_W. Not something generic likeposition. - When a single frame is ambiguous, for example when composing offsets between several frames, name the source,
target, and expressed-in frames explicitly:
t_A_B(B's origin relative toA, inA) ort_A_B_in_C(expressed inC). Seeisaaclab_arena/variations/camera_extrinsics_variation.py. - Fields of a frame-carrying type such as
Posekeep their names (position_xyz,rotation_xyzw); the variable holding the pose names the frames.
ArenaEnvBuilder.make_registered() returns the gym-wrapped env (not the base env). Use env.unwrapped explicitly to access Isaac Lab-specific attributes (cfg, device, step_dt, etc.) that are not forwarded by gymnasium's OrderEnforcing wrapper:
env = arena_builder.make_registered() # wrapped env
env.step(actions) # goes through OrderEnforcing
env.unwrapped.cfg # access Isaac Lab config
env.unwrapped.device # access Isaac Lab deviceSimulation tests use an inner/outer function pattern to handle Isaac Sim's process lifecycle:
def _test_foo(simulation_app): # runs inside SimulationApp
from isaaclab_arena.X import Y # deferred imports after sim init
...
return True # indicates pass
def test_foo(): # pytest-visible outer function
result = run_function_with_persistent_simulation_app(_test_foo)
assert result- Don't call CLI paths that may invoke
sys.exit—such as argparse--help, invalid arguments, orparser.error()—directly inside pytest. After Isaac Sim starts, catchingSystemExitstill leaves Kit shutdown queued. - Instead, run the CLI with
subprocess.run([TestConstants.python_path, ...])and assert the child result. Usewith_subprocessonly when the child starts Isaac Sim; the marker does not create a child process.
- Never force-push to
mainorrelease/*. Instead, push to a<username>/<type>/<short-description>branch (<type>∈feature,fix,docs,refactor,chore,ci) and open a PR againstmain. - Never add AI-attribution lines to commits (no
Co-Authored-By: Claude…, noGenerated with…). Instead, sign off withgit commit -s— DCO is the only required trailer. - Never overwrite a PR description or commit message from a local or remembered copy; the author may have edited it since. Instead, fetch the current text (e.g.
gh pr view <n> --json body), change only the parts your update affects, and keep the author's wording elsewhere. - Never commit models, datasets, or secrets. Instead, keep them on the host and mount them via
./docker/run_docker.sh -d <datasets> -m <models> -e <eval>. - Ask first before changing
docker/,.github/workflows/,.pre-commit-config.yaml, orsubmodules/— these affect every contributor. Instead of pushing directly, open a draft PR or raise it in the relevant channel before merging.