Commit ce9ab26
committed
Restore three-selection RO/RW design, drop eager world<->local flushes
Restores PR isaac-sim#5728's three-selection layout (`_trans_sel_ro`,
`_world_sel_rw`, `_local_sel_rw`) with asymmetric Fabric access flags
on `worldMatrix` and `localMatrix`. Those flags are what protect the
user's write from being clobbered by Kit's per-tick
`IFabricHierarchy.update_world_xforms`:
* On `set_world_poses` (via `_world_sel_rw`, `localMatrix=RO`), Fabric
does not recompute world from local -- the user's worldMatrix write
survives until the renderer reads it.
* On `set_local_poses` (via `_local_sel_rw`, `worldMatrix=RO`), Fabric
recomputes world from the new local on the next tick -- the renderer
reads the correct world.
A single combined `worldMatrix=RW, localMatrix=RW` selection (the
recent design on this branch) removed that protection. Fabric saw
both attributes as user-authored and fell back to the hierarchy's
canonical direction (local -> world), recomputing world from a stale
local and silently overwriting the user's world write. That was the
failure mode behind the
`test_output_equal_to_usdcamera` regression and any other Camera + RTX
path that drives world poses through Fabric.
With the RO/RW protection back in place, the eager world<->local
flushes introduced by commits "fix: flush Fabric world matrices after
local writes" and the follow-up "set_world_poses eager local sync" are
no longer needed and are removed. The `change_block` context manager
and its companion helpers existed only to batch those eager flushes;
with the flushes gone, the API has nothing to defer and is removed
from both `BaseFrameView` and `FabricFrameView`.
Class docstring now spells out the load-bearing role of the RO/RW
layout so a future refactor doesn't reintroduce the single-selection
shape.
Tests:
* Removed `test_set_local_*_updates_renderer_facing_fabric_world_matrix`
(asserted an eager-update contract that the lazy design deliberately
does not hold; correctness across the next render tick is provided
by the RO/RW protection, not by an extra Warp kernel).
* Removed the four `test_change_block_*` tests; the API is gone.
* Inverted `test_interleaved_set_emits_no_warning` back to
`test_interleaved_set_emits_warning`, restored `_dirty == LOCAL`
assertions in `test_world_scales_roundtrip` and the symmetric
`WORLD` assertion in `test_local_scales_roundtrip`, and updated
`test_multi_view_per_view_dirty_isolation` to expect the lazy
cross-view behavior.
* Adapted `test_prepare_for_reuse_detects_topology_change` and
`test_fabric_rebuild_after_topology_change` to poll/rebuild all
three selections.
Verified:
* `pytest test_ray_caster_camera.py::test_output_equal_to_usdcamera` passes.
* `pytest test_ray_caster_camera.py::test_output_equal_to_usd_camera_when_intrinsics_set` 4/4 pass.
* `pytest test_views_xform_prim_fabric.py` 71 passed, 3 skipped (cuda:1).
* `./isaaclab.sh -f` clean.
Net diff -198 lines.1 parent 2966561 commit ce9ab26
3 files changed
Lines changed: 232 additions & 430 deletions
File tree
- source
- isaaclab_physx
- isaaclab_physx/sim/views
- test/sim
- isaaclab/isaaclab/sim/views
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | 41 | | |
74 | 42 | | |
75 | 43 | | |
| |||
0 commit comments