Skip to content

Include joint armature in PhysX and OvPhysX mass matrices - #8424

Merged
AntoineRichard merged 7 commits into
isaac-sim:mainfrom
NeoZng:fix/newton-mass-matrix-armature
Nov 17, 2026
Merged

AntoineRichard merged 7 commits into
isaac-sim:mainfrom
NeoZng:fix/newton-mass-matrix-armature

Conversation

@NeoZng

@NeoZng NeoZng commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

PhysX and OvPhysX simulate joint armature but omit it from their native mass-matrix queries. Include it once in each backend's cached articulation mass matrix, using public joint order and leaving floating-base rows untouched. PhysX copies the native result into its own output buffer before adding armature.

The change is limited to isaaclab_physx and isaaclab_ov. Existing controllers and tasks consume the corrected matrix. Newton already includes armature upstream and needs no additional correction.

Related: #8423 and PhysX #575.

Type of change

  • Bug fix

Validation

  • Both new backend regressions failed before the fix and passed afterward. They cover reordered joints, floating-base offsets, repeated cached/refreshed reads, and preservation of PhysX's native query storage.
  • Focused OvPhysX dynamics checks: 5 passed.
  • Focused PhysX checks: 1 passed, 1 existing xfail (GPU mass/inertia writes take effect on the next step).
  • Repository formatting/lint hooks, changelog gate, and git diff --check passed. Independent review found no actionable issues.

GPU validation used a reused uv environment with this worktree's source imports verified: Isaac Sim 6.2.0, OvPhysX 0.7.0.74035321, Warp 1.17.0, Torch 2.11.0+cu130, RTX 5090. Existing dependency/native warnings were observed. A separate native SDK check also confirmed that OvPhysX 0.7 still omits armature before this correction.

Checklist

  • I have read and understood the contribution guidelines.
  • I have run the repository formatting and lint checks.
  • I have validated the changed behavior with focused coverage and applied the test-audit criteria.
  • I have added a changelog fragment for each touched package.
  • My name already exists in CONTRIBUTORS.md.
  • My changes generate no new warnings (existing dependency/native warnings were observed).

@NeoZng
NeoZng requested a review from a team October 9, 2026 10:03
@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Oct 9, 2026
@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issue was found.

Summary

Adds joint armature to the joint diagonal of Newton's mass_matrix when the active solver supports it.

  • Enables the flag for MuJoCo Warp, Featherstone, Kamino, and the coupled MuJoCo Warp/VBD manager.
  • Leaves floating-base rows unchanged and reads current armature values on each call.
  • Adds a regression test for reordered joints and a write to one environment.
  • NeoZng explicitly leaves the mixed solver coupler unchanged because its entries can use different solvers.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A["Read mass_matrix"] --> B["Compute rigid-body matrix"]
  B --> C["Gather rows in public joint order"]
  C --> D{"Solver supports joint armature?"}
  D -->|Yes| E["Add armature to joint diagonal"]
  D -->|No| F["Return matrix"]
  E --> F
Loading

Reviews (1) · Last reviewed commit: "Include the joint armature in the Newton..." · Reviewed by Greptile

@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

Needs attention: Style consistency (1). Other reviewed categories look good.

  • PR description: The scope matches the diff; substantiate or remove the latency claim with revisions, command, hardware, backend, environment count, warmup, and baseline/candidate metrics.
  • Design and architecture: Architecture looks good.
  • Scope and over-engineering: No over-engineering issues.
  • API: API changes look good.
  • Compatibility and deprecation: No breaking changes identified.
  • Implementation: Implementation looks good.
  • Style consistency: The armature docstring uses nonstandard mixed-joint unit wording, creating terminology inconsistency; change it to “[kg·m² or kg, depending on joint type]”.
  • Test quality: Test quality looks good.

Minor fixes needed. Posted 1 inline finding.

Automated review; human maintainers own approval decisions.

"""Add the joint armature to the joint diagonal of a view-sized mass matrix.

Args:
joint_armature: Joint armature [kg·m² or kg, per DoF type] in public joint order. Shape is

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 · Style Consistency — Mixed joint unit phrasing deviates from guide

The contribution guide prescribes [... depending on joint type] for mixed joint quantities. [kg·m² or kg, per DoF type] introduces new vocabulary; use [kg·m² or kg, depending on joint type].

@AntoineRichard

Copy link
Copy Markdown
Collaborator

Thanks a lot for the PR @NeoZng! I'm checking with the newton team if this should not be addressed on their side.

@ooctipus
ooctipus force-pushed the fix/newton-mass-matrix-armature branch from bcc126d to f9faae3 Compare October 10, 2026 07:53
@ooctipus ooctipus changed the title Include the joint armature in the Newton mass matrix Account for joint armature in inertia-based controllers Oct 10, 2026
@ooctipus

ooctipus commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

why couldn't be this implemented at usecase side where user compose joint armature component into diagonal of mass matrix, user will have flexibility to inlcude joint amature factor or not. Check the last commit I pushed if that works, we can revert otherwise

@AntoineRichard

Copy link
Copy Markdown
Collaborator

Yeah I'm not sure this is the right fix, why not have the solver fix it? They do use the armature in the solve. I'm not familiar enough with the controllers that might leverage that, but is there a reason not to include the armature in there? @ooctipus

@hujc7

hujc7 commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

From the newton issue discussion newton-physics/newton#4621, it looks like newton team is implementing this fix. Holding the PR until the issue got an upate.

@maxkra15 maxkra15 self-assigned this Oct 28, 2026
@maxkra15
maxkra15 self-requested a review October 28, 2026 12:43
@AntoineRichard AntoineRichard changed the title Account for joint armature in inertia-based controllers Include joint armature in PhysX and OvPhysX mass matrices Oct 30, 2026
@hujc7

hujc7 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

run-ci

hujc7
hujc7 approved these changes Nov 3, 2026 •
@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 Nov 3, 2026
The PhysX backend now adds the joint armature to the mass-matrix
diagonal, and each mock view draws its armature at random, so the
identity and the ordered articulation of
test_ordering_reorders_public_dynamics_quantities had different
diagonals. Write the same per-joint armature to both before the ordering
is installed; the ordered mass matrix then also checks that the armature
lands on the public joint order.

Signed-off-by: Zeng Qingcheng <60593302+NeoZng@users.noreply.github.com>
@maxkra15

maxkra15 commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

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 Nov 6, 2026
@AntoineRichard

Copy link
Copy Markdown
Collaborator

eun-ci

@AntoineRichard

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 Nov 11, 2026

@maxkra15 maxkra15 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.

Mass-matrix/armature handling looks correct. Current-head Docker and ARM checks are green.

State in BaseArticulationData.mass_matrix that joint armature is on the
joint diagonal, flag the PhysX and OvPhysX workaround for removal once
PhysX#575 is fixed upstream, and drop a redundant cached-read assertion.
@AntoineRichard

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 Nov 16, 2026
@AntoineRichard
AntoineRichard merged commit 5b3f070 into isaac-sim:main Nov 17, 2026
91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working 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.

6 participants