Skip to content

Add Newton inverse kinematics action#5756

Merged
ooctipus merged 4 commits into
isaac-sim:developfrom
maxkra15:max/newton-ik-manager
Jun 12, 2026
Merged

Add Newton inverse kinematics action#5756
ooctipus merged 4 commits into
isaac-sim:developfrom
maxkra15:max/newton-ik-manager

Conversation

@maxkra15

Copy link
Copy Markdown
Contributor

Description

Add Newton-backed inverse kinematics support to Isaac Lab.

This PR introduces a NewtonIKManager wrapper around Newton's objective-list IK solver API. The manager builds Newton pose objectives, optional joint-limit regularization, sampler settings, and custom objective passthrough into a batched Isaac Lab interface. Targets are updated from Torch tensors and converted to Warp arrays before calling Newton's IKSolver.

The PR also adds a manager-based NewtonInverseKinematicsAction that plugs this solver into Isaac Lab MDP action terms. Because Newton IK needs a single-articulation model while Isaac Lab runs replicated scenes, the Newton cloner now registers prototype builders during replication. NewtonManager.get_prototype_model() lazily finalizes the matching prototype on the active device, and the action resolves Isaac Lab joint/body names into Newton prototype joint-coordinate and link indices before solving.

Finally, this adds a Franka reach task variant using the new Newton IK action:

  • Isaac-Reach-Franka-Newton-IK-Rel-v0
  • Isaac-Reach-Franka-Newton-IK-Rel-Play-v0

The implementation includes tests for prototype-model lookup and cached prototype finalization behavior.

Fixes # (no issue filed)

Type of change

  • New feature (non-breaking change which adds functionality)

Screenshots

Not applicable.

Test plan

  • Added source/isaaclab_newton/test/physics/test_newton_prototype_models.py.
  • Manually launched the Franka Newton IK task and verified environment setup:
    ./isaaclab.sh -p scripts/environments/random_agent.py \
      --task Isaac-Reach-Franka-Newton-IK-Rel-Play-v0 \
      --num_envs 1 \
      --visualizer newton

@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label May 22, 2026
isaaclab-review-bot[bot]

This comment was marked as outdated.

@maxkra15 maxkra15 force-pushed the max/newton-ik-manager branch 2 times, most recently from 0ccb62c to bbc8e51 Compare June 3, 2026 18:23
@maxkra15 maxkra15 marked this pull request as ready for review June 3, 2026 20:48
@maxkra15 maxkra15 requested a review from ooctipus June 3, 2026 20:48
@greptile-apps

This comment was marked as outdated.

Comment thread source/isaaclab_newton/isaaclab_newton/physics/newton_manager.py Outdated
Comment thread source/isaaclab_newton/isaaclab_newton/ik/newton_ik_manager.py Outdated
Comment thread source/isaaclab_newton/isaaclab_newton/envs/mdp/actions/newton_ik_actions.py Outdated
@maxkra15 maxkra15 force-pushed the max/newton-ik-manager branch from bbc8e51 to 01d05fa Compare June 3, 2026 21:55
Comment thread source/isaaclab_newton/isaaclab_newton/ik/newton_ik_manager_cfg.py Outdated
"""Set the Newton model builder."""
NewtonManager._builder = builder

@classmethod

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I see what you are trying to do here. I need to take some time to think about what the best design, the current way makes sense, but let me think through this tomorrow

@ooctipus ooctipus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice work @maxkra15 , how urgent is this work? I think what you have there for saving the source builder makes sense, but its a bit duplicated to what we aready have in clone plan, I am wondering if there are further redundancies could be removed. I need to think abit more tomorrow.

If this work is urgent, I am ok with just merge it first and I find a time to clean it up later

@kellyguo11 kellyguo11 moved this to In review in Isaac Lab Jun 5, 2026
@maxkra15 maxkra15 force-pushed the max/newton-ik-manager branch from 1626028 to 743ef3a Compare June 12, 2026 00:43
@ooctipus

Copy link
Copy Markdown
Collaborator

@isaaclab-review-bot please review again

@ooctipus

Copy link
Copy Markdown
Collaborator

@greptile-apps please review again

@ooctipus ooctipus force-pushed the max/newton-ik-manager branch 2 times, most recently from f061260 to c686b58 Compare June 12, 2026 05:39
maxkra15 and others added 4 commits June 11, 2026 22:54
Move the per-step IK compute off Torch: the pose objective exposes its command
convention as Warp data (command code, relative flag, scale, offset), and the
action term computes targets, assembles the seed, solves and gathers through
Warp kernels. Torch now appears only as the policy action at the boundary,
viewed zero-copy into Warp.
@ooctipus ooctipus force-pushed the max/newton-ik-manager branch from c686b58 to a85a217 Compare June 12, 2026 05:56
@ooctipus ooctipus merged commit 3acbc32 into isaac-sim:develop Jun 12, 2026
60 of 61 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in Isaac Lab Jun 12, 2026
@ooctipus ooctipus deleted the max/newton-ik-manager branch June 12, 2026 08:12
maxkra15 added a commit to maxkra15/IsaacLab that referenced this pull request Jun 12, 2026
Squashed replay of max/waterhose-coupled-experimental (64 commits, old
history preserved on backup/waterhose-coupled-before-develop-rebase-
20260612) onto upstream/develop (d5f0455).

Conflict-resolution policy:
- Newton pin stays on the verified PR-2848 coupled-solver commit; warp
  floor stays >=1.14.0.dev (upstream's ==1.14.0 would downgrade below
  what that Newton build needs).
- Upstream's new Newton IK (solver/objectives, isaac-sim#5756) is taken verbatim;
  the branch's interim IK manager is kept temporarily until the
  waterhose task is ported to the new action API.
- newton_manager: upstream restructure + branch features (coupled reset
  protocol, FK articulation filter, Kit xform-op sync, pre-render
  callbacks). Builder creation runs both attribute-registration hooks
  (upstream's subclass hook and the branch's cfg-driven walk that covers
  coupled sub-solver entries).
- Cloner (isaac-sim#5770 restructure): ported the branch's cfg-driven VBD graph
  coloring for hook-built entities (cables), the static-visual-shape
  import for Newton-side visualizers, and hide_collision_shapes parity
  into the new replicate/build_source_builders flow. The waterhose cfg
  sets simplify_meshes=False - convex-hull approximation would fill the
  socket bore.
- Deformable contrib, visualizers, mjwarp manager and the manager
  abstraction test resolved as the union of both sides' features.
maxkra15 added a commit to maxkra15/IsaacLab that referenced this pull request Jun 12, 2026
Port the waterhose task from the interim NewtonIKManager to upstream's
Newton IK action (isaac-sim#5756), used as intended: one objectives list.

- Right end-effector: command-driven absolute pose objective (root-frame
  position + (x, y, z, w) quaternion).
- Multi-body holds: left_gripper_base (weight 1) and torso_hip_yaw
  (weight 50) pose objectives replace the old fixed_body_names hack; the
  scripted state machine writes their captured targets each step.
- Soft joint-limit objective replaces joint_limit_weight.
- Teleop variant: thin subclass rotates the relative rotation-vector
  from the end-effector frame into the root frame and delegates; no
  hold objectives (the operator owns the posture).
- The interim NewtonIKManager and the contrib reach duplicate (which
  registered the same gym ids upstream's core reach now owns) are
  removed.

Validated: phase convergence timings match the pre-rebase demo
step-for-step with the holds active.
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

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants