Inverse kinematics for delta robots seem to have an opinion of being very complex and un-intuitive. I don't really understand why, because to me they seem to be simpler then for most other robot arm configurations. Perhaps I'm missing something.
Let's split the problem in two parts. First, let's just look at 1/3 of the robot, a single "arm" of the delta:
We only have one degree of freedom here: the angle α. That's our output, what we need to calculate. And we only really have one input: the distance AD between the business end of the robot and the base of the servo. We also know all the mechanical dimensions of the robot: AB, BC, CD, DE. So how can we calculate α? From the law of cosines, of course! Given a triangle with dimensions a, b c, the law of cosines lets us calculate the angles of that triangle:
Where γ is the angle opposite c. Also, we will actually calculate 180°-α, which is a sum of three angles:
ADE, ADB and BDC. So we have:
And finally:
That's it. That's the position the servo needs to move to. All we need to know is the distance AD. How can we know that distance for each of the arms? That's very simple! It's just the distance between the point we want our robot to move to, (x, y, z), and the base of the given arm, (x₁, y₁, z₁), which we know (we can measure them or calculate from the distance ED and the angle of the given arm).
Applying all this math should let us move the robot to the coordinates we desire.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
The movements obtained by referential math are really fluid, I'm going to keep an eye on this. I've seen a 3D printer that works in a similar manner but your mechanism is 'inside out' compared to it. I like that. :-)
You can also use ArcTan( Height / Width ) to calculate those angles. I believe ATan2 in the Python math pack handles the quadrants for you.
Are you sure? yes | no
Yeah, I would have used atan2 if I had the lengths of the sides adjacent to the right angle of the triangle. But since I have one adjacent and one opposite it, acos works better, because I don't have to calculate the missing side from the Pythagoras theorem.
Not sure exactly what you mean by "inside out". It is currently up-side-down (I might change that and mount it on some support to make it right side up), so maybe that makes it look confusing.
Are you sure? yes | no
Thats very true. There are other ways of getting at it too, looking round the Magic Hexagon.
Besides, I was looking at it from the base plane, which is as you say upside down... Ok, I get that now.
Still needs a paintbrush in it though, if you dont, dont be surprised if I do sometime. ;-)
Are you sure? yes | no
There is a simplification possible: if we shift the coordinates of the servo by AB, we can ignore the angle ADB in our calculations.
Are you sure? yes | no