fix(examples,dhrobot): repair broken ikine_LMS/ikine_min example references - #650
Merged
Conversation
DHRobot.ikine_LM had its own narrow signature that silently dropped method/k/kq/km, so DH robots couldn't use the wampler/sugihara variants or joint-limit/manipulability weighting that ETS.ikine_LM supports. Switch to Tep/q0 explicit + **ikargs forwarding, documented via a new shared |ikargs| substitution (matching the existing |BlockOptions| pattern) so the description stays in one place as more ikine_LM wrappers pick it up. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Both examples/readme.py and examples/ikine_evaluate.py called robot.ikine_LMS(...), which hasn't existed since the LM variants were merged into ikine_LM(method=...). ikine_evaluate.py also called the never-existent robot.ikine_min(...), and its timeit benchmark strings passed q0 positionally, which lands in the end= parameter instead. Fixed all three, replacing ikine_LMS with ikine_LM(method="sugihara", k=0.0001) -- the default k=1.0 doesn't converge for this method -- and ikine_min with ikine_LM(joint_limits=False/True), which is what those benchmark rows were actually trying to compare. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #650 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 143 143
Lines 14035 14035
=====================================
Misses 14035 14035 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merged
4 tasks
petercorke
added a commit
that referenced
this pull request
Aug 26, 2026
… verify #379 repro # Conflicts: # tests/test_IK.py
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.
Summary
examples/readme.pyandexamples/ikine_evaluate.pyboth calledrobot.ikine_LMS(...), which hasn't existed since the LM variants were merged intoikine_LM(method=...).ikine_evaluate.pyalso called the never-existentrobot.ikine_min(...).ikine_LM(method="sugihara", k=0.0001)andikine_LM(joint_limits=False/True)respectively --k=0.0001matters here, the defaultk=1.0doesn't actually converge for the sugihara method (confirmed by running both scripts end-to-end).ikine_evaluate.py's timeit benchmark strings:robot.ikine_LM(T, q0)passesq0positionally, landing in theend=parameter instead ofq0=.DHRobot.ikine_LM(a thin wrapper aroundETS.ikine_LM) had its own narrow signature that silently droppedmethod/k/kq/km-- so DH robots couldn't use the wampler/sugihara variants at all. Widened it toTep, q0, **ikargs, forwarding everything through, documented via a new shared|ikargs|Sphinx substitution (docs/source/conf.py, matching the existing|BlockOptions|pattern) so the description lives in one place as moreikine_LMwrappers pick it up (relevant for a follow-up PR that touches the rest of theikine_LM/ik_LMfamily's docs).Item 2 of a 4-item IK-solver cleanup plan (see
claude-notes/ik-solver-cpp-python-divergence.md); Item 1 (YuMi gripper parent-swap fix) is PR #649.Test plan
DHRobot.ikine_LMactually forwardsmethod/kto the underlying solver (fails against the old narrow signature)ikine_evaluate.py, and the IK-relevant portion ofreadme.py) -- noAttributeError, all rows converge including sugihara-W --keep-going) clean of any new warnings from the|ikargs|substitution orDHRobot.ikine_LM's docstring🤖 Generated with Claude Code