Skip to content

feat: use Pink for controller ik tasks - #2992

Open
TomCC7 wants to merge 35 commits into
mainfrom
cc/feat/ik-task-self-collision
Open

feat: use Pink for controller ik tasks#2992
TomCC7 wants to merge 35 commits into
mainfrom
cc/feat/ik-task-self-collision

Conversation

@TomCC7

@TomCC7 TomCC7 commented Jul 16, 2026

Copy link
Copy Markdown
Member

Contribution path

  • Small, safe change that does not need a tracking issue
  • Linked issue or discussion: DIM-1272

Problem

Cartesian and keyboard EEF-twist control used a custom Pinocchio IK implementation. Not quite extensible.

Solution

Pink is now the sole Cartesian and EEF-twist control IK backend. Both task types share the Cartesian pipeline, re-anchor every solve to measured joint state, bound control dt once per task tick, enforce model and joint mappings, and hold measured position for expected solve failures.

All shipped manipulator teleop blueprints, including Piper, now use direct URDF/Xacro models with named end-effector frames. Pink remains optional: task modules import without it, while constructing a Pink task without the manipulation extra gives an actionable install instruction.

The legacy Pinocchio control IK fallback and all self-collision logic were removed from this control path.

How to Test

Run Piper keyboard teleop with the manipulation extra and robot connection configured:

uv run --extra manipulation dimos run keyboard-teleop-piper

AI assistance

OpenCode with GPT-5.6-terra was substantially involved in implementation, testing, review-response triage, and PR maintenance.

Checklist

  • This PR is scoped to one clearly stated problem.
  • I ran the relevant focused pytest, Ruff, mypy, blueprint-registry, and diff checks.
  • I have reviewed and understood every line in this PR.
  • I disclosed AI assistance above.
  • I have read and approved the CLA.

@mintlify

mintlify Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
dimensional 🟢 Ready View Preview Jul 16, 2026, 1:34 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@codecov

codecov Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.51351% with 85 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...control/tasks/cartesian_ik_task/pink_control_ik.py 81.00% 31 Missing and 18 partials ⚠️
...ntrol/tasks/cartesian_ik_task/cartesian_ik_task.py 72.72% 15 Missing and 6 partials ⚠️
...mos/control/tasks/eef_twist_task/eef_twist_task.py 84.14% 9 Missing and 4 partials ⚠️
dimos/robot/manipulators/common/blueprints.py 86.66% 1 Missing and 1 partial ⚠️
@@            Coverage Diff             @@
##             main    #2992      +/-   ##
==========================================
- Coverage   75.47%   71.11%   -4.36%     
==========================================
  Files        1157     1216      +59     
  Lines      111292   126743   +15451     
  Branches    10073    13370    +3297     
==========================================
+ Hits        83998    90139    +6141     
- Misses      24404    33671    +9267     
- Partials     2890     2933      +43     
Flag Coverage Δ
OS-ubuntu-24.04-arm 69.60% <87.07%> (+0.12%) ⬆️
OS-ubuntu-latest 71.64% <87.07%> (+0.11%) ⬆️
Py-3.10 71.64% <87.07%> (+0.11%) ⬆️
Py-3.11 71.64% <87.07%> (+0.11%) ⬆️
Py-3.12 71.63% <87.07%> (+0.10%) ⬆️
Py-3.13 71.63% <87.07%> (+0.11%) ⬆️
Py-3.14 71.63% <87.07%> (+0.11%) ⬆️
Py-3.14t 71.63% <87.07%> (+0.11%) ⬆️
SelfHosted-Large 29.60% <28.31%> (+<0.01%) ⬆️
SelfHosted-Linux 35.90% <28.45%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
.../tasks/cartesian_ik_task/test_cartesian_ik_task.py 100.00% <100.00%> (ø)
...ol/tasks/cartesian_ik_task/test_pink_control_ik.py 100.00% <100.00%> (ø)
...ontrol/tasks/eef_twist_task/test_eef_twist_task.py 100.00% <100.00%> (ø)
dimos/control/test_control.py 97.84% <ø> (+1.94%) ⬆️
dimos/robot/manipulators/a1z/blueprints/teleop.py 100.00% <100.00%> (ø)
dimos/robot/manipulators/a750/blueprints/teleop.py 100.00% <100.00%> (ø)
...os/robot/manipulators/openarm/blueprints/teleop.py 100.00% <100.00%> (ø)
...os/robot/manipulators/openyam/blueprints/teleop.py 100.00% <100.00%> (ø)
...imos/robot/manipulators/piper/blueprints/teleop.py 100.00% <ø> (ø)
dimos/robot/manipulators/xarm/blueprints/teleop.py 100.00% <100.00%> (ø)
... and 5 more

... and 198 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread dimos/control/tasks/cartesian_ik_task/pink_control_ik.py Outdated
Comment thread dimos/control/tasks/cartesian_ik_task/pink_control_ik.py Outdated
Comment thread dimos/control/tasks/cartesian_ik_task/pink_control_ik.py Outdated
Comment thread dimos/control/tasks/cartesian_ik_task/pink_control_ik.py Outdated
Comment thread dimos/control/tasks/cartesian_ik_task/pink_control_ik.py Outdated
Comment thread dimos/control/tasks/cartesian_ik_task/pink_control_ik.py Outdated
Comment thread dimos/control/tasks/cartesian_ik_task/pink_control_ik.py Outdated
Comment thread dimos/control/tasks/cartesian_ik_task/pink_control_ik.py Outdated
Comment thread dimos/control/tasks/cartesian_ik_task/pink_control_ik.py Outdated
Comment thread dimos/control/tasks/cartesian_ik_task/cartesian_ik_task.py Outdated
Comment thread dimos/control/tasks/cartesian_ik_task/pink_control_ik.py Outdated
Comment thread dimos/control/tasks/cartesian_ik_task/pink_control_ik.py Outdated
Comment thread dimos/control/tasks/cartesian_ik_task/pink_control_ik.py Outdated
@TomCC7 TomCC7 added the backport:skip Skip creating a backport to any release branches label Jul 18, 2026
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Jul 20, 2026
…collision

# Conflicts:
#	dimos/control/tasks/eef_twist_task/eef_twist_task.py
#	dimos/control/tasks/eef_twist_task/test_eef_twist_task.py
#	dimos/robot/manipulators/common/blueprints.py
#	dimos/robot/manipulators/piper/blueprints/teleop.py
#	dimos/robot/manipulators/test_blueprints.py
#	dimos/robot/manipulators/xarm/blueprints/teleop.py
#	docs/capabilities/manipulation/adding_a_custom_arm.md
@TomCC7
TomCC7 requested a review from Dreamsorcerer as a code owner July 28, 2026 03:40
@github-actions github-actions Bot removed the ready-to-merge Required CI checks have passed on this PR label Jul 28, 2026
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Jul 28, 2026
@TomCC7 TomCC7 changed the title feat: default control IK to Pink feat: use Pink for controller ik tasks Aug 3, 2026
Comment thread dimos/control/tasks/cartesian_ik_task/pink_control_ik.py Outdated
Comment thread dimos/control/tasks/cartesian_ik_task/pink_control_ik.py Outdated
paul-nechifor
paul-nechifor previously approved these changes Aug 4, 2026
…collision

# Conflicts:
#	dimos/robot/manipulators/test_blueprints.py
#	docs/capabilities/manipulation/index.md
@github-actions github-actions Bot removed the ready-to-merge Required CI checks have passed on this PR label Aug 4, 2026
@TomCC7
TomCC7 force-pushed the cc/feat/ik-task-self-collision branch from 3656e49 to 3b41dfa Compare August 4, 2026 06:22
paul-nechifor
paul-nechifor previously approved these changes Aug 4, 2026
@TomCC7
TomCC7 enabled auto-merge August 4, 2026 06:51
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Aug 4, 2026
@TomCC7
TomCC7 added this pull request to the merge queue Aug 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip Skip creating a backport to any release branches ready-to-merge Required CI checks have passed on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants