Robot Jacobian

We now know how the position of the end-effector in the Cartesian space relates to the configuration of the robot. But robots are no statues, they move around quite a lot and we are interested how fast they are moving.

Linear and angular velocity

Let's refresh quickly our knowledge about velocity. In school we learned that velocity is the distance over time or te be more precise the rate of change of the position, i.e. its time derivative. The linear velocity vv can be computed by

v=dsdtv = \frac{ds}{dt}

and the angular velocity ω\omega by

ω=dθdt\omega = \frac{d\theta}{dt}

A quick note about the notation: I will use from now on dots to denote the time derivative of a value. Instead of writing dqdt\frac{dq}{dt} for the joint velocity, I will use q˙\dot{q} instead. You will also see multiple dots for the second or third derivatives.

We can now tell the angular velocity of the joints quite easily by taking into account the angle we moved in a certain time span. If you move for example the slider for q1q_1 in one second from the right to the left, the joint moves with a rotational velocity of q1˙=2πrads\dot{q_1} = 2\pi \frac{rad}{s}.

But what is the linear velocity of the end-effector? The linear velocity of the end-effector veev_{ee} can be decomposed into two components: The linear velocity in x-direction and the linear velocity in y-direction. As we derived in the chapter about forwards kinematics, the position of the end-effector if we are only able to move q1q_1 is

pee=[l0+l1cos(q1)l0+l1sin(q1)]p_{ee} = \begin{bmatrix} l_0 + l_1 \cdot cos(q_1) \\ l_0 + l_1 \cdot sin(q_1) \end{bmatrix}

where q1q_1 changes over time and l0l_0 and l1l_1 are constant. By computing the time derivative, we get the velocity

vee=[l1sin(q1)l1cos(q1)]v_{ee} = \begin{bmatrix} -l_1 \cdot sin(q_1) \\ l_1 \cdot cos(q_1) \end{bmatrix}

Jacobian matrix

I wrote now a lot about angular and linear velocity without mentioning once the title of this chapter, the Jacobian. It is a matrix named after the mathematician Jacobi. In robotics we use it to express the relationship between the angular velocity of the joints and the linear and angular velocity of the end-effector, i.e.

p˙ee=Jeeq˙\dot{p}_{ee} = J_{ee} \cdot \dot{q}

where JeeJ_{ee} consists of all partial derivatives of the kinematics functions. The first two rows are the partial derivatives for the position (x,y) and the last row are the partial derivatives for the angle ϕ\phi of the end-effector.

Jee=[xq0xq1xq2yq0yq1yq2ϕq0ϕq1ϕq2]J_{ee} = \begin{bmatrix} \frac{\partial x}{\partial q_0} & \frac{\partial x}{\partial q_1} & \frac{\partial x}{\partial q_2} \\ \frac{\partial y}{\partial q_0} & \frac{\partial y}{\partial q_1} & \frac{\partial y}{\partial q_2} \\ \frac{\partial \phi}{\partial q_0} & \frac{\partial \phi}{\partial q_1} & \frac{\partial \phi}{\partial q_2} \end{bmatrix}

A quick refresh of partial derivatives. xq0\frac{\partial x}{\partial q_0} means, we take the formula for xx and assume that all other variables except q0q_0 are constants. Then we compute the derivative.

We get the following partial derivatives for xx.

xq0=l0sin(q0)l1sin(q0+q1)l2sin(q0+q1+q2)\frac{\partial x}{\partial q_0} = - l_0 \cdot sin(q_0) - l_1 \cdot sin(q_0+q_1) - l_2 \cdot sin(q_0+q_1+q_2)

xq1=l1sin(q0+q1)l2sin(q0+q1+q2)\frac{\partial x}{\partial q_1} = - l_1 \cdot sin(q_0+q_1) - l_2 \cdot sin(q_0+q_1+q_2)

xq2=l2sin(q0+q1+q2)\frac{\partial x}{\partial q_2} = - l_2 \cdot sin(q_0+q_1+q_2)

We can do the same for yy.

yq0=l0cos(q0)+l1cos(q0+q1)+l2cos(q0+q1+q2)\frac{\partial y}{\partial q_0} = l_0 \cdot cos(q_0) + l_1 \cdot cos(q_0+q_1) + l_2 \cdot cos(q_0+q_1+q_2)

yq1=l1cos(q0+q1)+l2cos(q0+q1+q2)\frac{\partial y}{\partial q_1} = l_1 \cdot cos(q_0+q_1) + l_2 \cdot cos(q_0+q_1+q_2)

yq2=l2cos(q0+q1+q2)\frac{\partial y}{\partial q_2} = l_2 \cdot cos(q_0+q_1+q_2)

The partial derivatives for ϕ\phi are all the same.

ϕq0=1\frac{\partial \phi}{\partial q_0} = 1

ϕq1=1\frac{\partial \phi}{\partial q_1} = 1

ϕq2=1\frac{\partial \phi}{\partial q_2} = 1

Given the velocity of each joint, we can now immediately compute the linear and angular velocities of the end-effector. But this is not the only thing the robot Jacobian is used for!