# velocity of the end-effector

The joint velocities are constant and equal to $\dot{\theta}_{2}$ = 1 and $\dot{\theta}_{1}$ = 1. How to Compute the velocity of the end-effector when $\theta_{2} =\pi/2$ and $\theta_{1} = \pi/6$

In velocity kinematic, you can establish a relationship between the velocity of the end-effector and the joint velocities,

\begin{align} x_{2}(t) &= a_{1} \cos\theta_{1}(t) + a_{2} \cos(\theta_{1}(t)+\theta_{2}(t)) \\ y_{2}(t) &= a_{1} \sin\theta_{1}(t) + a_{2} \sin(\theta_{1}(t)+\theta_{2}(t)) \end{align}

where $a_{1}$ and $a_{2}$ are the lengths of the links. Now the aim is to acquire $\dot{x}_{2}(t)$ and $\dot{y}(t)_{2}$. This is Matlab code for obtaining the derivatives if you are lazy to do them by hand.

clear
clc

syms a1 a2 x y th1 th2 t

th1(t) = symfun(sym('th1(t)'), t);
th2(t) = symfun(sym('th2(t)'), t);

x = a1*cos(th1(t)) + a2*cos(th1(t) + th2(t));
y = a1*sin(th1(t)) + a2*sin(th1(t) + th2(t));

dxdt = diff(x,t)
dydt = diff(y,t)


\begin{align} \dot{x}_{2}(t) &= -a_{1} \dot{\theta}_{1}\sin\theta_{1} - a_{2}(\dot{\theta}_{1} + \dot{\theta}_{2}) \sin(\theta_{1}+\theta_{2}) \\ \dot{y}_{2}(t) &= \ \ \ a_{1} \dot{\theta}_{1}\cos\theta_{1} + a_{2}(\dot{\theta}_{1} + \dot{\theta}_{2}) \cos(\theta_{1}+\theta_{2}) \end{align}

Now you substitute the given parameters in the aforementioned equations.