Skip to content

Integrate Newton's joint-impedance controller behind JointImpedanceController - #6693

Closed
hujc7 wants to merge 4 commits into
isaac-sim:developfrom
hujc7:jichuanh/newton-joint-impedance-controller
Closed

hujc7 wants to merge 4 commits into
isaac-sim:developfrom
hujc7:jichuanh/newton-joint-impedance-controller

Conversation

@hujc7

@hujc7 hujc7 commented Jul 23, 2026 •

Copy link
Copy Markdown
Collaborator

Superseded by #7854, which consolidates the three supported controllers on the released Newton API. Ackermann remains a separate draft in #6654.

Description

Delegates JointImpedanceController's control law to Newton's in-core model-free
joint-impedance controller while preserving the public interface.

  • JointImpedanceController now evaluates its impedance law — the PD term plus
    optional inertial decoupling and gravity compensation — through
    newton.controllers.ControllerJointImpedanceModelFree, using stable Torch/Warp
    bridge buffers and float32 solves. The public configuration, command
    (set_command), and output (compute) contracts are unchanged.
  • Command shaping (p_abs/p_rel targets and position offset), joint-limit
    clamping of the target, and the gain schedule (Kd = 2·sqrt(Kp)·zeta plus the
    variable-impedance gain resolution) stay in Isaac Lab, since these are Isaac Lab
    configuration and action-space semantics.
  • Fixes a pre-existing latent bug in set_command: the variable and
    variable_kp gain clamps indexed the robot dimension instead of the limit
    dimension and raised for any joint count other than two.

Dependencies: requires the in-core newton.controllers module introduced by
newton-physics/newton#3598. The Newton import is deferred to controller
construction, so importing the module never requires Newton; only instantiating
the controller does. This PR should remain a draft until #3598 merges and the
Newton pin advances.

Validation: a new parity test evaluates the Newton-backed controller against
the previous Torch impedance law across all three impedance modes, both command
types, and the inertial/gravity compensation flags (24 cases), matching within
1e-4. The test skips when newton.controllers is unavailable. pre-commit passes.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (backend change; no change to the public API)

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
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a changelog fragment under source/<pkg>/changelog.d/
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

hujc7 added 2 commits July 22, 2026 16:56
Delegate the joint-space impedance law (proportional-derivative with
optional inertial and gravity compensation) to Newton's model-free
joint-impedance controller
(newton.controllers.ControllerJointImpedanceModelFree). Command shaping
and the gain schedule stay in Isaac Lab, so the public configuration,
command, and output contracts are unchanged; solves run through float32
Warp bridge buffers. The Newton import is deferred to controller
construction so importing the module never requires Newton.

Also fix per-DOF gain-limit broadcasting in the variable impedance
modes, which previously indexed the robot dimension and raised for any
DOF count other than two.
Add an integration parity test covering the fixed, variable_kp, and
variable impedance modes across both command types and the inertial and
gravity compensation flags, comparing the Newton-backed controller
against the previous Torch impedance law. The test skips when
newton.controllers is unavailable. Add the accompanying changelog
fragment for the backend swap and the gain-limit fix.
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Jul 23, 2026
@hujc7 hujc7 closed this Sep 16, 2026
ooctipus pushed a commit that referenced this pull request Sep 24, 2026
…llers (#7854)

# Description

Added Newton 1.6 model-free differential IK, joint impedance, and OSC
through `cfg.use_newton=True`; the original Lab controllers remain the
default. Consolidates #6693, #7482, and the differential-IK portion of
#6654. Ackermann remains in its separate draft.

Both paths share constructor, command, and compute signatures and return
independent results. Controller selection is independent of the physics
backend. Newton initializes from compute inputs, or from supplied DiffIK
limits when avoidance is enabled. Existing callers and tutorials retain
their setup; SO101 retains its wrist-orientation mask through a
Newton-only Jacobian adaptation.

Newton uses float32 computation. Its OSC selects motion before inertia
decoupling, requires at least six joints for decoupling, and retains
motion-force coupling that fails three hybrid force-tracking cases.
Those Newton cases run as strict expected failures; Lab cases remain
active, and thresholds are unchanged. Convergence checks now apply masks
in the actual control frame.

Newton DiffIK requires joint limits before the first compute when
avoidance is enabled; later limit updates retain its buffers. Its `pinv`
also rejects fewer controlled joints than active task axes. These
differences prevent blanket replacement of the Lab path. Joint impedance
retains the same control law, subject to Newton's precision boundary.
Includes the position-only SVD and joint-impedance
gain-clamping/batched-inertia fixes.

## Type of change
- New feature, bug fix, documentation update

## Release backport
- [ ] <!-- backport-active-release --> Backport to the active release
branch

## Validation
- Post-merge CPU controller suite: **204 passed, 3 CUDA capture tests
skipped**. Formatting and changelog checks passed.
- Focused GPU hybrid simulation with current controller/test overlays,
16 environments: **3 Lab passed, 3 Newton xfailed**. This was not a
full-repository run of the final head.
- Warning-free current documentation build passed.
- Matched full-policy Lab/Newton videos were recorded for
Reach-Franka-OSC on PhysX/MJWarp and Drawer DiffIK on MJWarp. SO101
keyboard rollout and training equivalence remain unverified.
- Fresh Docker/GPU CI requested for the updated head; results pending.

## Checklist
- [x] Contribution guidelines followed; contributor already listed
- [x] Pre-commit checks run with `uv run isaaclab -f`
- [x] Documentation and package changelog fragments updated
- [x] Both-backend and regression tests added
- [ ] Newton hybrid force-tracking limitations resolved
- [ ] Changes generate no new warnings

---------

Co-authored-by: Mustafa H <34825877+StafaH@users.noreply.github.com>
Co-authored-by: Mustafa Haiderbhai <mhaiderbhai@nvidia.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant