fix: check numerical IK convergence before solver step - #667
Merged
petercorke merged 2 commits intoSep 12, 2026
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #667 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 143 143
Lines 14050 14055 +5
=====================================
- Misses 14050 14055 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
petercorke
force-pushed
the
fix/664-ik-prestep-convergence
branch
from
September 12, 2026 18:48
78bc948 to
8b0eb83
Compare
Owner
|
Thanks @tahazarif10 for the fix, and @niamorg for originally flagging this. Glad to see people are using the IK functions. While looking at this fix I found yet another thing to fix, see #668. |
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.
Thanks for contributing to RTB!
Summary
Fix the shared numerical IK solve loop so an initial configuration that already satisfies the target pose is accepted before attempting a solver update.
Currently,
IKSolver._solve()callsstep()before checking whether the current configuration has already converged. This can cause an unnecessary linear algebra failure even whenq0is already an exact solution — notably with a redundant Panda robot usingIK_LM(method="chan").This change:
step()implementations return the residual associated with the updated configuration;q0convergence for LM, NR, and GN with zero solver iterations.Related issue
Fixes #664
Checklist
pytest)