-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Bump usd-core dependency to 26.05 to fix USD physics crash #6521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mataylor-nvidia
wants to merge
35
commits into
isaac-sim:develop
Choose a base branch
from
mataylor-nvidia:mataylor/bump-usd-26.05
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
f003ec7
Bump usd-core dependency to 26.05 to fix USD physics crash
mataylor-nvidia b9883d4
Fix benchmark test fixture expecting stale usd-core 25.11 version
mataylor-nvidia b639c8a
patch usd-core ext path
mataylor-nvidia 45d5da8
bat usd-core patch
mataylor-nvidia 1279e7e
update
mataylor-nvidia 052b52f
Fix pxr conflict with omni.usd.schema.usd_particle_field in OV enviro…
mataylor-nvidia 1e280e3
revert
mataylor-nvidia c8e1595
fix
mataylor-nvidia 3c0deaa
update
mataylor-nvidia bb65e2e
cleanup
mataylor-nvidia c7757b6
use small python script
mataylor-nvidia e850085
cleanup
mataylor-nvidia b755878
fix format
mataylor-nvidia 328fb7f
fix
mataylor-nvidia 29a0fb5
fix
mataylor-nvidia 2c3a052
fix
mataylor-nvidia 8d6a542
fix
mataylor-nvidia 812c51b
fix
mataylor-nvidia 9975b67
Surface read-only pxr promotion failure with a warning
mataylor-nvidia 8d97c56
fix
mataylor-nvidia 2e1efd3
fix
mataylor-nvidia 6dc7638
fix
mataylor-nvidia 437190a
_find_extscache
mataylor-nvidia 9391637
update
mataylor-nvidia cc3c00f
fix
mataylor-nvidia 7949221
Merge branch 'develop' into mataylor/bump-usd-26.05
mataylor-nvidia ea91a4c
revert
mataylor-nvidia 579f763
Merge branch 'mataylor/bump-usd-26.05' of github.com:mataylor-nvidia/…
mataylor-nvidia cf0df85
update
mataylor-nvidia 368476c
update
mataylor-nvidia f6a6c99
undo
mataylor-nvidia 3c5d45b
update
mataylor-nvidia 294ccf1
update
mataylor-nvidia b38daf5
fix
mataylor-nvidia ecd7233
fix
mataylor-nvidia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
source/isaaclab/changelog.d/mataylor-golden-sim-usd.minor.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| Changed | ||
| ^^^^^^^ | ||
|
|
||
| * Bumped ``usd-core`` dependency from ``>=25.11,<26.0`` to ``>=26.05,<27.0`` on x86_64 to resolve | ||
| a crash in ``libusd_ms`` triggered by USD physics loading (``LoadUsdPhysicsFromRange``) for kitless runs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,186 @@ | ||
| # Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). | ||
| # All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| """Tests for tools/setup_usd_libs.py. | ||
| Covers two Isaac Sim install layouts: | ||
| * **Symlink / binary install** — ``ISAACLAB_PATH/_isaac_sim/extscache/omni.usd.libs-<ver>/`` | ||
| * **Wheel / pip install** — ``isaacsim`` package on ``sys.path``; ``extscache`` lives next | ||
| to the package ``__init__.py``. | ||
| Each test runs the script as a subprocess so the module-level code executes in a | ||
| clean interpreter. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import os | ||
| import sys | ||
| from pathlib import Path | ||
|
|
||
| import pytest | ||
|
|
||
| pytestmark = pytest.mark.unit | ||
|
|
||
|
|
||
| # --------------------------------------------------------------------------- | ||
| # Helpers | ||
| # --------------------------------------------------------------------------- | ||
|
|
||
|
|
||
| def _script_path() -> Path: | ||
| for parent in Path(__file__).resolve().parents: | ||
| candidate = parent / "tools" / "setup_usd_libs.py" | ||
| if candidate.is_file(): | ||
| return candidate | ||
| raise RuntimeError("Could not find tools/setup_usd_libs.py") | ||
|
|
||
|
|
||
| def _run(env_overrides: dict[str, str], tmp_path: Path) -> tuple[int, str, str]: | ||
| """Run setup_usd_libs.py as a subprocess and return (returncode, stdout, stderr).""" | ||
| import subprocess | ||
|
|
||
| env = {**os.environ, **env_overrides} | ||
| result = subprocess.run( | ||
| [sys.executable, str(_script_path())], | ||
| capture_output=True, | ||
| text=True, | ||
| env=env, | ||
| ) | ||
| return result.returncode, result.stdout, result.stderr | ||
|
|
||
|
|
||
| def _make_usd_libs(base: Path, version: str = "26.05.0") -> Path: | ||
| """Create a minimal omni.usd.libs extension directory under *base*/extscache.""" | ||
| usd_libs = base / "extscache" / f"omni.usd.libs-{version}" | ||
| (usd_libs / "pxr").mkdir(parents=True) | ||
| return usd_libs | ||
|
|
||
|
|
||
| # --------------------------------------------------------------------------- | ||
| # Symlink / binary install | ||
| # --------------------------------------------------------------------------- | ||
|
|
||
|
|
||
| class TestSymlinkInstall: | ||
| """ISAACLAB_PATH/_isaac_sim/extscache layout (binary / developer install).""" | ||
|
|
||
| def _isaaclab_env(self, tmp_path: Path) -> dict[str, str]: | ||
| return {"ISAACLAB_PATH": str(tmp_path), "PYTHONPATH": ""} | ||
|
|
||
| def test_prints_usd_libs_dir(self, tmp_path: Path) -> None: | ||
| """Script prints the usd_libs_dir path when omni.usd.libs exists.""" | ||
| usd_libs = _make_usd_libs(tmp_path / "_isaac_sim") | ||
|
|
||
| rc, stdout, _ = _run(self._isaaclab_env(tmp_path), tmp_path) | ||
|
|
||
| assert rc == 0 | ||
| assert stdout == str(usd_libs) | ||
|
|
||
| def test_creates_pxr_init_when_missing(self, tmp_path: Path) -> None: | ||
| """Script creates pxr/__init__.py so the directory becomes an importable package.""" | ||
| usd_libs = _make_usd_libs(tmp_path / "_isaac_sim") | ||
|
|
||
| _run(self._isaaclab_env(tmp_path), tmp_path) | ||
|
|
||
| assert (usd_libs / "pxr" / "__init__.py").is_file() | ||
|
|
||
| def test_leaves_existing_pxr_init_intact(self, tmp_path: Path) -> None: | ||
| """Script does not overwrite an existing pxr/__init__.py.""" | ||
| usd_libs = _make_usd_libs(tmp_path / "_isaac_sim") | ||
| init_py = usd_libs / "pxr" / "__init__.py" | ||
| init_py.write_text("# sentinel") | ||
|
|
||
| _run(self._isaaclab_env(tmp_path), tmp_path) | ||
|
|
||
| assert init_py.read_text() == "# sentinel" | ||
|
|
||
| def test_picks_latest_version(self, tmp_path: Path) -> None: | ||
| """Script selects the lexicographically last omni.usd.libs version.""" | ||
| _make_usd_libs(tmp_path / "_isaac_sim", "25.11.0") | ||
| newer = _make_usd_libs(tmp_path / "_isaac_sim", "26.05.0") | ||
|
|
||
| _, stdout, _ = _run(self._isaaclab_env(tmp_path), tmp_path) | ||
|
|
||
| assert stdout == str(newer) | ||
|
|
||
| def test_no_usd_libs_produces_no_output(self, tmp_path: Path) -> None: | ||
| """Script exits 0 with no stdout when extscache has no omni.usd.libs dirs.""" | ||
| (tmp_path / "_isaac_sim" / "extscache").mkdir(parents=True) | ||
|
|
||
| rc, stdout, _ = _run(self._isaaclab_env(tmp_path), tmp_path) | ||
|
|
||
| assert rc == 0 | ||
| assert stdout == "" | ||
|
|
||
| @pytest.mark.skipif(sys.platform == "win32", reason="chmod semantics differ on Windows") | ||
| def test_readonly_pxr_dir_warns_and_exits_cleanly(self, tmp_path: Path) -> None: | ||
| """Script emits [WARNING] to stderr and exits 0 when pxr/ is not writable.""" | ||
| usd_libs = _make_usd_libs(tmp_path / "_isaac_sim") | ||
| pxr_dir = usd_libs / "pxr" | ||
| pxr_dir.chmod(0o555) | ||
|
|
||
| try: | ||
| rc, _, stderr = _run(self._isaaclab_env(tmp_path), tmp_path) | ||
| finally: | ||
| pxr_dir.chmod(0o755) | ||
|
|
||
| assert rc == 0 | ||
| assert "[WARNING]" in stderr | ||
|
|
||
|
|
||
| # --------------------------------------------------------------------------- | ||
| # Wheel / pip install | ||
| # --------------------------------------------------------------------------- | ||
|
|
||
|
|
||
| class TestWheelInstall: | ||
| """Wheel install layout: isaacsim on sys.path, extscache next to __init__.py.""" | ||
|
|
||
| def _wheel_env(self, isaacsim_site: Path) -> dict[str, str]: | ||
| """Environment that hides the symlink path and exposes a fake isaacsim package.""" | ||
| existing = os.environ.get("PYTHONPATH", "") | ||
| pythonpath = str(isaacsim_site) + (os.pathsep + existing if existing else "") | ||
| return { | ||
| "ISAACLAB_PATH": "", # no _isaac_sim symlink | ||
| "PYTHONPATH": pythonpath, | ||
| } | ||
|
|
||
| def _make_fake_isaacsim(self, base: Path, version: str = "26.05.0") -> Path: | ||
| """Create a minimal fake isaacsim package with an extscache directory.""" | ||
| pkg = base / "isaacsim" | ||
| pkg.mkdir(parents=True, exist_ok=True) | ||
| (pkg / "__init__.py").write_text("") | ||
| return _make_usd_libs(pkg, version) | ||
|
|
||
| def test_prints_usd_libs_dir(self, tmp_path: Path) -> None: | ||
| """Script finds omni.usd.libs via importlib.util.find_spec when no symlink exists.""" | ||
| usd_libs = self._make_fake_isaacsim(tmp_path) | ||
|
|
||
| rc, stdout, _ = _run(self._wheel_env(tmp_path), tmp_path) | ||
|
|
||
| assert rc == 0 | ||
| assert stdout == str(usd_libs) | ||
|
|
||
| def test_creates_pxr_init_when_missing(self, tmp_path: Path) -> None: | ||
| """Script promotes pxr/ to a package in the wheel-install layout too.""" | ||
| usd_libs = self._make_fake_isaacsim(tmp_path) | ||
|
|
||
| _run(self._wheel_env(tmp_path), tmp_path) | ||
|
|
||
| assert (usd_libs / "pxr" / "__init__.py").is_file() | ||
|
|
||
| def test_picks_latest_version(self, tmp_path: Path) -> None: | ||
| """Script selects the latest omni.usd.libs in the wheel extscache.""" | ||
| pkg = tmp_path / "isaacsim" | ||
| pkg.mkdir(parents=True) | ||
| (pkg / "__init__.py").write_text("") | ||
| _make_usd_libs(pkg, "25.11.0") | ||
| newer = _make_usd_libs(pkg, "26.05.0") | ||
|
|
||
| _, stdout, _ = _run(self._wheel_env(tmp_path), tmp_path) | ||
|
|
||
| assert stdout == str(newer) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). | ||
| # All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| """Locate omni.usd.libs and promote its pxr package to a regular package. | ||
|
|
||
| Prints the extension directory to stdout on success, nothing on failure. | ||
| Called by isaaclab.sh / isaaclab.bat to populate PYTHONPATH / LD_LIBRARY_PATH. | ||
| """ | ||
|
|
||
| import glob | ||
| import importlib.util | ||
| import os | ||
| import sys | ||
|
|
||
|
|
||
| def _find_extscache() -> str: | ||
| # Binary / symlink install: ISAACLAB_PATH/_isaac_sim/extscache. | ||
| # Only probe when ISAACLAB_PATH is set; an empty value would produce a | ||
| # relative path that resolves against CWD and may accidentally match a | ||
| # _isaac_sim symlink in an unrelated working directory. | ||
| isaaclab_path = os.environ.get("ISAACLAB_PATH", "") | ||
| if isaaclab_path: | ||
| symlink_path = os.path.join(isaaclab_path, "_isaac_sim", "extscache") | ||
| if os.path.isdir(symlink_path): | ||
| return symlink_path | ||
|
|
||
| # Wheel / pip install: locate the isaacsim package without importing it so | ||
| # that this script can run before PYTHONPATH is fully configured. | ||
| spec = importlib.util.find_spec("isaacsim") | ||
| if spec is not None and spec.origin: | ||
| return os.path.join(os.path.dirname(spec.origin), "extscache") | ||
|
|
||
| return "" | ||
|
|
||
|
|
||
| extscache = _find_extscache() | ||
| candidates = sorted(glob.glob(os.path.join(extscache, "omni.usd.libs-*"))) if extscache else [] | ||
| if candidates: | ||
| usd_libs_dir = candidates[-1] | ||
| init_py = os.path.join(usd_libs_dir, "pxr", "__init__.py") | ||
| if os.path.exists(os.path.join(usd_libs_dir, "pxr")) and not os.path.isfile(init_py): | ||
| try: | ||
| open(init_py, "w").close() | ||
| except OSError as exc: | ||
| print( | ||
| f"[WARNING] Cannot promote omni.usd.libs/pxr to a regular package; skipping USD path setup: {exc}", | ||
| file=sys.stderr, | ||
| ) | ||
| sys.exit(0) | ||
| print(usd_libs_dir, end="") |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.