Skip to content

Fix OVPhysX joint-wrench sensor frame transform - #7997

Merged
ooctipus merged 3 commits into
isaac-sim:developfrom
Lynn-hh:fix/ovphysx-joint-wrench-frame
Sep 24, 2026
Merged

ooctipus merged 3 commits into
isaac-sim:developfrom
Lynn-hh:fix/ovphysx-joint-wrench-frame

Conversation

@Lynn-hh

@Lynn-hh Lynn-hh commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

Follow-up to #7967, which fixed this for PhysX. The OVPhysX joint-wrench sensor had the same extra frame transform.

OVPhysX reports LINK_INCOMING_JOINT_FORCE in the child-side joint frame at the joint anchor, the same convention as PhysX. isaaclab_ov/sensors/joint_wrench/kernels.py treated that reading as "body1's frame at body1's origin" and shifted/rotated it again by the child joint pose (localPos1/localRot1). Readings were therefore wrong whenever that pose was not identity.

This PR mirrors the PhysX correction in #7967 and makes the physical contract explicit across all three backends:

  • The OVPhysX split kernel passes force and torque through; unused USD joint-frame buffers are removed.
  • The shared test_joint_wrench_frame lives in source/isaaclab/test/sensors/joint_wrench_contract.py. Newton, PhysX, and OVPhysX import it directly into their existing sensor suites and provide their existing sim fixtures, following the FrameView contract-test pattern.
  • The runtime test utility, forwarding test functions, and circular OVPhysX frame-transform test are removed. The same physical scene and analytic force/torque expectations remain shared.
  • A small structural test checks that every joint-wrench backend imports the shared tests, rejects backend dependencies in the contract, and prevents restoration of the old utility.
  • OVPhysX uses the existing device_split CI marker so CPU and CUDA cases run in separate processes instead of silently skipping one device.

Measurement (OVPhysX 0.6.3, before this PR)

The setup is a 0.5 kg tool welded to an arm. The tool's COM is 0.15 m past the wrist anchor. I authored the child and parent frames of the weld as below and compared the tool's reading with the analytic wrench.

Child joint frame Sensor force Sensor torque Analytic (joint frame, at anchor) Raw OVPhysX
identity (0, 0, 4.905) (0, -0.736, 0) (0, 0, 4.905) / (0, -0.736, 0) = analytic
90° about z (0, 0, 4.905) (0, +0.736, 0) (0, 0, 4.905) / (-0.736, 0, 0) = analytic
anchor offset (lever 0.25 m) (0, 0, 4.905) (0, -1.717, 0) (0, 0, 4.905) / (0, -1.226, 0) = analytic
90° about z + offset (0, 0, 4.905) (-0.491, 1.226, 0) (0, 0, 4.905) / (-1.226, 0, 0) = analytic
90° about x (0, 0, -4.905) (0, 0.736, 0) (0, 4.905, 0) / (0, 0, 0.736) = analytic

In every case the raw OVPhysX tensor already matches the analytic wrench, and only the extra transform makes the sensor output wrong. With a 90° rotation about x, the reported force even points the wrong way.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
    • Readings change only for joints whose child frame is not identity.
    • The documented incoming_joint_frame convention is unchanged.

Tests

Local validation with OVPhysX 0.6.3, running backends in separate processes (CUDA on an RTX 5090):

  • Newton joint-wrench suite: 14 passed.
  • PhysX joint-wrench suite: 16 passed.
  • OVPhysX CPU pass (-k 'cpu or not cuda'): 12 passed, including the device-independent pre-init test.
  • OVPhysX CUDA pass (-k cuda): 11 passed.
  • Shared-contract structural gate: 1 passed. Removing the OVPhysX contract import makes it fail.
  • Restoring the original OVPhysX sensor and kernel makes the shared physical test fail on both CPU and CUDA with a maximum force-component error of 19.62 N.
  • File-by-file architecture audit and uv run --no-sync isaaclab -f passed.

The physical scenario count is unchanged; the existing per-backend frame tests now collect the same test function. Full PR CI remains pending.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation (kernel docstring)
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a changelog fragment for every touched package
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

cc @ooctipus

OVPhysX, like PhysX, reports the incoming joint wrench in the child-side
joint frame at the joint anchor. The OVPhysX sensor shifted and rotated
it again by the child joint pose, so readings were wrong whenever that
pose was not identity. Pass the reading through, as the PhysX sensor
now does (isaac-sim#7967), and drop the unused USD frame buffers.

Replace the circular frame-conversion check with the shared physical
contract test, and let check_joint_wrench_frame take a device so the
OVPhysX process device lock can select CPU or CUDA.

Signed-off-by: Lynn <[email protected]>
@Lynn-hh
Lynn-hh requested a review from a team September 24, 2026 05:51
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Sep 24, 2026

@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

Reviewed the OVPhysX joint-wrench correction that passes LINK_INCOMING_JOINT_FORCE through without a redundant child-frame transform, removes the associated USD frame buffers, and replaces the circular backend test with the shared analytic frame-contract check. The changed kernel, its launch site, sensor lifecycle, tests, and changelog fragments are consistent.

  • Design and architecture: The change preserves the documented child-side joint-frame-at-anchor convention while removing backend-specific transform state that contradicted the OVPhysX tensor convention. Buffer creation, validation, and invalidation paths were removed together, leaving no partial lifecycle dependency.
  • API: The sensor’s public force and torque shapes, units, and frame convention remain unchanged. Only private sensor buffers and private kernel parameters are removed. The shared test helper adds an optional device parameter with a default, preserving existing call sites while allowing OVPhysX tests to honor its process-wide device lock.
  • Implementation: The removed kernel arguments match the sole updated launch site, and the remaining UsdPhysics import and prim-query utilities are still used by articulation-root resolution. The new regression test uses the shared physical fixture and independently derived gravity-equilibrium expectations rather than reproducing the production transform. A minor residual integration risk is the helper forwarding device=None explicitly for existing callers, but the supplied interface and context show no concrete incompatibility.

No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.

Automated review; human maintainers own approval decisions.

@greptile-apps

greptile-apps Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable regression was established.

Summary

The PR removes an extra OVPhysX joint-wrench transform and tests the sensor against the shared physical joint-frame contract.

  • Force and torque now pass directly from the OVPhysX wrench tensor into sensor buffers.
  • Unused joint-frame buffers are removed.
  • The shared test helper accepts a simulation device so the OVPhysX contract check can run on CPU or CUDA.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[OVPhysX incoming joint wrench] --> B[Split force and torque]
    B --> C[Sensor buffers]
    C --> D[Child-side joint-frame readings]
Loading

Reviews (1) · Last reviewed commit: "Fix OVPhysX joint-wrench sensor frame tr..."

@ooctipus
ooctipus requested a review from hujc7 as a code owner September 24, 2026 13:21
@ooctipus

Copy link
Copy Markdown
Collaborator

thanks @Lynn-hh

@ooctipus ooctipus self-assigned this Sep 24, 2026
@ooctipus ooctipus added the ci:run-docker Trigger the on-demand Docker and GPU CI workflow label Sep 24, 2026
@ooctipus

Copy link
Copy Markdown
Collaborator

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 24, 2026
@ooctipus ooctipus added the ci:run-docker Trigger the on-demand Docker and GPU CI workflow label Sep 24, 2026
@ooctipus
ooctipus merged commit 6fa2c9f into isaac-sim:develop Sep 24, 2026
55 of 84 checks passed
ooctipus added a commit that referenced this pull request Sep 25, 2026
…ts (#8018)

## Description

Completes the missing `develop` backports to `release/3.0.0` from the
48-hour audit window ending September 25, 2026 at 05:55 UTC. Of 30
merged source PRs, 25 were already present on release, three had no
backport, and two had inferred draft backports.

- #7978: report Newton reaction wrenches for fixed connections while
preserving articulation control-joint ownership.
- #7997: correct OVPhysX joint-wrench frames and move the shared
analytic sensor contract into the test tree.
- #7989: correct body-offset Jacobians in task-space actions without
mutating backend buffers.
- #8010 and #8009: backport the OVPhysX and PhysX test audits after
their wrench prerequisite.

All five source patches apply without conflicts in this order. This
supersedes the now-closed inferred draft backports #8016 and #8017,
which were generated without #7997 and adapted their sensor tests around
the old release implementation. Source commit hashes are recorded in the
commit message.

## Validation

- Audited all 778 paths touched by the 30 source PRs. Remaining
differences in those paths are existing release metadata, cloning
documentation, a CLI test version example, and release-only renderer
tests.
- **55 focused checks passed:** 6 Jacobian/shared-contract unit tests,
14 Newton sensor tests, 9 OVPhysX sensor tests across CPU/GPU, 9 PhysX
sensor tests, 14 changed shared-ordering cases, and 3 live PhysX OSC
tracking/gravity cases. Seven PhysX ordering variants skipped in the
direct invocation; the live PhysX checks ran separately with Kit.
- Backend validation used Newton 1.6.0, Warp 1.17.0, OVPhysX 0.6.3, and
the pinned Isaac Sim 6.1.0 installation. Package imports were verified
to resolve to this backport checkout.
- `uv run --no-sync isaaclab -f`, `git diff --check`, and the full `make
-C docs current-docs` build with warnings as errors passed.
- Additional renderer contract coverage: 53 passed; two live-render
cases could not initialize the local native CRenderApi library despite
installing the pinned `ov` extra. Full Docker/GPU CI is running on the
PR head.
- The broader shared ordering file has 14 OVPhysX failures on both this
branch and unchanged release, with identical failing node IDs and no
added failures. The changed cases listed above passed.

## Controller coverage review

The live PhysX OSC tests remain in
`source/isaaclab/test/controllers/test_operational_space.py`; its
fixture uses `SimulationCfg`'s default `PhysxCfg`, and the file is
included in CI. The existing absolute-pose tracking,
gravity-compensation, and nullspace-centering cases passed against Isaac
Sim 6.1.0. The test audit removes the duplicate asset-suite cases while
retaining this controller-suite coverage.

## Existing release CI failures

The latest [release
run](https://github.com/isaac-sim/IsaacLab/actions/runs/36097576980) and
[develop
run](https://github.com/isaac-sim/IsaacLab/actions/runs/36099567240)
fail the same five OvStage image comparisons in
`rendering-correctness-kitless (ovstage)` and `ovrtx-cache-warm`:
Cartpole on Newton and OVPhysX, plus Newton Franka cable, cloth, and
soft. Cartpole is 2.03–2.04% different against a 1.50% threshold on both
branches; cloth is 32.48% on both. These shared rendering failures
predate this catch-up; this PR does not change rendering output or image
thresholds.

## Checklist

- [x] Contribution guidance followed and formatting checks passed
- [x] Original package changelog fragments and documentation included
- [x] File-by-file backport audit completed
- [x] Warning-free documentation build completed
- [ ] Full CI completed

Targets `release/3.0.0`; no further backport is needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci:run-docker Trigger the on-demand Docker and GPU CI workflow isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants