All courses › Robotics › Inverse Kinematics (2 Links)

Inverse Kinematics (2 Links)

Inverse kinematics goes the opposite way of forward kinematics: given a desired tool position, we find the joint angles that produce it. For a planar 2-link arm, θ2\theta_2 is solved with the law of cosines, and the solution can give two possibilities (elbow up or elbow down) or no solution if the target lies outside the workspace.

cos⁡θ2=x2+y2−L12−L222L1L2\cos\theta_2=\dfrac{x^2+y^2-L_1^2-L_2^2}{2L_1L_2}law of cosines solved for \theta_2

Symbols

x, yx,\ ydesired tool positionm
L1, L2L_1,\ L_2link lengthsm
θ2\theta_2elbow angle°

Example

L1=1L_1=1 m, L2=0.6L_2=0.6 m, target (1.2, 0.4)(1.2,\ 0.4) m:

cos⁡θ2≈0.200⇒θ2≈78.5°\cos\theta_2\approx0.200 \Rightarrow \theta_2\approx78.5°.

Always check the target lies within the workspace ∣L1−L2∣≤r≤L1+L2|L_1-L_2|\le r\le L_1+L_2 before solving the IK.
Practise kinematics for free →

← Forward Kinematics · Jacobian and Singularity →

Part of Robotics: Kinematics.