Skip to content

[Backport release/3.0.0] Clear self-collision filter pairs before finalizing shadow Newton model (#7505) - #7580

Merged
kellyguo11 merged 1 commit into
isaac-sim:release/3.0.0from
kellyguo11:codex/backport-7505-release-3.0.0
Sep 4, 2026
Merged

[Backport release/3.0.0] Clear self-collision filter pairs before finalizing shadow Newton model (#7505)#7580
kellyguo11 merged 1 commit into
isaac-sim:release/3.0.0from
kellyguo11:codex/backport-7505-release-3.0.0

Conversation

@kellyguo11

Copy link
Copy Markdown
Contributor

Description

Backports #7505 to release/3.0.0 by cherry-picking the merged commit 4b9ba22508895906bb856845153b6409b5e86b3c with -x provenance.

The automatic backport run encountered the expected visualization-builder conflict, but its inferred resolution dropped the release-only rename_builder_labels import and failed Ruff with F821.

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 calls rename_builder_labels separately. No runtime dependencies are added.

Field Commit
Original merged change 4b9ba22508895906bb856845153b6409b5e86b3c
Release base used 355dc9ba107527d7baae7600e89229a89d4e4628
Proposed backport 64c6d483803bf706404236516d92c8ec77ab8211

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Release backport

  • This PR already targets the active release branch.

Validation

  • Repository backport candidate validation passed with all five source paths preserved and no extra paths changed.
  • Full repository pre-commit suite passed against release/3.0.0, including changelog and Git LFS checks.
  • uv run --no-project python -m compileall -q passed for all three modified Python files.
  • git diff --check upstream/release/3.0.0...HEAD passed.
  • Focused Newton regression tests are pending Linux CI because the repository lockfile does not support the local macOS/arm64 host. The original source PR completed 53 checks successfully.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the available pre-commit checks
  • Documentation changes are not needed for this backport
  • My changes generate no new runtime warnings (pending Linux CI)
  • The original regression test is preserved in the backport
  • Changelog fragments are preserved for both touched packages
  • The original contributor is already listed in CONTRIBUTORS.md

…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)
@kellyguo11
kellyguo11 requested a review from a team September 4, 2026 17:53
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Sep 4, 2026
@kellyguo11

Copy link
Copy Markdown
Contributor Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 4, 2026
@greptile-apps

greptile-apps Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This backport prevents PhysX-backed Newton shadow visualization models from retaining and replicating unused collision-filter metadata before finalization.

  • Clears collision-filter pairs and resets collision groups in standalone and cloned visualization builders.
  • Rebuilds cloned output from a compact destination builder while preserving the release branch’s replication and label-renaming sequence.
  • Adds regression coverage for finalized shape counts and empty collision/contact-pair stores.
  • Includes the corresponding Isaac Lab and Isaac Lab Newton changelog fragments.

Confidence Score: 5/5

The 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

Filename Overview
source/isaaclab_newton/isaaclab_newton/physics/visualization_builder.py Clears unused collision metadata before composing and finalizing standalone or replicated shadow visualization models.
source/isaaclab_newton/test/cloner/test_rename_builder_labels.py Extends builder test doubles for collision metadata and adds a real-builder regression covering standalone and cloned finalization.
source/isaaclab/test/sim/test_newton_manager_visualization_state.py Updates the fake shadow builder to satisfy the new collision-state and composition interface.
source/isaaclab_newton/changelog.d/fix-shadow-model-collision-filter-oom.rst Documents the fix for memory exhaustion caused by replicated unused collision metadata.

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]
Loading

Reviews (1): Last reviewed commit: "Clear self-collision filter pairs before..." | Re-trigger Greptile

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kellyguo11
kellyguo11 merged commit 1c75487 into isaac-sim:release/3.0.0 Sep 4, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants