Skip to content

feat(usd): import NewtonJointAPI broadcast limit/damping/velocity attributes - #3

Closed
andrewkaufman wants to merge 1 commit into
mainfrom
import-newton-joint-api
Closed

feat(usd): import NewtonJointAPI broadcast limit/damping/velocity attributes#3
andrewkaufman wants to merge 1 commit into
mainfrom
import-newton-joint-api

Conversation

@andrewkaufman

@andrewkaufman andrewkaufman commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Summary

Import the six NewtonJointAPI schema attributes and broadcast them uniformly across all DOFs of revolute, prismatic, and D6 joints.

Schema Attribute Resolved Key Notes
newton:armature armature Overrides PhysX/MuJoCo if authored
newton:damping damping Newton-only
newton:friction friction Overrides MuJoCo if authored
newton:limitStiffness limit_ke inf = hard limit (1e8), -inf = builder default
newton:limitDamping limit_kd Ignored when limitStiffness = inf; -inf = builder default
newton:velocityLimit velocity_limit inf = builder default; overrides PhysX if authored

Changes

newton/_src/usd/schemas.py

  • Register six NewtonJointAPI attrs in the Newton schema resolver (JOINT prim type)
  • Add _newton_legacy_joint_state_attr() deprecation getter for 10 legacy per-DOF state attrs

newton/_src/utils/import_usd.py

  • Read broadcast limit_ke/limit_kd/velocity_limit from the resolver
  • Add _resolve_newton_limit_ke() and _resolve_newton_limit_kd() helpers for sentinel handling
  • Apply to all three joint-parsing paths (revolute, D6-linear, D6-angular) + MJCF proxy

docs/concepts/usd_parsing.rst

  • Document NewtonJointAPI attribute remapping table

Tests

  • test_import_usd.py: 5 new tests — basic revolute, prismatic, D6 mixed, hard-limit, velocity_limit=inf
  • test_schema_resolver.py: comprehensive cross-resolver ordering tests (all 6 permutations of Newton/PhysX/MuJoCo), deprecation warning tests

Closes

Closes newton-physics#3271

@andrewkaufman
andrewkaufman force-pushed the import-newton-joint-api branch from fd23df8 to 4da6422 Compare June 29, 2026 19:56

@andrewkaufman andrewkaufman left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should also be rst docs changes. See https://github.com/newton-physics/newton/pull/3005/files for an example

Comment thread CHANGELOG.md Outdated
Comment thread newton/_src/usd/schemas.py
Comment thread newton/_src/usd/schemas.py Outdated
Comment thread newton/_src/usd/schemas.py Outdated
Comment thread newton/_src/usd/schemas.py Outdated
Comment thread newton/_src/utils/import_usd.py Outdated
Comment thread newton/_src/utils/import_usd.py Outdated
Comment thread CHANGELOG.md Outdated
Comment thread newton/tests/test_import_usd.py
Comment thread CHANGELOG.md
Comment thread newton/_src/usd/schemas.py
Comment thread newton/_src/utils/import_usd.py Outdated
Comment thread newton/_src/utils/import_usd.py Outdated
Comment thread newton/_src/utils/import_usd.py Outdated
Comment thread newton/_src/utils/import_usd.py Outdated
Comment thread docs/concepts/usd_parsing.rst Outdated
Comment thread newton/tests/test_schema_resolver.py Outdated
Comment thread newton/_src/usd/schemas.py
Comment thread newton/_src/usd/schemas.py
Comment thread newton/_src/usd/schemas.py Outdated
Comment thread newton/_src/usd/schemas.py Outdated
@andrewkaufman

Copy link
Copy Markdown
Owner Author

CI fails with

/home/runner/work/newton/newton/docs/concepts/usd_parsing.rst:166: WARNING: Explicit markup ends without a blank line; unexpected unindent. [docutils]

@andrewkaufman
andrewkaufman force-pushed the import-newton-joint-api branch 3 times, most recently from 307fabd to 0832f6a Compare June 29, 2026 23:46
Add importer support for the NewtonJointAPI schema, resolving its six
per-joint attributes (armature, damping, friction, limitStiffness,
limitDamping, velocityLimit) and broadcasting them uniformly across all
DOFs of revolute, prismatic, and D6 joints.

Sentinel semantics:
- limitStiffness = inf  → hard limit (limit_ke = 1e8)
- limitStiffness = -inf → use builder default
- limitDamping   = -inf → use builder default
- limitDamping ignored when limitStiffness = inf
- velocityLimit  = inf  → use builder default

Schema resolver additions:
- Six new Newton JOINT keys with priority over PhysX/MuJoCo equivalents
  for armature, velocity_limit, and friction
- Deprecation warnings for 10 legacy newton:* per-DOF state attrs

Closes newton-physics#3271
@andrewkaufman
andrewkaufman force-pushed the import-newton-joint-api branch from 0832f6a to e5a2c60 Compare June 29, 2026 23:52
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.

Add Newton Importer Support for USD NewtonJointAPI

1 participant