[Backport release/3.0.0] Clear self-collision filter pairs before finalizing shadow Newton model (#7505) - #7580
Conversation
…el (isaac-sim#7505) - The PhysX-backend shadow Newton visualization model never runs collision detection, but USD-authored self-collision filter pairs (`physxArticulation:enabledSelfCollisions`) were still imported into it and replicated across every cloned env. - At real training env counts, this filter-pair set could reach billions of entries, causing `ModelBuilder.finalize()` to run out of memory. - Clears `builder.shape_collision_filter_pairs` before finalizing the shadow model since it has no use for them. - [x] `uv run python -m pytest source/isaaclab/test/sim/test_newton_manager_visualization_state.py` — 23 passed, including new regression test `test_ensure_visualization_model_clears_shape_collision_filter_pairs_before_finalize` - [x] `uv run python -m pytest source/isaaclab/test/sim/test_simulation_context_visualizers.py source/isaaclab_newton/test/physics/test_newton_manager_abstraction.py` — 200 passed - [x] `uv run isaaclab -f` - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` --------- Co-authored-by: Octi Zhang <zhengyuz@nvidia.com> (cherry picked from commit 4b9ba22)
|
run-ci |
Greptile SummaryThis backport prevents PhysX-backed Newton shadow visualization models from retaining and replicating unused collision-filter metadata before finalization.
Confidence Score: 5/5The PR appears safe to merge with no concrete correctness or security defects identified. The changed path removes collision metadata from a visualization-only shadow model before replication, while the regression test confirms that finalized standalone and cloned models retain expected shape counts and produce no collision-filter or contact pairs. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[USD stage] --> B[Global and source visualization builders]
B --> C[Clear collision-filter pairs and reset groups]
C --> D[Compact destination ModelBuilder]
D --> E[Compose global geometry]
E --> F[Replicate source builders by clone plan]
F --> G[Rename labels]
G --> H[Add shadow deformables]
H --> I[Finalize visualization-only Newton model]
Reviews (1): Last reviewed commit: "Clear self-collision filter pairs before..." | Re-trigger Greptile |
There was a problem hiding this comment.
Isaac Lab Review Bot
Reviewed the backport’s collision-filter reset in both standalone and cloned Newton visualization-builder paths, including composition order, release-branch clone helper calls, updated test doubles, regression coverage, and package changelog fragments. No actionable defect is established by the supplied patch and context.
- Design and architecture: The clone path rebuilds into a fresh ModelBuilder after clearing collision metadata on the global and source builders, then preserves the existing global composition, replication, label-renaming, and shadow-deformable sequence. The standalone path clears the same metadata before returning. This is a focused change, though it remains coupled to Newton’s mutable builder internals and their composition behavior.
- API: The public function signature and return shape remain unchanged. The backport retains the release branch’s separate replicate_builder_mapping and rename_builder_labels calls, and no dependency or public API change is introduced.
- Implementation: The new attribute accesses are reflected in affected mocks and fakes, and the regression test finalizes real standalone and cloned builders while checking shape counts and empty collision/contact-pair stores. Clearing occurs after shadow deformables in the standalone path but before their addition in the clone path; the current evidence does not show that shadow deformables repopulate these stores, so this is only a future maintenance consideration rather than a finding.
No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.
Automated review; human maintainers own approval decisions.
Description
Backports #7505 to
release/3.0.0by cherry-picking the merged commit4b9ba22508895906bb856845153b6409b5e86b3cwith-xprovenance.The automatic backport run encountered the expected visualization-builder conflict, but its inferred resolution dropped the release-only
rename_builder_labelsimport and failed Ruff withF821.This manual backport preserves the source change while retaining the release branch's API sequence: it strips collision filters and groups before composition and replication, calls the release signature of
replicate_builder_mapping, and then callsrename_builder_labelsseparately. No runtime dependencies are added.4b9ba22508895906bb856845153b6409b5e86b3c355dc9ba107527d7baae7600e89229a89d4e462864c6d483803bf706404236516d92c8ec77ab8211Type of change
Release backport
Validation
release/3.0.0, including changelog and Git LFS checks.uv run --no-project python -m compileall -qpassed for all three modified Python files.git diff --check upstream/release/3.0.0...HEADpassed.Checklist
CONTRIBUTORS.md