Skip to content

[Backport release/3.0.0] Fix FORGE and PhysX wrench frames (#7967) - #7996

Merged
ooctipus merged 1 commit into
isaac-sim:release/3.0.0from
ooctipus:backport/wrench-frames-7967-release-3.0
Sep 24, 2026
Merged

ooctipus merged 1 commit into
isaac-sim:release/3.0.0from
ooctipus:backport/wrench-frames-7967-release-3.0

Conversation

@ooctipus

Copy link
Copy Markdown
Collaborator

Description

Backports #7967 (37cfd637f6521dd36865f25918c303f120980acd) to release/3.0.0, following the merged backport batch #7993.

Corrects the rotation and torque lever-arm sign in FORGE's wrench transform. Removes the duplicate PhysX joint-frame conversion because the native wrench already uses the child-side joint frame and anchor. Includes the shared physical regression fixture, backend tests, documentation, and changelog fragments.

The source change applies without conflicts. All added and removed lines match #7967; existing release-specific context in the Newton tests, sensor documentation, and development guidelines is preserved.

Validation

  • Newton joint-wrench sensor suite and FORGE tests: 12 passed.
  • PhysX joint-wrench sensor suite: 16 passed, including the shared analytic frame check, recorded/eager updates, and resets.
  • File-by-file backport audit, uv run --no-sync isaaclab -f, and git diff --check passed.
  • Full Docker/GPU CI requested for this backport.

…7967)

Backport the merged fix to release/3.0.0.

(cherry picked from commit 37cfd63)
@ooctipus
ooctipus requested a review from a team September 24, 2026 04:22
@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Sep 24, 2026
@ooctipus ooctipus added the ci:run-docker Trigger the on-demand Docker and GPU CI workflow label Sep 24, 2026
@greptile-apps

greptile-apps Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the corrected transforms are consistent with the documented contracts and are covered by independent cross-backend physical regression tests.

Summary

This backport corrects joint-wrench frame handling in the PhysX backend and the FORGE wrench utility, while adding shared analytic regression coverage across PhysX and Newton.

  • PhysX now splits the native incoming-joint wrench directly because it is already expressed at the child-side joint anchor and frame.
  • FORGE now rotates wrenches in the correct direction and applies the correct torque lever-arm sign.
  • Shared physical tests validate non-identity joint frames against independently calculated gravity loads.
  • Documentation and changelog fragments describe the corrected frame contracts and resulting value changes.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    P[PhysX native incoming-joint wrench] --> S[Split force and torque]
    S --> C[Child-side joint frame and anchor]
    N[Newton parent reaction wrench] --> T[Backend frame conversion]
    T --> C
    C --> O[Shared JointWrenchSensor contract]
    F[FORGE source-frame wrench] --> A[Correct adjoint frame transform]
    A --> G[Target-frame force and torque]
    X[Known mass, gravity, and lever arm] --> R[Shared analytic regression fixture]
    R --> P
    R --> N
Loading

Reviews (1) · Last reviewed commit: "Fix FORGE wrench transforms and PhysX jo..."

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

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.

Isaac Lab Review Bot

The FORGE wrench transform and removal of PhysX’s duplicate joint-frame conversion are coherent, but two issues need correction: the shared regression fixture uses the wrong quaternion ordering, invalidating its analytic setup, and the updated FORGE API documentation states the wrong quaternion convention.

  • Design and architecture: Keeping PhysX as a thin splitter of the native child-joint-frame wrench and validating both backends through one shared physical fixture is a sound design. However, the fixture’s root orientation is authored with an xyzw-style tuple where Isaac Lab expects wxyz, so it does not currently enforce the intended cross-backend frame contract.
  • API: The JointWrenchSensor frame contract and buffer shapes remain unchanged, and the removed PhysX members are private. In change_FT_frame, the revised docstring incorrectly advertises quat_xyzw even though subtract_frame_transforms, quat_apply, and the test inputs use Isaac Lab’s wxyz convention; the position arguments should also document units and shapes.
  • Implementation: The FORGE adjoint calculation is supported by the independent point-force reference test, and directly splitting the native PhysX wrench is consistent with the documented backend contract. The shared fixture’s (0, 0, 2**-0.5, 2**-0.5) initial rotation is not the intended scalar-first 90-degree Z rotation, so gravity and the expected wrench are expressed along different axes and the fixture cannot validate the stated equilibrium until corrected.

Minor fixes needed. Posted 2 actionable findings inline.

Automated review; human maintainers own approval decisions.

prim_path="{ENV_REGEX_NS}/Robot",
spawn=sim_utils.UsdFileCfg(usd_path=usd_path),
actuators={"joint": ImplicitActuatorCfg(joint_names_expr=[".*"], stiffness=0.0, damping=0.0)},
init_state=ArticulationCfg.InitialStateCfg(pos=(0.0, 0.0, 1.0), rot=(0.0, 0.0, 2.0**-0.5, 2.0**-0.5)),

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.

🟡 Warning · Implementation — Fixture root quaternion contradicts analytic setup

InitialStateCfg.rot is (w, x, y, z), so (0, 0, 2**-0.5, 2**-0.5) is a 180-degree rotation about (0,1,1) — the xyzw spelling of the intended 90-degree Z rotation. It maps the joint frame's Z onto world +Y, so gravity is along joint -Y, the arm is no longer in static equilibrium about the joint axis, and the comment plus expected force/torque on lines 69-74 no longer describe the fixture. Use the scalar-first Z-rotation quaternion.

target_frame: Tuple of (quat_xyzw, pos) for target frame.
source_F: Force in source frame [N]. Shape is (N, 3).
source_T: Torque in source frame, about the source frame's origin [N·m]. Shape is (N, 3).
source_frame: Tuple of (quat_xyzw, pos) for source frame, both expressed in a common frame.

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.

🔵 Suggestion · Api — Docstring says xyzw, code expects wxyz

The rewritten Args block documents (quat_xyzw, pos), but the quaternions are passed to subtract_frame_transforms and quat_apply, which use Isaac Lab's (w, x, y, z) order, and the new test feeds quat_from_matrix output. Since this change re-documents the contract, label the inputs quat_wxyz and give the positions [m] and their shape so callers cannot silently supply a wrong rotation and lever arm.

@ooctipus
ooctipus merged commit 8638c36 into isaac-sim:release/3.0.0 Sep 24, 2026
54 checks passed
@ooctipus ooctipus self-assigned this Sep 25, 2026
@ooctipus ooctipus added this to the Isaac Lab 3.0 GA milestone Sep 25, 2026
@ooctipus
ooctipus deleted the backport/wrench-frames-7967-release-3.0 branch October 14, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run-docker Trigger the on-demand Docker and GPU CI workflow documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants