Repository navigation
Declare semantic inclusion matches and select compact clone worlds - #9156
Conversation
Clone planning enumerates the product of the variant counts of all replicated assets, which runs out of memory for scenes with several multi-variant assets. InclusionSet.variants pins the variant of assets in a clone combination, so a scene lists its legal compositions instead. Planning now raises a ValueError naming the pins when it would enumerate more than ten million world prototypes.
The limit counts the world prototypes of all clone combinations together, and a test covers the scene path without combinations. A pin given as a narrow NumPy integer selects its variant, the error states the exact count, and the API reference lists the fields of InclusionSet.
Planning enumerates the product of the variant counts again and runs out of memory for scenes that are too large, instead of raising a ValueError. InclusionSet.variants and its validation stay.
Pinning every asset of a combination into one world is already asserted by the pinned variants test, and the test no longer has a limit to contrast with.
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryAdds
No actionable issues were found. Tests were inspected but not run. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Clone combination] --> B[Check asset names and pins]
B --> C[Pinned assets contribute one choice]
B --> D[Unpinned assets contribute all choices]
C --> E[Build world prototypes]
D --> E
E --> F[Split combination weight across worlds]
Reviews (1) · Last reviewed commit: "Remove the redundant pinned-world count ..." · Reviewed by Greptile |
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Style consistency (2), Test quality (1). Other reviewed categories look good.
- PR description: Title and feature scope match; condense repeated rationale, remove future-merge timing, and compare bounded planning memory/latency across revisions with command, hardware, backend, software environment, environment count, and warmup.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: No breaking changes identified.
- Implementation: Implementation looks good.
- Style consistency: The added configuration copy uses a legacy method instead of the guide’s preferred functional operation; use clone(...) and remove the redundant assertion-narrating comment.
- Test quality: The distinct planning regression lacks a kitless marker and is omitted from kitless CI selection; mark it kitless while retaining the separate Newton initial-variant proof.
Minor fixes needed. Posted 3 inline findings.
Automated review; human maintainers own approval decisions.
| assert all(1 not in ids for _, _, ids in simulation.calls) | ||
|
|
||
|
|
||
| def test_pinned_variants_narrow_a_combination_to_its_unpinned_product(): |
There was a problem hiding this comment.
🟡 Warning · Test Quality — Mark the planning test kitless
CI selects kitless files by marker text. This pure-planning test has no kitless marker, so that selection omits it. Add pytest.mark.kitless to the test.
| InclusionSet(assets=["part", "part", "tool"], variants={"part": 1, "lamp": 1}), | ||
| ] | ||
| worlds, weights = make_valid_clone_combinations(names, counts, combinations) | ||
| # Pinning every multi-variant asset leaves one world carrying the whole weight; the free tool splits the other. |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Remove assertion-narrating comment
The comment repeats the test docstring and narrates the following world and weight assertions. Remove it; the prototype-row mapping above explains the non-obvious numeric IDs.
| def test_pinned_clone_combinations_choose_initial_variants(device: str) -> None: | ||
| """Each world starts with the variants its clone combination pins, for reset-time and static spawners.""" | ||
| scene_cfg = _VariantSceneCfg(num_envs=4, env_spacing=2.0) | ||
| third = scene_cfg.object.spawn.assets_cfg[0].copy() |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Use functional configuration cloning
New configuration code should use the guide's functional operations. Replace this added .copy() call with clone(...); the legacy method remains supported but is not the preferred new-code convention.
|
run-ci |
## Description Add `IsaacContrib-TableTop-PickPlace-Franka`, a flat Franka/Robotiq tabletop environment with 100 NVIDIA-hosted SimReady props and nine real SimReady table variants. Object count, categories, concrete assets, table and collision-free poses are sampled again at reset. Every environment can use every declared task family. The scene declares eight interchangeable object slots. Each slot contains the same complete catalog plus an invisible, non-colliding placeholder. Reset samples a count from 2–8, samples a compatible source category and an asset uniformly within that category, reserves a fitting receiver, then samples categories and assets for the remaining occupied slots. Occupied objects and placeholders are shuffled across slots. A composition such as one container and two food items therefore uses three slots and five placeholders; no slot is permanently assigned a receiver or object role. Repeated assets are allowed. Placement retries preserve the sampled count. `InclusionSet(assets=["objects", "work_table"], sample_by="category")` keeps initial clone planning factorized. Runtime selection uses Newton's existing native body variants through rigid-object and collection APIs, updating geometry, mass, inertia and COM-dependent state. There is no enumeration of complete world combinations or stored catalog-pair product, and no additional `ReplicateSession` customization. Identical collision-only source meshes share native SDF texture allocations across slots; visual meshes and prebuilt SDFs retain their ownership. Task rules are declared beside the scene config as `put_in_container` and `put_on_tray`. Task IDs are stable indices into `env.cfg.tasks`, shared across all environments. Requesting a family before reset samples objects that make it evaluable. Instructions and source/target masks are rebuilt from current category- and size-compatible objects after every reset. Success requires release, footprint containment and supporting contact; container placement additionally checks the bottom against the rim. Reset uses the intersection of the hand-defined robot workspace and each table's measured usable support polygon, including holes. Batched tensor checks test complete footprints against measured edges and holes, while XYZ bounds enforce the workspace; no polygon Boolean construction or Shapely task dependency is needed. Proposal bounds only narrow the search and do not replace the measured surface. Collision geometry is transformed relative to the simulator COM. Full footprints must fit, object pairs need clearance, and Newton's native collision pipeline rejects penetrating placements, including robot intersections. Tables retain their real visual geometry and triangle collisions; articulated table equipment is frozen into one kinematic body. A reset selects a different feasible table. Partial resets preserve untouched worlds. Pending worlds publish their new geometry and poses together; unplaced slots are kept apart outside the workspace during retries. The task declares SAH geometry BVHs: the same dense 64-world reset case passes with SAH and crashes inside Newton’s mesh-overlap kernel with LBVH. The config composes constants with `.copy()` and `.replace()`. Reset and success evaluation stay in task-local MDP terms. There are no per-task configuration files, task YAML, config factories, post-init scene generation, task-local object-cooking subclasses or core task manager. Objects, tables and robot support use NVIDIA-hosted SimReady paths; no Hugging Face cache or custom object/table uploads are required. The known problematic `Big_Plastic_Plate_A01` is excluded. The Newton backend declares optional SDF triangle reduction through `NewtonCfg(sdf_mesh_reduction=0.75)`, retaining original visual geometry and body inertia. This task uses 0.75 mm SDF voxels, four solver substeps with contact refresh, and a shared 5 ms gripper/object contact response. Robot home pose and actuator gains are preserved. Camera lighting comes from scene dome/distant-light assets translated at the builder boundary; renderer configs do not duplicate scene lighting. Unsupported light types are reported, and scenes with no supported lights keep Newton's defaults. The robot references `ISAACLAB_NUCLEUS_DIR/Robots/FrankaEmika/Robotiq/franka_robotiq_2F_85.usd`. Its corrected replacement was requested and bucket propagation is pending. Local simulation uses the corrected saved USD through a runner-only override; no robot USD is bundled in this PR. Based on main after #9156 merged. This PR is a prerequisite for #9184. ## Validation - Automated coverage includes the catalog/factorization check and backend collision-approximation and visual-import checks. - A 1,000-entry, five-category catalog remains factorized across eight slots, with at most 128 materialized world prototypes for 128 environments. - A negative control fails when identical collision meshes allocate separate SDF textures. An isolated replay of the captured dense mesh-overlap query also reproduces the LBVH crash and passes with SAH. - The actual 100-asset scene passed 896 forced resets across 64 worlds: every count from 2–8 and both task families in every environment. All 100 concrete props were observed. Partial resets preserved untouched object variants and poses, and 30 subsequent simulation steps kept object states finite. These checks used the cached NVIDIA assets and the corrected local robot override; MJWarp still emitted line-search iteration-limit warnings. - The Shapely-free support check matches an independent geometry oracle on 90,000 cases, including concave outlines, enclosed holes and three clearance distances. Local physical reset/task-success and actual Robotiq validation passed after removing the direct dependency. Shapely remains a transitive dependency of the existing Newton `alphashape` importer. - Repository formatting/lint, changelog checks and offline lockfile validation pass. The workspace is hand-defined rather than an IK reachability calculation. Size compatibility is conservative, not a grasp planner, and bounded placement can fail explicitly for infeasible configurations. The current documentation image was rendered before this reset change; no new policy success rate is claimed. ## Screenshot  ## Type of change - New feature - Documentation update ## Checklist - [x] Read the contribution guidelines - [x] Run formatting and lint checks - [x] Update documentation - [x] Validate behavior with focused coverage and apply the test-audit criteria - [x] Add package changelog fragments - [x] Contributor names already exist in `CONTRIBUTORS.md` --------- Co-authored-by: Octi Zhang <zhengyuz@nvidia.com>
Description
Multi-asset spawners can expose an enormous Cartesian product even when a task only needs a few compatible worlds. Declare compatibility with existing semantic tags and keep the legal choices compact until scene planning selects concrete worlds.
InclusionSetowns only asset membership, inclusion weight, and matching tag types. No matching subclass, override method, positional layouts, separate labels, environment count, or random seed is required.sizevalues. Repeat asset names for cardinality; all selected instances share the requested tags. Unclaimed assets remain independent. This expresses shared compatibility, not separate pairwise constraints or sampling without replacement.make_clone_planuses the existing scene clone strategy to select groups and each slot's candidates, materializes only selected worlds, and reuses identical concrete prototypes. Inclusion weights split equally across compatible groups. Multi-valued tags can make groups overlap; this is group-weighted selection, not uniform sampling over the exhaustive union of concrete worlds.ReplicateSessiononly receives broader type annotations for forwarding compact definitions; inclusion interpretation stays outside it.This is the generic prerequisite. Downstream task-manager, heterogeneous-task, and VLA evaluation example changes (#9161, #9165 and #9184 ) need to adopt the declarative API when restacked.
Validation
5 * 200**8concrete worlds; planning 128 environments created at most 128 concrete world prototypes.