Skip to content

[Backport release/3.0.0] Newton differential IK, joint impedance, and OSC (#7854) - #8013

Merged
StafaH merged 1 commit into
isaac-sim:release/3.0.0from
ooctipus:backport/newton-controllers-7854-release-3.0
Sep 24, 2026
Merged

StafaH merged 1 commit into
isaac-sim:release/3.0.0from
ooctipus:backport/newton-controllers-7854-release-3.0

Conversation

@ooctipus

Copy link
Copy Markdown
Collaborator

Description

Backports #7854 to release/3.0.0 from merged commit 481a676a993b4054f46556ebd2c14a155b87602f. The cherry-pick applied cleanly; every changed or deleted file matches the merged source commit exactly.

Adds Newton differential IK, joint impedance, and operational-space controllers and their task-space actions. Moves the Newton IK package to isaaclab_newton.controllers.ik and updates its callers and API documentation. Includes the original Lab controller fixes, consolidated tests, and changelog fragments. Newton remains pinned to 1.6.0.

Validation

  • 170 focused tests passed against Newton 1.6.0: Newton controller wrappers and IK solver, Lab joint impedance, differential IK and OSC numerical regressions (including available CUDA cases), SO101 IK, and Reach presets.
  • isaaclab -f: all formatting, lint, changelog, and other pre-commit checks passed.
  • Audited the moved/deleted paths and checked for stale isaaclab_newton.ik imports.
  • Full robot simulation tests and a documentation build were not run locally for this backport. Existing TorchScript deprecation warnings remain. The initial combined test harness crashed after importing Newton before Kit; isolated core runs with Kit loaded first passed.

Backport the merged differential IK, joint impedance, and operational-space
controller change without release-specific modifications.

(cherry picked from commit 481a676)

Co-authored-by: Mustafa H <[email protected]>
Co-authored-by: Mustafa Haiderbhai <[email protected]>
Signed-off-by: Octi Zhang <[email protected]>
@ooctipus
ooctipus requested a review from a team September 24, 2026 21:44
@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team infrastructure labels Sep 24, 2026
@ooctipus

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 24, 2026
@greptile-apps

greptile-apps Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 2/5

The PR is not ready to merge until the new task-space actions handle offsets, degenerate orientation targets, and wrench frames consistently.

Findings

  1. P1 Offset uses wrong frame ▶
  2. P1 Zero quaternion remains invalid ▶
  3. P1 Wrench frame is inconsistent ▶
  4. P2 Action integration lacks tests ▶

Summary

The PR adds Newton model-free controller wrappers and task-space actions, moves Newton IK under controllers.ik, and includes Lab controller fixes and expanded tests. The new action path needs correction for offset-frame Jacobians, degenerate OSC orientation commands, and wrench-frame handling.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Policy action] --> B[Newton task-space action]
  C[Articulation pose, Jacobian, dynamics] --> B
  B --> D[Newton IK or OSC controller]
  D --> E[Joint position or effort target]
Loading

Reviews (1) · Last reviewed commit: "Backport Newton controllers to release/3..."

Comment on lines +110 to +113
self._jacobian_b[:, :3] += torch.bmm(
-math_utils.skew_symmetric_matrix(self._offset_pos), self._jacobian_b[:, 3:]
)
self._jacobian_b[:, 3:] = torch.bmm(math_utils.matrix_from_quat(self._offset_rot), self._jacobian_b[:, 3:])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Offset uses wrong frame When the body is rotated relative to the robot root and body_offset.pos is nonzero, the Jacobian rows have already been rotated into the root frame, but this offset is still in the body frame. The linear Jacobian is therefore wrong, so either new task-space action can compute incorrect joint targets or efforts. Rotate the offset into the root frame before applying it.

)
else:
self._ee_pose_des[:, :3] = command[:, :3]
self._ee_pose_des[:, 3:] = math_utils.normalize(command[:, 3:])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Zero quaternion remains invalid For an absolute-pose OSC action, an initial or policy command can contain an all-zero quaternion. normalize leaves it at zero, and the action sends that invalid orientation to the controller, which can produce incorrect efforts. Fall back to a valid orientation, as the differential-IK action in this file does.

cfg = self._controller.cfg
data = self._asset.data
ee_pose = self._compute_ee_pose()
ee_wrench_des = self._processed_actions[:, self._slices["wrench"]] if self._use_wrench else None

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Wrench frame is inconsistent When wrench control uses a non-identity operational frame, the action passes the wrench command directly to the controller's desired_wrench_world input. Unlike the pose target, it is not converted from the action's operational frame. A commanded force can therefore act along the wrong axis. Convert the wrench into the controller input frame, or make the action's wrench-frame contract explicit and consistent.

self._asset.set_joint_position_target_index(target=joint_pos_des, joint_ids=self._joint_ids)


class NewtonOperationalSpaceControllerAction(_NewtonTaskSpaceAction):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Action integration lacks tests The added tests check the controllers directly, but not these new actions driving an articulation. Add action-level coverage for body offsets, non-identity operational frames, wrench feedback, and initialization; otherwise regressions in the frame and sensor integration can go unnoticed.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isaac Lab Review Bot

The backport adds Newton differential IK, joint impedance, and operational-space controllers with manager action integrations, but it introduces an inconsistent body-offset Jacobian, removes the documented isaaclab_newton.ik API without deprecation, risks overwriting the hand-written controllers API page during autosummary generation, and exposes an ineffective absolute-pose orientation scale.

  • Design and architecture: The Newton controller package and shared task-space action base are coherent overall, but _NewtonTaskSpaceAction does not express the body offset consistently: pose and velocity paths rotate the offset into the root frame, while the Jacobian shift uses the body-frame vector directly. This produces incorrect offset-point kinematics when the body and root orientations differ.
  • API: The documented public isaaclab_newton.ik package is removed without the deprecation and compatibility period required by repository policy. A temporary re-exporting shim is needed. In addition, orientation_scale is documented as scaling orientation targets but is cancelled by quaternion normalization for the default absolute-pose mode; its supported scope should be corrected or explicitly documented.
  • Implementation: The Lab controller fixes and batched OSC frame rotations are internally consistent, but documentation integration and offset kinematics need correction. Listing the hand-written controllers page under autosummary can cause Sphinx to regenerate that path and discard its custom IK section; it should be integrated through the hidden toctree like the other hand-authored Newton API pages.

Significant concerns. Posted 4 actionable findings inline.

Automated review; human maintainers own approval decisions.

Comment thread docs/source/api/index.rst

assets
cloner
controllers

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Warning · Implementation — Hand-written page listed under autosummary

controllers is added to the autosummary block with :toctree: lab_newton, so Sphinx generates lab_newton/isaaclab_newton.controllers.rst and (with autosummary_generate_overwrite defaulting to true) replaces the hand-written page added here, losing its ik section that replaced the deleted isaaclab_newton.ik page. Other hand-written lab_newton pages (isaaclab_newton.envs.mdp, formerly isaaclab_newton.ik) are listed in the hidden toctree instead; do the same.

Removed
^^^^^^^

* **Breaking:** Moved :mod:`isaaclab_newton.ik` to :mod:`isaaclab_newton.controllers.ik` without an alias. Replace

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Warning · Api — Public ik module removed without deprecation

isaaclab_newton.ik was documented as public (the deleted isaaclab_newton.ik.rst said so) and this fragment states it was moved "without an alias", so external from isaaclab_newton.ik import NewtonIKSolver breaks immediately on a release branch. Repository rules require a prior deprecation plus migration path. Keep a thin isaaclab_newton/ik package re-exporting controllers.ik with a deprecation warning for one release.

self._jacobian_b[:, 3:] = torch.bmm(root_rot, jacobian_w[:, 3:])
if self._offset_pos is not None:
# v_ee = v_link + w_link x r_link_ee, then rotate into the target frame
self._jacobian_b[:, :3] += torch.bmm(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Warning · Implementation — Offset Jacobian uses body-frame offset

_jacobian_b is already rotated into the root frame, but the offset shift applies self._offset_pos in the body frame. _compute_ee_velocity (line 356) rotates the same offset via quat_apply(body_quat_b, self._offset_pos) before its cross product, and _compute_ee_pose applies it through the body rotation, so the Jacobian disagrees with both whenever the body orientation differs from the root. Rotate the offset into root coordinates here.

self._processed_actions = torch.zeros_like(self._raw_actions)
self._scale = torch.ones(self.num_envs, dim, device=self.device)
self._scale[:, :3] = self.cfg.position_scale
self._scale[:, 3:pose_dim] = self.cfg.orientation_scale

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Suggestion · Api — orientation_scale inert for pose_abs targets

With the default target_type="pose_abs", pose_dim is 7, so this scales all four quaternion components uniformly; process_actions then calls math_utils.normalize(command[:, 3:]), cancelling any scale. The cfg documents orientation_scale as scaling orientation targets, yet it is silently a no-op in the default mode. Either apply it only for pose_rel or document the restriction on the field.

@StafaH
StafaH merged commit 69799a6 into isaac-sim:release/3.0.0 Sep 24, 2026
55 checks passed
@ooctipus ooctipus self-assigned this Sep 25, 2026
@ooctipus ooctipus added this to the Isaac Lab 3.0 GA milestone Sep 25, 2026
@ooctipus
ooctipus deleted the backport/newton-controllers-7854-release-3.0 branch October 14, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation infrastructure isaac-lab Related to Isaac Lab team

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants