- skbot.inverse_kinematics.gd(targets, joints, *, rtol=1e-06, maxiter=500)¶
L-BFGS-B based Gradient Descent.
This function will modify the objects in
jointsas a side effect.
Use L-BFGS-B to find values for
jointssuch that the sum of all target scores is minimal. L-BFGS-B is a quasi-Newton method that approximates both the targets Jacobian and Hessian.
A list of quality measures that a successful pose minimizes.
A list of 1DoF joints which should be adjusted to minimize
Relative tolerance for termination. If, after one iteration, the sum of scores has not improved by more than rtol the algorithm terminates and assumes that a local optimum has been found.
The maximum number of iterations to perform.
The final parameters of each joint.
Joint limits (min/max) are enforced as hard constraints throughout the optimization.
A common cause of IK faulure is that the chosen initial condition is too far away from the desired target position. One indicator for this is that
gd()converges based on
rtol, but the score of one or more targets isn’t below