Repository navigation
Articulation Reordering Part 3/8: Newton backend - #6336
AntoineRichard merged 18 commits into
Conversation
47b7b82 to
106413d
Compare
|
Addressed the first review batch in 470b4b7ee94 — per-comment map:
Tests: baseline-exact (257 passed/8 skipped/1 xfailed + 76 passed), pre-commit clean. |
Greptile SummaryThis PR wires articulation joint/body reordering into the Newton backend's read/write paths. Non-identity orderings install user-order shadow buffers and register a
Confidence Score: 4/5Safe to merge for the Newton ordering feature; all write paths, post-step republish, and actuator gain reordering are directionally correct and the existing 257-test suite validates the identity and non-identity paths. The ordering logic is carefully implemented — kernel argument directions (user_to_backend vs backend_to_user) are consistent throughout, the post-step callback lifecycle is symmetric (register in _create_buffers, unregister in _clear_callbacks), and timestamps prevent stale limit caches. The three comments are style/documentation nits rather than functional defects: the nullable Warp array pattern works in practice (tests pass), the duplicate output alias is guarded by write_joint_act=False, and the loop-vs-step docstring ambiguity is cosmetic. No data corruption or incorrect state scenario was found. articulation_data.py (nullable _joint_user_to_backend / _jacobian_body_user_to_backend passed to Warp kernels) and articulation.py (duplicate _sim_bind_joint_effort in outputs list) deserve a second read in the context of future Warp version upgrades. Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant User as User Code
participant Art as Articulation
participant NM as NewtonManager
participant Data as ArticulationData
participant Solver as Newton Solver
User->>Art: write_joint_state_to_sim(pos, vel)
Art->>Art: write_joint_state_user_to_backend_with_indices kernel
Note over Art: writes _joint_pos/vel_user (user order),\nscatters to _sim_bind_joint_pos/vel (backend)
User->>Art: write_data_to_sim() — per-step targets
Art->>Art: reorder_joint_targets_user_to_backend kernel
Note over Art: gathers user targets → backend\nvia _joint_backend_to_user map
NM->>Solver: _run_solver_substeps() × decimation
Solver-->>NM: _sim_bind_joint_pos/vel updated (backend order)
NM->>NM: for cb in _post_step_callbacks
NM->>Data: _refresh_user_order_state()
Data->>Data: reorder_2d_backend_to_user: joint_pos/vel → _joint_pos/vel_user
Data->>Data: reorder_2d_backend_to_user: body_link_pose_w/com_vel_w → user shadows
NM->>NM: _update_sensors()
User->>Art: data.joint_pos
Art-->>User: _joint_pos_user (already in user order)
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant User as User Code
participant Art as Articulation
participant NM as NewtonManager
participant Data as ArticulationData
participant Solver as Newton Solver
User->>Art: write_joint_state_to_sim(pos, vel)
Art->>Art: write_joint_state_user_to_backend_with_indices kernel
Note over Art: writes _joint_pos/vel_user (user order),\nscatters to _sim_bind_joint_pos/vel (backend)
User->>Art: write_data_to_sim() — per-step targets
Art->>Art: reorder_joint_targets_user_to_backend kernel
Note over Art: gathers user targets → backend\nvia _joint_backend_to_user map
NM->>Solver: _run_solver_substeps() × decimation
Solver-->>NM: _sim_bind_joint_pos/vel updated (backend order)
NM->>NM: for cb in _post_step_callbacks
NM->>Data: _refresh_user_order_state()
Data->>Data: reorder_2d_backend_to_user: joint_pos/vel → _joint_pos/vel_user
Data->>Data: reorder_2d_backend_to_user: body_link_pose_w/com_vel_w → user shadows
NM->>NM: _update_sensors()
User->>Art: data.joint_pos
Art-->>User: _joint_pos_user (already in user order)
Reviews (1): Last reviewed commit: "Unify identity target writes and trim va..." | Re-trigger Greptile |
| inputs=[ | ||
| self._jacobian_buf, | ||
| self._jacobian_view_art_ids, | ||
| self._jacobian_body_user_to_backend, | ||
| self._joint_user_to_backend, | ||
| self._jacobian_link_offset, | ||
| self._num_base_dofs, | ||
| self._has_body_ordering, | ||
| self._has_joint_ordering, | ||
| ], |
There was a problem hiding this comment.
Nullable array passed to Warp kernel without an identity fallback
data._joint_user_to_backend and data._jacobian_body_user_to_backend are both None when no ordering is active (set in _install_ordering_flags and _apply_ordering_maps_after_resolve). These None values are forwarded directly to wp.launch() as typed wp.array(dtype=wp.int32) inputs for gather_jacobian_rows. The same pattern repeats for gather_mass_matrix_rows at line ~1013.
Warp's documented guidance for optional arrays is to pass a zero-element array rather than None when the kernel guards the access with a boolean. While the existing tests pass, relying on undocumented null-pointer promotion means a Warp upgrade could silently break the identity-ordering path. Consider initialising a shared zero-length sentinel wp.array([], dtype=wp.int32, device=self.device) during _create_buffers and substituting it wherever None would be passed to a kernel. Alternatively, skip the gather launch entirely when both flags are False.
There was a problem hiding this comment.
Addressed by the Jacobian rework: the body-row map is now built unconditionally in the map builder (commit "Encode Jacobian body-row layout in the Newton map builder"), so gather_jacobian_rows / gather_mass_matrix_rows no longer receive a nullable array — the identity path passes a real map (user_to_backend[1:] for Newton's fixed base), not None. The flag/mirror machinery this note references was also removed in the ordering rework.
| outputs=[ | ||
| self.data._sim_bind_joint_effort, | ||
| self.data._sim_bind_joint_position_target, | ||
| self.data._sim_bind_joint_velocity_target, | ||
| self.data._sim_bind_joint_effort, | ||
| ], |
There was a problem hiding this comment.
Duplicate output buffer in Warp launch may confuse graph dependency tracking
_sim_bind_joint_effort is listed twice in outputs — as backend_effort (index 0) and as backend_joint_act (index 3). The kernel guards the write to index 3 with write_joint_act=False, so no data is ever written there, but Warp's graph-capture dependency tracker sees the buffer as a write target at both positions and may insert redundant synchronisation fences. Using _sim_bind_joint_act as the 4th output avoids the alias and matches the newton-actuator path above.
| outputs=[ | |
| self.data._sim_bind_joint_effort, | |
| self.data._sim_bind_joint_position_target, | |
| self.data._sim_bind_joint_velocity_target, | |
| self.data._sim_bind_joint_effort, | |
| ], | |
| outputs=[ | |
| self.data._sim_bind_joint_effort, | |
| self.data._sim_bind_joint_position_target, | |
| self.data._sim_bind_joint_velocity_target, | |
| self.data._sim_bind_joint_act, # write_joint_act=False, but avoids aliasing effort in outputs | |
| ], |
There was a problem hiding this comment.
Good catch. This write launch is restructured by the identity-fast-path change that lands in Part 8 (split into identity/ordered branches); the fix — 4th output → _sim_bind_joint_act, matching the newton-actuator branch — is applied there. It'll be visible once Part 8 is refreshed onto the current base.
| @@ -1772,6 +1790,8 @@ def _simulate_physics_only(cls) -> None: | |||
| contacts = None | |||
|
|
|||
| cls._run_solver_substeps(contacts) | |||
| for cb in cls._post_step_callbacks: | |||
| cb() | |||
| cls._update_sensors(contacts) | |||
|
|
|||
| # State accessors (used extensively by articulation/rigid object data) | |||
There was a problem hiding this comment.
Post-step callbacks fire once per
step(), outside the decimation loop — worth documenting explicitly
_simulate_full runs the callback list after ALL decimation iterations complete, not inside the loop. The docstring for register_post_step_callback says "right after the final solver substep of the decimation loop", which is accurate but easy to misread as "after each substep in the loop". A future author registering a callback that needs to see intermediate decimation state would get stale results. Consider adding a sentence clarifying "fires once per step() call, reflecting the state after all decimation iterations".
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Clarified — the docstring now states the callback fires once per step(), reflecting state after all decimation iterations complete (not once per substep). The change lands in Part 8, alongside the rest of the post-step-hook work.
| ) | ||
| stiffness = wp.to_torch(flat_stiffness.reshape((num_envs, num_joints))) | ||
| damping = wp.to_torch(flat_damping.reshape((num_envs, num_joints))) | ||
| if user_to_backend is not None: | ||
| user_to_backend_tensor = torch.tensor(user_to_backend, dtype=torch.long, device=device) | ||
| stiffness = stiffness.index_select(1, user_to_backend_tensor) | ||
| damping = damping.index_select(1, user_to_backend_tensor) | ||
| if not isinstance(joint_indices, slice): | ||
| backend_to_user = [0] * num_joints | ||
| for user_index, backend_index in enumerate(user_to_backend): | ||
| backend_to_user[backend_index] = user_index | ||
| joint_indices = torch.tensor( | ||
| sorted(backend_to_user[index] for index in managed_local), | ||
| dtype=torch.int32, |
There was a problem hiding this comment.
index_select direction converts backend → user but local name suggests the reverse
stiffness.index_select(1, user_to_backend_tensor) selects column user_to_backend[u] for position u, correctly mapping backend-order values into user-order positions. The local variable name user_to_backend_tensor matches the input permutation direction while the operation itself performs a gather-into-user-order step — conventionally the inverse direction. The code is correct; a short comment or a rename (e.g. backend_column_indices) would clarify intent for reviewers.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Clarified — renamed the gather index (backend_column_indices) so the backend→user-order direction is explicit at the call site. Commit "Clarify Newton actuator gain-reorder gather index" in this PR.
… utilities (#6334) # Description Moves the rigid object and rigid object collection interface test factories into shared underscore-prefixed utility modules so later parts can reuse them. Pure code movement with no behavior change and no ordering content. Part 1/8 of the series splitting #6248 into independently reviewable units. #6248 remains open, untouched, as the reference implementation; this stack was cut from its final tree after a `develop` sync (Kamino Core, Newton bump, OVPhysX 0.5.1). ## Stack - **Part 1/8 (this PR)**: #6334 — Extract rigid object interface test utilities - Part 2/8: #6335 — Core ordering foundation - Part 3/8: #6336 — Newton backend - Part 4/8: #6337 — PhysX backend - Part 5/8: #6338 — Extract articulation interface test utilities - Part 6/8: #6339 — OVPhysX backend - Part 7/8: #6340 — Cross-backend ordering interface tests - Part 8/8: #6341 — Events, consumers, and documentation ## Type of change - Test/documentation/refactor change ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] My name exists in `CONTRIBUTORS.md` ## Test Plan - [x] `./isaaclab.sh -p -m pytest source/isaaclab/test/assets/test_rigid_object_iface.py` -> 1478 passed, 12 xfailed - [x] `./isaaclab.sh -p -m pytest source/isaaclab/test/assets/test_rigid_object_collection_iface.py` -> 1902 passed; the 7 failures + 636 errors are pre-existing on `develop` in the local environment (OVPhysX 0.4.13 wheel vs the 0.5.x binding API from #6314) — fail-set identical to the `develop` baseline - [x] `./isaaclab.sh -f` -> all hooks pass --------- Signed-off-by: Antoine RICHARD <[email protected]> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
eb6afc0 to
1172ed3
Compare
| computed[i, j] = actuator_computed_effort[i, j] | ||
| applied[i, j] = sim_bind_joint_effort[i, j] | ||
| computed[i, j] = actuator_computed_effort[i, backend_j] | ||
| applied[i, j] = sim_bind_joint_effort[i, backend_j] | ||
|
|
There was a problem hiding this comment.
What's the mental model to differentiate when to use j vs backend_j just from the var name? Suggest making it mechanical: index variables carry their order space as a prefix (user_j / backend_j), and an index only subscripts arrays of its own space — the array names already carry _backend suffixes, so joint_pos_backend[i, backend_j] vs joint_pos_target[i, user_j] becomes self-checking. Same convention core adopted for the map argument (dst_to_src).
There was a problem hiding this comment.
Adopted the convention — user-space indices are now user_j, backend-space backend_j, each subscripting only arrays of its own space (self-checking against the _backend array suffixes). The telemetry-kernel changes land in Part 8 where the fast-path gather lives; visible once that part is refreshed.
| ordering_kernels.write_float_user_to_backend_with_mask( | ||
| position, | ||
| env_mask, | ||
| joint_mask, | ||
| self._joint_user_to_backend_map(), | ||
| has_joint_ordering, | ||
| joint_pos_user, | ||
| self.data._sim_bind_joint_pos, | ||
| device=self.device, | ||
| ) |
There was a problem hiding this comment.
nit: minor consistency issue — some ordering_kernels symbols are called as Python wrappers, others wp.launch'ed as raw kernels. The split has a rationale (wrappers where torch→warp adaptation is needed in setters; raw launches on hot per-step paths with Warp-native inputs) but it's undocumented. Suggest stating the two-tier contract in the ordering_kernels module docstring (which names are wrappers vs launchable kernels) or a naming cue, rather than unifying — all-wrappers costs Python overhead per step, all-raw pushes dtype adaptation to call sites.
There was a problem hiding this comment.
Documented the two-tier contract at the call site (commit "Document the two-tier ordering-kernel launch contract"): raw launches on hot per-step paths with Warp-native inputs, Python wrappers where torch→warp adaptation is needed in setters. Left the core ordering_kernels module docstring untouched since Part 2 is now merged.
There was a problem hiding this comment.
I was actually thinking just use self.data.has_joint_ordering as check, and self.data.joint_ordering if check passes XD. Not needing to create a new var should be slightly better
| if j_ids.dtype == torch.int64: | ||
| j_ids = j_ids.to(torch.int32) | ||
| j_ids = wp.from_torch(j_ids, dtype=wp.int32) | ||
| has_joint_ordering = self.data.joint_ordering is not None |
There was a problem hiding this comment.
has_joint_ordering = self.data.joint_ordering is not None is re-derived at several call sites — if it's commonly used, suggest a derived property on the data container:
@property
def has_joint_ordering(self) -> bool:
return self.joint_ordering is not NoneProperty (derivation), deliberately not a stored flag — the stored-copy variant is what the ordering rework removed for staleness.
There was a problem hiding this comment.
Added has_joint_ordering / has_body_ordering as derived properties on the base articulation data class (commit "Add ordering-presence properties and adopt them in Newton") — a derivation, not a stored flag, per your note. Adopted at the Newton sites here; the additional sites introduced by the identity-fast-path work are updated in Part 8.
| @@ -37,6 +37,27 @@ def compute_soft_joint_pos_limits_func( | |||
| """ | |||
|
|
|||
|
|
|||
| @wp.kernel | |||
| def update_wrench_array_with_force_and_torque_ordered( | |||
There was a problem hiding this comment.
The user→backend wrench routing is encoded twice: core's fused reorder_body_wrench_user_to_backend (consumed by PhysX) gathers over backend ids, while this kernel re-implements the routing as a masked scatter over user ids with spatial-vector packing inline. The output layouts differ (spatial vectors vs split arrays), but the direction/masking logic could exist once — extend the core kernel family (or share the routing wp.func) and keep only the packing Newton-specific.
There was a problem hiding this comment.
Extracted a Newton-local resolve_backend_index(...) wp.func shared across the ordered kernels (commit "Share Newton user-to-backend index resolution via a wp.func"), so the direction/masking logic isn't re-implemented per kernel. Full sharing with core's reorder_body_wrench_user_to_backend would mean editing that now-merged (Part 2) kernel, and the two are different shapes anyway — core does a backend-iterating gather via backend_to_user, Newton a user-iterating masked scatter with spatial-vector packing — so I kept the packing Newton-specific and left core untouched. Can file a follow-up if you'd like the core family extended.
There was a problem hiding this comment.
Follow-up: moved the shared user→backend routing helper resolve_backend_index (the direction + identity-fallback logic) into the core ordering_kernels module (commit "Move resolve_backend_index into the core ordering kernels"), so it's defined once and any backend can reuse it rather than re-implementing the routing inline.
I stopped short of unifying the wrench kernels themselves: core's reorder_body_wrench_user_to_backend is a backend-iterating gather (via backend_to_user) writing split force/torque arrays, while Newton's is a user-iterating masked scatter that packs into a single spatial vector. The direction, layout, and masking all differ, so beyond the shared index helper the two are genuinely different shapes — folding them into one core kernel would cost more than the one line of shared logic it saves. Happy to revisit if you'd prefer the full core-family extension.
| @@ -624,7 +635,12 @@ def concat_joint_pos_limits_lower_and_upper( | |||
| def gather_jacobian_rows( | |||
There was a problem hiding this comment.
The fixed-base Jacobian row convention is encoded twice: core _make_jacobian_body_user_to_backend pre-shifts rows by −1 (correct for PhysX, whose source already omits the root row), and this kernel re-adds link_offset because Newton's source keeps all rows. Building the map per source layout — for Newton it's just user_to_backend[1:], no shift — lets link_offset and has_body_ordering drop out of the kernel, leaving one encoding owned by the builder.
There was a problem hiding this comment.
Done — the row layout is now encoded in the map builder per source convention (commit "Encode Jacobian body-row layout in the Newton map builder"): Newton's fixed base is user_to_backend[1:] with no shift, so link_offset and the has_body_ordering branch drop out of the gather kernel, leaving one encoding owned by the builder. This also retires the separate "None passed to kernel" note above, since the body-row map is now always built.
| @@ -167,27 +171,41 @@ def num_bodies(self) -> int: | |||
| """Number of bodies in articulation.""" | |||
| return self.root_view.link_count | |||
|
|
|||
| @property | |||
| def _backend_num_shapes_per_body(self) -> list[int]: | |||
There was a problem hiding this comment.
This private property is returned verbatim by the public backend_num_shapes_per_body (:198) — one layer too many. Suggest folding the cache into the public property and deleting the private one; also the hasattr-based lazy init is off-convention — declare the cache attribute in _create_buffers like the sibling caches.
There was a problem hiding this comment.
Folded — the cache now lives directly in the public backend_num_shapes_per_body property with the private layer removed, and the cache attribute is declared in _create_buffers like the sibling caches (no more hasattr lazy-init). Commit "Fold Newton backend shape-count cache into its property".
| @@ -239,19 +248,20 @@ def build_newton_actuator_defaults( | |||
| dof_offset: int, | |||
| env_stride: int, | |||
| device: str, | |||
| joint_user_to_backend_indices: Sequence[int] | None = None, | |||
There was a problem hiding this comment.
The Newton-actuator fast-path init is assembled piecemeal in articulation.py (~:3578-3670): build_implicit_dof_mask + build_newton_actuator_defaults as free functions with ~8 threaded params each, plus a separate computed_effort_2d slice bind — all consuming the same adapter state. Suggest one method on the owner:
binding = adapter.bind_articulation(dof_offset, num_joints, joint_user_to_backend, device)
# .stiffness / .damping / .joint_indices / .implicit_dof_mask / .computed_effort_viewSame-purpose functions move into the namespace whose data they read; the parameter threading disappears.
There was a problem hiding this comment.
Agreed — consolidating the piecemeal fast-path init (build_implicit_dof_mask + build_newton_actuator_defaults + the computed-effort slice) into a single adapter.bind_articulation(...) on the owner is the right shape. Since it reaches into actuator-init coupling, I'm doing it as a focused follow-up commit rather than folding it into this review-response batch, so it stays cleanly reviewable.
There was a problem hiding this comment.
Done — added NewtonActuatorAdapter.bind_articulation(...) (commit "Encapsulate Newton actuator articulation binding" in this PR), returning an ArticulationBinding with .stiffness / .damping / .joint_indices / .implicit_dof_mask / .implicit_dof_mask_owner / .computed_effort_view. The piecemeal build_implicit_dof_mask + build_newton_actuator_defaults + manual computed-effort slice at the call site collapse into one binding = adapter.bind_articulation(...); the genuinely per-articulation inputs (lab_actuators, dof_offset, num_joints, ordering map) are the only args — num_envs/device/actuators/env_stride come from the adapter. The two building-block functions stay public and unit-tested (the method calls them internally). The identical PhysX call site is updated the same way in Part 4.
1172ed3 to
6f89a34
Compare
# Description Introduces the public joint/body ordering machinery in `isaaclab` core: the `ArticulationNameMap` type and builder, the ordering preset helper, the Warp reorder kernels with an explicit visibility contract, the symbolic convention resolvers (`physx`, `mjwarp`, `robot_schema`), the `ArticulationCfg.joint_ordering`/`body_ordering` fields, the `BaseArticulation`/`BaseArticulationData` plumbing that backends wire into, and the API reference entries. **Transitional semantics:** no backend consumes the machinery yet, so configuring an ordering in this intermediate state is a silent no-op until Parts 3/4/6 land. This is called out in the cfg field docstrings and resolves quickly as the stack merges. Part 2/8 of the series splitting #6248 into independently reviewable units. #6248 remains open, untouched, as the reference implementation; this stack was cut from its final tree after a `develop` sync (Kamino Core, Newton bump, OVPhysX 0.5.1). ## Stack - Part 1/8: #6334 — Extract rigid object interface test utilities - **Part 2/8 (this PR)**: #6335 — Core ordering foundation - Part 3/8: #6336 — Newton backend - Part 4/8: #6337 — PhysX backend - Part 5/8: #6338 — Extract articulation interface test utilities - Part 6/8: #6339 — OVPhysX backend - Part 7/8: #6340 — Cross-backend ordering interface tests - Part 8/8: #6341 — Events, consumers, and documentation > [!NOTE] > All parts target `develop`, so until the preceding parts merge this PR's diff includes them. The true delta of this part is [this compare](AntoineRichard/IsaacLab@antoiner/articulation-reordering-p1...antoiner/articulation-reordering-p2). ## Type of change - New feature (non-breaking change which adds functionality) ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] My name exists in `CONTRIBUTORS.md` ## Test Plan - [x] `./isaaclab.sh -p -m pytest source/isaaclab/test/assets/test_articulation_ordering.py` -> 67 passed - [x] `./isaaclab.sh -p -m pytest source/isaaclab/test/assets/test_articulation_ordering_kernels.py` -> 24 passed - [x] `./isaaclab.sh -f` -> all hooks pass
Translate between public and backend order on the Newton read and write paths. Non-identity orderings register an unconditional post-step publish that reorders the core state buffers inside the stepped and CUDA-graph-captured region, keeping the documented capture-safety contract without read guards; the manager gains the matching register and unregister callback API. Actuator torque telemetry reads live backend state through the ordering map. Also carries the shared branching test fixture used by the cross-backend convention tests in this and later parts. Part 3 of the articulation reordering series.
The identity-ordering branches of write_data_to_sim copied the joint targets into the sim-bound buffers through three or four separate full-buffer assigns while the ordered branches used the fused gather kernel. The asset-side joint map is an identity arange when no ordering is configured, so both branches collapse into one unconditional fused launch and the per-buffer assign helper goes away. Buffer validation now runs once at the end of the ordering configure step, which allocates every checked field; the per-call validations on the sync and rebind paths were unreachable. Mark the torch-routed actuator parameter writer for the upcoming actuator rework, document why the wrench scatter stays a separate launch, and state that the resolve and rebind seeds exist because the post-step publish only runs inside a step.
The private _backend_num_shapes_per_body property lazily built the backend-order shape-count cache with a hasattr guard and was returned verbatim by the public backend_num_shapes_per_body. Fold the cache into the public property, declare the cache attribute in _create_buffers like the sibling caches (initialized to None, no hasattr lazy-init), and delete the redundant private property. Public order via num_shapes_per_body is unchanged.
Ordering state lives only on the joint_ordering / body_ordering maps, so presence was re-derived as ... is not None at many call sites. Add derived has_joint_ordering / has_body_ordering properties on BaseArticulationData and adopt them across the Newton articulation and articulation-data presence checks. Genuine map-object uses (which dereference the map, not just test presence) are left untouched. No behavior change.
At a hot per-step write path that launches an ordering_kernels kernel raw, add a comment recording the contract that distinguishes it from the wrapper form: raw wp.launch on hot paths with Warp-native inputs, and the ordering_kernels.write_* Python wrappers in the property setters where torch-to-warp adaptation is needed first.
The user-to-backend routing with identity fallback was re-implemented inline in several Newton ordered write kernels, including the body-wrench scatter. Extract the direction logic into a Newton-local resolve_backend_index wp.func and adopt it in the wrench, body-COM-acceleration, and joint-limit kernels, keeping each kernel's masking and spatial-vector packing local. The core wrench-reorder kernel is a backend-iterating gather with a different map direction and no masking, so it is left untouched; a fuller Newton/core dedup would require changing the merged core kernel.
The two build_newton_actuator_defaults calls omitted the required env_stride argument. Pass num_joints (3) since the fixtures are single-articulation models without free-root DOFs, so the per-env DOF stride equals the joint count.
The ordering-presence properties added to the base articulation data container touch the isaaclab package, which requires its own fragment.
Consolidate the piecemeal Newton fast-path init behind a single NewtonActuatorAdapter.bind_articulation method that snapshots the initial gains, builds the implicit-DOF mask, and slices the adapter's computed-effort buffer, returning them as one ArticulationBinding. This eliminates the threaded parameters at the call site: whole-model quantities now come from the adapter, and only the articulation-local placement is passed in. The build_newton_actuator_defaults and build_implicit_dof_mask helpers remain public and are called internally.
Share the user-to-backend index-resolution helper across backends by defining it once in the core ordering-kernels module instead of the Newton kernel module, so a future backend can reuse the same routing with its identity fallback.
| # writes reuse it instead of re-wrapping and re-casting the Warp map every call. | ||
| self._joint_user_to_backend_torch = ( | ||
| wp.to_torch(self.data.joint_ordering.user_to_backend).to(dtype=torch.long) | ||
| if self.data.joint_ordering is not None |
There was a problem hiding this comment.
Two leftover sites re-derive the check the new property encapsulates: self.data.joint_ordering is not None here and self.joint_ordering is not None at the bind_articulation call — suggest self.data.has_joint_ordering (or bind the map to a local first) for consistency with the converted call sites.
There was a problem hiding this comment.
Done — bound the map to a local at both sites (commit "Use bound ordering local at leftover derivation sites"): joint_ordering = self.data.joint_ordering / self.joint_ordering before the presence check, so the is not None isn't re-derived inline and the map access reuses the local, consistent with the converted call sites.
Bind the joint ordering map to a local before the presence check at the two sites that still re-derived it inline, matching the converted call sites.
The Newton telemetry kernel gained user_to_backend and sim_buffers_are_backend_order parameters; pass the identity map and False from the PhysX launch so the shared kernel signature stays consistent without depending on the PhysX ordering wiring.
## Description A latent Warp defect can abort Newton simulation (re)initialization with a spurious `Warp CUDA error 1: invalid argument` at the first buffer copy (`wp.clone` during `PHYSICS_READY`), in processes that run several simulation lifecycles (test suites, notebooks). Root cause (fully diagnosed; a ~50-line pure-Warp repro exists and a Warp-side fix is in review): - `wp.capture_while`/`wp.capture_if` pause the parent capture and resume capturing into the conditional body graph on the same stream. If a Python garbage-collection pass runs inside a body callback and drops the last reference to an array allocated in the parent graph, Warp inserts the memory free node into the body graph with parent-graph dependency nodes — which fails with `cudaErrorInvalidValue`, leaks the allocation, and leaves the CUDA per-thread error latched. - `wp_array_copy_device` ends with `check_cuda(cudaGetLastError())`, so the next innocent Warp copy surfaces and mis-attributes the stale error — typically one test/lifecycle later, which made this look like flakiness. This PR adds two independent layers in `NewtonManager` until the upstream Warp fix propagates: 1. **Prevention** — garbage collection is paused for the duration of graph capture (both the standard `ScopedCapture` path and the RTX relaxed-capture path), with a collection run immediately after the capture window, where freeing graph-scoped allocations is handled correctly. Reference-count-driven frees are unaffected. 2. **Defense in depth** — `start_simulation` drains (and logs) any latched CUDA error via Warp's own `wp_cuda_context_check` before dispatching initialization callbacks, so no prior lifecycle can poison the next one through any other latched-error path. Validation: the deterministic 4-test repro (from the articulation-ordering test additions in #6336) goes red→green with the GC guard alone, with zero `failed to add a memory free node` warnings (the corrupting frees no longer happen); the full Newton articulation suite is green with ordering tests (257 passed) and on develop (236 passed). A develop-only regression test is not included because develop's current suite never arranges the triggering sequence; #6336's tests cover it organically once merged. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have read and understood the [contribution guidelines] - [x] I have run the [pre-commit checks] with `./isaaclab.sh --format` - [x] My changes generate no new warnings - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
| self.assert_shape_and_dtype_mask(limits, (env_mask, joint_mask), wp.vec2f, "limits") | ||
|
|
||
| _ = self.data.joint_pos_limits | ||
| has_joint_ordering = self.data.has_joint_ordering |
There was a problem hiding this comment.
nit: Ideally, should prefer using the existing one over creating new var as it does not contain any extra logic. At call site, it becomes obvious.
# Description Wires ordering into the PhysX backend read/write paths using the shared kernels: fused user-and-backend target writes, lazily refreshed timestamped `body_mass`/`body_inertia` (see the changelog `Changed` entry for the semantics change vs develop), and ordering maps resolved at initialization. Part 4/8 of the series splitting #6248 into independently reviewable units. #6248 remains open, untouched, as the reference implementation; this stack was cut from its final tree after a `develop` sync (Kamino Core, Newton bump, OVPhysX 0.5.1). ## Stack - Part 1/8: #6334 — Extract rigid object interface test utilities - Part 2/8: #6335 — Core ordering foundation - Part 3/8: #6336 — Newton backend - **Part 4/8 (this PR)**: #6337 — PhysX backend - Part 5/8: #6338 — Extract articulation interface test utilities - Part 6/8: #6339 — OVPhysX backend - Part 7/8: #6340 — Cross-backend ordering interface tests - Part 8/8: #6341 — Events, consumers, and documentation > [!NOTE] > All parts target `develop`, so until the preceding parts merge this PR's diff includes them. The true delta of this part is [this compare](AntoineRichard/IsaacLab@antoiner/articulation-reordering-p3...antoiner/articulation-reordering-p4). ## Type of change - New feature (non-breaking change which adds functionality) ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] My name exists in `CONTRIBUTORS.md` ## Test Plan - [x] `./isaaclab.sh -p -m pytest source/isaaclab_physx/test/assets/test_articulation.py` -> 239 passed - [x] `./isaaclab.sh -p -m pytest source/isaaclab_physx/test/assets/test_newton_actuators_physx.py` -> 44 passed - [x] `./isaaclab.sh -f` -> all hooks pass
… utilities (#6338) # Description Moves the articulation interface test factories into a shared utility module mirroring Part 1's rigid object extraction, with ordering-aware construction hooks used by Part 7's cross-backend suite. Part 5/8 of the series splitting #6248 into independently reviewable units. #6248 remains open, untouched, as the reference implementation; this stack was cut from its final tree after a `develop` sync (Kamino Core, Newton bump, OVPhysX 0.5.1). ## Stack - Part 1/8: #6334 — Extract rigid object interface test utilities - Part 2/8: #6335 — Core ordering foundation - Part 3/8: #6336 — Newton backend - Part 4/8: #6337 — PhysX backend - **Part 5/8 (this PR)**: #6338 — Extract articulation interface test utilities - Part 6/8: #6339 — OVPhysX backend - Part 7/8: #6340 — Cross-backend ordering interface tests - Part 8/8: #6341 — Events, consumers, and documentation > [!NOTE] > All parts target `develop`, so until the preceding parts merge this PR's diff includes them. The true delta of this part is [this compare](AntoineRichard/IsaacLab@antoiner/articulation-reordering-p4...antoiner/articulation-reordering-p5). ## Type of change - Test/documentation/refactor change ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] My name exists in `CONTRIBUTORS.md` ## Test Plan - [x] `./isaaclab.sh -p -m pytest source/isaaclab/test/assets/test_articulation_iface.py` -> 4086 passed, 96 skipped, 32 xfailed (with Newton and PhysX wired, OVPhysX not yet — exercises the unwired-backend identity path) - [x] `./isaaclab.sh -f` -> all hooks pass
# Description Wires ordering into the OVPhysX backend read/write paths: fused user-and-backend writes with persistent target staging separated from transient applied-torque scratch, FK-aware body state refresh, and a fused ordered joint acceleration kernel. Part 6/8 of the series splitting #6248 into independently reviewable units. #6248 remains open, untouched, as the reference implementation; this stack was cut from its final tree after a `develop` sync (Kamino Core, Newton bump, OVPhysX 0.5.1). ## Stack - Part 1/8: #6334 — Extract rigid object interface test utilities - Part 2/8: #6335 — Core ordering foundation - Part 3/8: #6336 — Newton backend - Part 4/8: #6337 — PhysX backend - Part 5/8: #6338 — Extract articulation interface test utilities - **Part 6/8 (this PR)**: #6339 — OVPhysX backend - Part 7/8: #6340 — Cross-backend ordering interface tests - Part 8/8: #6341 — Events, consumers, and documentation > [!NOTE] > All parts target `develop`, so until the preceding parts merge this PR's diff includes them. The true delta of this part is [this compare](AntoineRichard/IsaacLab@antoiner/articulation-reordering-p5...antoiner/articulation-reordering-p6). ## Type of change - New feature (non-breaking change which adds functionality) ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] My name exists in `CONTRIBUTORS.md` ## Test Plan - [x] Mock-based coverage lands in Part 7 (233 passed there). The live suite is blocked in the local environment: all 105 failures share the single `PhysX.set_cpu_mode` AttributeError from the OVPhysX 0.4.13 wheel vs #6314's manager code (develop shows the identical signature on its 99 pre-existing live tests); the same tests passed on the pre-sync monolithic branch - [x] CI with the 0.5.1 wheelhouse is the authoritative gate for this part - [x] `./isaaclab.sh -f` -> all hooks pass --------- Co-authored-by: Kelly Guo <[email protected]>
…sts (#6340) # Description Adds the shared interface test suite exercising ordering allocation, write parity, partial writes, and property reordering uniformly across PhysX, OVPhysX, and Newton through their mock views. Lands after all three backend parts because present-but-unwired backends error rather than skip. Part 7/8 of the series splitting #6248 into independently reviewable units. #6248 remains open, untouched, as the reference implementation; this stack was cut from its final tree after a `develop` sync (Kamino Core, Newton bump, OVPhysX 0.5.1). ## Stack - Part 1/8: #6334 — Extract rigid object interface test utilities - Part 2/8: #6335 — Core ordering foundation - Part 3/8: #6336 — Newton backend - Part 4/8: #6337 — PhysX backend - Part 5/8: #6338 — Extract articulation interface test utilities - Part 6/8: #6339 — OVPhysX backend - **Part 7/8 (this PR)**: #6340 — Cross-backend ordering interface tests - Part 8/8: #6341 — Events, consumers, and documentation > [!NOTE] > All parts target `develop`, so until the preceding parts merge this PR's diff includes them. The true delta of this part is [this compare](AntoineRichard/IsaacLab@antoiner/articulation-reordering-p6...antoiner/articulation-reordering-p7). ## Type of change - Test/documentation/refactor change ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] My name exists in `CONTRIBUTORS.md` ## Test Plan - [x] `./isaaclab.sh -p -m pytest source/isaaclab/test/assets/test_articulation_ordering_iface.py` -> 233 passed - [x] `./isaaclab.sh -f` -> all hooks pass
#6341) # Description Routes event terms through the asset's public index mapping (`map_body_ids_to_backend`), fixes consumers that mixed public-order indices with backend-order view arrays (Forge force sensor, Lee controller inertia pairing), applies the factory/automate armature inertia offsets through the asset API, and adds the sim-to-sim transfer guide. Part 8/8 of the series splitting #6248 into independently reviewable units. #6248 remains open, untouched, as the reference implementation; this stack was cut from its final tree after a `develop` sync (Kamino Core, Newton bump, OVPhysX 0.5.1). ## Stack - Part 1/8: #6334 — Extract rigid object interface test utilities - Part 2/8: #6335 — Core ordering foundation - Part 3/8: #6336 — Newton backend - Part 4/8: #6337 — PhysX backend - Part 5/8: #6338 — Extract articulation interface test utilities - Part 6/8: #6339 — OVPhysX backend - Part 7/8: #6340 — Cross-backend ordering interface tests - **Part 8/8 (this PR)**: #6341 — Events, consumers, and documentation > [!NOTE] > All parts target `develop`, so until the preceding parts merge this PR's diff includes them. The true delta of this part is [this compare](AntoineRichard/IsaacLab@antoiner/articulation-reordering-p7...antoiner/articulation-reordering-p8). ## Type of change - Test/documentation/refactor change ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] My name exists in `CONTRIBUTORS.md` ## Test Plan - [x] `./isaaclab.sh -p -m pytest source/isaaclab/test/envs/test_articulation_ordering_events.py` -> 12 passed - [x] `./isaaclab.sh -f` -> all hooks pass --------- Co-authored-by: Kelly Guo <[email protected]>
… utilities (isaac-sim#6334) # Description Moves the rigid object and rigid object collection interface test factories into shared underscore-prefixed utility modules so later parts can reuse them. Pure code movement with no behavior change and no ordering content. Part 1/8 of the series splitting isaac-sim#6248 into independently reviewable units. isaac-sim#6248 remains open, untouched, as the reference implementation; this stack was cut from its final tree after a `develop` sync (Kamino Core, Newton bump, OVPhysX 0.5.1). ## Stack - **Part 1/8 (this PR)**: isaac-sim#6334 — Extract rigid object interface test utilities - Part 2/8: isaac-sim#6335 — Core ordering foundation - Part 3/8: isaac-sim#6336 — Newton backend - Part 4/8: isaac-sim#6337 — PhysX backend - Part 5/8: isaac-sim#6338 — Extract articulation interface test utilities - Part 6/8: isaac-sim#6339 — OVPhysX backend - Part 7/8: isaac-sim#6340 — Cross-backend ordering interface tests - Part 8/8: isaac-sim#6341 — Events, consumers, and documentation ## Type of change - Test/documentation/refactor change ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] My name exists in `CONTRIBUTORS.md` ## Test Plan - [x] `./isaaclab.sh -p -m pytest source/isaaclab/test/assets/test_rigid_object_iface.py` -> 1478 passed, 12 xfailed - [x] `./isaaclab.sh -p -m pytest source/isaaclab/test/assets/test_rigid_object_collection_iface.py` -> 1902 passed; the 7 failures + 636 errors are pre-existing on `develop` in the local environment (OVPhysX 0.4.13 wheel vs the 0.5.x binding API from isaac-sim#6314) — fail-set identical to the `develop` baseline - [x] `./isaaclab.sh -f` -> all hooks pass --------- Signed-off-by: Antoine RICHARD <[email protected]> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…#6335) # Description Introduces the public joint/body ordering machinery in `isaaclab` core: the `ArticulationNameMap` type and builder, the ordering preset helper, the Warp reorder kernels with an explicit visibility contract, the symbolic convention resolvers (`physx`, `mjwarp`, `robot_schema`), the `ArticulationCfg.joint_ordering`/`body_ordering` fields, the `BaseArticulation`/`BaseArticulationData` plumbing that backends wire into, and the API reference entries. **Transitional semantics:** no backend consumes the machinery yet, so configuring an ordering in this intermediate state is a silent no-op until Parts 3/4/6 land. This is called out in the cfg field docstrings and resolves quickly as the stack merges. Part 2/8 of the series splitting isaac-sim#6248 into independently reviewable units. isaac-sim#6248 remains open, untouched, as the reference implementation; this stack was cut from its final tree after a `develop` sync (Kamino Core, Newton bump, OVPhysX 0.5.1). ## Stack - Part 1/8: isaac-sim#6334 — Extract rigid object interface test utilities - **Part 2/8 (this PR)**: isaac-sim#6335 — Core ordering foundation - Part 3/8: isaac-sim#6336 — Newton backend - Part 4/8: isaac-sim#6337 — PhysX backend - Part 5/8: isaac-sim#6338 — Extract articulation interface test utilities - Part 6/8: isaac-sim#6339 — OVPhysX backend - Part 7/8: isaac-sim#6340 — Cross-backend ordering interface tests - Part 8/8: isaac-sim#6341 — Events, consumers, and documentation > [!NOTE] > All parts target `develop`, so until the preceding parts merge this PR's diff includes them. The true delta of this part is [this compare](AntoineRichard/IsaacLab@antoiner/articulation-reordering-p1...antoiner/articulation-reordering-p2). ## Type of change - New feature (non-breaking change which adds functionality) ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] My name exists in `CONTRIBUTORS.md` ## Test Plan - [x] `./isaaclab.sh -p -m pytest source/isaaclab/test/assets/test_articulation_ordering.py` -> 67 passed - [x] `./isaaclab.sh -p -m pytest source/isaaclab/test/assets/test_articulation_ordering_kernels.py` -> 24 passed - [x] `./isaaclab.sh -f` -> all hooks pass
## Description A latent Warp defect can abort Newton simulation (re)initialization with a spurious `Warp CUDA error 1: invalid argument` at the first buffer copy (`wp.clone` during `PHYSICS_READY`), in processes that run several simulation lifecycles (test suites, notebooks). Root cause (fully diagnosed; a ~50-line pure-Warp repro exists and a Warp-side fix is in review): - `wp.capture_while`/`wp.capture_if` pause the parent capture and resume capturing into the conditional body graph on the same stream. If a Python garbage-collection pass runs inside a body callback and drops the last reference to an array allocated in the parent graph, Warp inserts the memory free node into the body graph with parent-graph dependency nodes — which fails with `cudaErrorInvalidValue`, leaks the allocation, and leaves the CUDA per-thread error latched. - `wp_array_copy_device` ends with `check_cuda(cudaGetLastError())`, so the next innocent Warp copy surfaces and mis-attributes the stale error — typically one test/lifecycle later, which made this look like flakiness. This PR adds two independent layers in `NewtonManager` until the upstream Warp fix propagates: 1. **Prevention** — garbage collection is paused for the duration of graph capture (both the standard `ScopedCapture` path and the RTX relaxed-capture path), with a collection run immediately after the capture window, where freeing graph-scoped allocations is handled correctly. Reference-count-driven frees are unaffected. 2. **Defense in depth** — `start_simulation` drains (and logs) any latched CUDA error via Warp's own `wp_cuda_context_check` before dispatching initialization callbacks, so no prior lifecycle can poison the next one through any other latched-error path. Validation: the deterministic 4-test repro (from the articulation-ordering test additions in isaac-sim#6336) goes red→green with the GC guard alone, with zero `failed to add a memory free node` warnings (the corrupting frees no longer happen); the full Newton articulation suite is green with ordering tests (257 passed) and on develop (236 passed). A develop-only regression test is not included because develop's current suite never arranges the triggering sequence; isaac-sim#6336's tests cover it organically once merged. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have read and understood the [contribution guidelines] - [x] I have run the [pre-commit checks] with `./isaaclab.sh --format` - [x] My changes generate no new warnings - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
# Description Wires ordering into the Newton backend read/write paths. Non-identity orderings register an unconditional post-step publish that reorders the core state buffers inside the stepped (and CUDA-graph-captured) region, keeping the documented Tier-1 capture-safety contract without Python read guards; `NewtonManager` gains the matching `register`/`unregister_post_step_callback` API. Actuator torque telemetry reads live backend state through the ordering map. Also carries the shared branching USD test fixture used by cross-backend convention tests here and in later parts. Part 3/8 of the series splitting isaac-sim#6248 into independently reviewable units. isaac-sim#6248 remains open, untouched, as the reference implementation; this stack was cut from its final tree after a `develop` sync (Kamino Core, Newton bump, OVPhysX 0.5.1). ## Stack - Part 1/8: isaac-sim#6334 — Extract rigid object interface test utilities - Part 2/8: isaac-sim#6335 — Core ordering foundation - **Part 3/8 (this PR)**: isaac-sim#6336 — Newton backend - Part 4/8: isaac-sim#6337 — PhysX backend - Part 5/8: isaac-sim#6338 — Extract articulation interface test utilities - Part 6/8: isaac-sim#6339 — OVPhysX backend - Part 7/8: isaac-sim#6340 — Cross-backend ordering interface tests - Part 8/8: isaac-sim#6341 — Events, consumers, and documentation > [!NOTE] > All parts target `develop`, so until the preceding parts merge this PR's diff includes them. The true delta of this part is [this compare](AntoineRichard/IsaacLab@antoiner/articulation-reordering-p2...antoiner/articulation-reordering-p3). ## Type of change - New feature (non-breaking change which adds functionality) ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] My name exists in `CONTRIBUTORS.md` ## Test Plan - [x] `./isaaclab.sh -p -m pytest source/isaaclab_newton/test/assets/test_articulation_ordering_kernels.py` -> 2 passed - [x] `./isaaclab.sh -p -m pytest source/isaaclab_newton/test/assets/test_newton_actuators_newton.py` -> 76 passed - [x] `./isaaclab.sh -p -m pytest source/isaaclab_newton/test/assets/test_articulation.py` -> 257 passed, 8 skipped, 1 xfailed - [x] `./isaaclab.sh -f` -> all hooks pass
# Description Wires ordering into the PhysX backend read/write paths using the shared kernels: fused user-and-backend target writes, lazily refreshed timestamped `body_mass`/`body_inertia` (see the changelog `Changed` entry for the semantics change vs develop), and ordering maps resolved at initialization. Part 4/8 of the series splitting isaac-sim#6248 into independently reviewable units. isaac-sim#6248 remains open, untouched, as the reference implementation; this stack was cut from its final tree after a `develop` sync (Kamino Core, Newton bump, OVPhysX 0.5.1). ## Stack - Part 1/8: isaac-sim#6334 — Extract rigid object interface test utilities - Part 2/8: isaac-sim#6335 — Core ordering foundation - Part 3/8: isaac-sim#6336 — Newton backend - **Part 4/8 (this PR)**: isaac-sim#6337 — PhysX backend - Part 5/8: isaac-sim#6338 — Extract articulation interface test utilities - Part 6/8: isaac-sim#6339 — OVPhysX backend - Part 7/8: isaac-sim#6340 — Cross-backend ordering interface tests - Part 8/8: isaac-sim#6341 — Events, consumers, and documentation > [!NOTE] > All parts target `develop`, so until the preceding parts merge this PR's diff includes them. The true delta of this part is [this compare](AntoineRichard/IsaacLab@antoiner/articulation-reordering-p3...antoiner/articulation-reordering-p4). ## Type of change - New feature (non-breaking change which adds functionality) ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] My name exists in `CONTRIBUTORS.md` ## Test Plan - [x] `./isaaclab.sh -p -m pytest source/isaaclab_physx/test/assets/test_articulation.py` -> 239 passed - [x] `./isaaclab.sh -p -m pytest source/isaaclab_physx/test/assets/test_newton_actuators_physx.py` -> 44 passed - [x] `./isaaclab.sh -f` -> all hooks pass
… utilities (isaac-sim#6338) # Description Moves the articulation interface test factories into a shared utility module mirroring Part 1's rigid object extraction, with ordering-aware construction hooks used by Part 7's cross-backend suite. Part 5/8 of the series splitting isaac-sim#6248 into independently reviewable units. isaac-sim#6248 remains open, untouched, as the reference implementation; this stack was cut from its final tree after a `develop` sync (Kamino Core, Newton bump, OVPhysX 0.5.1). ## Stack - Part 1/8: isaac-sim#6334 — Extract rigid object interface test utilities - Part 2/8: isaac-sim#6335 — Core ordering foundation - Part 3/8: isaac-sim#6336 — Newton backend - Part 4/8: isaac-sim#6337 — PhysX backend - **Part 5/8 (this PR)**: isaac-sim#6338 — Extract articulation interface test utilities - Part 6/8: isaac-sim#6339 — OVPhysX backend - Part 7/8: isaac-sim#6340 — Cross-backend ordering interface tests - Part 8/8: isaac-sim#6341 — Events, consumers, and documentation > [!NOTE] > All parts target `develop`, so until the preceding parts merge this PR's diff includes them. The true delta of this part is [this compare](AntoineRichard/IsaacLab@antoiner/articulation-reordering-p4...antoiner/articulation-reordering-p5). ## Type of change - Test/documentation/refactor change ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] My name exists in `CONTRIBUTORS.md` ## Test Plan - [x] `./isaaclab.sh -p -m pytest source/isaaclab/test/assets/test_articulation_iface.py` -> 4086 passed, 96 skipped, 32 xfailed (with Newton and PhysX wired, OVPhysX not yet — exercises the unwired-backend identity path) - [x] `./isaaclab.sh -f` -> all hooks pass
# Description Wires ordering into the OVPhysX backend read/write paths: fused user-and-backend writes with persistent target staging separated from transient applied-torque scratch, FK-aware body state refresh, and a fused ordered joint acceleration kernel. Part 6/8 of the series splitting isaac-sim#6248 into independently reviewable units. isaac-sim#6248 remains open, untouched, as the reference implementation; this stack was cut from its final tree after a `develop` sync (Kamino Core, Newton bump, OVPhysX 0.5.1). ## Stack - Part 1/8: isaac-sim#6334 — Extract rigid object interface test utilities - Part 2/8: isaac-sim#6335 — Core ordering foundation - Part 3/8: isaac-sim#6336 — Newton backend - Part 4/8: isaac-sim#6337 — PhysX backend - Part 5/8: isaac-sim#6338 — Extract articulation interface test utilities - **Part 6/8 (this PR)**: isaac-sim#6339 — OVPhysX backend - Part 7/8: isaac-sim#6340 — Cross-backend ordering interface tests - Part 8/8: isaac-sim#6341 — Events, consumers, and documentation > [!NOTE] > All parts target `develop`, so until the preceding parts merge this PR's diff includes them. The true delta of this part is [this compare](AntoineRichard/IsaacLab@antoiner/articulation-reordering-p5...antoiner/articulation-reordering-p6). ## Type of change - New feature (non-breaking change which adds functionality) ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] My name exists in `CONTRIBUTORS.md` ## Test Plan - [x] Mock-based coverage lands in Part 7 (233 passed there). The live suite is blocked in the local environment: all 105 failures share the single `PhysX.set_cpu_mode` AttributeError from the OVPhysX 0.4.13 wheel vs isaac-sim#6314's manager code (develop shows the identical signature on its 99 pre-existing live tests); the same tests passed on the pre-sync monolithic branch - [x] CI with the 0.5.1 wheelhouse is the authoritative gate for this part - [x] `./isaaclab.sh -f` -> all hooks pass --------- Co-authored-by: Kelly Guo <[email protected]>
…sts (isaac-sim#6340) # Description Adds the shared interface test suite exercising ordering allocation, write parity, partial writes, and property reordering uniformly across PhysX, OVPhysX, and Newton through their mock views. Lands after all three backend parts because present-but-unwired backends error rather than skip. Part 7/8 of the series splitting isaac-sim#6248 into independently reviewable units. isaac-sim#6248 remains open, untouched, as the reference implementation; this stack was cut from its final tree after a `develop` sync (Kamino Core, Newton bump, OVPhysX 0.5.1). ## Stack - Part 1/8: isaac-sim#6334 — Extract rigid object interface test utilities - Part 2/8: isaac-sim#6335 — Core ordering foundation - Part 3/8: isaac-sim#6336 — Newton backend - Part 4/8: isaac-sim#6337 — PhysX backend - Part 5/8: isaac-sim#6338 — Extract articulation interface test utilities - Part 6/8: isaac-sim#6339 — OVPhysX backend - **Part 7/8 (this PR)**: isaac-sim#6340 — Cross-backend ordering interface tests - Part 8/8: isaac-sim#6341 — Events, consumers, and documentation > [!NOTE] > All parts target `develop`, so until the preceding parts merge this PR's diff includes them. The true delta of this part is [this compare](AntoineRichard/IsaacLab@antoiner/articulation-reordering-p6...antoiner/articulation-reordering-p7). ## Type of change - Test/documentation/refactor change ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] My name exists in `CONTRIBUTORS.md` ## Test Plan - [x] `./isaaclab.sh -p -m pytest source/isaaclab/test/assets/test_articulation_ordering_iface.py` -> 233 passed - [x] `./isaaclab.sh -f` -> all hooks pass
isaac-sim#6341) # Description Routes event terms through the asset's public index mapping (`map_body_ids_to_backend`), fixes consumers that mixed public-order indices with backend-order view arrays (Forge force sensor, Lee controller inertia pairing), applies the factory/automate armature inertia offsets through the asset API, and adds the sim-to-sim transfer guide. Part 8/8 of the series splitting isaac-sim#6248 into independently reviewable units. isaac-sim#6248 remains open, untouched, as the reference implementation; this stack was cut from its final tree after a `develop` sync (Kamino Core, Newton bump, OVPhysX 0.5.1). ## Stack - Part 1/8: isaac-sim#6334 — Extract rigid object interface test utilities - Part 2/8: isaac-sim#6335 — Core ordering foundation - Part 3/8: isaac-sim#6336 — Newton backend - Part 4/8: isaac-sim#6337 — PhysX backend - Part 5/8: isaac-sim#6338 — Extract articulation interface test utilities - Part 6/8: isaac-sim#6339 — OVPhysX backend - Part 7/8: isaac-sim#6340 — Cross-backend ordering interface tests - **Part 8/8 (this PR)**: isaac-sim#6341 — Events, consumers, and documentation > [!NOTE] > All parts target `develop`, so until the preceding parts merge this PR's diff includes them. The true delta of this part is [this compare](AntoineRichard/IsaacLab@antoiner/articulation-reordering-p7...antoiner/articulation-reordering-p8). ## Type of change - Test/documentation/refactor change ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] My name exists in `CONTRIBUTORS.md` ## Test Plan - [x] `./isaaclab.sh -p -m pytest source/isaaclab/test/envs/test_articulation_ordering_events.py` -> 12 passed - [x] `./isaaclab.sh -f` -> all hooks pass --------- Co-authored-by: Kelly Guo <[email protected]>
Description
Wires ordering into the Newton backend read/write paths. Non-identity orderings register an unconditional post-step publish that reorders the core state buffers inside the stepped (and CUDA-graph-captured) region, keeping the documented Tier-1 capture-safety contract without Python read guards;
NewtonManagergains the matchingregister/unregister_post_step_callbackAPI. Actuator torque telemetry reads live backend state through the ordering map. Also carries the shared branching USD test fixture used by cross-backend convention tests here and in later parts.Part 3/8 of the series splitting #6248 into independently reviewable units. #6248 remains open, untouched, as the reference implementation; this stack was cut from its final tree after a
developsync (Kamino Core, Newton bump, OVPhysX 0.5.1).Stack
Note
All parts target
develop, so until the preceding parts merge this PR's diff includes them. The true delta of this part is this compare.Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.mdTest Plan
./isaaclab.sh -p -m pytest source/isaaclab_newton/test/assets/test_articulation_ordering_kernels.py-> 2 passed./isaaclab.sh -p -m pytest source/isaaclab_newton/test/assets/test_newton_actuators_newton.py-> 76 passed./isaaclab.sh -p -m pytest source/isaaclab_newton/test/assets/test_articulation.py-> 257 passed, 8 skipped, 1 xfailed./isaaclab.sh -f-> all hooks pass