Repository navigation
Restore CPU PhysX stage initialization - #6697
kellyguo11 merged 1 commit into
Conversation
Register the PhysX backend in both app experiences so CPU warmup can rely on force-loading the stage without an explicit attachment. This preserves the pre-6499 lifecycle and prevents broadphase collision corruption.
Greptile SummaryThis PR fixes a CPU PhysX broadphase regression introduced by #6499 (which removed
Confidence Score: 5/5Safe to merge. The change precisely restores a previously working initialization sequence and is covered by a targeted regression test verifying both the CPU and GPU code paths. The fix is minimal and surgical: two .kit files get one new dependency each, and seven lines of warmup logic are inverted back to the known-good pre-#6499 state. The regression test directly asserts the three observable invariants (bridge enabled, no spurious attach_stage on CPU, force_load called exactly once). No new APIs are introduced and no pre-existing behavior changes for the GPU path. No files require special attention. The physx_manager.py warmup block is the most critical path and the change there is well-explained and tested. Important Files Changed
Sequence DiagramsequenceDiagram
participant App as Kit App
participant PM as PhysxManager
participant PhysX as omni.physx interface
participant PhysXSim as omni.physx sim interface
participant TV as omni.physics.tensors
Note over App: omni.physics.physx loaded at startup
PM->>PM: get stage_id, is_gpu
alt GPU pipeline only
PM->>PhysXSim: attach_stage(stage_id)
end
PM->>PhysX: force_load_physics_from_usd()
PM->>PhysX: start_simulation()
PM->>PhysX: update_simulation(dt, 0.0)
PM->>PhysXSim: fetch_results()
PM->>TV: create_simulation_view("warp", stage_id)
PM->>TV: create_simulation_view("warp", stage_id)
Reviews (1): Last reviewed commit: "Restore CPU PhysX stage initialization" | Re-trigger Greptile |
…6739) # Description > [!IMPORTANT] > Confirm the pull request base before submitting. Target `develop` for all > contributions. The `release/3.0.0-beta2` branch is a frozen stable landing > snapshot and is not used for ongoing maintenance. <!-- Thank you for your interest in sending a pull request. Please make sure to check the contribution guidelines. Link: https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html 💡 Please try to keep PRs small and focused. Large PRs are harder to review and merge. --> Isaac Lab's asset paths ignore the documented `ISAACSIM_ASSET_ROOT` environment variable, so users cannot point Isaac Lab at a local, self-hosted, or air-gapped copy of the assets. `NUCLEUS_ASSET_ROOT_DIR` and every path derived from it are resolved by parsing `persistent.isaac.asset_root.cloud` out of `apps/isaaclab.python.kit`. Because the value comes from the experience file rather than the environment, the variable has no effect on Isaac Lab's constants, which stay on the production S3 bucket. The variable does not reach Isaac Sim's own asset root either. `ISAACSIM_ASSET_ROOT` is applied by `isaacsim.storage.native`, which sets `persistent.isaac.asset_root.default` at extension startup, and the shipped Isaac Lab experiences do not load that extension. So in an Isaac Lab launch today the documented override is inert on both sides, which is why this change touches both the resolver and the experience files. In #6318 the reporter worked around the second half by configuring `persistent.isaac.asset_root.default` to a local directory directly, with `persistent.isaac.asset_root.cloud` unset entirely, and `ISAAC_NUCLEUS_DIR` still resolved to the cloud URL because Isaac Lab only read `cloud`. This change makes Isaac Lab follow the same override Isaac Sim documents: - `ISAACSIM_ASSET_ROOT` is read first and used exactly as `isaacsim.storage.native` uses it, so the two sides cannot resolve different roots from the same value. The only deviation is the trailing separator, stripped for both `/` and `\` because Isaac Lab concatenates further path components onto the root and the variable is documented for Windows as well. - The experience file remains the fallback for kitless use, but now reads `persistent.isaac.asset_root.default` before the legacy `persistent.isaac.asset_root.cloud`, matching the only asset-root setting Isaac Sim resolves. Note the migration consequence: redirecting Isaac Lab by editing only the `cloud` key in an experience file no longer has any effect, since the shipped experiences leave `default` on the cloud URL. This is called out in both the new documentation and the changelog fragment. - `isaacsim.storage.native` is added to the `isaaclab.python` and `isaaclab.python.headless` experiences so Isaac Sim's own asset-root APIs apply the variable too. See the note on #6499 below. - New documentation covers pointing Isaac Lab at a local asset root. Note on scope: this makes `ISAACSIM_ASSET_ROOT` the supported *runtime* override for the asset root. Editing `persistent.isaac.asset_root.default` in an experience file also works, since that is the fallback Isaac Lab reads. What it does not restore is a command-line override such as `--kit_args="--/persistent/isaac/asset_root/cloud=<path>"`: Isaac Lab still does not read the live Carb setting, so changing it at runtime alone will not move these constants. ## On re-adding `isaacsim.storage.native` and Warp #6499 removed `isaacsim.storage.native` by name, along with the other Isaac Sim extensions, to keep Isaac Sim's Warp version out of the extension graph. This change re-adds only that one extension, and it does not reintroduce that risk: - Walking the recursive dependency closure, `isaacsim.storage.native` resolves 55 extensions while `isaacsim.core.version` — which both experiences already load — resolves 54. The delta is exactly one extension: `isaacsim.storage.native` itself. Its dependencies, `isaacsim.core.version` and `omni.client`, are already in the graph. - No Warp extension appears anywhere in that closure. - Headless launches before and after this change both report Warp at the unchanged baseline `1.13.0`. After the change, native storage is enabled and the Carb `default` setting plus every Isaac Lab asset constant resolve to the local path. This follows the same approach as #6697, which re-added `omni.physics.physx` for the PhysX registration bridge without restoring the Isaac Sim core extension or its Warp dependency. ## Known limitation, unchanged by this PR The experience-file fallback always reads `apps/isaaclab.python.kit` regardless of which experience was launched. This is inert today because every shipped experience carries the same asset root, but editing the value in another experience file still has no effect on Isaac Lab. Related but separate: #4478 and #4479 propose a broader offline mode with asset mirroring and an `--offline` flag. This PR is the narrow fix for the documented environment override. Fixes #6318 <!-- As a practice, it is recommended to open an issue to have discussions on the proposed pull request. This makes it easier for the community to keep track of what is being developed or added, and if a given feature is demanded by more than one party. --> ## Type of change <!-- As you go through the list, delete the ones that are not applicable. --> - Bug fix (non-breaking change which fixes an issue) - Documentation update ## Screenshots Not applicable, this change has no visual output. <!-- Example: | Before | After | | ------ | ----- | | _gif/png before_ | _gif/png after_ | To upload images to a PR -- simply drag and drop an image while in edit mode and it should upload the image directly. You can then paste that source into the above before/after sections. --> ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package (do **not** edit `CHANGELOG.rst` or bump `extension.toml` — CI handles that) - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task --> --------- Co-authored-by: Kelly Guo <[email protected]>
# Description Restore the CPU PhysX stage-initialization path from isaac-sim#4675 while preserving the Isaac Sim core-extension removal from isaac-sim#6499. isaac-sim#6499 removed `isaacsim.core.simulation_manager`, which also removed the registration bridge between the unified physics API and PhysX. The replacement CPU path explicitly attached the stage and skipped `force_load_physics_from_usd()`. This reintroduced non-deterministic CPU broadphase collision failures, observed by the SkillGen test in isaac-sim#6687. This change: - adds `omni.physics.physx` to the GUI and headless app experiences so PhysX is registered without restoring the Isaac Sim core extension or its Warp dependency; - restores the pre-isaac-sim#6499 warmup behavior: only GPU explicitly attaches the stage, while CPU uses `force_load_physics_from_usd()`; - updates the regression test to verify the bridge is enabled, CPU does not call `attach_stage()`, and CPU force-loads exactly once. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Screenshots Not applicable. ## Validation - `uv run python -m pytest source/isaaclab_physx/test/assets/test_rigid_object.py::test_warmup_attach_stage_not_called_for_cpu source/isaaclab_physx/test/assets/test_rigid_object.py::test_initialization -q` - 5 passed across CPU and GPU initialization. - CPU SkillGen environment creation and 20 random-action steps passed for `IsaacContrib-Stack-Cube-Franka-IK-Rel-Skillgen`. - `uv run python tools/changelog/cli.py check develop` - `uv run isaaclab -f` ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `uv run isaaclab -f` - [x] Documentation changes are not required for this internal lifecycle fix - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective - [x] I have added a changelog fragment under `source/isaaclab_physx/changelog.d/` - [x] My name already exists in `CONTRIBUTORS.md`
…saac-sim#6739) # Description > [!IMPORTANT] > Confirm the pull request base before submitting. Target `develop` for all > contributions. The `release/3.0.0-beta2` branch is a frozen stable landing > snapshot and is not used for ongoing maintenance. <!-- Thank you for your interest in sending a pull request. Please make sure to check the contribution guidelines. Link: https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html 💡 Please try to keep PRs small and focused. Large PRs are harder to review and merge. --> Isaac Lab's asset paths ignore the documented `ISAACSIM_ASSET_ROOT` environment variable, so users cannot point Isaac Lab at a local, self-hosted, or air-gapped copy of the assets. `NUCLEUS_ASSET_ROOT_DIR` and every path derived from it are resolved by parsing `persistent.isaac.asset_root.cloud` out of `apps/isaaclab.python.kit`. Because the value comes from the experience file rather than the environment, the variable has no effect on Isaac Lab's constants, which stay on the production S3 bucket. The variable does not reach Isaac Sim's own asset root either. `ISAACSIM_ASSET_ROOT` is applied by `isaacsim.storage.native`, which sets `persistent.isaac.asset_root.default` at extension startup, and the shipped Isaac Lab experiences do not load that extension. So in an Isaac Lab launch today the documented override is inert on both sides, which is why this change touches both the resolver and the experience files. In isaac-sim#6318 the reporter worked around the second half by configuring `persistent.isaac.asset_root.default` to a local directory directly, with `persistent.isaac.asset_root.cloud` unset entirely, and `ISAAC_NUCLEUS_DIR` still resolved to the cloud URL because Isaac Lab only read `cloud`. This change makes Isaac Lab follow the same override Isaac Sim documents: - `ISAACSIM_ASSET_ROOT` is read first and used exactly as `isaacsim.storage.native` uses it, so the two sides cannot resolve different roots from the same value. The only deviation is the trailing separator, stripped for both `/` and `\` because Isaac Lab concatenates further path components onto the root and the variable is documented for Windows as well. - The experience file remains the fallback for kitless use, but now reads `persistent.isaac.asset_root.default` before the legacy `persistent.isaac.asset_root.cloud`, matching the only asset-root setting Isaac Sim resolves. Note the migration consequence: redirecting Isaac Lab by editing only the `cloud` key in an experience file no longer has any effect, since the shipped experiences leave `default` on the cloud URL. This is called out in both the new documentation and the changelog fragment. - `isaacsim.storage.native` is added to the `isaaclab.python` and `isaaclab.python.headless` experiences so Isaac Sim's own asset-root APIs apply the variable too. See the note on isaac-sim#6499 below. - New documentation covers pointing Isaac Lab at a local asset root. Note on scope: this makes `ISAACSIM_ASSET_ROOT` the supported *runtime* override for the asset root. Editing `persistent.isaac.asset_root.default` in an experience file also works, since that is the fallback Isaac Lab reads. What it does not restore is a command-line override such as `--kit_args="--/persistent/isaac/asset_root/cloud=<path>"`: Isaac Lab still does not read the live Carb setting, so changing it at runtime alone will not move these constants. ## On re-adding `isaacsim.storage.native` and Warp isaac-sim#6499 removed `isaacsim.storage.native` by name, along with the other Isaac Sim extensions, to keep Isaac Sim's Warp version out of the extension graph. This change re-adds only that one extension, and it does not reintroduce that risk: - Walking the recursive dependency closure, `isaacsim.storage.native` resolves 55 extensions while `isaacsim.core.version` — which both experiences already load — resolves 54. The delta is exactly one extension: `isaacsim.storage.native` itself. Its dependencies, `isaacsim.core.version` and `omni.client`, are already in the graph. - No Warp extension appears anywhere in that closure. - Headless launches before and after this change both report Warp at the unchanged baseline `1.13.0`. After the change, native storage is enabled and the Carb `default` setting plus every Isaac Lab asset constant resolve to the local path. This follows the same approach as isaac-sim#6697, which re-added `omni.physics.physx` for the PhysX registration bridge without restoring the Isaac Sim core extension or its Warp dependency. ## Known limitation, unchanged by this PR The experience-file fallback always reads `apps/isaaclab.python.kit` regardless of which experience was launched. This is inert today because every shipped experience carries the same asset root, but editing the value in another experience file still has no effect on Isaac Lab. Related but separate: isaac-sim#4478 and isaac-sim#4479 propose a broader offline mode with asset mirroring and an `--offline` flag. This PR is the narrow fix for the documented environment override. Fixes isaac-sim#6318 <!-- As a practice, it is recommended to open an issue to have discussions on the proposed pull request. This makes it easier for the community to keep track of what is being developed or added, and if a given feature is demanded by more than one party. --> ## Type of change <!-- As you go through the list, delete the ones that are not applicable. --> - Bug fix (non-breaking change which fixes an issue) - Documentation update ## Screenshots Not applicable, this change has no visual output. <!-- Example: | Before | After | | ------ | ----- | | _gif/png before_ | _gif/png after_ | To upload images to a PR -- simply drag and drop an image while in edit mode and it should upload the image directly. You can then paste that source into the above before/after sections. --> ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package (do **not** edit `CHANGELOG.rst` or bump `extension.toml` — CI handles that) - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task --> --------- Co-authored-by: Kelly Guo <[email protected]>
Description
Restore the CPU PhysX stage-initialization path from #4675 while preserving the
Isaac Sim core-extension removal from #6499.
#6499 removed
isaacsim.core.simulation_manager, which also removed theregistration bridge between the unified physics API and PhysX. The replacement
CPU path explicitly attached the stage and skipped
force_load_physics_from_usd(). This reintroduced non-deterministic CPUbroadphase collision failures, observed by the SkillGen test in #6687.
This change:
omni.physics.physxto the GUI and headless app experiences so PhysX isregistered without restoring the Isaac Sim core extension or its Warp
dependency;
stage, while CPU uses
force_load_physics_from_usd();attach_stage(), and CPU force-loads exactly once.Type of change
Screenshots
Not applicable.
Validation
uv run python -m pytest source/isaaclab_physx/test/assets/test_rigid_object.py::test_warmup_attach_stage_not_called_for_cpu source/isaaclab_physx/test/assets/test_rigid_object.py::test_initialization -qIsaacContrib-Stack-Cube-Franka-IK-Rel-Skillgen.uv run python tools/changelog/cli.py check developuv run isaaclab -fChecklist
pre-commitchecks withuv run isaaclab -fsource/isaaclab_physx/changelog.d/CONTRIBUTORS.md