Enable lightwheel kitchen mesh placement - #972
Conversation
Greptile SummaryEnables mesh-based Lightwheel kitchen placement while preventing placement resources from interfering with configuration validation and simulator startup.
Confidence Score: 5/5The PR appears safe to merge, with no concrete changed-code defect identified. Mesh resources cleared after construction are recreated by later solver and validator paths, while reset events consistently unwrap the shared pool handle and use the pool's own object set. Important Files Changed
Sequence DiagramsequenceDiagram
participant Builder as Environment Builder
participant Pool as PooledObjectPlacer
participant Solver as Relation Solver
participant Event as Reset Event
Builder->>Pool: Construct placement pool
Pool->>Solver: Solve initial mesh-aware layouts
Solver-->>Pool: Ranked layouts
Builder->>Pool: Release mesh collision resources
Builder->>Event: Store opaque PlacementPoolHandle
Event->>Pool: Sample layouts on reset
alt Pool needs refill
Pool->>Solver: Solve additional layouts
Solver->>Solver: Lazily rebuild mesh resources
Solver-->>Pool: Additional ranked layouts
end
Pool-->>Event: Per-environment placements
Reviews (1): Last reviewed commit: "Add placement pool handle." | Re-trigger Greptile |
| PLACEMENT_RESET_EVENT_NAME = "placement_reset" | ||
|
|
||
|
|
||
| class PlacementPoolHandle: |
There was a problem hiding this comment.
🟡 Live runtime pool stored in config params
PlacementPoolHandle exists only so a live, mutating PooledObjectPlacer can survive configclass validation/deep-copy while sitting in EventTermCfg.params — an opaque token with __slots__ plus a __deepcopy__ that returns self. That's a fair bit of machinery to make runtime state pass as config.
Since the pool is runtime state (it mutates as layouts are consumed and holds warp caches), would it be cleaner long-term to hold it on the env/runtime and have the reset event look it up, rather than store it in event params? Not a blocker for this fix — mostly asking whether the handle is papering over the pool living in the config layer. The docstring here is great context either way.
🤖 Isaac Lab-Arena Review BotSummaryThis PR enables MESH collision on the Lightwheel Robocasa kitchen, drops warp mesh caches after the construction solve so CUDA BVHs are not pinned through Kit startup/reset, and wraps the live placement pool in an opaque Design, Boundaries & ScopeOne non-blocking question (also inline): Findings🟡 The Test CoverageGood. VerdictShip it — clean, well-tested fix; the one design question is a follow-up, not a blocker. |
949ab01 to
cc40fa2
Compare
| class PlacementPoolHandle: | ||
| """Opaque EventTermCfg param holding a runtime placement pool. | ||
|
|
||
| Isaac Lab ``configclass._validate`` recursively walks any object with ``__dict__`` and has no |
There was a problem hiding this comment.
Suggestion to rewrite this docstring in human :)
It exists because Isaac Lab deep-copies every termination parameter and would then hold a potential outdated copy?
There was a problem hiding this comment.
It's not for potential outdated copy.
on main, if we switch any asset to mesh mode instead of bbox, a warp GPU cache (wp.Mesh for BVHs) is created, which causes deepcopy to crash (ctype no pickled). so we need to either release that cache before sim starts (which requires recreating it on the first placement layout refill with extra runtime), or just avoid deepcopying all together.
After that fix there's also another RecurssionError issue with config validation.
There was a problem hiding this comment.
I've updated the docstring to make that more clear.
| PLACEMENT_RESET_EVENT_NAME = "placement_reset" | ||
|
|
||
|
|
||
| class PlacementPoolHandle: |
There was a problem hiding this comment.
PlacementPoolHandle doesn’t make its purpose very clear. Could we use a more descriptive name, such as PlacementResetState?
There was a problem hiding this comment.
Handle is a commonly used program object to holds reference to other resources. It's used for passing references through APIs that cannot accept the underlying object directly, and avoid accidental copying/serialization. This is exactly the purpose we introduce this wrapper here.
I think the name is fitting for what it is & its purpose. Prefer to keep.
cc40fa2 to
7d3c7dc
Compare
Store the live placement pool behind an opaque handle in EventTermCfg params instead of the pool object. Mesh-mode placement builds Warp BVHs on the pool's solver; configclass deepcopy then fails with "ctypes objects containing pointers cannot be pickled". The handle shares one pool across deep-copies and keeps validation from recursing into cyclic asset graphs. Leaving those Warp mesh caches on the pool through Fabric startup also hides the Droid stand_instanceable in Kit viz (physics and placement stay correct). Use --disable_fabric for viewport runs until that is resolved; a 4-env / 2000-step benchmark showed no rollout cost from the flag (87.0 vs 86.5 ms/step). Drop the redundant assets event kwarg; layouts come from placement_pool.objects. Signed-off-by: Qian Lin <qianl@nvidia.com>
7d3c7dc to
69ddc99
Compare
Summary
Set lightwheel kitchen placement to mesh and fix crashes from placement pool
Detailed description
Known issue: With Fabric enabled, live Warp caches on the pool can hide the Droid stand_instanceable in Kit viz while physics stays correct; use --disable_fabric --device cpu for viewport runs (4 env / 2000-step benchmark: 87.0 vs 86.5 ms/step rollout, no meaningful difference). Alternative to fix this problem requires releasing the warp cache before passing into EventTermCfg. This slows down the first refill solve significantly (x2).