Skip to content

Articulation Reordering Part 2/8: Core ordering foundation - #6335

Merged
AntoineRichard merged 19 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/articulation-reordering-p2
Jul 14, 2026
Merged

AntoineRichard merged 19 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/articulation-reordering-p2

Conversation

@AntoineRichard

@AntoineRichard AntoineRichard commented Jul 3, 2026 •

Copy link
Copy Markdown
Collaborator

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

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/test/assets/test_articulation_ordering.py -> 67 passed
  • ./isaaclab.sh -p -m pytest source/isaaclab/test/assets/test_articulation_ordering_kernels.py -> 24 passed
  • ./isaaclab.sh -f -> all hooks pass

@AntoineRichard

Copy link
Copy Markdown
Collaborator Author

Design change from review discussion: identity orderings now normalize to None at the install choke point (4b4c2f91d48). Previously a configured ordering that resolved to the backend's native order installed an identity ArticulationNameMap, giving consumers two sentinels for the same no-op state (None vs is_identity). Now: joint_ordering/body_ordering is not None ⇔ _has_*_ordering ⇔ reordering actually happens — one sentinel, checked with plain is None. ArticulationNameMap.is_identity and the total builder remain (identity maps stay legal values of the type, e.g. hand-built in tests); only assets normalize them away, with an info log recording the resolution. Later parts get their small ripple (guide examples, one events test) when the stack rebases after this review.

@AntoineRichard

Copy link
Copy Markdown
Collaborator Author

Addressed the ordering.py review points in 18ef656afcc — all ten drafts trace to one root cause (a coercion layer serving inputs we control), now deleted:

  • coerce naming → renamed _validate_articulation_names / _validate_articulation_indices; they validate and return the canonical tuple.
  • Defensive layers (str/bytes/bytearray special-cases, try: tuple(iterable)) → gone; hard type(x) in (list, tuple) check, per your one-contract call: list-or-tuple at the builder/cfg boundary (canonicalized to tuple), exact tuple on the frozen dataclass fields.
  • operator.index + the bool branch → gone. Bools only needed rejecting because operator.index(True) succeeds; with exact type(v) is int, True fails the ordinary check (bool is not int by exact type) with the standard message. NumPy ints are now rejected too — typed inputs exist for a reason.
  • object.__setattr__ → existed solely to write coerced values back into frozen fields; validation-only means no mutation, so it's deleted outright.
  • Element checks are now exact (type(name) is str), one line each.

Net: both helpers are ~7 lines, _validate no longer reassigns anything, and the tests were flipped to pin the strict contract (generic sequences and NumPy integral types now assert rejection; fail-then-pass preserved). 68/68 green, pre-commit clean. Your pending drafts should all be resolvable.

@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 introduces the public joint/body ordering foundation for Isaac Lab articulations: the ArticulationNameMap bidirectional descriptor, ArticulationOrderingConvention enum, Warp reorder kernels, symbolic convention resolvers (physx, mjwarp, robot_schema), and the plumbing on BaseArticulation/BaseArticulationData that backends will wire into in subsequent parts. No backend consumes the maps yet, so ordering is a silent no-op until Parts 3/4/6 land.

  • ordering.py adds a frozen, fully-validated ArticulationNameMap with CPU tuples + device wp.int32 arrays, plus build_articulation_name_map factory and apply_articulation_ordering_preset helper.
  • ordering_kernels.py contributes Warp kernels for 2-D/3-D gather, fused joint-target writes, Jacobian/mass-matrix/generalized-vector specials, and index-based/mask-based write kernels with a clear public/internal visibility contract via __all__.
  • ordering_resolvers.py implements a four-stage resolution chain (native fast-path → per-articulation cache → robot-schema USD → temporary Newton USD builder) with per-articulation result caching; a suspicious attribute-name priority inversion in _ROBOT_SCHEMA_NAME_OVERRIDE_ATTRS needs clarification.

Confidence Score: 4/5

Safe to merge as a foundational layer; no backend wires into the new maps yet, so the transitional no-op state limits blast radius to the new modules themselves.

The core data structures (ArticulationNameMap, kernels) are well-validated and well-tested. The main concerns are in the resolver and data-container layers: the _ROBOT_SCHEMA_NAME_OVERRIDE_ATTRS attribute-priority asymmetry could silently resolve joint and body name overrides from different attributes on the same prim; _backend_body_com_pose_b bypasses the staleness guard used by _ensure_body_com_pose_b_current causing redundant backend fetches when ordering is active; and the hasattr-based silent skip in _ordering_configure_backend_staging can mask a misconfigured backend until a kernel launch fails with an opaque None error.

ordering_resolvers.py (attribute-name priority asymmetry), base_articulation_data.py (_backend_body_com_pose_b staleness), base_articulation.py (staging silent-skip).

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/assets/articulation/ordering.py New file: defines ArticulationOrderingConvention enum, frozen ArticulationNameMap dataclass with thorough validation, and build_articulation_name_map builder. Logic is correct; CPU/device inverse-permutation invariants are well-tested.
source/isaaclab/isaaclab/assets/articulation/ordering_resolvers.py New file: symbolic convention resolution chain (native fast-path to per-articulation cache to robot-schema USD to Newton builder). Has a suspicious attribute-name priority inversion between joints and bodies in _ROBOT_SCHEMA_NAME_OVERRIDE_ATTRS; otherwise the chain and caching logic are sound.
source/isaaclab/isaaclab/assets/articulation/ordering_kernels.py New file: Warp kernels for 2-D/3-D item-axis reordering, fused joint-target and body-wrench writes, Jacobian/mass-matrix/generalized-vector specials. Public all contract is clearly stated; kernel logic is correct.
source/isaaclab/isaaclab/assets/articulation/base_articulation.py Large extension: adds ordering-map install/cache helpers, backend_joint_names/backend_body_names deprecation fallbacks, index-translation methods, and staging allocation. The silent hasattr skip in _ordering_configure_backend_staging can mask misconfigured backends; otherwise logic is sound.
source/isaaclab/isaaclab/assets/articulation/base_articulation_data.py Extends data container with ordering flags, device permutation arrays, and _ensure_body_com_pose_b_current. The _backend_body_com_pose_b property unconditionally fetches when ordering is active, bypassing the staleness guard used by _ensure_body_com_pose_b_current.
source/isaaclab/isaaclab/assets/articulation/articulation_cfg.py Adds joint_ordering and body_ordering fields to ArticulationCfg. Well-documented with clear transitional semantics noted in docstrings.
source/isaaclab/test/assets/test_articulation_ordering.py 67 tests covering convention parsing, name-map construction/validation, robot-schema resolver, Newton builder delegation, and resolver caching. Good coverage of edge cases; stubs cleanly isolate tests from heavy simulation dependencies.
source/isaaclab/test/assets/test_articulation_ordering_kernels.py 24 tests covering reorder kernels, fused joint-target writes, Jacobian/mass-matrix/generalized-vector kernels. Tests run on CPU Warp device and verify both index maps and floating-base-DoF offset handling.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["ArticulationCfg\njoint_ordering / body_ordering\n(str | enum | list | None)"] --> B["_resolve_and_install_ordering_maps\n(called during backend init)"]
    B --> C{"ordering is None?"}
    C -- Yes --> D["data.joint_ordering = None\ndata.joint_names = backend names"]
    C -- No --> E["_resolve_articulation_ordering_names\n(ordering_resolvers.py)"]
    E --> F{"Explicit list/tuple?"}
    F -- Yes --> G["_validate_articulation_names\n(type-check only)"]
    F -- No --> H["parse_articulation_ordering_convention"]
    H --> I{"Active backend\nnatively matches\nconvention?"}
    I -- Yes --> J["Return backend names\n(identity fast-path)"]
    I -- No --> K{"In per-articulation\nconvention cache?"}
    K -- Yes --> L["Return cached names"]
    K -- No --> M{"robot_schema\nconvention?"}
    M -- Yes --> N["_get_robot_schema_names\n(read USD relationships)"]
    M -- No --> O["Newton USD builder\n(BFS or DFS traversal)"]
    N --> P["_filter_complete_backend_name_order"]
    O --> Q["_get_complete_convention_names_by_kind\ncache if both joint+body complete"]
    G --> R["build_articulation_name_map\n(complete-permutation validation\n+ device wp.int32 arrays)"]
    J --> R
    L --> R
    P --> R
    Q --> R
    R --> S{"is_identity?"}
    S -- Yes --> T["Normalize to None\n(log info)"]
    S -- No --> U["data.joint_ordering =\nArticulationNameMap"]
    T --> V["_apply_ordering_maps_after_resolve"]
    U --> V
    V --> W["_cache_ordering_maps\n(mirror maps onto asset for hot paths)"]
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"}}}%%
flowchart TD
    A["ArticulationCfg\njoint_ordering / body_ordering\n(str | enum | list | None)"] --> B["_resolve_and_install_ordering_maps\n(called during backend init)"]
    B --> C{"ordering is None?"}
    C -- Yes --> D["data.joint_ordering = None\ndata.joint_names = backend names"]
    C -- No --> E["_resolve_articulation_ordering_names\n(ordering_resolvers.py)"]
    E --> F{"Explicit list/tuple?"}
    F -- Yes --> G["_validate_articulation_names\n(type-check only)"]
    F -- No --> H["parse_articulation_ordering_convention"]
    H --> I{"Active backend\nnatively matches\nconvention?"}
    I -- Yes --> J["Return backend names\n(identity fast-path)"]
    I -- No --> K{"In per-articulation\nconvention cache?"}
    K -- Yes --> L["Return cached names"]
    K -- No --> M{"robot_schema\nconvention?"}
    M -- Yes --> N["_get_robot_schema_names\n(read USD relationships)"]
    M -- No --> O["Newton USD builder\n(BFS or DFS traversal)"]
    N --> P["_filter_complete_backend_name_order"]
    O --> Q["_get_complete_convention_names_by_kind\ncache if both joint+body complete"]
    G --> R["build_articulation_name_map\n(complete-permutation validation\n+ device wp.int32 arrays)"]
    J --> R
    L --> R
    P --> R
    Q --> R
    R --> S{"is_identity?"}
    S -- Yes --> T["Normalize to None\n(log info)"]
    S -- No --> U["data.joint_ordering =\nArticulationNameMap"]
    T --> V["_apply_ordering_maps_after_resolve"]
    U --> V
    V --> W["_cache_ordering_maps\n(mirror maps onto asset for hot paths)"]
Loading

Comments Outside Diff (2)

  1. source/isaaclab/isaaclab/assets/articulation/base_articulation_data.py, line 788-798 (link)

    P2 _backend_body_com_pose_b bypasses staleness guard when body ordering is active

    When _has_body_ordering is True, _backend_body_com_pose_b calls _fetch_body_com_pose_b_backend unconditionally on every access, without checking whether the backend staging buffer is already current. In contrast, _ensure_body_com_pose_b_current guards its fetch with self._body_com_pose_b.timestamp >= 0.0. A caller that invokes both in the same step triggers two backend fetches for the same data because the public buffer timestamp is never updated by _backend_body_com_pose_b.

  2. source/isaaclab/isaaclab/assets/articulation/base_articulation.py, line 472-483 (link)

    P2 Silent skip for undeclared staging attributes masks misconfigured backends

    The if not hasattr(self, backend_name): continue guard silently ignores any staging name in _ordering_joint_staging_names that has not been set as an instance attribute. A backend that adds a name to the tuple but forgets to initialise the corresponding attribute gets a silent no-op instead of an allocation, and the omission surfaces later as a confusing None dereference inside a kernel launch.

Reviews (1): Last reviewed commit: "Drop meta-tests and torch stub scaffoldi..." | Re-trigger Greptile

Comment on lines +121 to +124
_ROBOT_SCHEMA_NAME_OVERRIDE_ATTRS: dict[Literal["joint", "body"], tuple[str, ...]] = {
"joint": ("isaac:NameOverride", "isaac:nameOverride"),
"body": ("isaac:nameOverride", "isaac:NameOverride"),
}

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 Inverted attribute-name priority for body vs joint name overrides

The search order for the override attribute is reversed between joints and bodies. For joints "isaac:NameOverride" (capital N) is tried first; for bodies "isaac:nameOverride" (lowercase n) is tried first. If the same prim authors both spellings with different values, the two resolution paths would return different names from the same prim. If the intended canonical spelling is uniform across both element kinds, the priority order should be identical for joints and bodies.

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! Is the reversed priority for "isaac:NameOverride" vs "isaac:nameOverride" intentional — do the Isaac Sim joint and body USD schemas actually define these under different capitalizations?

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 — and digging into it, the divergence is worse than a style issue: neither ordering was authoritative. The Isaac Sim robot schema (isaacsim.robot.schema) defines exactly one spelling, isaac:nameOverride (RobotSchema.usda: string isaac:nameOverride = ""); the capitalized isaac:NameOverride does not exist in any schema — it was speculative tolerance introduced here. Fixed in cb749f4ae15 by reading only the schema-defined attribute for both joints and bodies, which removes the dual-spelling ambiguity entirely rather than just unifying the priority.

ROBOT_SCHEMA = "robot_schema"


@dataclass(frozen=True)

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.

Could we keep ArticulationNameMap private and make it represent only a real permutation?

Condensing the current representation, it stores:

kind
backend_names / user_names
two CPU permutations
two device permutations
is_identity

Several fields duplicate state already present on the articulation, while identity maps are immediately normalized to None. Public construction also requires a large validation surface, including copying the Warp maps back to the host, and frozen dataclass semantics do not make the Warp arrays immutable.

Could this instead be factory-controlled and private?

@dataclass(frozen=True, slots=True)
class _AxisPermutation:
    public_to_backend_indices: tuple[int, ...]
    public_to_backend: wp.array
    backend_to_public: wp.array

def _make_axis_permutation(...) -> _AxisPermutation | None:
    if public_names == backend_names:
        return None
    ...

The existing joint_names/body_names remain the public result, and map_joint_ids_to_backend/map_body_ids_to_backend can provide the raw-view escape hatch without exposing the representation. This leaves one identity state, removes duplicated names and is_identity, and avoids committing to a public constructor and its direct-construction tests before an external use case needs it.

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.

Suggest also storing the result only on ArticulationData (asset delegates) and collapsing the install into one factory call resolving both axes in one discovery pass:

data.joint_ordering, data.body_ordering = ArticulationOrdering.resolve(
    cfg, backend_names, device, is_fixed_base, staging_specs)

This removes _install_ordering_flags / _cache_ordering_maps / _reset_and_cache_ordering_maps / _ordering_maps_cached and the mirrored _has_*/map attributes on both classes — one source of truth, so the copies can't disagree.

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.

Largely agree, and adopted most of this in 7b0c9db5c34: build_articulation_name_map is now the only construction path and returns None for identity (your _make_axis_permutation | None shape), so the direct-construction validation surface — __post_init__, _prevalidated, the device-to-host comparison copies, and their tests — is gone. kind, user_names/backend_names, and is_identity are dropped from the type (names live on data.joint_names/backend_joint_names; identity is represented by None), leaving exactly the two CPU tuples and two device permutations.

Two deliberate deviations: (1) the type itself stays public (not underscored) because it is the return type of the public articulation.joint_ordering/body_ordering properties, and raw-view interop — launching the public gather kernels on solver-view arrays — needs read access to the device maps; map_*_ids_to_backend covers index translation but not device-side reordering. It is now a read-only result type with no public constructor (the builder is also de-exported from isaaclab.assets). (2) Kept the user_* field naming over public_*: it matches every kernel parameter and docstring across the series, and the rename would touch dozens of files for no semantic change.

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 — implemented in 321e9b3410d. The maps live only on ArticulationData (joint_ordering/body_ordering), the asset properties delegate, and _install_ordering_flags / _cache_ordering_maps / _reset_and_cache_ordering_maps / _ordering_maps_cached plus every mirrored _has_*/map attribute on both classes are deleted; read paths check data.joint_ordering is not None directly (one attribute hop per setter call — noise next to the kernel launch). The install-once guard went with the machinery: it only existed because the mirrors could go stale, and with one home there is nothing to desynchronize.

Two small deviations from the sketch: resolution stays two per-axis calls behind the one install site (joint and body discovery read different USD relationships, so a fused pass shares nothing), and backend staging keeps its existing allocation hook, now invoked directly by backends when they (re)create buffers instead of through the cache guard.

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.

A preference note, no behavior concern: I personally find this easier to follow when the functions live with the data — state is now on data.joint_ordering/body_ordering, but resolve/install and the staging/reorder helpers sit on BaseArticulation, gather paths on BaseArticulationData, so reading "ordering" still spans two classes and three modules. Was keeping them separate deliberate (asset context? churn in parts 3–8)?

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.

Deliberate, though the readability cost is real. The split follows what each piece needs and which buffers it fills: resolution/install sits on the asset because it consumes asset-scope context (cfg, the backend-overridable backend_*_names, __backend_name__, is_fixed_base, and — for the robot-schema/USD resolvers — the articulation object itself plus its convention cache); the staging configure lives there because the write-path staging buffers are asset attributes feeding write_data_to_sim; the gather paths live on data because they fill data-owned timestamped caches. Moving resolve onto data would just mean passing the asset in as an argument, and parts 3–8 backends override the asset-side staging and the data-side hooks independently, so co-locating them now would churn every backend part mid-review. Happy to add a short "where ordering lives" map to the ordering.py module docstring if that would help navigation.

backend_data[env_id, backend_id] = user_data[env_id, user_id]


@wp.kernel

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.

Could we separate the fundamental permutation/scatter primitives from semantic and fused kernels, and see whether more of the writer family can share generalized primitives?

The current module grows through a cross-product of concerns:

reorder_2d / reorder_3d
indices / masks
scalar / array inputs
full / compact inputs
ordinary writes / velocity history / complete joint state
dtype-specific Torch overloads

I agree that some specializations are real. Jacobians and mass matrices permute multiple axes while preserving floating-base DoFs, and joint-state writes must update velocity history and acceleration. I am not suggesting forcing those into one magical generic kernel.

For the remaining property writers, could the layering be closer to:

# generalized private primitives
_reorder_2d_*
_reorder_3d_*
_scatter_2d_with_indices_or_mask
_scatter_3d_with_indices_or_mask

# semantic/fused kernels only where required or measured hot
_write_joint_state_and_history
_reorder_joint_targets
_reorder_jacobian
_reorder_mass_matrix

For example, normalizing Torch/Warp input representation once in the Python wrapper may let the generic kernels handle more dtypes without a separate public overload name for every call shape. Where index and mask launch shapes prevent useful unification, keeping two concrete variants is still clearer than adding abstraction for its own sake.

Since this foundation PR has no backend call sites yet, another option is to introduce each semantic/fused kernel with its first consumer while keeping it physically in core when it is shared. That would let us review the axis rules and any fusion/performance justification beside the launch site, and would substantially reduce the review surface here without discarding legitimate optimized kernels.

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.

actually I am not knowledge enough to comment on what is the best practice on Kernel organization, @StafaH can you comment?

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.

One concrete reduction: the direction pairs are the same kernel body — keep one gather per rank and name the map by its contract:

def gather_2d(src, dst_to_src, dst):
    env_id, dst_id = wp.tid()
    dst[env_id, dst_id] = src[env_id, dst_to_src[dst_id]]

reorder_2d_backend_to_user / reorder_2d_user_to_backend (and the 3d pair) become aliases of this; dst_to_src makes the map direction unambiguous by construction.

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 wrapper idea in 0c0dae23c45 — it is strictly better than the overload table: each generic write_* kernel now has a thin Python launch wrapper that adapts torch inputs once (wp.from_torch with explicit dtype, including the vec3/transform trailing-dim folding) and derives the launch dim, so the 8 dtype-suffixed overload names are gone and, since call sites go through wrappers, the generic kernels are now properly module-private (_write_*) — which also resolves the awkward "non-underscored but internal" caveat in the visibility contract. hujc7's gather unification is folded in as well (54f10b3f0d3).

On relocating the fused kernels to their first-consumer PRs: pushing back there. The kernels plus their unit tests are a self-contained reviewable unit here, with the axis conventions documented in one place; splitting them across the backend PRs would fragment those conventions and put core-package churn inside backend diffs that are already inflated by fork-stacking. The backend PRs (Parts 3/4/6) show every launch site if you want to review the fusion justification beside its consumer. Happy to revisit the file organization if @StafaH lands a different convention — at that point it is a mechanical reshuffle.

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 in 54f10b3f0d3 — one gather_2d/gather_3d per rank with the map named dst_to_src (unambiguous by construction, as you say), and the four directional names kept as aliases of the same kernel objects so launch sites keep reading as intent (reorder_2d_backend_to_user) and no call site or test changes. The alias block documents which map to pass for each direction.

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-p2 branch from 53de48e to 4e50b7c Compare July 7, 2026 13:19
@AntoineRichard

Copy link
Copy Markdown
Collaborator Author

Addressed this review round as six commits:

  • cb749f4ae15 — robot-schema name override: read only the schema-defined isaac:nameOverride (greptile)
  • 54f10b3f0d3 — gather_2d/gather_3d unification with directional aliases (@hujc7)
  • 0c0dae23c45 — write-kernel launch wrappers replace the 8 dtype-suffixed overloads; generic kernels are now module-private (@ooctipus)
  • 7b0c9db5c34 + 321e9b3410d — ArticulationNameMap slimmed to a factory-built permutation type (builder returns None for identity, de-exported) and single-homed on ArticulationData; the flag/map mirrors and cache-guard machinery are gone (@ooctipus, @hujc7)
  • 932fe0e18a3 — docstring clarifications on the new map helpers

Net −130 lines. Replies with specifics — including the two partial declines (type stays publicly readable for raw-view interop; fused kernels stay in this PR) and why — are on the threads.

return list(self.backend_body_names)

@property
def backend_joint_names(self) -> list[str]:

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.

Agent-found bug: if a backend overrides neither joint_names nor backend_joint_names, the two fallbacks recurse into each other (previously the abstract property failed at instantiation). Suggest guarding the fallback:

if type(self).joint_names is BaseArticulation.joint_names:
    raise NotImplementedError("override joint_names or backend_joint_names")

Same for the body pair.

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, thanks — fixed in 3da1e81164a with exactly your guard, on both axes, placed ahead of the deprecation warning so a backend overriding neither gets NotImplementedError instead of RecursionError (and a backend overriding only the public property keeps the deprecated-fallback behavior unchanged). The regression test asserts the error from all four entry points (joint_names, body_names, and both backend_* fallbacks) on a subclass that overrides neither.

"""
return self.data.body_ordering

def map_joint_ids_to_backend(self, joint_ids: Sequence[int]) -> Sequence[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.

Agent-found bug: slice(None) passes through under identity ordering but raises TypeError under a real permutation — a config-dependent split on the common "all joints" selector. Suggest handling slice on both paths, plus a 3-cycle test for both methods (currently untested; a swapped-direction implementation would pass the suite).

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.

Fixed in 3da1e81164a. The permutation path now expands slices through tuple slicing (ordering.user_to_backend_indices[joint_ids]), which handles any slice — start/stop/step — not just slice(None); the identity path keeps returning the selector unchanged, so both paths accept the common "all joints" selector. Also added the 3-cycle tests you suggested for both methods (user_to_backend == (1, 2, 0) vs backend_to_user == (2, 0, 1), so a direction-swapped implementation fails), plus slice coverage on both paths.

Introduce the public joint and body ordering machinery in isaaclab
core: the articulation name map type and builder, the ordering preset
helper, the Warp reorder kernels with their visibility contract, the
symbolic convention resolvers, the ArticulationCfg ordering fields,
and the base articulation and data class plumbing that backends wire
into. No backend consumes the machinery yet: configuring an ordering
has no effect until the backend parts of this series land, which is
called out in the configuration field docstrings. Part 2 of the
articulation reordering series.
An ordering that resolved to the backend's native order previously
installed an identity name map, giving the public API two sentinels
for the same no-op state: None and an identity map. Every consumer had
to check both, and missing one was a latent bug that only fired when a
configuration flipped between unset and a native-matching preset.

Normalize at the single install choke point: when the resolved map is
the identity, install None and log the resolution. The invariant
becomes structural — a non-None ordering property, an active ordering
flag, and actual reordering work now all coincide. The name map type
keeps is_identity and the builder stays total, since identity maps
remain legal values for direct construction; only assets normalize
them away.
The name and index validation helpers accepted any iterable, coerced
integral types through operator.index, special-cased strings, bytes,
and bools, and mutated the frozen dataclass fields through
object.__setattr__ to store the coerced results. The module controls
its own inputs, so replace the coercion layer with hard checks: inputs
must be plain lists or tuples, name elements exactly str, index
elements exactly int, and dataclass fields exactly tuples. The bool
special case disappears because an exact int check already excludes
it, and validation no longer reassigns fields. Rename the helpers from
coerce to validate to match what they now do.
Enforce the contract strictly with one canonical type: explicit
orderings, name fields, and index fields must be tuples, not lists.
The validators check and return their input unchanged, the cfg field
annotations drop list, and the internal call sites that source names
from list-valued articulation properties convert at the boundary. A
list explicit ordering is now a pinned rejection case.
Hydra and YAML configuration sources produce lists, so the ingestion
boundary accepts both plain sequence forms and normalizes to a tuple
immediately: explicit orderings in the resolver, the builder name
parameters, and the cfg field annotations take list or tuple. The
interior contract stays strict: a directly constructed name map still
requires exact tuple fields, and exact str and int element checks are
unchanged. Both sequence forms are pinned by an acceptance test and
the frozen-map strictness by a rejection test.
Reduce ArticulationNameMap to its four permutation fields
(user_to_backend_indices, backend_to_user_indices, and the two device
maps), dropping the kind, backend_names, user_names, and is_identity
fields along with the __post_init__ validation and _prevalidated
init-only path. The type is now built only by the module-level
build_articulation_name_map factory, which returns None for identity
orderings (user_names is None or already equals backend order) so a
non-None map always denotes an actual permutation.

Un-export build_articulation_name_map from isaaclab.assets and its
articulation sub-package (it stays importable from the ordering module)
and drop its autosummary and autofunction entries from the assets API
docs. ArticulationNameMap remains exported.
Make ArticulationData the single home for resolved ordering state. The
install site now resolves each axis through the new _resolve_axis_ordering
helper and stores only joint_ordering / body_ordering (plus public names)
on data, so is-not-None checks alone decide whether reordering is active.

Delete the mirror/guard machinery that duplicated this state: the asset
_cache_ordering_maps / _reset_and_cache_ordering_maps guard methods and
the data _install_ordering_flags method with its _has_joint_ordering,
_has_body_ordering, _joint_user_to_backend, and _body_user_to_backend
mirror attributes. Every read path now checks data.joint_ordering /
data.body_ordering directly. Add four _*_map helpers on the asset that
return the active device map or the backend-allocated identity index
buffer for unconditional in-graph launch sites.

Repoint the deprecated joint_names / body_names fallbacks off the removed
map fields onto the public names stored on data.
The joint/body name properties and their deprecated backend_* fallbacks
delegate to each other, so a backend overriding neither recursed
infinitely instead of failing like the former abstract property; the
fallbacks now raise NotImplementedError when the public property is not
overridden.

map_joint_ids_to_backend/map_body_ids_to_backend accepted the common
slice(None) selector only while no ordering was active and raised
TypeError under a real permutation; slices are now expanded through the
permutation on the mapped path and still pass through unchanged under
identity. Adds 3-cycle direction tests for both methods.
The float write family's array form duplicated the generic 2-D write
kernels at float32, and only its scalar form was unique. The wrappers
now dispatch scalars to small concrete broadcast kernels and delegate
array inputs to the 2-D wrappers, removing the generic Any-typed input
machinery and the _resolve_float_input overload pair. Wrapper names and
signatures are unchanged, so call sites are unaffected.
Drop the had/has gate around the post-resolve data hook: backend
overrides reconcile staging from current state, so the install site
always invokes the hook and keeps no change-tracking bookkeeping.

Read public joint/body names from the installed data names instead of
branching on ordering presence; the fallback to backend names now only
covers the pre-install window.

Merge the two thin _get_backend_ordered_joint_* delegates into the one
underlying reorder method, keeping the backend-facing name with an
optional component_count.

Drop the vestigial body_ordering parameter from the Jacobian row-map
builder; data owns the map since the single-homing rework.

Add direction- and axis-pinning tests for the four ordering map helpers
and strengthen the map_*_ids tests with per-axis distinct 3-cycles.
@AntoineRichard
AntoineRichard force-pushed the antoiner/articulation-reordering-p2 branch from 36ed6ae to 2ff929a Compare July 10, 2026 09:35
explicit-name fallback, and a short reason the attempted
resolution strategy did not apply.
"""
kind = _validate_ordering_kind(kind)

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 feel this should be encapsualted into kind.

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 call — agreed. Ill encapsulate the element kind into a small internal type (a frozen _ArticulationElementKind carrying its backend_*_names attribute, robot-schema relationship + name-override attrs, the joint_ordering/body_ordering config-field label, and whether backend-spelling matching applies), resolved once at the public boundary so the Literal["joint","body"] entry contract is unchanged. That collapses the scattered kind == "joint" ternaries and per-kind module dicts into one place. Landing it in this PR so it merges alongside Part 3.

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: Part 2 merged before this landed, so the encapsulation is up as a small standalone PR against develop — #6507. Same shape described above (frozen _ArticulationElementKind, string boundary preserved, no behavior change).

The robot-schema name-override resolver only recognized the lowercase
isaac:nameOverride attribute and treated the capitalized spelling as
foreign. The installed isaacsim.robot.schema defines both attributes:
RobotSchema.usda:109 authors string isaac:nameOverride as the generic
link "Name Override", while RobotSchema.usda:136 declares string
isaac:NameOverride as the "Joint Name Override" (mirrored by the
extension's JOINT_NAME_OVERRIDE = "isaac:NameOverride" next to
NAME_OVERRIDE = "isaac:nameOverride").

Resolve overrides through a per-kind attribute table: joints prefer the
declared isaac:NameOverride and fall back to isaac:nameOverride, bodies
the inverse. The previous test pinned the inverted behavior (asserting
the capitalized spelling is ignored for both kinds); replace it with
canonical- and fallback-spelling resolution tests.
Factor the robot-schema fixture authoring into shared helpers
(_author_robot_schema_stage, _install_robot_schema_source_asset,
_make_robot_schema_articulation) backing five distinct named schema
tests. Collapse the invalid-kind and unsupported-type rejection
matrices to one case per distinct validation site, and drop the
explicit-sequence resolution test already covered by the
list-and-tuple parametrization.

Relocate the four map_body_ids_to_backend/map_joint_ids_to_backend
application tests from the events suite (which lands in the events
part) so they live beside the name-map construction tests they
exercise.
@AntoineRichard
AntoineRichard merged commit 2b794ec into isaac-sim:develop Jul 14, 2026
38 checks passed
AntoineRichard added a commit that referenced this pull request Jul 15, 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 #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 (this PR)**: #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-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
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

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.

3 participants