Repository navigation
Fixes CPU pipeline stage initialization in PhysxManager - #4675
Merged
Merged
Conversation
Contributor
Greptile SummaryThis PR fixes a CPU collision detection bug introduced during the PhysicsManager refactoring (#4564). The recent refactoring added an unconditional call to Key changes:
The fix aligns with the original behavior where the old SimulationManager never called Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[_warmup_and_create_views called] --> B{Check device type}
B -->|GPU pipeline<br/>cuda in device| C[attach_stage]
B -->|CPU pipeline<br/>cpu device| D[Skip attach_stage]
C --> E[force_load_physics_from_usd]
D --> E
E --> F[start_simulation]
F --> G[update_simulation]
G --> H[Create SimulationView]
H --> I[Physics Ready]
C -.->|Prevents| J[GPU buffer allocation issues]
D -.->|Prevents| K[CPU broadphase MBP<br/>double-initialization]
K -.->|Would cause| L[Objects fall through surfaces]
Last reviewed commit: 90894d0 |
ooctipus
approved these changes
Feb 21, 2026
1 of 7 tasks
7 tasks done
kellyguo11
added a commit
that referenced
this pull request
Jul 23, 2026
# 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-#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
# 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`
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
In recent PhysicsManager refactoring, behavior in the PhysxManager changed to call attatch_stage by default for initialization.
This triggered a side effect in CPU pipeline that caused objects to miss contacts and collisions.
It appears that attach stage to PhysX before loading/starting is only needed for GPU pipeline. So in this change, we are guarding this call to run on GPU pipeline only and avoid it on CPU pipeline to avoid issues in collisions.
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there