Skip to content

Articulation Reordering Part 3/8: Newton backend - #6336

Merged
AntoineRichard merged 18 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/articulation-reordering-p3
Jul 15, 2026
Merged

AntoineRichard merged 18 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/articulation-reordering-p3

Conversation

@AntoineRichard

@AntoineRichard AntoineRichard commented Jul 3, 2026 •

Copy link
Copy Markdown
Collaborator

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 #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

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

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package
  • My name exists in CONTRIBUTORS.md

Test 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

@AntoineRichard

Copy link
Copy Markdown
Collaborator Author

Addressed the first review batch in 470b4b7ee94 — per-comment map:

  • Unify into a single launch (both write_data_to_sim sites): done, and better than asked — those were the identity branches (the ordered path already used the fused kernel). Since the asset-side joint map is an identity arange when no ordering is configured, both branch pairs collapsed into one unconditional fused launch (no branch at all): identity path goes from 4 memcpys (direct-drive) / 3 (Lab) to 1 launch; _assign_backend_ordered_joint_buffer lost its last callers and is deleted.
  • Unified property-write kernels: audited every wp.launch in the file — none remain to migrate. All joint property writers (stiffness/damping/armature/friction/limits, index+mask) already route through the fused write_*_user_to_backend kernels, and position limits have their own fused vec2f kernel. The anchored hunks predate the fused migration that's already on this branch.
  • _write_actuator_param torch routing / no mask variant: correct on both counts — gains are per-actuator torch views over arbitrary joint subsets, so single-launch needs the actuator-side buffer layout rework. Marked with a TODO deferring to the actuator rework built on this series, as suggested.
  • Write-to-sim mega kernel: evaluated, recommending no: the wrench scatter iterates (envs, bodies) vs the target gather's (envs, joints) (max-dim launch with divergent guarded phases, zero memory saving), and on the Lab path _apply_actuator_model() runs between them producing the gather's inputs — they can't share a launch. Reasons now stated in a comment at the wrench launch.
  • Review-trace comment: reduced to the functional sentence.
  • Runtime validation: the configure step allocates every checked field, so the per-call validations on sync/rebind paths were unreachable — removed; the validators now run exactly once at the end of configure as a structural guard.
  • "Is this used?" quartet: full caller-map audit — everything is production-used, nothing deletable: _refresh_user_order_state is the registered post-step callback (every step under ordering, in-graph); the joint-state pairs in the sync method are the resolve/rebind seeds that make first pre-step reads valid, since the post-step publish only fires inside a step — now documented in that docstring.

Tests: baseline-exact (257 passed/8 skipped/1 xfailed + 76 passed), pre-commit clean.

@AntoineRichard
AntoineRichard marked this pull request as ready for review July 3, 2026 14:40
@greptile-apps

greptile-apps Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This 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 _refresh_user_order_state post-step callback with NewtonManager so reorder kernel launches are captured inside every CUDA graph. NewtonManager gains register_post_step_callback / unregister_post_step_callback APIs; build_newton_actuator_defaults grows an optional joint_user_to_backend_indices parameter for converting Newton adapter gain tensors to public order; and the sync_torque_telemetry actuator kernel is updated to index backend-order sim buffers via a user_to_backend map.

  • Post-step callback registration: Articulation._create_buffers registers data._refresh_user_order_state with NewtonManager only when a non-identity ordering is active, and _clear_callbacks unregisters it symmetrically, preventing dangling references.
  • Fused target gather: write_data_to_sim replaces four direct .assign() calls with a single reorder_joint_targets_user_to_backend kernel launch that also serves the identity-ordering case via the _ALL_JOINT_INDICES identity arange, merging the two write paths into one unconditional launch per step.
  • Newton actuator gain reordering: build_newton_actuator_defaults converts Newton's backend-order stiffness/damping and managed-joint index tensor to user order via index_select and an explicit inverse permutation when joint_user_to_backend_indices is provided.

Confidence Score: 4/5

Safe 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

Filename Overview
source/isaaclab_newton/isaaclab_newton/assets/articulation/articulation.py Core Newton articulation wired for ordering: write paths use fused user→backend kernel, post-step callback registers the user-order shadow refresh, property writers delegate to write_joint_float_property_to_sim{index,mask} helpers. The non-Newton-actuator write_data_to_sim path passes _sim_bind_joint_effort twice in the outputs list as a documented alias trick (write_joint_act=False guards the second slot).
source/isaaclab_newton/isaaclab_newton/assets/articulation/articulation_data.py Large refactor adding user-order shadow buffers (_joint_pos/vel_user, _body_link_pose_w_user, etc.), ordering configuration/sync/refresh helpers, and Jacobian/mass-matrix gather kernels parameterized by user_to_backend maps. data._joint_user_to_backend is None when no ordering, passed as a nullable input to Warp kernels guarded by has_joint_ordering booleans — relies on Warp null-array handling but tests pass.
source/isaaclab_newton/isaaclab_newton/physics/newton_manager.py Adds _post_step_callbacks list called after the final solver substep (outside decimation loop) in both _simulate_full and _simulate_physics_only. register/unregister_post_step_callback API mirrors the existing post_actuator pattern; cleared on reset.
source/isaaclab_newton/isaaclab_newton/actuators/adapter.py build_newton_actuator_defaults gains optional joint_user_to_backend_indices to convert backend-order stiffness/damping tensors to user order via index_select and convert managed-joint indices via inverse permutation. Permutation completeness validation added.
source/isaaclab_newton/isaaclab_newton/actuators/kernels.py sync_torque_telemetry updated to index backend-order sim buffers through user_to_backend map while targets, gains, limits, and telemetry outputs remain at user index j.
source/isaaclab/isaaclab/assets/articulation/base_articulation.py Adds backend_joint_names/backend_body_names abstract properties, promotes joint_names/body_names to concrete implementations reading data.joint_ordering, and adds _resolve_and_install_ordering_maps/_cache_ordering_maps initialization pipeline.
source/isaaclab/isaaclab/assets/articulation/ordering_kernels.py New module with reorder_2d_backend_to_user, reorder_2d_user_to_backend, reorder_joint_targets_user_to_backend, and write_*user_to_backend_with{indices,mask} kernels. Signatures and docstrings are consistent with usage.
source/isaaclab_newton/isaaclab_newton/assets/articulation/kernels.py Old write_joint_vel_data_index/mask and write_joint_state_data_index/mask kernels removed. New update_wrench_array_with_force_and_torque_ordered, get_body_com_acc_from_body_com_vel_ordered, write_joint_limit_data_to_user_and_backend_{index,mask}, gather_jacobian_rows, and gather_mass_matrix_rows kernels added with ordering support.

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)
Loading
%%{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)
Loading

Reviews (1): Last reviewed commit: "Unify identity target writes and trim va..." | Re-trigger Greptile

Comment on lines 941 to 950
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,
],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +388 to +393
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,
],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Suggested change
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
],

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 1772 to 1797
@@ -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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 332 to +345
)
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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

AntoineRichard added a commit that referenced this pull request Jul 7, 2026
… 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>
@AntoineRichard
AntoineRichard force-pushed the antoiner/articulation-reordering-p3 branch 5 times, most recently from eb6afc0 to 1172ed3 Compare July 10, 2026 09:36
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]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +1254 to 1263
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,
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 None

Property (derivation), deliberately not a stored flag — the stored-copy variant is what the ordering rework removed for staleness.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_view

Same-purpose functions move into the namespace whose data they read; the parameter threading disappears.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@AntoineRichard
AntoineRichard force-pushed the antoiner/articulation-reordering-p3 branch from 1172ed3 to 6f89a34 Compare July 13, 2026 16:13
AntoineRichard added a commit that referenced this pull request Jul 14, 2026
# 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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
AntoineRichard added a commit that referenced this pull request Jul 15, 2026
## 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
@AntoineRichard
AntoineRichard merged commit 0257fa0 into isaac-sim:develop Jul 15, 2026
41 checks passed
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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

AntoineRichard added a commit that referenced this pull request Jul 17, 2026
# 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
AntoineRichard added a commit that referenced this pull request Jul 21, 2026
… 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
kellyguo11 added a commit that referenced this pull request Jul 28, 2026
# 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]>
AntoineRichard added a commit that referenced this pull request Jul 28, 2026
…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
kellyguo11 added a commit that referenced this pull request Jul 29, 2026
#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]>
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
… 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>
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
…#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
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
## 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
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
# 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
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
# 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
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
… 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
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
# 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]>
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
…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
matthewtrepte pushed a commit to matthewtrepte/IsaacLab that referenced this pull request Aug 4, 2026
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants