Repository navigation
feat(ets): add numerical inverse kinematics for planar ETS2 - #826
Conversation
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Security | 16 high |
🟢 Metrics 46 complexity · 1 duplication
Metric Results Complexity 46 Duplication 1
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #826 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 146 146
Lines 17103 17200 +97
=====================================
- Misses 17103 17200 +97 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ETS2 had fkine, jacob0 and jacobe but no inverse kinematics, so planar robots could only be solved by hand. Add ETS2.ikine_LM, a Levenberg- Marquardt solver with Chan's damping (the planar counterpart of ETS.ikine_LM): 3-vector (x, y, theta) pose error, optional mask, random restarts within the joint limits, joint-limit rejection and trajectory support, returning the existing IKSolution dataclass. Closes petercorke#824 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
257f45e to
5eabf27
Compare
|
Rebased onto
That note is now "
Re-verified on the rebased head On the Codacy report: the 16 "security" findings are |
|
Thank you for the careful rebase and for explaining the Our own recent changes to |
Resolve the conflict in the ETS2 members list of ets_2d.rst, which main has changed (swapped, merged), and say versionadded 1.5.0, the next release. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Sounds good — thanks for taking the |
Summary
ETS2hasfkine,jacob0andjacobebut no inverse kinematics, so a planar robot built fromET2s can only be solved by hand. This addsETS2.ikine_LM, the planar counterpart ofETS.ikine_LM:A = JᵀWeJ + k·E·I), using the existingjacob0.(Δx, Δy, Δθ)in the world frame, with the angle wrapped to[-π, π].q0(vector or matrix of starting points), random restarts within the joint limits,mask(e.g.[1, 1, 0]for position only on a 2-link arm),joint_limitsrejection,seed, and trajectory input (SE2with N values or an(N, 3, 3)array). Returns the existingIKSolutiondataclass.ikine_LMadded to theETS2member list indocs/source/arm_ets.rst.Related issue
Closes #824
How it was verified
New
tests/test_ets2_ikine_LM.py(10 tests): 2- and 3-link reach,ndarraytarget,q0converging in one search,q0matrix, mask, joint-limit rejection vs.joint_limits=False, unreachable target, seed reproducibility, trajectory, andValueErroron badmask/Tep/q0.Run against the pure-Python kinematics fallback (no compiled extension on this machine), so the C++
fknmpath is unchanged and untouched by this PR.ruff formatapplied to the two touched Python files; the remainingruff checkhits inETS2.pyare pre-existing.Checklist
pytestpassesX | Y, docstring is reST with:param:/:returns:/:raises:🤖 Generated with Claude Code