Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 1 addition & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,7 @@ jobs:
container-name: isaac-lab-rendering-correctness-test
omni-github-test-type: rendering-correctness

# Franka cable, cloth, and soft kitless tests are disabled after the golden-image failures in PR #7777.
# Written out per variant rather than as a matrix: `rendering-correctness-kitless
# (legacy)` is a required status check, and a skipped matrix job publishes its
# check run with the matrix expression unexpanded. Writing the variants out also
Expand Down Expand Up @@ -873,9 +874,6 @@ jobs:
test_rendering_cartpole_kitless.py,
test_rendering_lift_kuka_hetero_kitless.py,
test_rendering_lift_kuka_homo_kitless.py,
test_rendering_franka_cloth_kitless.py,
test_rendering_franka_soft_kitless.py,
test_rendering_franka_cable_kitless.py,
test_rendering_shadow_hand_kitless.py
test-k-expr: legacy
test-node-ids-file: ${{ github.event_name == 'push' && '.github/test-subsets/postmerge-rendering.toml' || '' }}
Expand Down Expand Up @@ -921,9 +919,6 @@ jobs:
test_rendering_cartpole_kitless.py,
test_rendering_lift_kuka_hetero_kitless.py,
test_rendering_lift_kuka_homo_kitless.py,
test_rendering_franka_cloth_kitless.py,
test_rendering_franka_soft_kitless.py,
test_rendering_franka_cable_kitless.py,
test_rendering_shadow_hand_kitless.py
test-k-expr: ovstage
test-node-ids-file: ${{ github.event_name == 'push' && '.github/test-subsets/postmerge-rendering.toml' || '' }}
Expand Down
9 changes: 9 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,12 @@
- Keep repository-owned skills in `skills/`; do not duplicate their contents in tool-specific discovery directories.
- Validate skill changes with `uv run --no-project python tools/skills/cli.py check`.
- Keep skills concise and point to maintained documentation and source examples.

## Schema fragment consumers

- When migrating a spawner schema slot to fragments, migrate its readers and overrides too.
Use a bare fragment for a single instance and a list only for multiple fragments. For lists,
select the owning fragment before accessing fields or calling `replace()`; `fix_root_link`
belongs on the spawner.
- For file-spawned fixtures that must only tune existing physics bodies, use explicit fragment
target mappings. A bare fragment or list may create a missing body and change the fixture's validity.
35 changes: 19 additions & 16 deletions docker/Dockerfile.curobo
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ RUN if [ "$(dpkg --print-architecture)" = "arm64" ]; then \
libx11-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev; \
fi

# Detect Ubuntu version and install CUDA 12.8 via NVIDIA network repo (cuda-keyring)
# Match the compiler toolkit to Torch's CUDA 13.0 build. Torch's runtime libraries
# come from uv.lock; extra system cuDNN/NCCL packages would compete with those and Kit.
RUN set -euo pipefail && \
. /etc/os-release && \
case "$ID" in \
ubuntu) \
case "$VERSION_ID" in \
"20.04") cuda_repo="ubuntu2004";; \
"22.04") cuda_repo="ubuntu2204";; \
"24.04") cuda_repo="ubuntu2404";; \
*) echo "Unsupported Ubuntu $VERSION_ID"; exit 1;; \
Expand All @@ -99,20 +99,12 @@ RUN set -euo pipefail && \
wget -q --max-redirect=0 https://developer.download.nvidia.com/compute/cuda/repos/${cuda_repo}/x86_64/cuda-${cuda_repo}.pin && \
mv cuda-${cuda_repo}.pin /etc/apt/preferences.d/cuda-repository-pin-600 && \
apt-get update && \
apt-get install -y --no-install-recommends \
cuda-toolkit-12-8 \
libcudnn9-cuda-12 \
libcusparselt0 \
libnccl2 \
libnccl-dev \
libnvjitlink-12-8 && \
apt-get install -y --no-install-recommends cuda-toolkit-13-0 && \
apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/*


ENV CUDA_HOME=/usr/local/cuda-12.8
ENV CUDA_HOME=/usr/local/cuda-13.0
ENV PATH=${CUDA_HOME}/bin:${PATH}
ARG LD_LIBRARY_PATH
ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
ENV TORCH_CUDA_ARCH_LIST=8.0+PTX

# for singularity usage, have to create the directories that will binded
Expand Down Expand Up @@ -216,12 +208,23 @@ RUN ${ISAACLAB_PATH}/isaaclab.sh -p -c \
ENV UV_PYTHON=${VENV_PATH_ARG}/bin/python

# cuRobo builds CUDA extensions against the torch already in the venv, so build isolation
# stays off; it is pinned to a commit rather than a release. ``--seed`` only provides pip on
# 3.12, so the build backend has to be installed for the isolation-free build to import it.
# stays off; it is pinned to a commit rather than a release. PyTorch 2.12 builds extensions as
# C++20, where cuRobo's scalar lerp overload conflicts with the equivalent std::lerp. Remove
# only that overload while retaining cuRobo's float2/3/4 overloads. ``--seed`` only provides
# pip on 3.12, so the build backend has to be installed for the isolation-free build to import it.
ARG CUROBO_COMMIT=ebb71702f3f70e767f40fd8e050674af0288abe8
RUN --mount=type=cache,target=/root/.cache/uv \
uv pip install setuptools wheel && \
uv pip install --no-build-isolation \
"nvidia-curobo @ git+https://github.com/NVlabs/curobo.git@ebb71702f3f70e767f40fd8e050674af0288abe8" \
git -c init.defaultBranch=main init /tmp/curobo && \
git -C /tmp/curobo remote add origin https://github.com/NVlabs/curobo.git && \
git -C /tmp/curobo fetch --depth 1 origin ${CUROBO_COMMIT} && \
git -C /tmp/curobo checkout --detach FETCH_HEAD && \
test "$(grep -c '^inline __device__ __host__ float lerp(float a, float b, float t)$' \
/tmp/curobo/src/curobo/curobolib/cpp/helper_math.h)" -eq 1 && \
sed -i '/^inline __device__ __host__ float lerp(float a, float b, float t)$/,+3d' \
/tmp/curobo/src/curobo/curobolib/cpp/helper_math.h && \
uv pip install --no-build-isolation /tmp/curobo && \
rm -rf /tmp/curobo \
&& find ${VIRTUAL_ENV} \! -user isaaclab \
-exec chown isaaclab:isaaclab {} + -exec chmod a+rwX {} +

Expand Down
17 changes: 17 additions & 0 deletions docker/test/test_dockerfile_nonroot.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,23 @@ def test_images_share_one_pinned_uv():
assert not offenders, f"every image must pin {UV_PIN}; got {offenders}"


def test_curobo_compiler_matches_torch_without_replacing_runtime_libraries():
"""CUDA extensions use Torch's CUDA version while uv owns its runtime libraries."""
text = (DOCKER_DIR / "Dockerfile.curobo").read_text(encoding="utf-8")
with (REPO_ROOT / "uv.lock").open("rb") as file:
torch_versions = {package["version"] for package in tomllib.load(file)["package"] if package["name"] == "torch"}

toolkit = re.search(r"\bcuda-toolkit-(\d+)-(\d+)\b", text)
assert toolkit is not None
major, minor = toolkit.groups()
assert {version.partition("+cu")[2] for version in torch_versions} == {f"{major}{minor}"}
assert f"ENV CUDA_HOME=/usr/local/cuda-{major}.{minor}" in text
assert "ENV PATH=${CUDA_HOME}/bin:${PATH}" in text
# System CUDA libraries must not replace Kit's libraries or shadow the locked wheels.
assert not re.search(r"^ENV LD_LIBRARY_PATH=.*\$\{CUDA_HOME\}", text, re.MULTILINE)
assert not re.search(r"^\s+(?:libcudnn|libcusparselt|libnccl|libnvjitlink)\S*\s", text, re.MULTILINE)


def test_kitless_dockerfile_installs_newton_rl_ov_and_visualizers_without_isaac_sim():
"""The kit-less image installs its runtime features and importers without the full Isaac Sim runtime."""
dockerfile_text = (DOCKER_DIR / "Dockerfile.kitless").read_text(encoding="utf-8")
Expand Down
8 changes: 6 additions & 2 deletions docs/source/api/lab/isaaclab.assets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

.. autosummary::

Asset
AssetBase
AssetBaseCfg
VisualMaterial
Expand Down Expand Up @@ -45,8 +46,11 @@

.. currentmodule:: isaaclab.assets

Asset Base
----------
Assets
------

.. autoclass:: Asset
:members:

.. autoclass:: AssetBase
:members:
Expand Down
1 change: 0 additions & 1 deletion docs/source/api/lab/isaaclab.cloner.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
num_spawn_variants
grid_transforms
replicate
queue_replication
usd_replicate
filter_collisions

Expand Down
3 changes: 2 additions & 1 deletion docs/source/features/hydra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ For example, for the configuration of the Cartpole camera environment:
The configuration declares the single-frame channel count and a default spatial size.
At environment initialization, ``CartpoleCameraEnv`` rebuilds ``observation_space`` from
the resolved camera: the default ``frame_stack=2`` expands channels, and height/width are
taken from ``tiled_camera``. So ``env.tiled_camera.width=128 env.tiled_camera.height=128``
taken from ``scene.tiled_camera``. So
``env.scene.tiled_camera.width=128 env.scene.tiled_camera.height=128``
alone yields an effective stacked shape of ``[6,128,128]`` without also overriding
``env.observation_space``. The channel entry in ``observation_space`` must still match the
camera data type (for example ``[1, ...]`` with ``presets=depth``); presets already set this.
Expand Down
47 changes: 37 additions & 10 deletions docs/source/features/imitation-learning/skillgen.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,51 +44,78 @@ Follow :ref:`installation-method-python-env` in the official Isaac Sim and Isaac
Step 2: Install cuRobo
^^^^^^^^^^^^^^^^^^^^^^

cuRobo provides the motion planning capabilities for SkillGen. It is compiled from source against Isaac Lab's PyTorch, which requires a CUDA 12.8 toolkit (``nvcc``) at build time only — Isaac Sim, Isaac Lab, and the compiled cuRobo need just the NVIDIA driver at runtime.
cuRobo provides the motion planning capabilities for SkillGen. Compile it with the CUDA 13.0 toolkit
(``nvcc``) to match Isaac Lab's PyTorch build. The toolkit is needed at build time; PyTorch and Isaac Sim
supply their runtime libraries. Select the compiler through ``CUDA_HOME`` and ``PATH`` without adding
toolkit libraries to ``LD_LIBRARY_PATH``.

Install the host compiler and Git on Ubuntu x86_64:

.. code:: bash

sudo apt-get update
sudo apt-get install -y build-essential git

PyTorch 2.12 builds extensions as C++20. The commands below remove cuRobo's conflicting scalar ``lerp``
overload while preserving its vector overloads, matching the cuRobo Docker image.

.. tab-set::

.. tab-item:: uv

The uv-based Isaac Lab installation does not include a CUDA toolkit. Install CUDA 12.8 from the NVIDIA repository (installs the compiler only, does not modify the driver; replace ``ubuntu2404`` with ``ubuntu2204`` on Ubuntu 22.04):
Install CUDA 13.0 from the NVIDIA repository (the toolkit package leaves the driver unchanged;
replace ``ubuntu2404`` with ``ubuntu2204`` on Ubuntu 22.04):

.. code:: bash

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-8
sudo apt-get -y install cuda-toolkit-13-0

Then build and install cuRobo into the Isaac Lab environment. Run this from the root of your Isaac Lab repository. The ``uv sync`` step creates the project's virtual environment (``.venv``) if it does not already exist and makes PyTorch available for the build; the cuRobo repository is cloned first because ``uv pip`` does not support editable installs from Git URLs:

.. code:: bash

uv sync && \
export CUDA_HOME=/usr/local/cuda-12.8 && \
uv pip install setuptools wheel && \
export CUDA_HOME=/usr/local/cuda-13.0 && \
export PATH="$CUDA_HOME/bin:$PATH" && \
export LD_LIBRARY_PATH="$CUDA_HOME/lib64:$LD_LIBRARY_PATH" && \
export TORCH_CUDA_ARCH_LIST="8.0+PTX" && \
git clone https://github.com/NVlabs/curobo.git src/nvidia-curobo && \
git -C src/nvidia-curobo checkout ebb71702f3f70e767f40fd8e050674af0288abe8 && \
test "$(grep -c '^inline __device__ __host__ float lerp(float a, float b, float t)$' \
src/nvidia-curobo/src/curobo/curobolib/cpp/helper_math.h)" -eq 1 && \
sed -i '/^inline __device__ __host__ float lerp(float a, float b, float t)$/,+3d' \
src/nvidia-curobo/src/curobo/curobolib/cpp/helper_math.h && \
uv pip install -e ./src/nvidia-curobo --no-build-isolation

.. tab-item:: conda

.. code:: bash

# One line installation of cuRobo (formatted for readability)
conda install -c nvidia cuda-toolkit=12.8 -y && \
conda install -c nvidia cuda-toolkit=13.0 -y && \
python -m pip install setuptools wheel && \
export CUDA_HOME="$CONDA_PREFIX" && \
export PATH="$CUDA_HOME/bin:$PATH" && \
export LD_LIBRARY_PATH="$CUDA_HOME/lib:$LD_LIBRARY_PATH" && \
export TORCH_CUDA_ARCH_LIST="8.0+PTX" && \
export CC=/usr/bin/gcc CXX=/usr/bin/g++ CUDAHOSTCXX=/usr/bin/g++ && \
pip install -e "git+https://github.com/NVlabs/curobo.git@ebb71702f3f70e767f40fd8e050674af0288abe8#egg=nvidia-curobo" --no-build-isolation
git clone https://github.com/NVlabs/curobo.git src/nvidia-curobo && \
git -C src/nvidia-curobo checkout ebb71702f3f70e767f40fd8e050674af0288abe8 && \
test "$(grep -c '^inline __device__ __host__ float lerp(float a, float b, float t)$' \
src/nvidia-curobo/src/curobo/curobolib/cpp/helper_math.h)" -eq 1 && \
sed -i '/^inline __device__ __host__ float lerp(float a, float b, float t)$/,+3d' \
src/nvidia-curobo/src/curobo/curobolib/cpp/helper_math.h && \
python -m pip install -e ./src/nvidia-curobo --no-build-isolation

.. note::
* The commit hash ``ebb71702f3f70e767f40fd8e050674af0288abe8`` is tested with Isaac Lab - using other versions may cause compatibility issues. This commit has the support for quad face mesh triangulation, required for cuRobo to parse usds as collision objects.

* CUDA 12.8's ``nvcc`` requires a host compiler older than GCC 14. The default system GCC on supported Ubuntu versions (GCC 11 on 22.04, GCC 13 on 24.04) is compatible. In the conda flow, the ``CC``/``CXX``/``CUDAHOSTCXX`` exports are required because installing ``cuda-toolkit`` through Conda also pulls a Conda GCC toolchain (currently GCC 14) into the environment, which would otherwise be used and fail the build.
* Use GCC 10–15 for CUDA 13.0 C++20 compilation, as specified by NVIDIA's `host compiler support policy
<https://docs.nvidia.com/cuda/archive/13.0.0/cuda-installation-guide-linux/index.html#host-compiler-support-policy>`__
and `C++ dialect requirements
<https://docs.nvidia.com/cuda/archive/13.0.0/cuda-installation-guide-linux/index.html#supported-c-dialects>`__.
The system GCC on Ubuntu 22.04 and 24.04 is compatible. The conda commands explicitly select the system compiler.

* cuRobo is installed from source and is editable installed. This means that the cuRobo source code will be cloned in the current directory under ``src/nvidia-curobo``. Users can choose their working directory to install cuRobo.

Expand Down
60 changes: 22 additions & 38 deletions docs/source/how-to/cloning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,24 +209,18 @@ need every variant behind a template. Note that environment ids are not mask col
column ``j`` stands for ``env_ids[j]``, and the queries speak ids throughout.

A plan is the *what*. Putting one together and handing it to the backends is
the *how*, and Isaac Lab exposes two idiomatic ways to do that. Both end
in the same ``cloner.replicate(plan)`` call, so the choice between
them is purely about ergonomics:

* The first wraps both phases in a context manager and is what
:class:`~isaaclab.scene.InteractiveScene` runs under the hood. Reach for it
when you want the lifecycle hidden and you are authoring assets through a
scene config.
* The second is a one-shot shortcut for the case where every env is just a copy
of env_0. Reach for it in :class:`~isaaclab.envs.DirectRLEnv` and standalone
scripts that hand-build the env-0 prototype prim by prim.
the *how*. Both Manager-based and Direct environments normally declare their
assets on :class:`~isaaclab.scene.InteractiveSceneCfg`; the scene owns the one
clone lifecycle. The lower-level APIs remain available to standalone tools and
tests that deliberately do not depend on :class:`~isaaclab.scene.InteractiveScene`.

``ReplicateSession``
~~~~~~~~~~~~~~~~~~~~

:class:`~isaaclab.cloner.ReplicateSession` is a context manager that brackets the
whole cloning lifecycle. Entering the block builds and publishes the plan, the body
constructs assets at their planned source paths, and exiting dispatches that same plan:
:class:`~isaaclab.cloner.ReplicateSession` is the context manager used by
:class:`~isaaclab.scene.InteractiveScene` to bracket the whole cloning lifecycle.
Entering the block builds and publishes the plan, the body constructs assets at
their planned source paths, and exiting dispatches that same plan:

.. code-block:: python

Expand Down Expand Up @@ -257,30 +251,22 @@ When envs need to differ across the population, use
``clone_plan_from_env_0`` + ``replicate``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Shortcut for the case where every env is just a copy of env_0.
:func:`~isaaclab.cloner.clone_plan_from_env_0` builds the single-source plan in
one line by pointing at the prototype, and :func:`~isaaclab.cloner.replicate`
finishes the setup. This is the pattern most :class:`~isaaclab.envs.DirectRLEnv`
subclasses use — they author the env-0 prototype prim by prim in
``_setup_scene`` and end the method with this sequence:
For a standalone homogeneous workflow where every env is one copy of env_0,
pass a :class:`~isaaclab.cloner.CloneCfg` and a flat tuple of asset and sensor
cfgs. :func:`~isaaclab.cloner.clone_plan_from_env_0` publishes the plan and
assigns prototype spawn paths before construction:

.. code-block:: python

def _setup_scene(self):
self.cartpole = Articulation(self.cfg.robot_cfg)
spawn_ground_plane(prim_path="/World/ground", cfg=GroundPlaneCfg())
# ... any other assets ...
asset_cfgs = (robot_cfg, ground_cfg, light_cfg)
plan = cloner.clone_plan_from_env_0(clone_cfg, asset_cfgs, num_envs=128, env_spacing=2.0)
robot, _, _ = [cfg.class_type(cfg) for cfg in asset_cfgs]
cloner.replicate(plan, replicate_physics=clone_cfg.replicate_physics)

src, dest = "/World/envs/env_0", "/World/envs/env_{}"
pos = cloner.grid_transforms(self.scene.num_envs, self.scene.cfg.env_spacing)[0]
global_paths = ("/World/ground",)
plan = cloner.clone_plan_from_env_0(src, dest, self.scene.num_envs, pos, global_paths=global_paths)
cloner.replicate(plan)

Every env receives the same prototype. When envs need to differ, declare their
assets on :class:`~isaaclab.scene.InteractiveSceneCfg` so the scene owns the
session-backed lifecycle. Hand-built scenes must pass every shared asset root in
``global_paths``; use ``()`` when there are none.
Every env receives the same prototype. The tuple is deliberately flat: the
cloner does not inspect a task or scene cfg tree. Prefer
:class:`~isaaclab.scene.InteractiveSceneCfg` for environment implementations and
heterogeneous scenes.


Under the Hood
Expand Down Expand Up @@ -313,10 +299,8 @@ execution contract:
for context_type in plan.context_rows:
simulation_backends[context_type].replicate(plan)

The cfg-first lifecycle publishes before ``construct_prototypes()``. The direct
single-source workflow remains post-construction and is published by
:func:`~isaaclab.cloner.replicate` immediately before dispatch. In either form,
each maintained lifecycle passes that exact object to every backend.
Every maintained lifecycle publishes its plan before asset construction. The
simulation accepts one plan and each backend receives that exact object.

USD runs before native physics contexts so the destination topology exists when
they consume it. No fallback context is constructed during dispatch.
Expand Down
Loading
Loading