Disclosure of Invention
In view of the foregoing, it is desirable to provide a method and system for calibrating a robot user coordinate system.
A method of calibrating a robot user coordinate system, the moving end of the robot being provided with a probe for detecting position coordinates of a workpiece surface point, the method comprising the steps of:
under a first coordinate system, taking position coordinates of at least ten sampling points on the surface of the workpiece through the probe, wherein X coordinates of four sampling points are respectively 1X, 2X, 5X and 6X, Y coordinates of the other two sampling points are respectively 3Y and 4Y, and Z coordinates of the rest four sampling points are respectively 7Z, 8Z, 9Z and 10Z;
determining first correction point coordinates (X1, Y1, Z1), wherein X1 ═ 1X +2X)/2, Y1 ═ 3Y +4Y)/2, Z1 ═ 7Z +8Z +9Z +10Z)/4, Rz ═ atan ((6X-5X)/t), t is an arbitrary value;
determining second calibration point coordinates (X2, Y2, Z2), wherein X2 ═ X1+ t, Y2 ═ Y1+ t ═ tanRz, Ry ═ atan ((7Z-8Z)/t), Z2 ═ Z1+ t ·;
determining third correction point coordinates (X3, Y3, Z3), wherein X3 ═ X1+ t tanRz, Y3 ═ Y1+ t, Rx ═ atan ((10Z-9Z)/t), Z3 ═ Z1+ t tanRx;
and taking the first correction point coordinate as the origin coordinate of the corrected user coordinate system, taking the straight line where the first correction point coordinate and the second correction point coordinate are located as the X-axis direction of the corrected user coordinate system, and taking the plane where the first correction point coordinate, the second correction point coordinate and the third correction point coordinate are located as the XY plane of the user coordinate system.
By adopting the technical scheme, the point taking modes of the first correction point coordinate, the second correction point coordinate and the third correction point coordinate are not random, but are related to the selection of the parameter t, when the parameter t is selected, the first correction point coordinate, the second correction point coordinate and the third correction point coordinate are determined, the point taking standards are consistent, the correction results of different robots are more uniform, and the efficiency is corrected.
In one embodiment, in the step of taking point coordinates 1X and 2X, points are taken by the probe on both sides of the workpiece in the Y-axis direction.
By adopting the technical scheme, the midpoint coordinate is convenient to obtain, and the point-taking reference on the workpiece can be the midpoint coordinate as the reference.
In one embodiment, in the step of taking point coordinates 1X and 2X, two points corresponding to the coordinates 1X and 2X are disposed at a position where the distance of the workpiece in the Y-axis direction of the first coordinate system is maximum.
By adopting the technical scheme, the coordinate precision of the midpoint coordinate is convenient to improve.
In one embodiment, in the step of taking point coordinates 5X and 6X, the positions of two points corresponding to the coordinates 5X and 6X are at a distance t along the X-axis direction of the first coordinate system.
By adopting the technical scheme, the uniform parameter t is selected, so that the point taking is convenient.
In one embodiment, in the step of taking point coordinates 3Y and 4Y, two points corresponding to the coordinates 3Y and 4Y are disposed where the distance of the workpiece in the X-axis direction of the first coordinate system is maximum.
By adopting the technical scheme, the coordinate precision of the midpoint coordinate is convenient to improve.
In one embodiment, the workpiece is a rectangular parallelepiped.
By adopting the technical scheme, the cuboid workpiece is regular in appearance, higher in point taking precision and higher in speed.
In one embodiment, four points corresponding to the point coordinates 1X, 3Y, 2X and 4Y are respectively located on four sides of the rectangular workpiece.
By adopting the technical scheme, the point is taken through the side edge, and the point taking mode is simple, quick and efficient.
In one embodiment, two points corresponding to coordinates 5X and 6X are located on one side of the rectangular parallelepiped workpiece.
By adopting the technical scheme, the point taking is convenient and the efficiency is high.
In one embodiment, four points corresponding to the point coordinates 7Z, 8Z, 9Z and 10Z are respectively located on the top surface of the workpiece of the rectangular parallelepiped.
In one embodiment, the coordinates in the Z-axis direction are determined through four points, so that the efficiency is high, and the precision is high.
A system for calibrating a robot user coordinate system, comprising:
the jig is used for clamping a workpiece; and
the robot comprises a moving end, a probe is arranged on the moving end, and the moving end of the robot drives the probe to move so as to detect the position coordinates of the sample points on the surface of the workpiece.
By adopting the technical scheme, the user coordinate system is corrected through the system, the intellectualization is realized, and the efficiency is improved.
In summary, the point fetching manner of the first correction point coordinate, the second correction point coordinate and the third correction point coordinate is not random, but is related to the selection of the parameter t, when the parameter t is selected, the first correction point coordinate, the second correction point coordinate and the third correction point coordinate are determined, the point fetching standards are consistent, the correction results of different robots are more uniform, and the efficiency block is corrected.
Detailed Description
To facilitate an understanding of the invention, the invention is described more fully below with reference to the accompanying drawings. Preferred embodiments of the present invention are shown in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
It will be understood that when an element is referred to as being "secured to" another element, it can be directly on the other element or intervening elements may also be present. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. In contrast, when an element is referred to as being "directly on" another element, there are no intervening elements present. The terms "vertical," "horizontal," "left," "right," and the like as used herein are for illustrative purposes only.
Fig. 1 is a schematic diagram of a calibration of the user coordinate system of the robot 160 in an embodiment, wherein the robot 160 may be an industrial robot, and in particular a grinding robot. The robot 160 has at least two coordinate systems, a tool coordinate system and a user coordinate system, respectively. Taking a grinding robot as an example, a tool coordinate system is provided on the grinding head 180 at the moving end of the grinding robot, and a user coordinate system is provided on the workpiece 100. Prior to polishing, calibration of the user coordinate system on the workpiece 100 is required to accurately move the polishing head 180 of the robot 160 to a set position.
A method of calibrating a user coordinate system of a robot 160, the moving end of the robot 160 being provided with a probe 170 for probing the position coordinates of surface points of a workpiece 100, the method comprising the following steps.
In the first coordinate system, the first coordinate system may be a tool coordinate system or another preset coordinate system, and the position coordinates of at least ten sampling points are acquired on the workpiece 100 through the probe 170, wherein the position coordinates of the sampling points do not need to acquire coordinates on all three coordinate axes, and only the position coordinates of the sampling points on one coordinate axis need to be acquired. In the following embodiments, the collected coordinates are expressed in such a manner that, for example, aX denotes the coordinate values of the spots collected in the X-axis direction of the first coordinate system, for example, bY denotes the coordinate values of the spots collected in the Y-axis direction of the first coordinate system, and for example, cZ denotes the coordinate values of the spots collected in the Z-axis direction of the first coordinate system. Specifically, taking the following ten sampling points in a first coordinate system, wherein the coordinates of four sampling points in the X-axis direction are 1X, 2X, 5X and 6X, and the coordinates of the four sampling points in the Y-axis direction and the coordinates of the four sampling points in the Z-axis direction are not collected; the coordinates of the two sampling points in the Y-axis direction are 3Y and 4Y, and the coordinates of the two sampling points in the X-axis direction and the coordinates of the two sampling points in the Z-axis direction are not collected; the coordinates of the four sampling points in the Z-axis direction are 7Z, 8Z, 9Z and 10Z, and the coordinates of the four sampling points in the X-axis direction and the Y-axis direction are not collected. Wherein, the ten points are all points on the outer surface of the workpiece 100 by the probe 170.
First correction point coordinates (X1, Y1, Z1) are determined based on the ten sample points collected above. Wherein the values of X1, Y1, and Z1 are calculated according to the following formulas, respectively:
X1=(1X+2X)/2;
that is, the coordinate value of X1 is the midpoint position of sample point 1X and sample point 2X in the X-axis direction.
Y1=(3Y+4Y)/2;
That is, the coordinate value of Y1 is the midpoint position of the samples 3Y and 4Y in the Y-axis direction.
Z1=(7Z+8Z+9Z+10Z)/4;
That is, the coordinate value of Z1 is the midpoint position of the sampling points 7Z, 8Z, 9Z and 10Z in the Z-axis direction.
As shown in fig. 2, the value of Rz, which is atan ((6X-5X)/t), is calculated by a trigonometric function, where t is an arbitrary number, and t may be 200mm, for example.
Second correction point coordinates (X2, Y2, Z2) are determined based on the ten samples collected above. Wherein the values of X2, Y2, and Z2 are calculated according to the following formulas, respectively:
x2 ═ X1+ t ═ (1X +2X)/2+ t; that is, the first coordinate system extends along the X-axis direction by the distance t, and the X-coordinate of the second calibration point is X2.
Y2 ═ Y1+ t ═ tanRz ═ Y1 ═ 3Y +4Y)/2+ t ═ tanRz ═ 3Y +4Y)/2+ 6X-5X; that is, the XY plane is corrected after rotating the first coordinate system by an Rz angle, and then the Y coordinate of the second correction point after moving the distance t along the X axis is obtained as Y2.
As shown in fig. 3, the angle value of Ry, which is atan ((7Z-8Z)/t), is calculated by a trigonometric function.
Then, Z2 ═ Z1+ t ═ tanRy ═ Z1+ 7Z-8Z; that is, the XZ plane is corrected after rotating for Ry angle under the first coordinate system, and then the Z coordinate of the second correction point after moving for the distance t along the X axis is obtained as Z2.
The third correction point coordinates (X3, Y3, Z3) are determined based on the ten sample points collected above. Wherein the values of X3, Y3, and Z3 are calculated according to the following formulas, respectively:
x3 ═ X1+ t ═ tanRz ═ X1+ 6X-5X; namely, the Y axis is corrected after rotating the Rz angle under the first coordinate system, and then the X coordinate of the third correction point after moving the distance t along the Y axis is obtained.
Y3 ═ Y1+ t ═ (3Y +4Y)/2+ t; namely, the Y coordinate of the third position point is obtained by extending the distance t along the Y-axis direction under the first coordinate system.
Rx=atan((10Z-9Z)/t);
Z3 ═ Z1+ t tanRx ═ 7Z +8Z +9Z +10Z)/4+ 10Z-9Z. Namely, in the first coordinate system, the Z axis is corrected after the Rx angle is rotated, and then the Z coordinate of the third correction point is obtained after the movement distance t along the Y axis is obtained.
And taking the first correction point coordinate as the origin coordinate of the corrected user coordinate system, taking the straight line where the first correction point coordinate and the second correction point coordinate are located as the X-axis direction of the corrected user coordinate system, and taking the plane where the first correction point coordinate, the second correction point coordinate and the third correction point coordinate are located as the XY plane of the user coordinate system.
It can be seen that the point selection method of the first correction point coordinate, the second correction point coordinate, and the third correction point coordinate is not random, but is related to the selection of the parameter t, and when the parameter t is selected, for example, t is selected to be 200mm, the first correction point coordinate, the second correction point coordinate, and the third correction point coordinate are determined, and even when the different robot 160 is replaced and the workpiece 100 of the same standard jig is corrected, the first correction point coordinate, the second correction point coordinate, and the third correction point coordinate are all at the determined positions. Therefore, the problem of inconsistent point-taking standards caused by the traditional random point-taking can be solved. The point-taking mode can be duplicated on a plurality of robots 160, so that the point-taking standards of different robots 160 are consistent, the calibration standards of user coordinate systems of different robots 160 are uniform, and the accuracy error is found to be about +/-1mm in actual tests. Because of adopting the uniform point-taking mode, the method can be realized by a robot 160 program, and the efficiency is improved compared with the manual random point-taking.
As shown in fig. 2, the rectangular parallelepiped workpiece 100 is taken as an example for detailed description, but the workpiece 100 to be specifically applied is not limited to a rectangular parallelepiped, and may be a workpiece having an arbitrary shape.
When the workpiece 100 is a rectangular parallelepiped, a method of correcting the user coordinate system of the robot 160 may be performed by taking points as follows. The coordinate system shown in fig. 2, 3 and 4 is the first coordinate system, i.e. the coordinate system before the robot 160 is corrected, and the robot 160 user coordinate system is corrected by rotating a certain angle based on the first coordinate system.
The following coordinates of the sampling points are all performed on the first coordinate system.
The rectangular parallelepiped workpiece 100 includes a first side 110, a second side 120, a third side 130, a fourth side 140, and a top surface 150.
In the step of taking point coordinates 1X and 2X, points are taken on both sides of the workpiece 100 in the Y-axis direction by the probe 170. That is, the coordinates 1X and 2X in the X-axis direction are obtained by the probe 170 colliding randomly against the first side 110 and the third side 130. When the workpiece 100 is a rectangular parallelepiped, the probe 170 may take a point at any position of the first side 110 and the third side 130.
When the workpiece 100 is in another shape, in the step of taking the point coordinates 1X and 2X, the positions of the two points corresponding to the coordinates 1X and 2X are at the farthest distance of the workpiece 100 along the Y-axis direction of the first coordinate system, that is, the positions of the two points corresponding to the coordinates 1X and 2X are at the largest distance of the workpiece 100 along the Y-axis direction of the first coordinate system. The workpiece 100 may be intersected by several axes parallel to the Y-axis, for example, and among all the intersections, the X-coordinate of the point where the distance in the Y-axis direction is the largest, i.e., the coordinates corresponding to 1X and 2X. Of course, the point-taking method is only for finding the same point under different robots 160, and the point-taking may be performed in a random point-taking manner.
In the step of taking point coordinates 5X and 6X, the positions of two points corresponding to the coordinates 5X and 6X are at a distance t in the X-axis direction of the workpiece 100 along the first coordinate system. t may be 200mm, 300mm, etc., and the specific value is not limited, but it should be ensured that the probe 170 still collides with the side of the workpiece 100 after moving the distance t.
The coordinates 3Y and 4Y in the Y-axis direction are obtained by the probe 170 colliding randomly against the second side 120 and the fourth side 140. In the step of taking the point coordinates 3Y and 4Y, the positions of the two points corresponding to the coordinates 3Y and 4Y are at the farthest distance of the workpiece 100 in the X-axis direction of the first coordinate system, that is, the positions of the two points corresponding to the coordinates 3Y and 4Y are at the largest distance of the workpiece 100 in the X-axis direction of the first coordinate system. In a manner similar to when taking 1X and 2X, when the workpiece 100 is a rectangular parallelepiped, since the second side 120 and the third side 130 are parallel, the X-coordinate of the point taken throughout the second side 120 is the same, and the X-coordinate of the point taken throughout the fourth side 140 is the same. For convenience of determining the midpoint coordinate, when the workpiece 100 has another shape, the two points taken in the present embodiment may be Y coordinates of two points of the workpiece 100 that are farthest from each other in the X-axis direction.
Four points corresponding to the point coordinates 7Z, 8Z, 9Z and 10Z are respectively located on the top surface 150 of the rectangular parallelepiped workpiece 100.
A system for correcting a robot 160 user coordinate system, comprising: the jig is used for clamping the workpiece 100; and the robot 160, the robot 160 includes moving the end, be provided with the probe 170 on the moving end, the moving end drive of robot 160 the probe 170 removes in order to survey the position coordinate of work piece 100 surface appearance point. Robot 160 may execute the program in the method described above to take points and correct the user coordinate system.
In order to solve the problems of the invention, the computer program processing flow is used as the basis for all or part, and the computer program which is prepared according to the flow is executed by the computer, so as to control or process the external object or the internal object of the computer.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.