Closed wxmerkt closed 4 years ago
Here is an overview of what got changed by this pull request:
Clones removed
==============
+ exotations/solvers/exotica_ik_solver/src/ik_solver.cpp -2
See the complete overview on Codacy
Could you add this as a new solver? The linear system solver may still be good for teaching purposes.
Sure, I will need to fix the memory overwriting bugs in the old linear system solver though. Do we want adaptive regularisation and line-search in the old solver? It did make some convergence increase (~10 iterations faster).
I initially had a new version of the linear system solver before changing to pseudo-inverse... but didn't commit it as this one performed a lot better. So will have to recreate.
Actually, for teaching purposes the LevenbergMarquardtSolver
solves a linear system. This solver is now aligned with the RSS teaching slides by using the pseudo-inverse.
This PR replaces the linear-system-based IK with a weighted and regularised pseudo-inverse IK with adaptive regularisation and backtracking line-search. It further includes more stopping criteria. These changes result in much better convergence and numerical behaviour/conditioning. The implementation is performance-oriented and uses Cholesky decomposition for the matrix decomposition/inverse.
The solution the new solver returns are also better (read: closer to the original state, within joint limits).
Changes:
NominalState
regularisation by appending a nominal state to the error vector was removed.MaxStep
for interactive IK is still supported, however, only whenMaxIterations == 1
.example_ik
now converges in 6 iterations, previously 43.Here's a plot of the behaviour on the LWR example (
example_ik
) for the first target - before and after:And corresponding convergence logs:
Before
After