Skip to content

Fix PhysX D6 translational limit lookup - #3569

Merged
adenzler-nvidia merged 1 commit into
newton-physics:mainfrom
adenzler-nvidia:adenzler/fix-physx-d6-limits
Jul 20, 2026
Merged

Fix PhysX D6 translational limit lookup#3569
adenzler-nvidia merged 1 commit into
newton-physics:mainfrom
adenzler-nvidia:adenzler/fix-physx-d6-limits

Conversation

@adenzler-nvidia

@adenzler-nvidia adenzler-nvidia commented Jul 20, 2026

Copy link
Copy Markdown
Member

Description

Fixes SchemaResolverPhysx resolving all three D6 translational axes through the generic PhysxLimitAPI:linear instance. Each transX, transY, and transZ stiffness and damping value now comes from its matching multi-apply API instance.

Checklist

  • New or existing tests cover these changes
  • The documentation is up to date with these changes
  • CHANGELOG.md has been updated (if user-facing change)

Test plan

python -m unittest newton.tests.test_schema_resolver
uvx pre-commit run --files CHANGELOG.md newton/_src/usd/schemas.py newton/tests/test_schema_resolver.py

Bug fix

Steps to reproduce:

  1. Author distinct stiffness or damping values on PhysxLimitAPI:transX, PhysxLimitAPI:transY, and PhysxLimitAPI:transZ.
  2. Resolve limit_transX_ke, limit_transY_ke, or limit_transZ_ke with SchemaResolverPhysx.
  3. Observe every key returning the value from PhysxLimitAPI:linear instead of its corresponding axis.

Minimal reproduction:

from pxr import Sdf, Usd

from newton.usd import PrimType, SchemaResolverPhysx

stage = Usd.Stage.CreateInMemory()
joint = stage.DefinePrim("/joint", "PhysicsJoint")
joint.CreateAttribute("physxLimit:linear:stiffness", Sdf.ValueTypeNames.Float).Set(99.0)
joint.CreateAttribute("physxLimit:transX:stiffness", Sdf.ValueTypeNames.Float).Set(1.0)

value = SchemaResolverPhysx().get_value(joint, PrimType.JOINT, "limit_transX_ke")
assert value == 1.0

Summary by CodeRabbit

  • Bug Fixes
    • Fixed PhysX D6 joint settings so translational stiffness and damping values are correctly read for the X, Y, and Z axes.
  • Tests
    • Added coverage to verify per-axis translational limit values are resolved correctly.

Read stiffness and damping from each translational axis's matching
PhysxLimitAPI instance instead of the unrelated linear instance.
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 21690ee8-17e9-4e9e-a8ee-42d4b5da250b

📥 Commits

Reviewing files that changed from the base of the PR and between e6ea232 and e4238bc.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • newton/_src/usd/schemas.py
  • newton/tests/test_schema_resolver.py

📝 Walkthrough

Walkthrough

SchemaResolverPhysx now resolves D6 translational stiffness and damping from the matching transX, transY, and transZ USD instances. A unit test covers all six mappings, and the changelog records the fix.

Changes

PhysX D6 limit resolution

Layer / File(s) Summary
Per-axis mapping and validation
newton/_src/usd/schemas.py, newton/tests/test_schema_resolver.py, CHANGELOG.md
Joint mappings use axis-specific PhysX stiffness and damping attributes, tests verify all translational axes and gains, and the fix is documented.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: nvtw

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the core fix: PhysX D6 translational limit values are now resolved from the correct per-axis instances.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@adenzler-nvidia
adenzler-nvidia added this pull request to the merge queue Jul 20, 2026
Merged via the queue into newton-physics:main with commit fc573d0 Jul 20, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants