Back in 2009, I got excited about the idea of building my own industrial robot that could do something useful (namely, sort small parts on the conveyor). I’ll say right away that I built a robot (you see the result in the title photo), and at the same time, as a by-product, I wrote a short article about the kinematics of delta robots on the TrossenRobotics forum - an American seller of sets of parts for robots. At that time they were holding a contest for authors. Of course, I did not win the contest, but the article in English remained. Several times I tried to translate it into my native language, but I managed to complete the job just now.
If you want to build your own model of a delta robot, or just figure out how to derive kinematic formulas for this type of robot (without going beyond the school program in algebra and geometry) - welcome to cat. For those who are not very fond of theory, at the end of the article are examples of ready-made code in C.
What is a delta robot
Delta-robot (
wiki ) was invented in the early 1980s by the Swiss scientist Raymond Clavel, below is an illustration from the original patent US4976582 on "A device for moving and positioning an element in space":
')
The robot consists of two platforms: a fixed upper base (1) and a small mobile platform (8), connected by three levers. Each lever consists of two parts: the upper arm (4) is rigidly connected to the engine (3) located on the upper base, and the lower arm is a parallelogram (5), in the corners of which are installed the so-called. universal joints (6, 7) (
wiki ) that allow angles to change. Each parallelogram is connected to the upper arm by the hinge (16) so that its upper side always remains perpendicular to its lever and parallel to the plane of the upper base. Due to this, the mobile robot platform attached to the lower sides of the parallelograms will also always be parallel to the upper base. We can control the position of the platform by changing the angle of rotation of the upper arms relative to the base of the robot with the help of engines.
In the center of the lower platform (8) is attached the so-called. the working body (in English they use the term end effector) of the robot (9). This may be a manipulator, a gripping device or, for example, an extruder in the case of a 3D printer. Additionally, another engine (11) can be used, which provides rotation of the working element through the rod (14).
The main advantage of delta robots is speed: heavy engines are placed on a fixed base, only levers and a lower platform move, which they try to make from light composite materials, thereby reducing their inertia. Here, for example,
article on Geektimes with a couple of very spectacular videos.
Task statement
To build your own delta robot, you need to learn how to solve two problems. In the first situation, we know the position to which we want to move the robot's manipulator (for example, we want to grab a cookie that is on a conveyor at a point with coordinates
(x, y, z) . To do this, we need to determine the angles to which we They must turn the engines connected with the levers of the robot to set it in the correct position to grip.The procedure for determining these angles is called the inverse (in some Russian-language sources the word “inverse” is used) kinematic task.
In the second situation, we know the angles that the robot control motors are turned on (if we use servomotors, then the angles can be easily recognized by reading the readings from the angle sensors), and we want to find the position of the robot platform in space (for example, to correct its position) . This is a direct kinematic problem.
We formalize both problems. Both the motionless base of the robot and its moving platform can be represented as equilateral triangles: in the diagram below, they are painted in green and pink, respectively. The rotation angles of the levers of the robot relative to the plane of the base (they are also the angles of rotation of the motors) are designated as
Ѳ 1 ,
2 and
Ѳ 3 , and the coordinates of the
E 0 point located in the center of the mobile platform and in which the robot arm will be fixed in real life
(x 0 , y 0 , z 0 ) .
It turns out that we have to come up with two functions:
- f inverse (x 0 , y 0 , z 0 ) → (Ѳ 1 , Ѳ 2 , Ѳ 3 ) to solve the inverse kinematic problem and
- f forward (Ѳ 1 , Ѳ 2 , 3 ) → (x 0 , y 0 , z 0 ) to solve the direct kinematic problem.
Inverse kinematics
Let's set some key parameters which are defined by the geometrical sizes of our robot:
Denote the length of the side of the upper base
f , the side of the lower platform
e , the length of the upper arm of the lever
r f and the length of the lower arm (the long side of the parallelogram)
r e . For calculations, we choose a coordinate system with a reference point that coincides with the geometric center of the upper triangle. We will direct the
Z axis upwards, so the z-coordinate of the mobile platform will always be negative.
The design of the robot implies that the lever
F 1 J 1 (see figure below) can only rotate in the
YZ plane, describing a circle with a radius of
r f centered at the point
F 1 (in this place it is attached to the engine). Unlike
F 1 , nodes
J 1 and
E 1 use universal joints, due to which arm
E 1 J 1 can freely rotate relative to
E 1 , describing a sphere of radius
r e centered at point
E 1 .
The intersection of this sphere and the
YZ plane is a circle centered at the point
E ' 1 with a radius
E' 1 J 1 , where the point
E ' 1 lies as the projection of the point
E 1 onto the
YZ plane. Then the point
J 1 will be located at the intersection of two circles with centers at the points
E ' 1 and
F 1 , and we can determine the radii of these circles. There is a small subtlety: the circles intersect at two points, but we are only interested in one of them - with a smaller value of the
y coordinate, since we want the levers of the robot to always stick out "elbows" outwards. Having thus determined the coordinates of the point
J 1 , we can easily find the angle of interest to us
1 .
For convenience, the projection of our three-dimensional image on the
YZ plane is shown below:
The lower platform is an equilateral triangle whose center is the point
E 0 (x 0 , y 0 , z 0 ) . Mean distance
which gives us the following coordinates of the point
E 1 and its projection
E ' 1 on the
YZ plane:
The distance
E 1 E ' 1 = x 0 , then, according to the Pythagorean theorem,
Since the upper platform is also an equilateral triangle, the coordinates of the point
F 1 will be
To find the coordinates of the point
J 1 , which is the intersection of two circles, it is necessary to solve the system of equations:
The coordinates of the centers of the circles are known to us; if we substitute them, we get the following expression:
If we expand the brackets and subtract one equation from another, we can express the z-coordinate of the point
J 1 in a linear way through the y-coordinate, then, substituting it into the second equation, we get the usual quadratic equation for y, from the two solutions of which we choose the smallest we spoke above). And having thus obtained the coordinates of the point
J 1 , we find the angle
All the expressions turned out to be quite simple due to the successful choice of the coordinate system: the lever arm
F 1 J 1 always moves in the
YZ plane, so we can simply ignore the
x coordinate. To maintain this advantage when finding the two remaining angles
Ѳ 2 and
Ѳ 3 , we use the symmetry of the delta-robot design. First, rotate our coordinate system 120 ° counterclockwise in the
XY plane around the
Z axis:
We got a new coordinate system
X'Y'Z ' , and in this new system we can use our ready-made formulas to find the angle
2 . The only subtlety is that we must first recalculate the coordinates of the point
E 0 in the new frame of reference. This is easily done using the well-known formula (transformation when the system is rotated around the origin), shown in the figure above. To find the angle
3, it will also be necessary to rotate the original reference system, but now it is already clockwise. This technique is very conveniently implemented as a program: it is enough to write a function to calculate the angle Ѳ in the YZ plane, and then call it three times for each of the corners and frames of reference.
Direct kinematics
Let's try to solve the inverse problem: now we know the angles
Ѳ 1 ,
Ѳ 2 and
Ѳ 3 , and we want to find the coordinates
(x 0 , y 0 , z 0 ) of the point
E 0 located in the center of the mobile platform of our robot. Knowing the angles, we can easily find the coordinates of the points
J 1 ,
J 2 and
J 3 (see the figure below). The arms of the arms
J 1 E 1 ,
J 2 E 2 and
J 3 E 3 can freely rotate around the points
J 1 ,
J 2 and
J 3 respectively, forming in space three spheres with radii
r e .
We use a clever trick: displace the centers of each of these spheres from the points
J 1 ,
J 2 ,
J 3 in the
XY plane in the direction of the
Z axis, using the displacement vectors
E 1 E 0 ,
E 2 E 0 and
E 3 E 0, respectively (in the figure shown as red arrows). After this transformation, it turns out that all three spheres intersect at point
E 0 , as shown in the figure below:
It turns out that to determine the coordinates
(x 0 , y 0 , z 0 ) of the point
E 0 we must find the intersection point of three spheres, the radii and coordinates of whose centers are known to us. In other words, we need to solve a system of three equations describing three-dimensional spheres:
where
(x i , y i , z i ) are the coordinates of the centers of the spheres
J ' 1 ,
J' 2 and
J ' 3 , which can be found as follows:
Below, to shorten the record, I will use the notation
(x 1 , y 1 , z 1 ) ,
(x 2 , y 2 , z 2 ) and
(x 3 , y ) as the coordinates of the points
J ' 1 ,
J' 2 and
J ' 3. 3 , z 3 ) respectively. I also want to note that
x 1 = 0 (since the point
J ' 1 is in the
YZ plane). We get the following system of equations:
We introduce the notation
and, subtracting the second and third from the upper equation, as well as the third from the second, we get:
Subtracting the second from the first equation (thus reducing
y ) and the third from the second (reducing
x ), we can express
x and
y in
z :
Now, substituting
x and
y , expressed in terms of
z , into the equation for the first circle (with center at the point
J ' 1 ), we get:
It remains to solve this quadratic equation (in the standard way, through the discriminant) in order to find
z (we remember to choose the smallest of the two
z !), And through it
x and
y .
Source Code Examples
Below are examples of functions for calculating the kinematics of a delta robot in the C language. The names of the variables correspond to the notation used in the article, the angles of
theta1
,
theta2
and
theta3
specified in degrees.
Used Books
All the key ideas about the kinematics of the delta robot I took from the work of prof. Paul Zsombor-Murray "
Descriptive Geometric Kinematic Analysis of Clavel's" Delta "Robot ". Frankly speaking, my mathematical preparation was not enough to understand it to the end, so I had to derive a lot myself.
Conclusion
Thanks to everyone who read this article to the end. I hope for someone it will be useful and will inspire you to create your own variants of a delta robot.