IKSolver - IK Solver Abstract Base Class

class roboticstoolbox.robot.IK.IKSolver(name='IK Solver', ilimit=30, slimit=100, tol=1e-06, mask=None, joint_limits=True, seed=None)[source]

Bases: ABC

An abstract super class for numerical inverse kinematics (IK)

This class provides basic functionality to perform numerical IK. Superclasses can inherit this class and implement the solve method and redefine any other methods necessary.

  • name (str) – The name of the IK algorithm

  • ilimit (int) – How many iterations are allowed within a search before a new search is started

  • slimit (int) – How many searches are allowed before being deemed unsuccessful

  • tol (float) – Maximum allowed residual error E

  • mask (Union[ndarray, List[float], Tuple[float], Set[float], None]) – A 6 vector which assigns weights to Cartesian degrees-of-freedom error priority

  • joint_limits (bool) – Reject solutions with joint limit violations

  • seed (Optional[int]) – A seed for the private RNG used to generate random joint coordinate vectors

See also


Implements this class using the Newton-Raphson method


Implements this class using the Gauss-Newton method


Implements this class using the Levemberg-Marquadt method


Implements this class using a quadratic programming approach

Changed in version 1.0.3: Added the abstract super class IKSolver


step(ets, Tep, q)

Abstract step method

solve(ets, Tep[, q0])

Solves the IK problem

error(Te, Tep)

Calculates the error between Te and Tep

Private Methods

_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