roboticstoolbox.robot.IK.IK_LM.solve
- IK_LM.solve(ets, Tep, q0=None)
Solves the IK problem
- Parameters:
ets (
ETS) – The ETS representing the manipulators kinematicsTep (
SE3|ndarray|Sequence[float]) – The desired end-effector poseq0 (
ndarray|Sequence[float] |None) – The initial joint coordinates, a vector (n,), or a matrix (m, n) whose rows are the starting points of the first m searches (any further searches start from random valid coordinates)
- Returns:
An IKSolution containing joint coordinates
q,successflag,iterations,searches,residualerror value, andreasonstring if applicable- Return type:
This method will attempt to solve the IK problem and obtain joint coordinates which result the the end-effector pose
Tep.If
Tepis anSE3containing more than one pose, or an array with shape (N, 4, 4), it is treated as a trajectory of N poses. Each pose is solved independently, using the same initial coordinatesq0(and the same random restarts) for every pose, so consecutive solutions are not guaranteed to lie on the same IK branch. The returnedIKSolutionhas:qwith shape (N, n), one row per posesuccessTrue only if every pose was solvediterationsandsearchessummed over all posesresidualthe maximum residual over all poses, the worst casereasonthe reason given by the last pose that failed, if any
Changed in version 1.4.5: For a trajectory,
residualis now the maximum over the poses, previously it was the minimum, which hid poses that were solved badly.