Commit 0eb2589
[Newton] Delegate homogeneous world prefix generation to
# Description
This depends on newton-physics/newton#4012 and pins the Newton 1.6
development build that first provides `ModelBuilder.replicate(...,
label_prefixes=...)`.
The homogeneous Newton cloning path previously replicated the model and
then walked every replicated entity label to replace the prototype
environment with its destination environment. It now rebases only the
retained prototype labels, restores them after the call, and lets
`ModelBuilder.replicate()` assign each copy's destination prefix while
it is created. String-valued custom attributes still use the existing
targeted rewrite because Newton cannot identify which strings are entity
paths.
The destination itself is the source of identity: prefixes are derived
from the queued source/destination mapping. No clone-plan environment
metadata, scene discovery, fallback clone path, or retained prototype
mutation is introduced. Labels exactly at a directly cloned asset root,
including Newton's `_free_joint` and `_articulation` companion labels,
are expressed relative to the nearest templated destination ancestor and
remain on the same fast path.
The Newton commit pin is mirrored in workspace and wheel installation
inputs so every supported install receives the API this path requires.
The final PR is `+195/-218`, net **-23 LOC**.
## Performance
GPU 0, 4096 worlds, two samples per PR head. The targeted measurement
uses one 48-body/48-shape Newton prototype and times replication plus
all required label publication:
| Head | Targeted path median | Versus develop |
|---|---:|---:|
| develop base (`3a31389a9`) | 1.428 s | — |
| original PR (`cbb17ab6e`) | 1.160 s | -18.8% |
| cleaned PR (`844f4c4db`) | 1.171 s | **-18.0%** |
The cleanup is within 1.0% (11 ms) of the original PR result and
preserves the removed-pass gain. The 257 ms reduction from develop is
consistent with the original 215 ms observation on
`Isaac-Velocity-Flat-G1`.
Whole-workload check used:
```bash
CUDA_VISIBLE_DEVICES=0 uv run --no-sync isaaclab zero_agent \
--task Isaac-Lift-KukaAllegro --num_envs 4096 --max_steps 1 \
--device cuda:0 --visualizer none physics=newton_mjwarp
```
| Head | Warm wall median | Scene creation median |
|---|---:|---:|
| original PR | 21.30 s | 6.324 s |
| cleaned PR | 21.39 s | 6.345 s |
That end-to-end difference is within startup noise; the cleanup
introduces no measured workload regression.
## Type of change
- Startup performance enhancement
## Validation
- 81 focused clone, Newton, visualization-state, wheel-metadata, and
install tests passed.
- Ruff formatting and lint checks passed.
- Exact-root, sparse-environment, hook-authored-label, custom-attribute,
and retained-prototype cases are covered.
- The changelog fragment is present for the changed Newton package.
## Checklist
- [x] I have read and understood the contribution guidelines
- [x] My changes generate no new warnings
- [x] I have added tests that prove the fix is effective
- [x] I have added the required changelog fragment
- [x] My name already exists in `CONTRIBUTORS.md`
---------
Signed-off-by: Kelly Guo <kellyg@nvidia.com>
Co-authored-by: Octi Zhang <zhengyuz@nvidia.com>
Co-authored-by: Kelly Guo <kellyg@nvidia.com>ModelBuilder.replicate() (#7453)1 parent 8fbdc38 commit 0eb2589
20 files changed
Lines changed: 305 additions & 225 deletions
File tree
- docker/test
- source
- isaaclab_newton
- changelog.d
- isaaclab_newton
- cloner
- physics
- test
- cloner
- physics
- isaaclab
- changelog.d
- isaaclab/cli/commands
- test
- cli
- install_ci/uv_pip
- sim
- tools/wheel_builder
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
172 | 181 | | |
173 | 182 | | |
174 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
90 | | - | |
| 88 | + | |
| 89 | + | |
91 | 90 | | |
92 | 91 | | |
93 | 92 | | |
| |||
403 | 402 | | |
404 | 403 | | |
405 | 404 | | |
406 | | - | |
| 405 | + | |
407 | 406 | | |
408 | 407 | | |
409 | 408 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1062 | 1062 | | |
1063 | 1063 | | |
1064 | 1064 | | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
1065 | 1069 | | |
1066 | | - | |
| 1070 | + | |
1067 | 1071 | | |
1068 | | - | |
| 1072 | + | |
1069 | 1073 | | |
1070 | 1074 | | |
1071 | 1075 | | |
| |||
1118 | 1122 | | |
1119 | 1123 | | |
1120 | 1124 | | |
1121 | | - | |
1122 | | - | |
1123 | | - | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
1124 | 1128 | | |
1125 | 1129 | | |
1126 | 1130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
930 | 930 | | |
931 | 931 | | |
932 | 932 | | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
933 | 952 | | |
934 | 953 | | |
935 | 954 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
836 | 836 | | |
837 | 837 | | |
838 | 838 | | |
839 | | - | |
840 | | - | |
| 839 | + | |
841 | 840 | | |
842 | 841 | | |
843 | 842 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments