Commit bab8ca0
committed
Tighten FabricFrameView lifecycle and verify transpose math
Three review fixes plus the missing coverage for the transpose
storage convention.
* Hierarchy cache eviction: cache key is now (stage_id, fabric_id) so a
recycled stage_id paired with a new Fabric attachment never returns a
stale handle. Added FabricFrameView.clear_static_caches() classmethod
for explicit teardown and wired it into the test fixture so cached
handles do not accumulate across the suite.
* PrepareForReuse no longer fires twice per sync. Both _sync_local_from_world
and _sync_world_from_local_if_dirty refresh trans_sel_ro exactly once,
then read _world_ifa_ro / _local_ifa_ro / _parent_world_ifa_ro directly
from the fields instead of going through the accessors.
* Class docstring rewritten to describe the actual PrepareForReuse policy
(every accessor calls it; idempotent and cheap in the steady state).
The prior wording claimed reads avoided PrepareForReuse, which has not
been true since the indexedfabricarray rewrite.
* New regression tests for the transpose storage convention. The standard
fixture parents are translation-only, so the rotation block is identity
and equal to its transpose - which means a wrong transpose convention
would still pass every existing test. Two new tests place a parent
rotated 90 degrees around Z and verify the world<->local round-trip:
- test_set_local_then_get_world_with_rotated_parent exercises
update_indexed_world_matrix_from_local
- test_set_world_then_get_local_with_rotated_parent exercises
update_indexed_local_matrix_from_world
Confirmed locally that flipping the multiply order in either kernel
makes the matching test fail.
45 tests pass on cpu and cuda:0.1 parent 82ed7ea commit bab8ca0
2 files changed
Lines changed: 137 additions & 25 deletions
File tree
- source/isaaclab_physx
- isaaclab_physx/sim/views
- test/sim
Lines changed: 56 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
89 | 95 | | |
90 | 96 | | |
91 | 97 | | |
| |||
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
103 | 126 | | |
104 | 127 | | |
105 | 128 | | |
| |||
451 | 474 | | |
452 | 475 | | |
453 | 476 | | |
454 | | - | |
455 | | - | |
456 | | - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
457 | 481 | | |
458 | 482 | | |
459 | 483 | | |
460 | 484 | | |
461 | | - | |
| 485 | + | |
462 | 486 | | |
463 | 487 | | |
464 | 488 | | |
| |||
476 | 500 | | |
477 | 501 | | |
478 | 502 | | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
479 | 506 | | |
480 | 507 | | |
481 | 508 | | |
482 | 509 | | |
483 | | - | |
484 | | - | |
| 510 | + | |
| 511 | + | |
485 | 512 | | |
486 | 513 | | |
487 | 514 | | |
| |||
611 | 638 | | |
612 | 639 | | |
613 | 640 | | |
614 | | - | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
615 | 644 | | |
616 | | - | |
617 | | - | |
618 | | - | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
619 | 650 | | |
620 | | - | |
| 651 | + | |
621 | 652 | | |
622 | 653 | | |
623 | 654 | | |
624 | | - | |
625 | | - | |
| 655 | + | |
| 656 | + | |
626 | 657 | | |
627 | 658 | | |
628 | 659 | | |
| |||
Lines changed: 81 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
276 | 279 | | |
277 | 280 | | |
278 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
0 commit comments