Basic 3-joint inverse kinematics question

269 Views Asked by At

In the above diagram, I am trying to solve for the 3 angles, x, y, and z (hope they are clearly labeled). The circles next to the angles just denote where the joints are; this is for a robot arm. Any solution of these angles will work, with the one caveat that none of the joints can go "above" the hypotenuse c. Distances a, b, and c are all known, as are the lengths of the three arm parts, h1, h2, and h3. h3 > h2 = h1 in length.

One thing that may help is that I can "fix" part h3 at a certain angle if need be, like saying that it will always be 5 degrees away from c. I think that may help, but I am not sure how. I think, if possible, it would actually be preferable to fix part h3. How can I solve for x, y, and z in terms of the other knowns? Thanks in advance for your help, I am a trigonometry/inverse kinematics noob, and Google has not led to a solution so far.

1

There are 1 best solutions below

6
On BEST ANSWER

In most cases there is no unique solution. For example, say $c/3<h_1=h_2=h_3<c$. I can show 3 trivial solutions:

  1. $h_1$ is along $c$, and $h_2$, $h_3$ form an isosceles triangle with the base $c-h_1$.
  2. $h_3$ is along $c$, and $h_1$, $h_2$ form an isosceles triangle with the base $c-h_3$.
  3. $h_2$ is parallel to $c$, and you form an isosceles trapeze

But there are infinitely many possibilities, so you need more constraints.

EDIT For case 3, you know that the long base of the trapezoid is $c$, the short base is $h=h_1=h_2=h_3$. If you draw perpendiculars from the $y$ and $z$ joints onto $c$ you form a rectangle and two right angle triangles. The hypotenuse if $h$ and one of the sides is $$\frac{c-h}2$$Then the angle between $c$ and $h_1$ is $$\alpha=\arccos\frac{c-h}{2h}$$ The angle between $h_1$ and $h_2$, and the angle between $h_2$ and $h_3$ will be $$90^\circ+(90^\circ-\alpha)=180^\circ-\alpha$$

EDIT2 New request: $h_1=h_2=h<h_3$. We are still going to try to create a trapezoid, $h_2||c$, but it won't be isosceles anymore. In your sketch, draw a parallel to $h_3$ through the joint between $h_1$ and $h_2$. You will have a parallelogram with lengths $h_3$ and $h$, and a triangle with lengths $h$, $h_3$, and $c-h$. You can use Law of cosines to calculate the angles in this triangle.