Skip to content

Exclude relation anchors from background collision meshes - #1003

Merged
qianl-nv merged 2 commits into
mainfrom
qianl/feature/mesh-collision-deduplication
Aug 4, 2026
Merged

Exclude relation anchors from background collision meshes#1003
qianl-nv merged 2 commits into
mainfrom
qianl/feature/mesh-collision-deduplication

Conversation

@qianl-nv

@qianl-nv qianl-nv commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Exclude anchored references from background meshes

Detailed description

  • Prevent conflicting relation and mesh-collision constraints for anchored object references.
  • Exclude referenced USD prim subtrees when aggregating their parent background mesh.
  • Include exclusions in mesh-cache keys and handle fully excluded geometry.
  • Add coverage for exclusion propagation, extraction, and cache behavior.

Command to run:
/isaac-sim/python.sh isaaclab_arena/evaluation/policy_runner.py --viz kit --policy_type zero_action --num_episodes 20 --disable_fabric --device cpu --env_graph_spec_yaml isaaclab_arena_environments/kitchen_bench/replicator_kitchen_peninsula_mustard_bowl.yam

Before:
[RelationSolver] solve: 3635.3 ms | batch=50 | objects=3 optimizable + 2 anchors | no-overlap pairs=9 | iters=600 (6.06 ms/iter)
[placement] Validated 50 candidate layout(s); passed per check: on_relation=0/50, next_to=34/50, not_next_to=50/50, face_to=50/50, no_overlap=34/50

After:
[RelationSolver] solve: 3392.7 ms | batch=50 | objects=3 optimizable + 2 anchors | no-overlap pairs=9 | iters=600 (5.65 ms/iter)
[placement] Validated 50 candidate layout(s); passed per check: on_relation=35/50, next_to=35/50, not_next_to=50/50, face_to=50/50, no_overlap=47/50

@qianl-nv qianl-nv left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

self review 1

Comment thread isaaclab_arena/assets/object_reference.py Outdated
Comment thread isaaclab_arena/utils/usd_helpers.py
@qianl-nv
qianl-nv force-pushed the qianl/feature/mesh-collision-deduplication branch 2 times, most recently from 8395ab9 to b367580 Compare August 3, 2026 09:11
@qianl-nv
qianl-nv marked this pull request as ready for review August 3, 2026 09:13
@greptile-apps

greptile-apps Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Excludes anchored object-reference subtrees when aggregating parent USD geometry into background collision meshes.

  • Resolves and caches each reference's parent-USD prim path alongside its relative pose.
  • Propagates anchored-reference exclusions through passive collision discovery and fixed-mesh aggregation.
  • Includes normalized exclusion sets in collision-mesh cache keys and distinguishes fully excluded geometry.
  • Adds coverage for exclusion propagation, extraction behavior, and cache isolation.

Confidence Score: 5/5

The PR appears safe to merge; no concrete changed-code failure remains.

The exclusion path preserves scene-object identity, uses correctly delimited absolute USD subtree paths, and separates cached meshes by their exclusion sets.

Important Files Changed

Filename Overview
isaaclab_arena/assets/object_reference.py Resolves and retains the referenced absolute USD path while preserving the existing relative-pose calculation.
isaaclab_arena/environments/relation_solver_interface.py Collects anchored ObjectReferences and forwards them to passive background collision discovery.
isaaclab_arena/relations/passive_collision_objects.py Groups reference exclusions by the same parent objects selected for aggregate collision processing.
isaaclab_arena/relations/background_collision_object.py Propagates per-object USD subtree exclusions into fixed collision-mesh extraction.
isaaclab_arena/relations/warp_mesh_manager.py Keys extracted meshes by normalized exclusions and forwards exclusions to the USD extractor.
isaaclab_arena/utils/usd_helpers.py Omits exact prim subtrees during traversal and reports when exclusions remove all mesh geometry.
isaaclab_arena/tests/test_relation_solver_background_collision.py Covers exclusion forwarding, grouping, cache separation, and background extraction failure behavior.
isaaclab_arena/tests/test_usd_helpers.py Adds simulator-backed coverage for complete exclusions and malformed remaining geometry.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Anchored ObjectReference] --> B[Resolve parent USD prim path]
  B --> C[Collect exclusions by parent asset]
  C --> D[Passive collision discovery]
  D --> E[Fixed background mesh aggregation]
  E --> F[USD mesh extraction]
  C --> G[Cache key: USD path + scale + exclusions]
  F --> H[Background collision mesh without anchor subtree]
Loading

Reviews (1): Last reviewed commit: "Exclude relation anchors from background..." | Re-trigger Greptile

Comment thread isaaclab_arena/utils/usd_helpers.py Outdated
@arena-review-bot

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

This PR stops anchored object references from being counted twice in placement collision — once as their own anchor collision mesh and again inside the aggregated background mesh — by threading per-object USD subtree exclusions from the solver interface down through mesh extraction. The change is well-layered (pxr imports stay deferred, exclusions live in the domain/relations layer), the cache key correctly incorporates exclusions, subtree matching avoids prefix false-positives (startswith(f"{path}/")), and the reported on_relation / no_overlap gains confirm it fixes a real conflict. Solid, focused work.

Findings

🔵 usd_helpers.py:369 — When exclusions remove every mesh from a background, the new NoCollisionMeshError ultimately trips the whole-scene-Background assertion and aborts placement. Raised as a question: is a hard crash intended, or should a background whose geometry is fully covered by anchors simply contribute no mesh? (See inline.)

Test Coverage

Strong. New coverage spans exclusion propagation (test_passive_background_excludes_relation_anchor_subtrees), cache keying by exclusions (test_warp_mesh_cache_keys_exclusions), the fully-excluded and unsupported-geometry error paths, prim-path caching, and an inner/outer sim test (test_mesh_exclusion_errors) exercising real USD extraction. The interface-level forwarding test correctly patches get_passive_collision_objects at its source module to match the new lazy import.

Verdict

Ship it — the one finding is an open design question, not a blocker.

@zhx06 zhx06 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! The only nit is the comments from the arena review bot, whether excluding all meshes should be treated as an error. Everything else looks good.

Base automatically changed from qianl/feature/mesh-optimization to main August 4, 2026 01:42
Avoid conflicting On and mesh-collision constraints by omitting anchored object-reference subtrees when aggregating background geometry.

Signed-off-by: Qian Lin <qianl@nvidia.com>
Treat exhaustive anchor exclusions as a valid empty background while preserving cached extraction failures for strict background handling.

Signed-off-by: Qian Lin <qianl@nvidia.com>
@qianl-nv
qianl-nv force-pushed the qianl/feature/mesh-collision-deduplication branch from b367580 to 7ca4caa Compare August 4, 2026 05:52
@qianl-nv
qianl-nv merged commit 3c19a3a into main Aug 4, 2026
10 checks passed
@qianl-nv
qianl-nv deleted the qianl/feature/mesh-collision-deduplication branch August 4, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants