Repository navigation
Conversation
…oller Evaluate the task-space impedance, contact-wrench and null-space laws through newton.controllers.ControllerOperationalSpaceModelFree instead of the in-tree Torch implementation, keeping target resolution, the task frame and the gain schedule in Isaac Lab so the public configuration, command and output contracts are unchanged. This mirrors the JointImpedanceController port. The task frame is handed to Newton as the operational frame, so gains, selection axes and targets stay expressed in it rather than being rotated into the root frame first. That removes the root-frame gain, selection-matrix and operational-space mass-matrix buffers, and lets the per-axis gains be stored as vectors instead of diagonal matrices. Measured 2.6-2.8x faster per step than the previous Torch law (0.32 ms vs 0.88 ms at 4096 envs, 7 DoF, on one RTX PRO 6000).
…operational-space-controller
Follow the JointImpedanceController port's rule: a buffer this controller owns and updates in place binds to its Newton input port once, and only a value composed from several sources is written through a port view. The motion gains, the task frame, the desired pose and wrench, the tool state and the null-space target now bind directly, leaving the measured contact wrench as the single per-step write. Warp wrappers around caller tensors are cached per port and rebuilt only when the caller hands over a different tensor, so a caller refilling a persistent buffer pays no wrapper construction. Non-contiguous tensors are never cached, since the wrapper would alias the throwaway copy rather than the caller's storage. Per-step tensor copies drop from ten to two, and the step cost from 0.32 ms to 0.25 ms at 4096 envs (3.5x the previous Torch law, up from 2.8x).
Cache the damping ratio at construction instead of rebuilding it from the config tuple on every set_command, write the resolved targets into persistent buffers rather than allocating a fresh tensor per command, and refresh the measured wrench's moment half per command instead of per step. The public target attributes still read None until commanded, then name their buffer, so the sentinel is unchanged and the Warp binding cache keys stay stable. Zeroing the measured wrench on the uncommanded path must not be skipped: with closed-loop force control a stale moment left behind by a reset is read as Kp * (0 - stale) and drives torque from a command that no longer exists. The reset test now steps once while commanded before resetting, so it exercises that state; without the fix it fails by 3.21.
…operational-space-controller
4 of 7 tasks
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 <[email protected]> Co-authored-by: Mustafa Haiderbhai <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.
Superseded by #7854, which consolidates the three supported controllers on the released Newton API. Ackermann remains a separate draft in #6654.
Summary
OperationalSpaceControllernow evaluates its control laws through Newton instead of an in-treeTorch implementation: 2.6-2.8x faster per step (0.32 ms vs 0.88 ms at 4096 envs) with the
public configuration, command and output contracts unchanged.
Important
Blocked — do not merge or run CI yet. This depends on
newton-physics/newton#4105 (unmerged), plus
three further Newton changes described in §3 that are not yet proposed upstream. Against
develop's pinnednewton[sim]==1.5.1,compute()raisesImportError: cannot import name 'ControllerOperationalSpaceModelFree'. Opened to review theIsaac Lab side of the change only.
Description
Fixes # (issue)
The task-space impedance law, the contact-wrench law and null-space control move to
newton.controllers.ControllerOperationalSpaceModelFree. Target resolution, the task frame and thegain schedule stay in Isaac Lab, mirroring the
JointImpedanceControllerport.1. Frame handling
The task frame is handed to Newton as the operational frame, so gains, selection axes and targets
stay expressed in it instead of being rotated into the root frame first. That retires the
root-frame gain buffers, both selection matrices, the operational-space mass matrix and the cached
joint-space mass-matrix inverse, and lets the per-axis gains be stored as
(num_envs, 6)vectorsrather than diagonal matrices.
_motion_p_gains_task/_motion_d_gains_taskchange shapeaccordingly; the one in-tree consumer (
ExportPatcher) is updated.2. Behavior
No intended behavior change. Verified two ways:
test_operational_space_newton_integration.pyreimplements the previous Torchlaw and compares against it across 14 configurations (absolute/relative pose, open- and
closed-loop wrench, all three decoupling modes, null-space centering, both variable impedance
modes, with and without a task frame). 14/14 on
cpuand oncuda:0.test_operational_space.pyis 18/18, matching the pre-change baselinemeasured in the same container.
3. Required Newton changes
Prototyped locally and measured; not yet proposed upstream. Without them the sim suite is 12/18.
_invert_spd_block_kernel_FLOAT32_EPS * max(|diag|, 1)then divides by that floor, so a near-singularJ M⁻¹ Jᵀinverts to order1/eps. Atcond = 2.4e8the torque error is 349%, which failed 5 tests. Damping only on a second pass, and only when the first hits a degenerate pivot, keeps well-conditioned blocks bit-identical.>=6controlled-DOF guard on that ridgemask_motion_after_inertiaflag4. Known contract narrowing
compute()returns a view of Newton's output port rather than a freshly allocated tensor. Bothin-tree callers copy or consume it immediately; external code holding the reference across steps
would now see it mutate.
float32; the previous Torch law acceptedfloat64.compute()call, sincenum_DoFcomes from the Jacobian, soconfiguration errors surface at the first step rather than at construction.
Type of change
Release backport
developChecklist
pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.mdor my name already exists there