Commit 21bc111
[Newton] Streamline contact and raycast sensor startup (#7269)
## Summary
This PR is now the contact/raycast part of the Newton startup work:
- compile contact-sensor full-path expressions once and match them
directly, without regex-to-glob conversion or stage globbing;
- use Newton's current contact-sensing API names;
- declare raycast collision-shape requirements before model
finalization, so the model builds one correctly configured BVH instead
of rebuilding it during sensor initialization.
The contact-selector and sensing-API commits retain Chris's (`camevor`)
original authorship. The BVH lifecycle change incorporates the review
from #7296 while keeping this as Chris's PR.
The related ownership work is intentionally split by component: #7292
handles explicit global ownership, and #7295 handles model/articulation
startup. This PR contains no inactive-solver registration or
articulation-view changes and supersedes #7296.
Production code is `+29/-56` (net `-27`) against `909cc5decc5`.
## Startup benchmark
RTX 5090, CUDA device 1, 4096 environments, three fresh processes per
revision/task. Values are median end-to-end startup wall time. Base:
`909cc5decc5`. PR: `5d0e1b1595e`.
| Task | Base | PR | Change |
|---|---:|---:|---:|
| `Isaac-Cartpole` | 8.316 s | 8.410 s | +1.1% |
| `Isaac-Velocity-Rough-UnitreeGo2` | 16.363 s | 15.682 s | -4.2% |
| `Isaac-Lift-KukaAllegro-Camera` | 39.473 s | 37.605 s | -4.7% |
Cartpole has no contact/raycast workload here and is neutral within
process-startup noise. The sensor-heavy tasks show the intended gain:
| Median phase | Go2 base | Go2 PR | Kuka base | Kuka PR |
|---|---:|---:|---:|---:|
| `newton_contact_sensor` | 0.10 s | 0.04 s | 1.32 s | 0.24 s |
| `simulation_start` | 6.36 s | 5.91 s | 11.48 s | 10.39 s |
Raw end-to-end totals:
- Cartpole base: 9.368, 8.316, 8.195 s; PR: 8.410, 8.370, 8.476 s.
- Go2 rough base: 19.900, 16.363, 16.091 s; PR: 15.669, 15.682, 15.984
s.
- Kuka camera base: 41.328, 38.625, 39.473 s; PR: 37.580, 37.605, 38.785
s.
## Test plan
- `261 passed, 8 xpassed` across the Newton manager abstraction,
contact-sensor, and raycast-sensor suites.
- Repository formatting and pre-commit checks pass.
- Architecture checks reject the removed regex-to-glob path, deprecated
sensing names, duplicate BVH state, and late BVH fallback.
- The three 4096-environment benchmark tasks also provide end-to-end
Newton MJWarp startup coverage.
## Type of change
- Performance improvement
- Bug fix
---------
Co-authored-by: Octi Zhang <zhengyuz@nvidia.com>1 parent 0a05bbd commit 21bc111
10 files changed
Lines changed: 172 additions & 58 deletions
File tree
- source
- isaaclab_newton
- changelog.d
- isaaclab_newton
- physics
- sensors
- contact_sensor
- ray_caster
- test
- physics
- sensors
- isaaclab
- changelog.d
- isaaclab/sensors/contact_sensor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
| |||
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
| 112 | + | |
| 113 | + | |
109 | 114 | | |
110 | 115 | | |
111 | 116 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
Lines changed: 22 additions & 51 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
123 | 131 | | |
124 | 132 | | |
125 | 133 | | |
| |||
435 | 443 | | |
436 | 444 | | |
437 | 445 | | |
438 | | - | |
| 446 | + | |
439 | 447 | | |
440 | 448 | | |
441 | 449 | | |
| |||
1109 | 1117 | | |
1110 | 1118 | | |
1111 | 1119 | | |
1112 | | - | |
| 1120 | + | |
1113 | 1121 | | |
1114 | 1122 | | |
1115 | 1123 | | |
| |||
1178 | 1186 | | |
1179 | 1187 | | |
1180 | 1188 | | |
| 1189 | + | |
1181 | 1190 | | |
1182 | 1191 | | |
1183 | 1192 | | |
| |||
2577 | 2586 | | |
2578 | 2587 | | |
2579 | 2588 | | |
2580 | | - | |
2581 | | - | |
2582 | | - | |
| 2589 | + | |
2583 | 2590 | | |
2584 | 2591 | | |
2585 | 2592 | | |
2586 | 2593 | | |
2587 | 2594 | | |
2588 | | - | |
2589 | | - | |
2590 | | - | |
2591 | | - | |
2592 | | - | |
2593 | 2595 | | |
2594 | 2596 | | |
2595 | 2597 | | |
2596 | 2598 | | |
2597 | 2599 | | |
2598 | 2600 | | |
2599 | 2601 | | |
2600 | | - | |
2601 | | - | |
2602 | | - | |
2603 | | - | |
2604 | | - | |
2605 | | - | |
| 2602 | + | |
| 2603 | + | |
2606 | 2604 | | |
2607 | 2605 | | |
2608 | 2606 | | |
| |||
3357 | 3355 | | |
3358 | 3356 | | |
3359 | 3357 | | |
3360 | | - | |
3361 | | - | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
3362 | 3361 | | |
3363 | 3362 | | |
3364 | 3363 | | |
| |||
3386 | 3385 | | |
3387 | 3386 | | |
3388 | 3387 | | |
3389 | | - | |
3390 | | - | |
3391 | | - | |
3392 | | - | |
3393 | | - | |
3394 | | - | |
3395 | | - | |
3396 | | - | |
3397 | | - | |
3398 | | - | |
3399 | | - | |
3400 | | - | |
3401 | | - | |
3402 | | - | |
3403 | | - | |
3404 | | - | |
3405 | | - | |
3406 | | - | |
3407 | | - | |
3408 | | - | |
3409 | | - | |
3410 | | - | |
3411 | | - | |
3412 | | - | |
3413 | | - | |
3414 | 3388 | | |
3415 | 3389 | | |
3416 | 3390 | | |
3417 | 3391 | | |
3418 | 3392 | | |
3419 | 3393 | | |
3420 | 3394 | | |
3421 | | - | |
3422 | | - | |
3423 | | - | |
3424 | 3395 | | |
3425 | 3396 | | |
3426 | 3397 | | |
3427 | | - | |
3428 | | - | |
3429 | | - | |
3430 | | - | |
| 3398 | + | |
| 3399 | + | |
| 3400 | + | |
| 3401 | + | |
3431 | 3402 | | |
3432 | 3403 | | |
3433 | 3404 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
339 | | - | |
| 338 | + | |
| 339 | + | |
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| 276 | + | |
276 | 277 | | |
277 | 278 | | |
278 | 279 | | |
| |||
326 | 327 | | |
327 | 328 | | |
328 | 329 | | |
329 | | - | |
| 330 | + | |
330 | 331 | | |
331 | 332 | | |
332 | 333 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
339 | 341 | | |
340 | 342 | | |
341 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
342 | 368 | | |
343 | 369 | | |
344 | 370 | | |
| |||
988 | 1014 | | |
989 | 1015 | | |
990 | 1016 | | |
| 1017 | + | |
991 | 1018 | | |
992 | 1019 | | |
993 | 1020 | | |
994 | 1021 | | |
| 1022 | + | |
995 | 1023 | | |
996 | 1024 | | |
997 | 1025 | | |
| |||
0 commit comments