feat(schemas): joint-drive schema-fragment API (additive)#8
Draft
vidurv-nvidia wants to merge 5 commits into
Draft
feat(schemas): joint-drive schema-fragment API (additive)#8vidurv-nvidia wants to merge 5 commits into
vidurv-nvidia wants to merge 5 commits into
Conversation
Add the additive joint-drive schema-fragment framework, mirroring the rigid-body pilot. This is the override-func family: UsdPhysicsDriveCfg overrides func with apply_drive instead of the generic applier. Core: - JointDriveFragment marker and UsdPhysicsDriveCfg (typed multi-instance UsdPhysics.DriveAPI; max_effort -> max_force alias). - apply_drive: per-joint writer reproducing modify_joint_drive_properties (angular/linear instance pick, tendon-child guard, rad->deg conversion for angular stiffness/damping, drive_type -> type carve-out). - apply_joint_drive_properties: recursive family writer; DriveAPI is presence-gated (applied only when a UsdPhysicsDriveCfg is present). ensure_drives_exist is a writer kwarg, not a fragment field. Backends: - PhysxJointCfg (physxJoint:* / PhysxJointAPI, max_joint_velocity with max_velocity alias). - MujocoJointCfg (mjc:* / MjcJointAPI, actuatorgravcomp). Spawner: - Widen joint_drive_props slot to accept a fragment list; add the spawner-level ensure_drives_exist flag. Bridge the from-files spawn site while keeping the gravcomp auto-enable logic working for fragments. Add exports, test_joint_drive_fragments.py, and changelog fragments.
…t rad->deg conversion
The tendon-child guard (PhysxTendonAxisAPI without PhysxTendonAxisRootAPI) lived only inside apply_drive. The dispatch loop in apply_joint_drive_properties runs every fragment's func per joint prim, so PhysxJointCfg / MujocoJointCfg authored physxJoint:* / mjc:* attributes on tendon-child joints that the legacy modify_joint_drive_properties skipped wholesale (it returns False, so @apply_nested writes nothing and descends). Hoist the guard into the dispatch loop so a tendon-child joint is skipped for all fragments (and its children are descended into, matching the legacy writer). apply_drive keeps its own guard defensively. Add a regression test (verified to fail before the fix).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Additive joint-drive fragment family (custom func)
UsdPhysicsDriveCfgoverridingfunc→apply_drive(multi-instanceDriveAPI, rad→deg for angular,drive_type→type, tendon-child guard)PhysxJointCfg(physxJoint:maxJointVelocity); newton:MujocoJointCfg(mjc:actuatorgravcomp)apply_joint_drive_properties(...):DriveAPIpresence-gated;ensure_drives_existis a spawner-level flag.max_joint_velocityrad→deg conversion is NOT reproduced (it now lives onPhysxJointCfgwritten by the generic applier, which has no joint-type awareness). For angular-joint parity,PhysxJointCfgneeds its own override func. Status: authored, ruff clean, sim verification pending.Fixes # (N/A — part of the staged physics schema-fragment refactor; no tracked public issue)
Type of change
Screenshots
N/A — no user-facing visual changes.
Checklist
ruff+ruff-format) on the changed files./isaaclab.sh -d; not separately authored)source/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.md