# IK_QP - Numerical IK with Quadratic Programming

class roboticstoolbox.robot.IK.IK_QP(name='IK Solver', ilimit=30, slimit=100, tol=1e-06, mask=None, joint_limits=True, seed=None, kj=0.01, ks=1.0, kq=0.0, km=0.0, ps=0.0, pi=0.3, **kwargs)[source]

Bases: IKSolver

Quadratic Progamming Numerical Inverse Kinematics Solver

A class which provides functionality to perform numerical inverse kinematics (IK) using a quadratic progamming approach. See step method for mathematical description.

Parameters:
Raises:

ImportError – If the package qpsolvers is not installed

Examples

The following example gets the ets of a panda robot object, instantiates the IK_QP solver class using default parameters, makes a goal pose Tep, and then solves for the joint coordinates which result in the pose Tep using the solve method.

Traceback (most recent call last):
File "<input>", line 1, in <module>
NameError: name 'solver' is not defined


Notes

When using the this method, the initial joint coordinates $$q_0$$, should correspond to a non-singular manipulator pose, since it uses the manipulator Jacobian. When the the problem is solvable, it converges very quickly.

References

• J. Haviland, and P. Corke. “Manipulator Differential Kinematics Part II: Acceleration and Advanced Applications.” arXiv preprint arXiv:2207.01794 (2022).

IKSolver

An abstract super class for numerical IK solvers

IK_NR

Implements IKSolver class using the Newton-Raphson method

IK_GN

Implements IKSolver class using the Gauss-Newton method

IK_LM

Implements IKSolver class using the Levemberg-Marquadt method

 step(ets, Tep, q) Performs a single iteration of the Gauss-Newton optimisation method solve(ets, Tep[, q0]) Solves the IK problem error(Te, Tep) Calculates the error between Te and Tep
 _random_q(ets[, i]) Generate a random valid joint configuration using a private RNG _check_jl(ets, q) Checks if the joints are within their respective limits