Commit 3929056
committed
Strip env_1..N from the USD handed to physx.add_usd
InteractiveScene now USD-replicates every env's asset subtree for all
backends (clone_usd=True from the previous commit), but OvPhysxManager
was still handing the full N-env stage to physx.add_usd. The wheel
loaded all N USD-defined bodies as independent prims, so the subsequent
physx.clone() ran onto already-populated targets and never produced the
clone-lineage that the wheel's create_tensor_binding fast path expects.
At 4096 envs this turned every binding-creation call into a multi-second
USD enumeration -- the hang in articulation init.
Re-shape _warmup_and_load to export an env_0-scoped USD file:
1. Export the full stage to disk (existing flatten-and-write).
2. Re-open the exported file as an Sdf.Layer.
3. Delete every /World/envs/env_<i> prim spec for i != 0 from the layer.
4. Re-export.
The live USD stage held by SimulationContext is untouched -- sensors
(RayCaster, Camera, ContactSensor discovery) still see N envs and
discover _num_envs = N correctly. Only the file passed to the wheel is
scoped to env_0 + globals. physx.clone() then repopulates env_1..N at
the physics layer with proper lineage, and create_tensor_binding walks a
1-USD-path result that auto-extends across the N clones -- the fast
path that clone_usd=False used to give us implicitly.
Net effect: keeps the previous commit's clone_usd=True flip (sensor
parity across backends) while restoring OVPhysX's per-env scaling. No
test changes required; the FrameView/ContactSensor suite stays at
27/27 pass on CPU.1 parent 66d3325 commit 3929056
1 file changed
Lines changed: 76 additions & 2 deletions
Lines changed: 76 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
377 | 435 | | |
378 | 436 | | |
379 | 437 | | |
| |||
417 | 475 | | |
418 | 476 | | |
419 | 477 | | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
420 | 494 | | |
421 | 495 | | |
422 | | - | |
| 496 | + | |
423 | 497 | | |
424 | | - | |
| 498 | + | |
425 | 499 | | |
426 | 500 | | |
427 | 501 | | |
| |||
0 commit comments