Skip to content

Joint Dependent Mesh/BBox for Embodiment - #968

Merged
zhx06 merged 7 commits into
mainfrom
zxiao/feature/joint_dependent_placement_geometry
Aug 4, 2026
Merged

Joint Dependent Mesh/BBox for Embodiment#968
zhx06 merged 7 commits into
mainfrom
zxiao/feature/joint_dependent_placement_geometry

Conversation

@zhx06

@zhx06 zhx06 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Joint-dependent mesh/bbox for embodiments

Detailed description

  • Compute embodiment bounding boxes at configured initial joint positions
  • Use one combined posed link-box collision mesh for Droid and Franka
  • Preserve existing list-based joint-pose APIs
  • Enable Droid mesh collision in the Lightwheel kitchen; other embodiment configurations retain bbox collision by default

Tests

  • Joint-dependent bounding boxes and collision meshes match configured Franka and Droid joint poses.
  • Cached bounding boxes and meshes return mutation-safe copies.
  • Completed 20 episodes for both Droid bbox and mesh collision modes with placement_seed=17.
  • Across five placement solves, on_relation, not_next_to, face_to, and no_overlap validation counts matched between modes. next_to remained comparable.

Command to run:

/isaac-sim/python.sh isaaclab_arena/evaluation/policy_runner.py \
  --viz kit \
  --policy_type zero_action \
  --num_episodes 20 \
  --placement_seed 17 \
  --disable_fabric \
  --device cpu \
  --env_graph_spec_yaml isaaclab_arena_environments/kitchen_bench/droid_pick_and_place_lightwheel_kitchen.yaml

With Droid mesh collision and solver logging enabled, five solves averaged:

[RelationSolver] solve: 4434.8 ms average | batch=50 | objects=3 optimizable + 3 anchors | no-overlap pairs=8 | iters=600 (7.39 ms/iter)

Versus the previous Droid bbox configuration:

[RelationSolver] solve: 4140.6 ms average | batch=50 | objects=3 optimizable + 3 anchors | no-overlap pairs=12 | iters=600 (6.90 ms/iter)

This is an end-to-end configuration comparison: Droid mesh collision was approximately 7.1% slower, while using fewer no-overlap pairs.

Comment thread isaaclab_arena/embodiments/embodiment_base.py
Comment thread isaaclab_arena/utils/collision_mesh_store.py Outdated
@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR introduces joint-dependent placement geometry and reusable collision-mesh artifacts.

  • Poses embodiment bounding boxes and collision meshes from configured articulation joints.
  • Adds persistent local and published mesh loading, validation, eviction, and export tooling.
  • Adds per-embodiment robot-library folders, USD articulation kinematics, visualization helpers, and extensive simulation tests.

Confidence Score: 3/5

The PR should not merge until Franka and Droid placement geometry honors constructor-supplied initial joint poses; source-aware cache invalidation should also be strengthened.

Franka and Droid can reset into a constructor-selected arm pose while their newly introduced bounding box and collision mesh are computed from a different joint mapping, causing incorrect placement geometry on a supported path.

Files Needing Attention: isaaclab_arena/embodiments/embodiment_base.py, isaaclab_arena/embodiments/franka/franka.py, isaaclab_arena/embodiments/droid/droid.py, isaaclab_arena/utils/collision_mesh_store.py

Important Files Changed

Filename Overview
isaaclab_arena/embodiments/embodiment_base.py Routes embodiment geometry through joint-aware helpers, but reads a different joint-pose source than Franka and Droid constructor overrides.
isaaclab_arena/utils/usd_articulation.py Adds offline USD articulation forward kinematics for revolute, prismatic, fixed, instanced, and closed-loop geometry.
isaaclab_arena/utils/usd_helpers.py Adds cached posed-mesh extraction and posed Gprim bounding-box computation.
isaaclab_arena/utils/collision_mesh_store.py Adds persistent and published mesh artifacts, though source identity does not invalidate artifacts after in-place USD updates.
isaaclab_arena/scripts/export_ready_pose_collision_meshes.py Adds a simulation-backed exporter that deduplicates embodiment variants and reports partial failures.
isaaclab_arena/tests/test_usd_articulation.py Adds broad articulation-kinematics and real-robot geometry coverage.
isaaclab_arena/tests/test_collision_mesh_store.py Covers pose keys, artifact validation, scaling, atomic storage, publication, and cache trimming.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Config[Embodiment scene config] --> Source[PlacementGeometrySource]
  Source --> Pose[USD articulation posing]
  Pose --> BBox[Posed bounding box]
  Pose --> Extract[Mesh extraction]
  Source --> Store{Stored artifact valid?}
  Store -->|yes| Mesh[Scaled collision mesh]
  Store -->|no| Extract
  Extract --> Cache[Local/published mesh store]
  Cache --> Mesh
  BBox --> Placement[Relation placement]
  Mesh --> Placement
Loading

Reviews (1): Last reviewed commit: "add joint support for robots" | Re-trigger Greptile

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

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

This PR makes an embodiment's placement bounding box and collision mesh reflect the robot as actually spawned — posed at its configured init_state.joint_pos via offline USD forward kinematics — instead of the arbitrary joint configuration the asset was authored in. That is a real correctness improvement for relation-based placement, and it is backed by an unusually strong test suite (PhysX ground-truth link-pose comparison, closed-loop articulations, instanced geometry, prismatic/revolute cases, LRU eviction, and stale/foreign-artifact rejection). The FK and geometry code is careful and well-documented.

Design, Boundaries & Scope

My one real question is scope, raised inline on collision_mesh_store.py: the change ships a two-tier persistence layer — a 1 GiB on-disk LRU cache plus a Nucleus-published robot library with an export/upload pipeline. The in-process lru_cache on the posed-geometry helpers already covers the relation-solver hot path within a run, so the disk + Nucleus layer only saves the one-time 0.1–2.5 s extraction per fresh process. Against that it adds ongoing maintenance (re-export on every USD/joint change), a Nucleus dependency in the placement path, and a cache that grows in every user's ~/.cache on the default path. Worth confirming that cross-process cost actually bites before taking on the exported-library machinery; the in-process cache (plus perhaps a plain local disk cache) may deliver most of the value for far less surface.

Boundaries otherwise hold: the new FK/store code is generic USD/IO utility, no robot-specific logic leaks into core, and the embodiment geometry methods stay pure (no live env).

Findings

🟡 collision_mesh_store.py — question whether the published-library + disk-LRU persistence needs to ship now, or could be deferred behind the in-process cache (inline).

Test Coverage

Excellent. New tests follow the inner/outer run_simulation_app_function pattern with deferred sim imports and land in Phase 1 (in-process persistent app, no cameras/subprocess), matching the existing sibling test. Coverage spans unit FK, real-Droid geometry, PhysX agreement, and the full store lifecycle including negative cases. No gaps worth calling out.

Verdict

Minor fixes needed — essentially ship-ready; please just weigh in on the persistence-layer scope question before merge.

@qianl-nv qianl-nv 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.

I have some general questions on why we need the "local/Omniverse cache for pre-computed mesh" part.

  • collecting the mesh for droid is only taking about 1s, it's hardly the bottlenet in the overall pipeline atm. we don't think we need to go done for the perf there using cache. Finding ways the speed up the mesh mode for Background (where we absolutely need it) is more important imo.
  • for embodiment, what's blocking is actually the joint-angle-based bounding box collection. unless we are confident of shipping v0.3 with both background and embodiment using mesh mode (so far it has always take forever for solver), we need a working version of background in mesh mode + embodiment in bbox mode.

Comment thread isaaclab_arena/assets/asset_cache.py Outdated
Comment thread isaaclab_arena/embodiments/embodiment_base.py
Comment thread isaaclab_arena/embodiments/robot_on_stand_utils.py Outdated
@zhx06
zhx06 force-pushed the zxiao/feature/joint_dependent_placement_geometry branch 2 times, most recently from 4e98441 to 204ab44 Compare July 30, 2026 18:25

@qianl-nv qianl-nv 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.

For droid/franka let's just overwrite get_collision_mesh instead of creating a new get_collsion_meshes. The return should be one mesh, this should remove a lot of downstream changes.

Please rebase the MR onto qianl/feature/mesh-optimization
Update the commit message with solver/validation logging before/after this change for the droid kitchen example

Will do another pass after above modification.

Comment thread isaaclab_arena/embodiments/droid/droid.py Outdated
Comment thread isaaclab_arena/embodiments/franka/franka.py Outdated
Comment thread isaaclab_arena/embodiments/droid/droid.py
Comment thread isaaclab_arena/embodiments/embodiment_base.py Outdated
Comment thread isaaclab_arena/embodiments/embodiment_base.py Outdated
Comment thread isaaclab_arena/embodiments/embodiment_base.py Outdated
Comment thread isaaclab_arena/embodiments/droid/droid.py
@zhx06
zhx06 force-pushed the zxiao/feature/joint_dependent_placement_geometry branch from 204ab44 to fb0fa80 Compare August 3, 2026 15:54
@zhx06
zhx06 changed the base branch from main to qianl/feature/mesh-optimization August 3, 2026 15:55
@zhx06
zhx06 changed the base branch from qianl/feature/mesh-optimization to main August 3, 2026 15:56
@zhx06
zhx06 changed the base branch from main to qianl/feature/mesh-optimization August 3, 2026 15:57
@zhx06
zhx06 changed the base branch from qianl/feature/mesh-optimization to main August 3, 2026 17:00

@qianl-nv qianl-nv 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.

Some more nits.
Plz do one more pass in cleaning / simplying the util functions

Comment thread isaaclab_arena/embodiments/embodiment_base.py Outdated
Comment thread isaaclab_arena/utils/usd_articulation.py Outdated
Comment thread isaaclab_arena/utils/usd_helpers.py
Comment thread isaaclab_arena/utils/usd_helpers.py Outdated
Comment thread isaaclab_arena/utils/usd_helpers.py
Comment thread isaaclab_arena/utils/usd_helpers.py Outdated
Comment thread isaaclab_arena/utils/usd_articulation.py Outdated
Comment thread isaaclab_arena/utils/usd_articulation.py Outdated
Comment thread isaaclab_arena/utils/usd_articulation.py

@qianl-nv qianl-nv 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.

Thanks a lot for addressing all the comments. Looks a lot cleaner now.
Approved!
one super small nit, see if you can fix it when rebasing to main.

Comment thread isaaclab_arena/utils/usd_helpers.py Outdated
zhx06 added 7 commits August 3, 2026 21:06
Signed-off-by: zhx06 <zihaox@nvidia.com>
Signed-off-by: zhx06 <zihaox@nvidia.com>
Signed-off-by: zhx06 <zihaox@nvidia.com>
Signed-off-by: zhx06 <zihaox@nvidia.com>
Signed-off-by: zhx06 <zihaox@nvidia.com>
Signed-off-by: zhx06 <zihaox@nvidia.com>
Signed-off-by: zhx06 <zihaox@nvidia.com>
@zhx06
zhx06 force-pushed the zxiao/feature/joint_dependent_placement_geometry branch from 6359d9e to d0dad62 Compare August 4, 2026 04:07
@zhx06
zhx06 merged commit ba2833f into main Aug 4, 2026
19 of 20 checks passed
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