Skip to content

Restore CPU PhysX stage initialization - #6697

Merged
kellyguo11 merged 1 commit into
isaac-sim:developfrom
kellyguo11:kellyg/fix-skillgen-cpu-path-regression
Jul 23, 2026
Merged

kellyguo11 merged 1 commit into
isaac-sim:developfrom
kellyguo11:kellyg/fix-skillgen-cpu-path-regression

Conversation

@kellyguo11

Copy link
Copy Markdown
Contributor

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 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 #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-Removes Isaac Sim core extensions from app file to avoid warp conflict #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

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with uv run isaaclab -f
  • Documentation changes are not required for this internal lifecycle fix
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective
  • I have added a changelog fragment under source/isaaclab_physx/changelog.d/
  • My name already exists in CONTRIBUTORS.md

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.
@github-actions github-actions Bot added bug Something isn't working isaac-sim Related to Isaac Sim team isaac-lab Related to Isaac Lab team labels Jul 23, 2026
@kellyguo11
kellyguo11 marked this pull request as ready for review July 23, 2026 20:53
@kellyguo11
kellyguo11 requested a review from a team July 23, 2026 20:53
@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a CPU PhysX broadphase regression introduced by #6499 (which removed isaacsim.core.simulation_manager) by restoring the pre-#6499 warmup behavior and replacing the removed registration bridge with an explicit omni.physics.physx dependency.

  • physx_manager.py: attach_stage() is now guarded to GPU-only; force_load_physics_from_usd() is called unconditionally for both pipelines, matching the original pre-Removes Isaac Sim core extensions from app file to avoid warp conflict #6499 behavior where CPU relied on implicit stage attachment through the bridge.
  • .kit files: omni.physics.physx is added to both the GUI and headless app experiences so the PhysX-to-unified-physics registration bridge is available without reinstating the removed Isaac Sim core extension or its Warp dependency.
  • Test: Regression test is updated to assert attach_stage is not called on CPU, force_load_physics_from_usd is called exactly once, and the omni.physics.physx extension is enabled.

Confidence Score: 5/5

Safe 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

Filename Overview
source/isaaclab_physx/isaaclab_physx/physics/physx_manager.py Fixes CPU broadphase initialization by making attach_stage GPU-only and restoring unconditional force_load_physics_from_usd for both pipelines
source/isaaclab_physx/test/assets/test_rigid_object.py Regression test updated to verify attach_stage is NOT called on CPU (0 times), force_load_physics_from_usd is called exactly once, and omni.physics.physx bridge is enabled
apps/isaaclab.python.headless.kit Adds omni.physics.physx dependency to register the PhysX backend with the unified physics API without requiring the removed Isaac Sim core extension
apps/isaaclab.python.kit Adds omni.physics.physx dependency to the GUI app experience, parallel to the headless kit change
source/isaaclab_physx/changelog.d/fix-physx-cpu-lifecycle.rst New changelog fragment correctly documenting the CPU broadphase fix

Sequence Diagram

sequenceDiagram
    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)
Loading

Reviews (1): Last reviewed commit: "Restore CPU PhysX stage initialization" | Re-trigger Greptile

@kellyguo11
kellyguo11 merged commit a4abce1 into isaac-sim:develop Jul 23, 2026
41 of 42 checks passed
kellyguo11 added a commit that referenced this pull request Jul 28, 2026
…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]>
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
# 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`
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team isaac-sim Related to Isaac Sim team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant