# Wearable Intertace for Teleoperation of Robot Arms - WITRA

In order to control the position of the SCARA robot in our project, we need to develop the Inverse Kinematics of it so that it's possible to calculate each degree of freedom (DoF) in terms of the desired (x,y,z) position. The SCARA robot has four DoFs, namely, three rotational and one prismatic, as seen in the figure below:

*Figure 1: Schematic of SCARA.*

The robot has rotational and prismatic constraints: theta1 can go from 0 to 200 degrees in anti-clockwise direction; theta2 goes from 0 to 135 degrees in clockwise direction; d3 is limited from 0 to 200 milimiters downwards and theta4 goes from -180 to 180 degrees.

We want, therefore, to calculate the values of theta1, theta2 and d3 based on the values of (x,y,z) at the end effector. The value of theta4 is not regarded here, since it will be dealt separately in the furute as pure orientation of the tool, not contributing for the position of the end-effector. It's quite simple to model the inverse kinematics of this robot. When seen from above, it is like a double-pendulum, as shown in the next figure:

*Figure 2: SCARA seen from above - a double-pendulum*

Thus, one can calculate the values of theta1 and theta2 from the values of x and y using the law of cosines:

Furthermore:

Applying the law of cosines to OAB once more:

and, finally,

Note that there is also another solution for theta1 = beta - phi and theta2' = - theta2. However this solution does not agree with the robot rotational constraints.

Finally, the value of d3 is directly derived from the value of the z-coordinate. That is: **d3 = z**.

Hence we complete the inverse kinematics of the SCARA robot.

_____________________________________________________________________________________________________

Make sure you also follow our news and updates on our social channels below.