Two Link Kinematics¶
Forward Kinematics¶
The Cartesian location of the elbow joint between the links:
\[\vec{\textrm{elbow}} = (L_1 \sin \theta_1, L_1 \cos \theta_1)\]
The Cartesian location of the end point:
\[\vec{p} = \vec{\textrm{elbow}} + (L_2 \sin (\theta_1+\theta_2), L_2 \cos (\theta_1+\theta_2))\]
Inverse Kinematics¶
Given an endpoint expressed in polar coordinates:
\[\textrm{end} = (R, \theta)\]
Internal angles can be labeled as follows:
\[ \begin{align}\begin{aligned}\theta = \theta_1 + \alpha\\\beta = \pi - \theta_2\end{aligned}\end{align} \]
Applying the law of cosines and algebra:
\[ \begin{align}\begin{aligned}R^2 = L_1^2 + L_2^2 - 2 L_1 L_2 \cos \beta\\\beta = \arccos {R^2 - L_1^2 - L_2^2 \over - 2 L_1 L_2}\end{aligned}\end{align} \]
Applying the law of sine and algebra:
\[ \begin{align}\begin{aligned}{R \over \sin \beta} = {L_2 \over \sin \alpha}\\\alpha = \arcsin {L_2 \sin \beta \over R}\end{aligned}\end{align} \]
Calculating the joint angles. Note that zero, one, or two solutions may exist.
\[ \begin{align}\begin{aligned}\theta_1 = \theta - \alpha\\\theta_2 = \pi - \beta\end{aligned}\end{align} \]
Supporting Material¶
documentation of our Webots Two-Link Robot Model
my Fall 2020 video lecture on Kinematics of the Two-Link Arm
SymPy derivation of two-link inverse kinematics two-link-kinematics.py
sample Python code for two-link forward and inverse kinematics: two-link-ik.py