How do I solve this robot arm movement?

145 Views Asked by At

I am moving my robot arm's tool pitch. In this example, the tool is moving pitch by 80 degrees (lime green number).

1

The red lines are the current position of the arm.

The blue lines are the position the robot needs to be moved to.

The 3 dark green numbers are the angles of the red arm.

I need to find the 3 pink angles. How do I do this?

2

There are 2 best solutions below

2
On BEST ANSWER

I got the distance the arm needed to move in the X direction and the Y direction first.

TPitch

Then I moved in the X and Y directions.

X

Y

0
On

Labelling the joints as $A$ (bottom right), $B$ (top), $C$ (left), $D$ (end-effector). We can write the coordinates of the end-effector for the initial position as follows

$D = 100(\cos(100^\circ), \sin(100^\circ)) + 90(\cos((100-180-80)^\circ, \sin(100-180-80)^\circ) + 5 (\cos((-160 + 180 - 120)^\circ, \sin((-160+180-120)^\circ) ) $

And this simplifes to

$D = 100 (\cos(100^\circ), \sin(100^\circ) ) + 90 (\cos(-160^\circ), \sin(-160^\circ) ) + 5 (\cos(-100^\circ), \sin(-100^\circ) ) \hspace{25pt}(1)$

Now using the pink angles $t_1, t_2, t_3$, we can write the coordinates of the tip as follows

$D = 100( \cos(\pi - t_1),\sin(\pi - t_1)) + 90 (\cos(-t_1 - t_2), \sin(-t_1 - t_2)) + 5 (\cos( \pi - t_1 - t_2 + t_3), \sin(\pi - t_1 - t_2 + t_3 ) )\hspace{25pt}(2)$

In addition, we know that the difference in direction between the directions of the last link between the initial configuration and the final configuration is $80^\circ$, and therefore, we can write

$ -100^\circ - (180^\circ - t_1 - t_2 + t_3) = 80^\circ $

From which,

$ t_1 + t_2 - t_3 = 80^\circ + 280^\circ = 360^\circ = 0^\circ $

Thus, $t_3 = t_1 + t_2 $

Now, from equations $(1)$ and $(2)$, we get two equations for the two components $x$ and $y$ of the tip $D$, and using trigonometric identities,

$-100 \cos(t_1) + 90 \cos(t_1 + t_2) = 100 \cos(100^\circ) + 90 \cos(160^\circ) + 5 \cos(100^\circ) + 5\hspace{25pt}(3) $

$ 100 \sin(t_1) - 90 \sin(t_1 + t_2) = 100 \sin(100^\circ) - 90 \sin(160^\circ) - 5 \sin(100^\circ) \hspace{25pt}(4)$

Equations $(3),(4)$ are of the form

$ - a \cos(t_1) + b \cos(t_1 + t_2) = c_1 \hspace{25pt}(5) $

$ a \sin(t_1) - b \sin(t_1 + t_2) = c_2 \hspace{25pt}(6)$

where $a = 100, b = 90$ and

$ c_1 = 100 \cos(100^\circ) + 90 \cos(160^\circ) + 5 \cos(100^\circ) + 5$

$ c_2 = 100 \sin(100^\circ) - 90 \sin(160^\circ) - 5 \sin(100^\circ) $

Squaring equations $(5), (6)$ and adding results in

$ a^2 + b^2 - 2 a b \cos(t_2) = c_1^2 + c_2^2 $

So that,

$ t_2 = \cos^{-1} \bigg( \dfrac{ a^2 + b^2 - c_1^2 - c_2^2 }{2 a b } \bigg) $

Using the values of $a, b, c_1, c_2$, we get the following numerical value for $t_2$

$t_2 = 1.31275 \text{ radian} = 75.215^\circ $

Now equations $(5), (6)$ can be expanded as follows

$ - a \cos(t_1) + b (\cos(t_1)\cos(t_2) - \sin(t_1)\sin(t_2) ) = c_1 \hspace{25pt}(7) $

$ a \sin(t_1) - b (\sin(t_1)\cos(t_2) + \cos(t_1)\sin(t_2) = c_2 \hspace{25pt}(8)$

Which are of the form

$ \begin{bmatrix} -a + b \cos(t_2) && -b \sin(t_2) \\ - b \sin(t_2) && a - b \cos(t_2) \end{bmatrix} \begin{bmatrix} \cos(t_1) \\ \sin(t_1) \end{bmatrix} = \begin{bmatrix} c_1 \\ c_2 \end{bmatrix} \hspace{25pt} (9)$

Now we can solve for $\cos(t_1) $ and $\sin(t_1)$, and we get

$ \cos(t_1) =0.1533733473, \hspace{25pt} \sin(t_1) = 0.9881683137 $

From which $ t_1 = 1.4168152 \text{ radian} = 81.177^\circ $

And finally,

$t_3 = t_1 + t_2 = 2.72956769 \text{ radian} = 156.3927^\circ $

Both configurations, initial and final are plotted below, with the red lines indicating the initial configuration, and the blue lines the final configuration.

enter image description here