0
$\begingroup$

I have a problem. Earlier I posted a subproblem of this one but poorly asked so I hope I do better this time.

I have an example which is a more simple one of my actual problem:

I want to find two angles (theta_2 and theta_3) given two links with known link lengths(a2, a3) and a known end point (r,s).

Problem 1

With the law of cosines the two angles theta_2 and theta_3 can be found.

theta_3 = atan2(d, +-sqrt(1-d^2)) where

d = (r^2 + s^2 - a2^2 - a3^2) / (2*a2*a3)

theta_2 then becomes:

theta_2 = atan2(r,s) - atan2(a2+a3*cos(theta_3), a3*sin(theta_3))

And that is all understood. But now if I make the problem slightly more complicated I cannot figure out how to find these angles anymore.

Now consider this problem which is exactely the same as problem 1, just with a rigidly attached link at the end point in a 90 degree angle:

Problem 2

How can I now solve for the angles given only the three link lengths (a2, a3, d) and the coordinates of point D?

$\endgroup$
  • $\begingroup$ Please provide a link to the "sub problem" you posted earlier. $\endgroup$ – amWhy Aug 3 '17 at 16:59
  • $\begingroup$ I deleted that question. I removed the mention of that no to confuse people. $\endgroup$ – ruffy Aug 3 '17 at 17:02
  • $\begingroup$ If there were a diagram of the configuration you intend, I might have spent time on this problem. $\endgroup$ – Eric Towers Aug 3 '17 at 17:12
  • 1
    $\begingroup$ @ruffy once you earn a bit more in the way of reputation, you'll be able to insert images into your post, like I did above. $\endgroup$ – amWhy Aug 3 '17 at 17:29
  • 1
    $\begingroup$ @ruffy Solve the problem for fixed point $D$ and lengths $\,a_2, \sqrt{a_3^2+d^2}\,$, then add $\,\arctan(d / a_3)\,$ to the second angle. $\endgroup$ – dxiv Aug 3 '17 at 17:42
1
$\begingroup$

The right triangle $\triangle CBD$ has fixed-size legs of lengths $a_3$ and $d$ respectively, so its hypotenuse will have fixed length $\sqrt{a_3^2+d^2}$ by Pythagoras' theorem.

Given the fixed point $D$ and the known distances $a_2$ and $\sqrt{a_3^2+d^2}\,$, the angles $\theta_2$ and $\theta_3^{\,'}$ can be determined as shown in the posted solution to the first problem, where $\theta_3^{\,'}$ is the angle between $BD$ and the dashed line marked with an arrow.

The last step is to note that $\theta_3 - \theta_3^{\,'} = \angle CBD=\arctan(d / a_3)\,$, so $\theta_3 = \theta_3^{\,'} + \arctan(d / a_3)\,$.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you so far! I can get out Theta_3 just fine, but struggle with theta_2. The way I did it: If the point D = (xd, yd) is first define: l = sqrt(a3^2 + d^2) and redefine the variable that was in my original post defined as d, but I now call b = (xd^2 + yd^2 - l^2 - a2^2)/(2*a2*l). Then theta_3 = atan2(b, +-sqrt(1-b^2) + atan2(d/a3). But what is theta_2? I thought analog to problem 1 it should be: atan2(xd, yd) - atan2(a2+lcos(theta_3), lsin(theta_3)) but that does not come out right. How do I do theta_2? $\endgroup$ – ruffy Aug 4 '17 at 8:47
  • $\begingroup$ Looking more into this, I can draw up some triangles and can get the angle between a line AC and a2, but I always end up with calculations that require the point C. Because when I have angle alpha between AC and a2, I could get the angle between the x-axis and AC to from which I would only subtract angle alpha to get theta_3 but this would require knowing point C which I don't know. $\endgroup$ – ruffy Aug 4 '17 at 9:59
  • $\begingroup$ @ruffy Once you solved the first case, all you have to do is substitute $\,(r,s) \mapsto (x_d,y_d)\,$ and $\,(a_2,a_3) \mapsto (a_2,\sqrt{a_3^2+d^2})\,$. $\endgroup$ – dxiv Aug 4 '17 at 17:36
  • $\begingroup$ Let me work through this and draw up a few images for you trying to show you why I think this is not possible. I can do this tomorrow. $\endgroup$ – ruffy Aug 4 '17 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.