[Cloner] Represent worlds with reusable asset prototypes - #8045
Conversation
|
run-ci |
|
There was a problem hiding this comment.
Isaac Lab Review Bot
The cfg-backed ClonePlan consolidates variant selection and backend path derivation through replication_mapping, but two issues need correction: public cloner fields and arguments are removed without the required deprecation period, and clone_plan_from_env_0 treats spawnerless environment-scoped declarations as active prototypes, producing wildcard paths that low-level backends cannot consume.
- Design and architecture: Retaining source configurations and deriving backend mappings from one plan removes duplicated manifests and keeps declared subtree ownership explicit. However, the homogeneous planner must distinguish declarations used for querying from concrete prototype roots eligible for backend replication.
- API: The changes remove or redefine public
ClonePlanfields and remove theglobal_pathsparameters frommake_clone_planandReplicateSessionimmediately. Migration documentation and a breaking changelog entry are present, but the repository requires prior deprecation; compatibility properties and transitional arguments are needed before removal. - Implementation:
clone_plan_from_env_0marks every environment-scoped configuration as populated, including configurations without spawners. Consequently,_iter_prototypescan synthesize regex-containing paths such as/World/envs/env_0/Robot/[^/]*; the changed OVPhysX contact-sensor path then passes that non-prim source toovphysx_replicate, which rejects it. Only declarations with concrete prototype paths should contribute replication mappings.
Minor fixes needed. Posted 2 actionable findings inline.
Automated review; human maintainers own approval decisions.
|
run-ci |
|
run-ci |
StafaH
left a comment
There was a problem hiding this comment.
Let's make sure that names are updated to reflect the new value, e.g. I caught scene_entities not being updated to scene even though its value is now InteractiveScene.
Also will need updated performance (especially for homogenous scenes under newton)
|
run-ci |
|
Fixed the standalone Kit failure in 46821c6. With 2 environments and 16 declared layouts, weighted sequential selection chose layouts 4 and 12 rather than the full first bin. Some grocery cfgs then had no selected spawn path. The demo now limits its layouts to the environment count, so the full first bin is always selected. Only examples/bin_packing.py changed (+6/-6); no generic cloner changes or additional tests. Validated locally on GPU 1 with Isaac PhysX, no visualizer, and 10 simulation steps for both 1 and 2 environments. Checked layout coverage for 1, 2, 16, and 32 environments. Formatting and lint checks passed. |
Keep all four prototype fields together and store world origins on ClonePlan. Add explicit Warp materialization and batched numeric queries, with path selection separate from topology queries. Migrate consumers and extend existing coverage for CPU sharing and CUDA graph replay.
Flatten compound matching loops and name meaningful predicates. Remove duplicated launch branches and one-use indirection while preserving clone routing, native ownership, and the public API.
c98a6d4 to
7578ce8
Compare
|
run-ci |
|
run-ci |
|
run-ci |
Summary
Replace the asset-by-environment matrix with reusable asset definitions and explicit world compositions. Repeated memberships create distinct instances without importing the same geometry again.
cloner.path/cloner.queryoperations. They no longer read USD clone-context state. Clone contexts execute replication; they do not own naming, placement, or runtime resources.cloner.to_warp(plan.topology, device)explicitly materializes numeric arrays for batched, graph-capturable runtime queries. No implicit transfers or mirrored cfg objects.Compared with develop
d728f0335: 577 fewer package-production lines and 679 fewer test lines; 1,468 fewer lines overall, including documentation and release notes.Migration
Normal
InteractiveSceneandclone_plan_from_env_0signatures remain unchanged.Direct plan callers use
ClonePlan(topology, asset_cfgs, env_template=..., positions=...).ReplicateSessiontakesworld_prototypesandweightsinstead ofvalid_set; sequential selection produces contiguous weighted groups.pathandqueryare stateless function namespaces inclone_plan.py, exported fromisaaclab.cloner. Import the namespaces from the package;cloner.path.*andcloner.query.*calls remain unchanged.Path filters live in
cloner.pathand take the host plan. Numeric queries takeplan.topologyand integer IDs, individually or in batches. All three numeric queries return flat world indices and boundaries shaped[num_queries, num_worlds + 2]. Warp callers supply resident IDs and preallocated outputs.Custom clone contexts receive
replicate(plan, asset_prototype_ids); context instances are constructed by the dispatcher from the simulation. Authored sources come fromcloner.path.get_asset_prototype_paths(plan).get_world_prototype_asset_templates(plan)returns templates and prototype boundaries;include_world_indices=Trueadditionally returns world IDs and their per-prototype boundaries. These tables replaceget_instance_paths; the two boundary arrays group different relationships. Neither table depends on a USD context. Removed joined path mappings,iter_subtree_copies, and theunder/relativize/splitwrappers. Compose plan indexing withmatch,relative_to,rebase, andget_parent_indices; the API reference documents these primitives. Raw backend replication APIs retain their path-based inputs.Performance check
Matched warm runs of
2c2c7bb55against developd728f0335on RTX 5090 GPU 0: 4096 environments, seed 42, identical dependencies, no interactive visualizer. Newton uses MJWarp. Each checkout/workload had one excluded primer, then two fresh warm launches with the PR/develop order reversed for the second pair. Values are means of those two samples.Startup includes imports, cfg resolution, application launch, and completed environment construction; it excludes explicit reset, warmup, and teardown. Runtime measures a GPU-synchronized 100-step random-action loop after 20 warmup steps. FPS is aggregate environment-steps/s, not policy-training throughput. These are warm-cache results, not cold startup measurements.
Validation
uv run isaaclab -f, changelog validation, andgit diff --checkpassed. Documentation builds in CI.Type of change
Checklist
Release backport