Finding Angles counterclockwise

263 Views Asked by At

I have a robot arm like this: enter image description here and I have to write a program that will move the arm to the point (2,0). I am having trouble expressing angles $\phi_2$ and $\phi_3$ in terms of $\phi_1$. ($\phi_1$ is given). I feel like there is a really simple solution but I have been working on this all week and I can't seem to figure it out.

1

There are 1 best solutions below

2
On BEST ANSWER

I presume that the lengths of arm parts are fixed and that you with to compute the position of "elbow" #3 given the angle between $OX$ and arm part #1.

Given the position of "elbow" #3, you can compute the angles.

By definition of $\sin$ and $\cos$, we have that the position of "elbow" 2 is $(L_1\cos\Phi_1, L_1\sin\Phi_1)$; equivalently, $\Phi_1 = \arctan\frac{y_2}{x_2}$.

Law of cosines allows us to determine the distance between "elbow" 2 and the point $(2, 0)$. Once we know this distance, we can compute the the angle of "elbow" 3 - again, we will use the law of cosines to do it.

Note that, since we now know the length of all triangle sides, application of the law of cosines allows you to compute the cosine of any angle. Then apply $\arccos$ to get the value of angle in radians!

Let me know if anything is unclear.