CN112847441A - Six-axis robot coordinate offset detection method and device based on gradient descent method - Google Patents

Six-axis robot coordinate offset detection method and device based on gradient descent method Download PDF

Info

Publication number
CN112847441A
CN112847441A CN202110076809.2A CN202110076809A CN112847441A CN 112847441 A CN112847441 A CN 112847441A CN 202110076809 A CN202110076809 A CN 202110076809A CN 112847441 A CN112847441 A CN 112847441A
Authority
CN
China
Prior art keywords
matrix
target
parameter
joint
axis robot
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110076809.2A
Other languages
Chinese (zh)
Other versions
CN112847441B (en
Inventor
郭永杰
王钦若
贺加乐
刘建圻
张慧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN202110076809.2A priority Critical patent/CN112847441B/en
Publication of CN112847441A publication Critical patent/CN112847441A/en
Application granted granted Critical
Publication of CN112847441B publication Critical patent/CN112847441B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J19/00Accessories fitted to manipulators, e.g. for monitoring, for viewing; Safety devices combined with or specially adapted for use in connection with manipulators
    • B25J19/0095Means or methods for testing manipulators

Abstract

The invention discloses a six-axis robot coordinate offset detection method and device based on a gradient descent method, wherein the method comprises the following steps: acquiring a standard joint matrix for the six-axis robot; performing repeated positioning operation on the six-axis robot for multiple times to obtain a plurality of arm extension joint matrixes; adjusting the ith parameter in the standard joint matrix to generate a target matrix; determining a target cost value corresponding to the target matrix according to the target matrix and the arm extension joint matrixes; if the target cost value is smaller than the preset threshold value, the target matrix and the standard joint matrix are compared, and the coordinate offset of the six-axis robot is determined, so that the calibration cost of the six-axis robot is reduced more effectively, and the calibration accuracy and the measurement efficiency are improved.

Description

Six-axis robot coordinate offset detection method and device based on gradient descent method
Technical Field
The invention relates to the technical field of robot coordinate offset detection, in particular to a six-axis robot coordinate offset detection method and device based on a gradient descent method.
Background
Six-axis robots have been widely used in various aspects of industrial production. With the expansion of the application range, the requirement on the positioning precision of the robot is higher and higher. Because the teaching mode is widely adopted for robot programming at present, the requirement on the repeated positioning precision is higher. However, in the assembly process of the parts of the robot, certain errors may exist, the zero position of each joint shaft of the robot may be inaccurate due to insufficient machining precision of a manufacturer, and the like, which all affect the positioning precision of the robot, and after the robot runs for a long time and loses the zero position of the joint shaft of the robot, the zero position correction needs to be performed in time. Therefore, the robot needs to be regularly detected in terms of repeated positioning accuracy so as to maintain and correct the robot and ensure the normal operation of the robot.
In the manufacturing process of the six-axis industrial robot, manufacturers need to detect the repeated positioning precision of the robot, and most of the six-axis industrial robot adopts a laser tracker to detect at present. For zero correction, different six-axis industrial robot manufacturers have different zero correction methods and modes, and more common methods include a dial indicator, a reticle, a side-tipping instrument, an EMT (empirical mode test) or a groove.
However, the calibration equipment used in the above calibration method is expensive, some calibrations are inaccurate and inefficient, and the zero position correction devices between robots of various manufacturers cannot be used universally, which is inconvenient.
Disclosure of Invention
The invention provides a gradient descent method-based six-axis robot coordinate offset detection method and device, and solves the technical problems that the existing calibration method is high in cost, low in accuracy and measurement efficiency, and incapable of achieving universal zero correction.
The invention provides a six-axis robot coordinate offset detection method based on a gradient descent method, which comprises the following steps:
acquiring a standard joint matrix for the six-axis robot;
performing repeated positioning operation on the six-axis robot for multiple times to obtain a plurality of arm extension joint matrixes;
adjusting the ith parameter in the standard joint matrix to generate a target matrix; wherein i is more than or equal to 1, and i is a positive integer;
determining a target cost value corresponding to the target matrix according to the target matrix and the arm extension joint matrixes;
and if the target cost value is smaller than a preset threshold value, comparing the target matrix with the standard joint matrix, and determining the coordinate offset of the six-axis robot.
Optionally, the method further comprises:
if the target cost value is greater than or equal to the preset threshold value, judging whether the ith parameter is the last parameter;
if the ith parameter is not the last parameter, taking the (i + 1) th parameter as a new ith parameter;
if the ith parameter is the last parameter, taking the first parameter as a new ith parameter;
and skipping to execute the step of adjusting the ith parameter in the standard joint matrix to generate a target matrix.
Optionally, the step of adjusting the ith parameter in the standard joint matrix to generate a target matrix includes:
adjusting the ith parameter in the standard joint matrix according to a preset step length to obtain an adjustment matrix;
determining an adjustment cost value and a learning rate corresponding to the adjustment matrix according to the adjustment matrix and the plurality of arm extension joint matrices;
and adjusting the ith parameter in the adjustment matrix according to the adjustment cost value and the learning rate to generate a target matrix.
Optionally, the step of determining a target cost value corresponding to the target matrix according to the target matrix and the plurality of arm abduction joint matrices includes:
determining the terminal coordinates corresponding to each repeated positioning operation according to the target matrix and the arm extension joint matrixes;
calculating the Euclidean distance between two adjacent terminal coordinates in a subsection mode;
and calculating the distance average value of the plurality of groups of Euclidean distances as the target cost value corresponding to the target matrix.
Optionally, the coordinate offset includes offset joints and offset, and if the target cost value is smaller than a preset threshold, the step of comparing the target matrix with the standard joint matrix to determine the coordinate offset of the six-axis robot includes:
if the target cost value is smaller than a preset threshold value, comparing the target matrix with the standard joint matrix;
when the target matrix and the standard joint matrix are different, determining different parameters in the target matrix and the standard joint matrix as deviation parameters;
determining the offset joint according to the joint to which the deviation parameter belongs;
calculating a difference between the deviation parameters as the offset.
The invention also provides a six-axis robot coordinate deviation detection device based on the gradient descent method, which comprises the following steps:
the standard joint matrix acquisition module is used for acquiring a standard joint matrix aiming at the six-axis robot;
the arm extension joint matrix determining module is used for executing repeated positioning operation on the six-axis robot for multiple times to obtain a plurality of arm extension joint matrixes;
the parameter adjusting module is used for adjusting the ith parameter in the standard joint matrix to generate a target matrix; wherein i is more than or equal to 1, and i is a positive integer;
the target cost value determining module is used for determining a target cost value corresponding to the target matrix according to the target matrix and the arm extension joint matrixes;
and the coordinate offset module is used for comparing the target matrix with the standard joint matrix and determining the coordinate offset of the six-axis robot if the target cost value is smaller than a preset threshold value.
Optionally, the method further comprises:
the judging module is used for judging whether the ith parameter is the last parameter or not if the target cost value is greater than or equal to the preset threshold value;
a first parameter updating module, configured to take the (i + 1) th parameter as a new ith parameter if the ith parameter is not the last parameter;
a second parameter updating module, configured to, if the ith parameter is the last parameter, take the first parameter as a new ith parameter;
and the skipping module is used for skipping and executing the step of adjusting the ith parameter in the standard joint matrix to generate a target matrix.
Optionally, the parameter adjusting module includes:
the modulation matrix generation submodule is used for adjusting the ith parameter in the standard joint matrix according to a preset step length to obtain an adjustment matrix;
the cost value determining submodule is used for determining an adjusting cost value and a learning rate corresponding to the adjusting matrix according to the adjusting matrix and the arm extension joint matrixes;
and the target matrix generation submodule is used for adjusting the ith parameter in the adjustment matrix according to the adjustment cost value and the learning rate to generate a target matrix.
Optionally, the target cost value determination module includes:
the terminal coordinate determination submodule is used for determining terminal coordinates corresponding to each repeated positioning operation according to the target matrix and the arm spread joint matrixes;
the Euclidean distance calculation submodule is used for calculating the Euclidean distance between two adjacent terminal coordinates in a subsection mode;
and the target cost value determining submodule is used for calculating the distance average value of the Euclidean distances as the target cost value corresponding to the target matrix.
Optionally, the coordinate offset includes an offset joint and an offset amount, and the coordinate offset module includes:
the matrix comparison submodule is used for comparing the target matrix with the standard joint matrix if the target cost value is smaller than a preset threshold value;
a deviation parameter determination submodule for determining different parameters in the target matrix and the standard joint matrix as deviation parameters when the target matrix and the standard joint matrix are different;
the offset joint determining submodule is used for determining the offset joint according to the joint to which the deviation parameter belongs;
and the offset determining submodule is used for calculating the difference value between the deviation parameters as the offset.
According to the technical scheme, the invention has the following advantages:
according to the method, after a standard joint matrix of the six-axis robot is obtained, repeated positioning operation is performed on the six-axis robot for multiple times, and a plurality of arm extension joint matrixes are obtained; adjusting the ith parameter in a standard joint matrix to generate a target matrix, and determining a target cost value corresponding to the target matrix according to the target matrix and the plurality of arm extension joint matrices; and if the target cost value is smaller than the preset threshold value, further comparing the target matrix with the standard joint matrix, and determining the coordinate offset of the six-axis robot. Therefore, the technical problems that the existing calibration method is high in cost, low in accuracy and measurement efficiency and incapable of realizing universal zero correction are solved, the calibration cost of the six-axis robot is effectively reduced, and the calibration accuracy and the measurement efficiency are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a flowchart illustrating steps of a six-axis robot coordinate offset detection method based on a gradient descent method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating steps of a six-axis robot coordinate offset detection method based on a gradient descent method according to a second embodiment of the present invention;
fig. 3 is a schematic diagram of coordinate parameters of a six-axis robot joint according to a second embodiment of the present invention;
fig. 4 is a schematic coordinate system diagram of each joint of a six-axis robot according to a second embodiment of the present invention;
fig. 5 is a block diagram of a coordinate offset detection apparatus for a six-axis robot based on a gradient descent method according to a third embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a gradient descent method-based six-axis robot coordinate offset detection method and device, which are used for solving the technical problems that the existing calibration method is high in cost, low in accuracy and measurement efficiency and incapable of realizing universal zero correction.
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating steps of a six-axis robot coordinate offset detection method based on a gradient descent method according to an embodiment of the present invention.
The invention provides a six-axis robot coordinate offset detection method based on a gradient descent method, which comprises the following steps:
101, acquiring a standard joint matrix for a six-axis robot;
a six-axis robot refers to a robot having six rotatable joints and capable of realizing the movement of a robot arm of the robot.
The standard joint matrix refers to a matrix formed by coordinates of each joint of the six-axis robot in a standard state, and can be obtained from a manufacturer, or a technician sets an original state by himself and takes the coordinates in the state as the standard joint matrix.
In the embodiment of the present invention, since the offset detection needs to be performed on each joint coordinate of the six-axis robot, a standard joint matrix of the six-axis robot in a standard state may be acquired first.
102, performing repeated positioning operation on the six-axis robot for multiple times to obtain a plurality of arm extension joint matrixes;
the repeated positioning operation refers to an operation performed by the six-axis robot repeatedly reaching a point corresponding to the standard joint matrix.
After the standard joint matrix is obtained, on the basis of the standard joint matrix, repeated positioning operation is carried out on the six-axis robot for multiple times, and a corresponding arm expansion joint matrix can be obtained in each repeated positioning operation.
103, adjusting the ith parameter in the standard joint matrix to generate a target matrix; wherein i is more than or equal to 1, and i is a positive integer;
in the embodiment of the present invention, after the standard joint matrix is obtained, since the coordinate corresponding to each joint is usually represented by a parameter form, in order to adjust the parameters in the standard joint matrix more accurately, the parameters in the standard joint matrix may be adjusted one by one to generate the target matrix.
104, determining a target cost value corresponding to the target matrix according to the target matrix and the arm extension joint matrixes;
after the target matrix is obtained, whether the adjustment meets the preset requirement needs to be determined, and at this time, the target cost value can be calculated according to the target matrix and the arm extension joint matrixes to determine whether the target matrix meets the preset requirement.
And 105, if the target cost value is smaller than a preset threshold value, comparing the target matrix with the standard joint matrix, and determining the coordinate offset of the six-axis robot.
After the target cost value is obtained through calculation, if the target cost value is smaller than a preset threshold value, the target matrix at the moment can be used as a joint matrix obtained by repeatedly positioning the six-axis robot each time, and whether parameter difference exists between the target matrix and a standard joint matrix can be further compared, so that whether coordinate offset exists in the six-axis robot and the specific amount of the coordinate offset can be determined.
In the embodiment of the invention, after the standard joint matrix of the six-axis robot is obtained, repeated positioning operation is carried out on the six-axis robot for multiple times to obtain a plurality of arm extension joint matrixes; adjusting the ith parameter in a standard joint matrix to generate a target matrix, and determining a target cost value corresponding to the target matrix according to the target matrix and the plurality of arm extension joint matrices; and if the target cost value is smaller than the preset threshold value, further comparing the target matrix with the standard joint matrix, and determining the coordinate offset of the six-axis robot. Therefore, the technical problems that the existing calibration method is high in cost, low in accuracy and measurement efficiency and incapable of realizing universal zero correction are solved, the calibration cost of the six-axis robot is effectively reduced, and the calibration accuracy and the measurement efficiency are improved.
Referring to fig. 2, fig. 2 is a flowchart illustrating steps of a six-axis robot coordinate offset detection method based on a gradient descent method according to a second embodiment of the present invention.
The invention provides a six-axis robot coordinate offset detection method based on a gradient descent method, which comprises the following steps:
step 201, acquiring a standard joint matrix for a six-axis robot;
in the embodiment of the invention, the coordinates corresponding to each joint of the six-axis robot can be acquired respectively
Figure BDA0002907835410000071
When the coordinates of the six joints are acquired, a 6 × 6 matrix with 36 parameters may be constructed as a standard joint matrix of the six-axis robot.
202, performing repeated positioning operation on the six-axis robot for multiple times to obtain a plurality of arm extension joint matrixes;
in the specific implementation, in order to conveniently perform repeated positioning operation on the six-axis robot, mathematical modeling can be performed on the six-axis robot, firstly, the D-H mathematical parameters of the six-axis robot body, such as the length of a connecting rod, the offset length of the connecting rod and other parameters, then, the spatial structure of the robot is determined through the D-H parameters, finally, the six-axis robot is subjected to mathematical modeling, and a mathematical model of the six-axis robot is obtained through Matlab software.
It should be noted that, for robots of different models, the spatial structure of the body is different, and the parameters such as joint angles, link lengths, link offsets and the like are different, so that formulas such as the forward kinematics, the inverse kinematics, the calculation of the jacobian matrix of the robot and the like can be applied to robot trajectory planning and the like of various types and structures, therefore, in the derivation process of a series of related formulas of the robot, the parameters such as a0, a1, a2, a3, D1, D2, D3 and the like are adopted to replace the joint lengths and the joint offsets of the robot, and after the D-H parameters of the robot are known, the formulas can be used to describe the interrelationships between the links and the joints of the robot, and the interrelationships between the links and the joints are expressed through a geodetic coordinate system, and a transformation matrix is obtained.
For ease of understanding, the following table 1 gives the D-H parameters for a six-axis robot:
joint serial number θn/(。) dn/mm an/mm αn/(。)
Joint 1 -la1 415 180 -90
Joint 2 l2-90 0 590 0
Joint 3 l3 0 115 -90
Joint 4 -l4 625 0 90
Joint 5 l5 0 0 0
Joint 6 -l6 98 0 0
TABLE 1
Wherein L1, L2, L3, L4, L5 and L6 indicate the rotation angle of each joint, namely, J, L is a matrix of 6 × 6, each row represents a joint, xn, yn and zn of the first three columns indicate the position of the joint, the 4 th column indicates the offset angle around the X axis, the 5 th column indicates the offset angle around the Y axis, the 6 th column indicates the offset angle around the Z axis, the lower matrix is an initial L matrix, and the last 3 columns are all zero, indicating that no deviation is detected around the joint temporarily.
Figure BDA0002907835410000081
Then using the DH method, substituting the above parameters into the following formula, wherein xn, yn, zn are equal to ancos(θn)、an in(θn)、dnPhi, theta,
Figure BDA0002907835410000082
The corresponding parameters are also changed, and the specific changing process is as follows:
s
n-1Tn=An=R(z,θn)T(0,0,dn)T(an,0,0)R(x,αn)
Figure BDA0002907835410000091
referring to fig. 3, fig. 3 shows a coordinate parameter diagram of a six-axis robot joint according to a second embodiment of the present invention.
The D-H modeling is mainly influenced by two types of parameters, namely the parameters of the connecting rod and the position relation parameters of the adjacent connecting rod. The connecting rod size parameters comprise the length of the connecting rod and the torsion angle of the connecting rod; the position relation of the connecting rods comprises the vertical distance length and the connecting rod included angle of the adjacent connecting rods. A fixed coordinate system may be established on each joint, with the need to specify the direction of the X, Y, Z axis for each joint. If the joint i is a revolute joint, ZiThe shaft is in the direction of regular rotation by the right hand; if the joint i is a sliding joint, ZiThe axis being the direction of rectilinear movement of the joint;XiAxis perpendicular to ZiAnd Zi+1The plane of the device; y isiThe axes are determined by the right hand rule.
The right-hand rule refers to that the right hand is used for holding the Z axis, the direction pointed by the thumb is the positive direction of the Z axis, and the method pointed by the four fingers is the positive direction of the Y axis.
Step 203, adjusting the ith parameter in the standard joint matrix to generate a target matrix; wherein i is more than or equal to 1, and i is a positive integer;
optionally, step 203 may include the following sub-steps S11-S13:
s11, adjusting the ith parameter in the standard joint matrix according to a preset step length to obtain an adjustment matrix;
s12, determining an adjustment cost value and a learning rate corresponding to the adjustment matrix according to the adjustment matrix and the arm extension joint matrixes;
and S13, adjusting the ith parameter in the adjustment matrix according to the adjustment cost value and the learning rate to generate a target matrix.
Gradient descent (gradient) is a parameter optimization algorithm commonly used in machine learning and artificial intelligence to recursively approximate a minimum deviation model. The calculation process of the gradient descent method is to solve the minimum value along the descending direction of the gradient (or solve the maximum value along the ascending direction of the gradient). In the field of optimization, the gradient is usually called first-order information to describe the variation of the function F at the variable x, so the gradient-based method is usually called first-order method, and the gradient direction can be obtained by deriving the function, wherein the cost value is constructed as the F function, which is embodied by a six-axis robot as follows:
f (36 parameters) ═ learning rate (F (36 original parameters) — F (one of 36 parameters-step))/step size
In a specific implementation, if the step size of the function is too short, the algorithm is slow to converge. If the step length is too long, the solution may rush over the valley bottom at a time or oscillate, and it is difficult to accurately converge to the optimal solution. The step size is related to the dimension of the function argument itself to be optimized, and the step size adjustment method includes but is not limited to: the attenuation of a preset step size is performed with the number of iterations. For example, at the beginning of the algorithm, if the number of iterations is less than N, a larger step size, such as 0.01, is used, and as the solution approaches the optimal solution, the number of iterations is greater than or equal to N, and at this time, the step size, such as 0.001 or 0.0001, is gradually reduced, and a detailed search is performed around the optimal solution. The step size may also be selected according to the width of the gradient. Where the gradient is small, the function is flat and quickly crosses the flat area with a large step size. Where the gradient is large, the function changes dramatically, with smaller steps to avoid missing the optimum.
In a specific implementation, the first order requirement that the optimal point satisfies the minimum point is that the gradient is 0, which is a candidate point for the global minimum point. The solution is not updated after such a point is found. But due to step size or computer floating point number precision limitations, it is substantially impossible to move the solution to a point where the gradient is exactly 0. A threshold value may be set, for example, using 1 e-4. If the modulus of the gradient of the current point is smaller than the threshold value, the gradient of the point is considered to be approximately 0, and the algorithm is stopped. The algorithm may oscillate around the optimal point without stopping because the step size is not appropriate, which can be avoided by setting the maximum number of iterations.
In the embodiment of the present invention, to further improve the precision of parameter adjustment, the ith parameter in the standard joint matrix may be adjusted according to a preset step length to obtain an adjustment matrix, for example, the ith parameter may be adjusted from the first parameter of the first joint in the standard joint matrix according to the preset step length. Determining an adjustment cost value corresponding to the adjustment matrix according to the adjustment matrix and the plurality of arm extension joint matrices, and selecting a proper learning rate based on the adjustment cost value; and finally, adjusting the ith parameter in the adjustment matrix according to the adjustment cost value and the learning rate to generate a target matrix.
In a specific implementation, the adjustment mode of the ith parameter of the adjustment matrix is to add the adjustment cost value and the value corresponding to the ith parameter to obtain a target parameter, and the adjustment matrix including the target parameter at this time is used as the target matrix.
Optionally, the preset step size may be set to 0.0001 or less, and the preset learning rate may be set to 0.5, since in the actual operation process, as the degree of the optimal solution is approached, the variation range of the cost value is also reduced, at this time, the learning rate and the step size may be gradually reduced by a fixed step size, so as to improve the parameter adjustment precision and reduce the cost value.
Step 204, determining a target cost value corresponding to the target matrix according to the target matrix and the arm extension joint matrixes;
in one example of the present invention, step 204 may include the following sub-steps S21-S23:
s21, determining the terminal coordinates corresponding to each repeated positioning operation according to the target matrix and the arm extension joint matrixes;
s22, calculating the Euclidean distance between two adjacent terminal coordinates in a subsection mode;
and S23, calculating the distance average value of the Euclidean distances as the target cost value corresponding to the target matrix.
In the large range of the manipulator, most of the manipulator arms comprise two joints, namely a rotary joint and a mobile joint. The robot can be regarded as a serial mechanical system formed by hinging a plurality of connecting rods, the relation between the connecting rods and the positions and postures of adjacent rods are described by a connecting rod coordinate system, and the relation between each joint of the robot is expressed by a simplified model. If the position and attitude of the manipulator is to be determined, the position and attitude of each link of the manipulator relative to the previous link is first determined. And describing the pose, namely describing the position and the posture of the mechanical hand. The position and attitude are two very important features describing the current state of the manipulator. In the working space of the manipulator, it is very important to establish a pose coordinate system, and after the coordinate system is established, the coordinate system of two axes of one connecting rod of the manipulator can be calculated by a D-H method to obtain the positive solution of the robot, so that the tail end position of the robot is obtained.
In the embodiment of the invention, the rotation angles and displacements of all joints of the six-axis robot can be obtained according to the target matrix and the plurality of arm expansion joint matrixes, so that the position and the posture of the six-axis robot end effector in a space coordinate system are calculated, and the end coordinate corresponding to the position of the six-axis robot end effector is determined. After the terminal coordinates are obtained, the Euclidean distance can be calculated by adopting two adjacent terminal coordinates, finally, a plurality of groups of Euclidean distances corresponding to the joints are obtained, and the average value of each group of Euclidean distances is calculated respectively to obtain the target cost value.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating a coordinate system of each joint of a six-axis robot according to a second embodiment of the present invention.
Substituting each parameter in the figure into the following formula by using DH method, wherein xn, yn, zn are equal to ancos(θn)、an in(θn)、dnPhi, theta,
Figure BDA0002907835410000111
Will also cause changes to the corresponding parameters, the specific changing process is as follows
s
n-1Tn=An=R(z,θn)T(0,0,dn)T(an,0,0)R(x,αn)
Figure BDA0002907835410000121
And sequentially multiplying the transformed homogeneous transformation matrix of the coordinate system to the right to obtain a pose equation of the robot end effector relative to the base coordinate, wherein the pose equation comprises the following steps:
Figure BDA0002907835410000122
the matrix 0T6 above, as a homogeneous transformation matrix expression for the robot, can be described as the pose of the end effector in space relative to the base coordinate system. At this time, by substituting the joint rotation ln of the robot into the equation θ n, the posture of the robot end effector in space with respect to the base coordinate system can be obtained by changing the joint variables of each joint. In the homogeneous transformation matrix 0T6, px, py, and pz, therefore, combine to form a component of the position vector p of the robot end effector relative to each coordinate axis in the base coordinate system. In addition, nx, ny and nz are components of the vector n relative to each coordinate axis; ox, oy and oz are components of the vector o relative to each coordinate axis; ax, ay, az are components of the vector a relative to the coordinate axes, and the final vectors n, o, a can be described as the pose of the robot end by combining. When a certain parameter of J is changed, the corresponding n-1Tn may be right-multiplied by the corresponding transformation matrix.
Step 205, if the target cost value is smaller than a preset threshold value, comparing the target matrix with the standard joint matrix, and determining the coordinate offset of the six-axis robot;
in another example of the present invention, the coordinate offset includes an offset joint and an offset amount, and step 205 may include the following sub-steps S31-S34:
s31, if the target cost value is smaller than a preset threshold value, comparing the target matrix with the standard joint matrix;
s32, when the target matrix and the standard joint matrix are different, determining different parameters in the target matrix and the standard joint matrix as deviation parameters;
s33, determining the offset joint according to the joint to which the deviation parameter belongs;
and S34, calculating the difference value between the deviation parameters as the offset.
In the embodiment of the invention, if the target cost value is smaller than the preset threshold value, the optimal value meeting the requirement is obtained at the moment, and the target matrix is compared with the standard joint matrix; if certain parameter exists in the target matrix and the standard joint matrix, different parameters in the two matrices are determined as deviation parameters, the joint to which the deviation parameters belong is determined as an offset joint, and the difference value between the deviation parameters in the two matrices is calculated as an offset, so that the coordinate offset of the six-axis robot is obtained, instruments for measuring the coordinate offset of the joint are omitted, the automation degree of product defect detection is improved, and the enterprise deployment cost is reduced.
Step 206, if the target cost value is greater than or equal to the preset threshold, determining whether the ith parameter is the last parameter;
in an example of the present invention, if the target cost value is greater than or equal to the preset threshold, it is indicated that the target matrix at this time does not meet the requirement, but the one-time adjustment of the ith parameter is already finished at this time, it may be continuously determined whether the ith parameter is the last parameter, so as to determine whether to jump to the first parameter to restart the adjustment.
Step 207, if the ith parameter is not the last parameter, taking the (i + 1) th parameter as a new ith parameter;
in the embodiment of the present invention, after the ith parameter is adjusted and compared with the cost value, if the ith parameter is not the last parameter, the next parameter of the current ith parameter, that is, the (i + 1) th parameter, may be used as a new ith parameter, so as to perform iterative adjustment of the next parameter.
In a specific implementation, due to the limitation of the processing precision, the i + k-th parameter may be selected as a new i-th parameter for iterative adjustment, where k is a positive integer.
Step 208, if the ith parameter is the last parameter, taking the first parameter as a new ith parameter;
in another example of the present invention, if the ith parameter is the last parameter, the first parameter may be used as a new ith parameter for the next iteration adjustment.
And 209, skipping to execute the step of adjusting the ith parameter in the standard joint matrix to generate a target matrix.
And after the new ith parameter is obtained, the step of adjusting the ith parameter in the standard joint matrix to generate a target matrix is executed again, so that the target matrix after the parameter adjustment is obtained, and the target cost value can be compared again conveniently.
In the embodiment of the invention, after the standard joint matrix of the six-axis robot is obtained, repeated positioning operation is carried out on the six-axis robot for multiple times to obtain a plurality of arm extension joint matrixes; adjusting the ith parameter in a standard joint matrix to generate a target matrix, and determining a target cost value corresponding to the target matrix according to the target matrix and the plurality of arm extension joint matrices; and if the target cost value is smaller than the preset threshold value, further comparing the target matrix with the standard joint matrix, and determining the coordinate offset of the six-axis robot. Therefore, the technical problems that the existing calibration method is high in cost, low in accuracy and measurement efficiency and incapable of realizing universal zero correction are solved, the calibration cost of the six-axis robot is effectively reduced, and the calibration accuracy and the measurement efficiency are improved.
Referring to fig. 5, fig. 5 is a block diagram illustrating a structure of a six-axis robot coordinate offset detection apparatus based on a gradient descent method according to a third embodiment of the present invention.
The invention provides a six-axis robot coordinate deviation detection device based on a gradient descent method, which comprises the following steps:
a standard joint matrix obtaining module 501, configured to obtain a standard joint matrix for a six-axis robot;
an arm extension joint matrix determining module 502, configured to perform repeated positioning operations on the six-axis robot for multiple times to obtain multiple arm extension joint matrices;
a parameter adjusting module 503, configured to adjust an ith parameter in the standard joint matrix to generate a target matrix; wherein i is more than or equal to 1, and i is a positive integer;
a target cost value determination module 504, configured to determine a target cost value corresponding to the target matrix according to the target matrix and the plurality of arm spread joint matrices;
and a coordinate offset module 505, configured to compare the target matrix with the standard joint matrix if the target cost value is smaller than a preset threshold, and determine a coordinate offset of the six-axis robot.
Optionally, the method further comprises:
the judging module is used for judging whether the ith parameter is the last parameter or not if the target cost value is greater than or equal to the preset threshold value;
a first parameter updating module, configured to take the (i + 1) th parameter as a new ith parameter if the ith parameter is not the last parameter;
a second parameter updating module, configured to, if the ith parameter is the last parameter, take the first parameter as a new ith parameter;
and the skipping module is used for skipping and executing the step of adjusting the ith parameter in the standard joint matrix to generate a target matrix.
Optionally, the parameter adjusting module 503 includes:
the modulation matrix generation submodule is used for adjusting the ith parameter in the standard joint matrix according to a preset step length to obtain an adjustment matrix;
the cost value determining submodule is used for determining an adjusting cost value and a learning rate corresponding to the adjusting matrix according to the adjusting matrix and the arm extension joint matrixes;
and the target matrix generation submodule is used for adjusting the ith parameter in the adjustment matrix according to the adjustment cost value and the learning rate to generate a target matrix.
Optionally, the target cost value determination module 504 includes:
the terminal coordinate determination submodule is used for determining terminal coordinates corresponding to each repeated positioning operation according to the target matrix and the arm spread joint matrixes;
the Euclidean distance calculation submodule is used for calculating the Euclidean distance between two adjacent terminal coordinates in a subsection mode;
and the target cost value determining submodule is used for calculating the distance average value of the Euclidean distances as the target cost value corresponding to the target matrix.
Optionally, the coordinate offset includes an offset joint and an offset amount, and the coordinate offset module 505 includes:
the matrix comparison submodule is used for comparing the target matrix with the standard joint matrix if the target cost value is smaller than a preset threshold value;
a deviation parameter determination submodule for determining different parameters in the target matrix and the standard joint matrix as deviation parameters when the target matrix and the standard joint matrix are different;
the offset joint determining submodule is used for determining the offset joint according to the joint to which the deviation parameter belongs;
and the offset determining submodule is used for calculating the difference value between the deviation parameters as the offset.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A six-axis robot coordinate offset detection method based on a gradient descent method is characterized by comprising the following steps:
acquiring a standard joint matrix for the six-axis robot;
performing repeated positioning operation on the six-axis robot for multiple times to obtain a plurality of arm extension joint matrixes;
adjusting the ith parameter in the standard joint matrix to generate a target matrix; wherein i is more than or equal to 1, and i is a positive integer;
determining a target cost value corresponding to the target matrix according to the target matrix and the arm extension joint matrixes;
and if the target cost value is smaller than a preset threshold value, comparing the target matrix with the standard joint matrix, and determining the coordinate offset of the six-axis robot.
2. The six-axis robot coordinate offset detection method based on the gradient descent method according to claim 1, further comprising:
if the target cost value is greater than or equal to the preset threshold value, judging whether the ith parameter is the last parameter;
if the ith parameter is not the last parameter, taking the (i + 1) th parameter as a new ith parameter;
if the ith parameter is the last parameter, taking the first parameter as a new ith parameter;
and skipping to execute the step of adjusting the ith parameter in the standard joint matrix to generate a target matrix.
3. The six-axis robot coordinate offset detection method based on the gradient descent method according to claim 1, wherein the step of generating the target matrix by adjusting the ith parameter in the standard joint matrix comprises:
adjusting the ith parameter in the standard joint matrix according to a preset step length to obtain an adjustment matrix;
determining an adjustment cost value and a learning rate corresponding to the adjustment matrix according to the adjustment matrix and the plurality of arm extension joint matrices;
and adjusting the ith parameter in the adjustment matrix according to the adjustment cost value and the learning rate to generate a target matrix.
4. The six-axis robot coordinate offset detection method based on the gradient descent method according to claim 1, wherein the step of determining the target cost value corresponding to the target matrix based on the target matrix and the plurality of arm-span joint matrices includes:
determining the terminal coordinates corresponding to each repeated positioning operation according to the target matrix and the arm extension joint matrixes;
calculating the Euclidean distance between two adjacent terminal coordinates in a subsection mode;
and calculating the distance average value of the plurality of groups of Euclidean distances as the target cost value corresponding to the target matrix.
5. The six-axis robot coordinate offset detection method based on the gradient descent method according to any one of claims 1 to 4, wherein the coordinate offset includes offset joints and offset amounts, and the step of determining the coordinate offset of the six-axis robot by comparing the target matrix with the standard joint matrix if the target cost value is smaller than a preset threshold value includes:
if the target cost value is smaller than a preset threshold value, comparing the target matrix with the standard joint matrix;
when the target matrix and the standard joint matrix are different, determining different parameters in the target matrix and the standard joint matrix as deviation parameters;
determining the offset joint according to the joint to which the deviation parameter belongs;
calculating a difference between the deviation parameters as the offset.
6. A six-axis robot coordinate offset detection device based on a gradient descent method is characterized by comprising:
the standard joint matrix acquisition module is used for acquiring a standard joint matrix aiming at the six-axis robot;
the arm extension joint matrix determining module is used for executing repeated positioning operation on the six-axis robot for multiple times to obtain a plurality of arm extension joint matrixes;
the parameter adjusting module is used for adjusting the ith parameter in the standard joint matrix to generate a target matrix; wherein i is more than or equal to 1, and i is a positive integer;
the target cost value determining module is used for determining a target cost value corresponding to the target matrix according to the target matrix and the arm extension joint matrixes;
and the coordinate offset module is used for comparing the target matrix with the standard joint matrix and determining the coordinate offset of the six-axis robot if the target cost value is smaller than a preset threshold value.
7. The gradient descent method-based six-axis robot coordinate displacement detection device according to claim 6, further comprising:
the judging module is used for judging whether the ith parameter is the last parameter or not if the target cost value is greater than or equal to the preset threshold value;
a first parameter updating module, configured to take the (i + 1) th parameter as a new ith parameter if the ith parameter is not the last parameter;
a second parameter updating module, configured to, if the ith parameter is the last parameter, take the first parameter as a new ith parameter;
and the skipping module is used for skipping and executing the step of adjusting the ith parameter in the standard joint matrix to generate a target matrix.
8. The gradient descent method-based six-axis robot coordinate displacement detection device according to claim 6, wherein the parameter adjustment module comprises:
the modulation matrix generation submodule is used for adjusting the ith parameter in the standard joint matrix according to a preset step length to obtain an adjustment matrix;
the cost value determining submodule is used for determining an adjusting cost value and a learning rate corresponding to the adjusting matrix according to the adjusting matrix and the arm extension joint matrixes;
and the target matrix generation submodule is used for adjusting the ith parameter in the adjustment matrix according to the adjustment cost value and the learning rate to generate a target matrix.
9. The gradient descent method-based six-axis robot coordinate displacement detection apparatus according to claim 6, wherein the target cost value determination module includes:
the terminal coordinate determination submodule is used for determining terminal coordinates corresponding to each repeated positioning operation according to the target matrix and the arm spread joint matrixes;
the Euclidean distance calculation submodule is used for calculating the Euclidean distance between two adjacent terminal coordinates in a subsection mode;
and the target cost value determining submodule is used for calculating the distance average value of the Euclidean distances as the target cost value corresponding to the target matrix.
10. The six-axis robot coordinate shift detection device based on the gradient descent method according to any one of claims 6 to 9, wherein the coordinate shift includes a shift joint and a shift amount, and the coordinate shift module includes:
the matrix comparison submodule is used for comparing the target matrix with the standard joint matrix if the target cost value is smaller than a preset threshold value;
a deviation parameter determination submodule for determining different parameters in the target matrix and the standard joint matrix as deviation parameters when the target matrix and the standard joint matrix are different;
the offset joint determining submodule is used for determining the offset joint according to the joint to which the deviation parameter belongs;
and the offset determining submodule is used for calculating the difference value between the deviation parameters as the offset.
CN202110076809.2A 2021-01-20 2021-01-20 Six-axis robot coordinate offset detection method and device based on gradient descent method Expired - Fee Related CN112847441B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110076809.2A CN112847441B (en) 2021-01-20 2021-01-20 Six-axis robot coordinate offset detection method and device based on gradient descent method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110076809.2A CN112847441B (en) 2021-01-20 2021-01-20 Six-axis robot coordinate offset detection method and device based on gradient descent method

Publications (2)

Publication Number Publication Date
CN112847441A true CN112847441A (en) 2021-05-28
CN112847441B CN112847441B (en) 2022-02-15

Family

ID=76007856

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110076809.2A Expired - Fee Related CN112847441B (en) 2021-01-20 2021-01-20 Six-axis robot coordinate offset detection method and device based on gradient descent method

Country Status (1)

Country Link
CN (1) CN112847441B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101537617A (en) * 2007-08-30 2009-09-23 应用材料公司 Method and apparatus for robot calibrations with a calibrating device
US20100161125A1 (en) * 2008-12-24 2010-06-24 Canon Kabushiki Kaisha Work apparatus and calibration method for the same
CN105773609A (en) * 2016-03-16 2016-07-20 南京工业大学 Robot kinematics calibration method based on vision measurement and distance error model
CN106403762A (en) * 2016-07-01 2017-02-15 佛山市业鹏机械有限公司 Palletizing robot end part movement repeated positioning accuracy detection method and device
CN108527373A (en) * 2018-06-28 2018-09-14 深圳清华大学研究院 The parameter measurement of mechanical arm and discrimination method and device, terminal, storage medium
CN109304713A (en) * 2018-11-19 2019-02-05 珠海格力电器股份有限公司 Scaling method, device and the computer readable storage medium of tool coordinates system
CN109737850A (en) * 2018-12-20 2019-05-10 合肥欣奕华智能机器有限公司 The measuring device and method of robot pose repeatability
CN110065072A (en) * 2019-05-21 2019-07-30 西南交通大学 The verification method of robot repetitive positioning accuracy
CN111360836A (en) * 2020-04-02 2020-07-03 易思维(杭州)科技有限公司 Robot calibration method for optimizing identification parameters
CN111791231A (en) * 2020-06-02 2020-10-20 同济大学 Robot calibration system and two-dimensional plane and three-dimensional space motion calibration method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101537617A (en) * 2007-08-30 2009-09-23 应用材料公司 Method and apparatus for robot calibrations with a calibrating device
US20100161125A1 (en) * 2008-12-24 2010-06-24 Canon Kabushiki Kaisha Work apparatus and calibration method for the same
CN105773609A (en) * 2016-03-16 2016-07-20 南京工业大学 Robot kinematics calibration method based on vision measurement and distance error model
CN106403762A (en) * 2016-07-01 2017-02-15 佛山市业鹏机械有限公司 Palletizing robot end part movement repeated positioning accuracy detection method and device
CN108527373A (en) * 2018-06-28 2018-09-14 深圳清华大学研究院 The parameter measurement of mechanical arm and discrimination method and device, terminal, storage medium
CN109304713A (en) * 2018-11-19 2019-02-05 珠海格力电器股份有限公司 Scaling method, device and the computer readable storage medium of tool coordinates system
CN109737850A (en) * 2018-12-20 2019-05-10 合肥欣奕华智能机器有限公司 The measuring device and method of robot pose repeatability
CN110065072A (en) * 2019-05-21 2019-07-30 西南交通大学 The verification method of robot repetitive positioning accuracy
CN111360836A (en) * 2020-04-02 2020-07-03 易思维(杭州)科技有限公司 Robot calibration method for optimizing identification parameters
CN111791231A (en) * 2020-06-02 2020-10-20 同济大学 Robot calibration system and two-dimensional plane and three-dimensional space motion calibration method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
袁文波 等: "梯度下降法在双目视觉导航中的一个运用", 《电子世界》 *

Also Published As

Publication number Publication date
CN112847441B (en) 2022-02-15

Similar Documents

Publication Publication Date Title
CN108748159B (en) Self-calibration method for tool coordinate system of mechanical arm
CN108908327B (en) Robot positioning error grading compensation method
KR102050895B1 (en) Calibration and programming of robots
CN110434851A (en) A kind of 5-dof robotic manipulator inverse kinematics method
CN111168719B (en) Robot calibration method and system based on positioning tool
CN110815206A (en) Stewart type parallel robot kinematics calibration method
CN109176531A (en) A kind of tandem type robot kinematics calibration method and system
CN112318498B (en) Industrial robot calibration method considering parameter coupling
CN110000773B (en) Robot control device and inverse transformation processing method for robot
JP3349652B2 (en) Offline teaching method
CN113160334B (en) Dual-robot system calibration method based on hand-eye camera
CN116038702B (en) Seven-axis robot inverse solution method and seven-axis robot
WO2024031922A1 (en) Robot calibration method and device based on equivalent kinematic model
CN111687845B (en) Mechanical arm kinematics parameter calibration method based on inertia measurement unit
WO2019114631A1 (en) Method and device for acquiring tcp coordinates of robot
CN112894814B (en) Mechanical arm DH parameter identification method based on least square method
CN113240753A (en) Sphere fitting method for calibrating base coordinate system of robot and double-shaft deflection mechanism
CN112847441B (en) Six-axis robot coordinate offset detection method and device based on gradient descent method
CN113910218A (en) Robot calibration method and device based on kinematics and deep neural network fusion
CN109397293B (en) Ground level error modeling and compensating method based on mobile robot
CN110900608A (en) Robot kinematics calibration method based on optimal measurement configuration selection
CN114932551A (en) Zero calibration method, system and medium for mechanical arm
WO2019114630A1 (en) Method and device for obtaining coordinates of tcp of robot
JP3507032B2 (en) Method for deriving machine differences of robots
CN114102595B (en) Robot calibration method, calibration assembly and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20220215