Geometric decoupling method for calibrating line laser in robot system
Technical Field
The invention relates to the field of robot control technology and application, in particular to a method for calibrating line laser in robot system application.
Background
In the robot application system, along with the development of external sensor application, the application of a laser sensor in an absolute measurement system is more and more extensive, and especially, the proportion of the line laser is more and more large along with the development of the robot application technology due to the advantages of more collected data, good precision, high efficiency and the like, so that the indispensable achievement is even achieved. Calibration of the position and attitude of the line laser system in the robot coordinate system becomes the most important factor of whether the line laser can be used to the maximum extent.
In the prior art, describing the spatial position and posture of a line laser in a robot coordinate system, a homogeneous transformation matrix equation is generally used, as shown in formula (1):
Wherein, in the formula (1),
P B is the coordinate value of the laser measuring point under the robot world coordinate system;
Is the pose of the robot T0 coordinate system (namely the robot wrist coordinate system) under the world coordinate system;
is the position of the robot T0 coordinate system (i.e., the robot wrist coordinate system) in the robot world coordinate system;
Is the pose of the line laser in the robot T0 (i.e., robot wrist coordinate system) coordinate system;
the position of the line laser under a coordinate system of a robot T0 (namely a robot wrist coordinate system);
L x、Ly、Lz is the measured value of the object under the line laser local coordinate system respectively.
The purpose of line laser calibration is by the knownL x、Ly、Lz value, find rotation matrixPosition matrixObtainingThe difficulty of (a) is how to decouple the coefficients of the rotation matrix. As known from rigid body kinematics, the pose of a spatial rigid body is represented by three euler angles x (γ), y (β), and z (α), and forms a 3×3 rotation matrix, as shown in formula (2):
As can be seen from equation (2), although the pose matrix R has nine elements, there are only three independent variables α, β, γ, and if we want to solve α, β, γ using equation (3) below, because these three unknowns are coupled together by the nonlinear relationship of trigonometric functions, a decoupling method must be employed before solving to get a correct answer.
Wherein, in the formula (3),
The value of the X-axis coordinate of the line laser coordinate system under the T0 coordinate;
The value of the Y-axis coordinate of the line laser coordinate system under the T0 coordinate;
is the value of the line laser coordinate system Z-axis coordinate at the T0 coordinate.
Therefore, the linear programming calculation capable of solving geometric decoupling and least square method is provided, and the geometric decoupling method for calibrating the line laser of the position and the gesture of the line laser in the robot system under the robot coordinate system can be rapidly and accurately calculated, so that the problem which needs to be solved in the industry is solved.
Disclosure of Invention
The invention aims to provide a geometric decoupling method for calibrating line laser in a robot system, which comprises the mathematical methods of converting a nonlinear equation set containing Euler angles into a linear equation set, a least square method and the like, adopts a one-time measurement and line laser position and posture matrix step-by-step calculation method, can calibrate the line laser system simply, quickly, accurately and stably, solves the problems of geometric decoupling and linear programming calculation of the least square method, has the characteristics of quick calculation and high precision, and can realize online calibration quickly.
In order to achieve the above object, a first object of the present invention is to provide a geometric decoupling method for calibrating a line laser in a robot system, comprising the steps of (1) calculating an attitude matrix of a line laser coordinate system under a robot T0 coordinate systemMeasuring at least three groups of laser lines, acquiring values of the sphere center of a standard sphere calculated by the at least three groups of laser lines under a linear laser coordinate system, acquiring the position value of each laser line in the at least three groups of laser lines under a robot T0 coordinate system, acquiring the posture and the position value of the robot T0 coordinate system under a robot world coordinate system under the state of each laser line in the at least three groups of laser lines, wherein each group of line lasers comprises a first laser line and a second laser line, the movement of the robot under the first line laser and the second line laser is translational movement, and calculating to acquire a posture matrixCorresponding 9 unknown quantities, judging and optimizing the numerical value obtained in the step (1), and calculating the position value of the line laser coordinate system under the robot T0 coordinate system in the step (3)The coordinates of the sphere center of a standard sphere under the robot coordinate system are respectively extracted from the data with the same posture in each group to form an overdetermined equation set, and the equation set is simplified to be a left surface containing a position valueBy applying least square method to calculate equation set, solving position value from matrix equation
In the step (1), the position calculation theory of the line laser coordinate system under the robot Tool0 coordinate system is that a position matrix of the line laser coordinate system under the robot T0 coordinate system is calculated and expressed by a formula (3), a calibration sphere with a standard radius of R is used in the calibration process, and the robot knowledge shows that the coordinates of the sphere center of the standard sphere calculated by the first laser line under the robot coordinate system are as follows:
in the formula (4), the amino acid sequence of the compound,
The pose of the robot T0 coordinate system under the world coordinate system of the robot is shown;
The position of the robot T0 coordinate system under the robot world coordinate system;
The attitude of the line laser under a robot T0 coordinate system;
the position of the line laser under the coordinate system of the robot T0;
l1 is the value of the center of the standard sphere calculated from the first laser line in the line laser coordinate system.
The coordinates of the sphere center of the standard sphere calculated by the second laser line under the robot coordinate system are as follows:
in the formula (5), the amino acid sequence of the compound,
The pose of the robot T0 coordinate system under the world coordinate system;
the position of the robot T0 coordinate system under the world coordinate system;
The attitude of the line laser under a robot T0 coordinate system;
the position of the line laser under the coordinate system of the robot T0;
l2 is the value of the center of the standard sphere calculated from the second laser line in the line laser coordinate system.
Since the position value of the center of the standard calibration sphere in the robot system is unchanged, the equation (4) and the equation (5) are equal, i.e
As can be seen from equation (7), if it is assumed thatEqual toAnd is multiplied byThe inverse matrix of (2) can be reduced to:
from the above theoretical derivation, it is found that to obtain the formula (8), it is necessary to ensure The T0 gestures of the robots are guaranteed to be the same, namely the robots are guaranteed to move in translation in the first laser line and the second laser line; the position value can be obtained through translational movement on the premise of ensuring that the T0 posture is unchanged. By adopting the same method, N groups of laser lines are measured again, at least 3 groups of measurement are needed for ensuring that the equation 8 can be solved, and the data of multiple measurements can be solved by adopting a least square method.
Optionally, in step (1), five sets of laser line measurements are made.
Optionally, the step (1) includes (1-1) measuring and acquiring values of the sphere center of the standard sphere calculated by the five laser lines in the linear laser coordinate system, measuring and acquiring a position value of each laser line in the five laser lines in the robot T0 coordinate system, and measuring and acquiring a posture and a position value of the robot T0 coordinate system in the robot world coordinate system in the state of each laser line in the five laser lines, wherein the posture of the robot T0 coordinate system in the robot world coordinate system in the first laser line is thatThe pose of the robot T0 coordinate system under the second group of the first laser lines under the robot world coordinate system isThe pose of the robot T0 coordinate system under the third group of the first laser lines under the robot world coordinate system isThe gesture of the robot T0 coordinate system under the fourth group of the first laser lines under the robot world coordinate system isThe pose of the robot T0 coordinate system under the fifth group of the first laser line under the robot world coordinate system is(1-2) Setting the value of the center of each group of standard balls calculated by the first laser line under the online laser coordinate system minus the value of the center of each group of standard balls calculated by the second laser line under the online laser coordinate system as a center difference value, obtaining a center difference value l12 of each standard ball measured by the first two laser lines, a center difference value l34 of each standard ball measured by the second two laser lines, a center difference value l56 of each standard ball measured by the third two laser lines, a center difference value l78 of each standard ball measured by the fourth two laser lines, and a center difference value l910 of each standard ball measured by the fifth two laser lines; (1-3) setting the position value of the second laser line in each group of laser lines under the robot T0 coordinate system minus the position value of the first laser line under the robot T0 coordinate system to obtain the difference value P21 of the position values of the first two laser lines T0, the difference value P43 of the position values of the second two laser lines T0, the difference value P65 of the position values of the third two laser lines T0, the difference value P87 of the position values of the fourth two laser lines T0 and the difference value P109 of the position values of the fifth two laser lines T0, (1-4), the setting type (a) and the setting type (b)
Resetting
In the formula (c), l12 T、l34T、l56T、l78T、l910T is the transposed matrix of the first group to the fifth group of spherical center vector difference matrices respectively;
(1-5) setting
(1-6) Constructing a matrix according to formula (d), to obtain formula (e), formula (f) and formula (g):
The subscripts 1,2 and 3 in the formulas (e), (f) and (g) respectively represent a first element, a second element and a third element of the corresponding vector, and (1-7) respectively calculate 9 unknown quantities in the formula (b) according to the steps (1-1) to (1-6):
(1-8) calculating to obtain an attitude matrix of the line laser coordinate system under the robot T0 coordinate system
Wherein, in (1-3),AndIs the position of the robot T0 coordinate system under the robot world coordinate system, thusIs the difference value of the T0 position values of the two laser lines in the world coordinate system, and the two laser lines and the T0 are in translational motion, so the position difference is the same, and the position difference is setThe method comprises (8)Thereby obtaining that the difference of the position values of the robot T0 coordinate system in the world coordinate system is equal to the difference of the position values of the two laser lines T0.
Optionally, step (2) includes (2-1) performing orthogonality determination on the included angle between the 3 column vectors in formula (b), and (2-2) performing unitization on the 3 column vectors that complete step (2-1).
Optionally, in step (2-1), the angle between the 3 column vectors in formula (b) is orthogonally determined using formula (k):
when the calculated angle and 90 DEG difference value is within the range of +/-0.1 DEG, determining the attitude matrix of the line laser coordinate system obtained in the step (1) under the robot T0 coordinate system And (3) when the calculated angle and the 90 DEG difference exceeds the range of +/-0.1 DEG, re-measuring and calculating the laser line in the step (1) until the calculated angle and the 90 DEG difference are within the range of +/-0.1 deg.
Alternatively, if the calculated angle is within ±0.05° from the 90 ° difference, determining the pose matrix of the line laser coordinate system obtained in step (1) under the robot T0 coordinate systemMeets the precision requirement.
Optionally, in the step (2-2), the method comprises the steps of (2-2-1) respectively setting three column vectors in the formula (b) to obtain a formula (l);
Performing unitization calculation on the three column vectors in the step (2-2-1) respectively to obtain a formula (m);
Calculating a=x in formula (m) to obtain formula (n), obtaining a first column element of formula (b), and
(2-2-4) Respectively calculating the vector B and the vector C in the formula (m) according to the step (2-2-3) to obtain a second column element and a third column element of the formula (B) to obtain an attitude matrix of the line laser coordinate system under the robot T0 coordinate system
Preferably, in step (3), it includes (3-1), constructing an overdetermined equation set (o):
wherein in formula (o) For the pose of the line laser in the robot T0 coordinate system,For the position value of the robot T0 coordinate system under the first laser line in the robot world coordinate system,For the position value of the robot T0 coordinate system under the second group of the first laser line under the robot world coordinate system,For the position value of the robot T0 coordinate system under the third group of the first laser line under the robot world coordinate system,For the position value of the robot T0 coordinate system under the fourth group of the first laser line under the robot world coordinate system,The position value of the robot T0 coordinate system under the robot world coordinate system under the first laser line of the fifth group is obtained; L1 is the value of the spherical center of the standard sphere calculated by the first laser line of the first group under the online laser coordinate system of the robot T0 coordinate system, l3 is the value of the spherical center of the standard sphere calculated by the first laser line of the second group under the online laser coordinate system of the standard sphere, l5 is the value of the spherical center of the standard sphere calculated by the first laser line of the third group under the online laser coordinate system of the standard sphere, l7 is the value of the spherical center of the standard sphere calculated by the first laser line of the fourth group under the online laser coordinate system of the spherical center of the standard sphere calculated by the first laser line of the fourth group, l9 is the value of the spherical center of the standard sphere calculated by the first laser line of the first group, (3-2) the equation (p) is obtained by simplifying the equation (o);
(3-3) calculating an equation set (p) to construct matrixes (q) and (r);
(3-4) simplifying the equation set (p) by the matrices (q) and (r) to obtain a matrix equation(s), and
(3-5) Calculating the position value of the line laser coordinate system under the robot T0 coordinate system by the matrix equation (T)
Optionally, in step (3-1), a set of building-up overdetermined equations (o) is extracted from each set of data of the same pose.
Alternatively, in step (3-3) and step (3-5), the calculation is performed by the least square method.
The method has the advantages that (1) the problem of nonlinear coupling of Euler angles is solved by utilizing a geometric decoupling method, meanwhile, the rotation matrix of the equation set is guaranteed to be identical by utilizing the translational motion of the robot to eliminate nonlinear coupling items in the equation set, finally, the linear equation set is solved by adopting a least square method to obtain the attitude matrix of the line laser, then, the position variable is solved, the parameters in the attitude matrix are decoupled, meanwhile, the coupling of the attitude matrix and the position matrix parameters is decoupled, more data can be acquired according to the precision requirement of a user to improve the calibration precision without influencing the convergence stability, and (2) the method has the advantages of high calculation precision, high calculation speed, capability of guaranteeing the convergence stability and simple, quick and accurate realization of the line laser calibration.
Drawings
Fig. 1 is a schematic step diagram of a method for geometric decoupling of line laser calibration in a robotic system according to the present invention.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present invention and should not be construed as limiting the invention.
Referring to fig. 1, as a non-limiting embodiment, the geometric decoupling method for calibrating a line laser in a robot system according to the present invention includes first, in step S1, calculating an attitude matrix of a line laser coordinate system under a robot T0 coordinate systemMeasuring at least three groups of laser lines, acquiring values of the sphere center of a standard sphere calculated by the at least three groups of laser lines under a linear laser coordinate system, acquiring the position value of each laser line in the at least three groups of laser lines under a robot T0 coordinate system, acquiring the posture and the position value of the robot T0 coordinate system under a robot world coordinate system under the state of each laser line in the at least three groups of laser lines, wherein each group of line lasers comprises a first laser line and a second laser line, the movement of the robot under the first line laser and the second line laser is translational movement, and calculating to acquire a posture matrixCorresponding 9 unknowns. Next, in step S2, the values obtained in step S1 are determined and optimized. Finally, in step S3, the position value of the line laser coordinate system in the robot T0 coordinate system is calculatedThe coordinates of the sphere center of a standard sphere under the robot coordinate system are respectively extracted from the data with the same posture in each group to form an overdetermined equation set, and the equation set is simplified to be a left surface containing a position valueBy applying least square method to calculate equation set, solving position value from matrix equation
The calculation theory of the step S1 is that a position matrix expressed by a formula (3) in a robot T0 coordinate system is calculated, a calibration sphere with a standard radius of R is used in the calibration process, and the robot knowledge can know that the coordinates of the sphere center of the standard sphere calculated by the first laser line in the robot coordinate system are as follows:
in the formula (4), the amino acid sequence of the compound,
The pose of the robot T0 coordinate system under the world coordinate system of the robot is shown;
The position of the robot T0 coordinate system under the robot world coordinate system;
The attitude of the line laser under a robot T0 coordinate system;
the position of the line laser under the coordinate system of the robot T0;
l1 is the value of the center of the standard sphere calculated from the first laser line in the line laser coordinate system.
The coordinates of the sphere center of the standard sphere calculated by the second laser line under the robot coordinate system are as follows:
in the formula (5), the amino acid sequence of the compound,
The pose of the robot T0 coordinate system under the world coordinate system;
the position of the robot T0 coordinate system under the world coordinate system;
The attitude of the line laser under a robot T0 coordinate system;
the position of the line laser under the coordinate system of the robot T0;
l2 is the value of the center of the standard sphere calculated from the second laser line in the line laser coordinate system.
Since the position value of the center of the standard calibration sphere in the robot system is unchanged, the equation (4) and the equation (5) are equal, i.e
As can be seen from equation (7), if it is assumed thatEqual toAnd is multiplied byThe inverse matrix of (2) can be reduced to:
From the theoretical derivation above, if equation (8) is desired, due to the assumption that Equal toIn teaching each pair of laser lines, e.g. 1 st laser line, 2 nd laser line, to ensureThe same T0 posture of the robot is ensured, namely the movement of the robot in the 1 st laser line and the 2 nd laser line is ensured to be translation; the position value can be obtained through translational movement on the premise of ensuring that the T0 posture is unchanged. By adopting the same method, measuring N groups of laser lines again, at least 3 groups of measurement are needed for ensuring that the equation (8) can be solved, and the equation (8) can be solved by adopting a least square method for multi-measured data.
Thus, for convenience in mathematical representation, the following settings are made as one non-limiting embodiment, taking 5 groups as examples.
Firstly, measuring and acquiring values of the sphere centers of standard spheres calculated by five groups of laser lines under an online laser coordinate system, wherein the values are sequentially l1, l2, l3, l4, l5, l6, l7, l8, l9 and l10 according to the first group of first laser lines, the first group of second laser lines, the second group of first laser lines and the second group of second laser lines and the sequence of the laser lines.
Measuring and acquiring a position value of each laser line in the five groups of laser lines under a robot T0 coordinate system, and measuring and acquiring a posture and a position value of the robot T0 coordinate system under a robot world coordinate system under a state of each laser line in the five groups of laser lines, wherein the posture of the robot T0 coordinate system under the first group of laser lines under the robot world coordinate system is thatThe pose of the robot T0 coordinate system under the second group of the first laser lines under the robot world coordinate system isThe pose of the robot T0 coordinate system under the third group of the first laser lines under the robot world coordinate system isThe gesture of the robot T0 coordinate system under the fourth group of the first laser lines under the robot world coordinate system isThe pose of the robot T0 coordinate system under the fifth group of the first laser line under the robot world coordinate system is
Setting the value of the center of each standard sphere calculated by the first laser line in the online laser coordinate system minus the value of the center of each standard sphere calculated by the second laser line in the online laser coordinate system as a center difference value, for example, l12=l1-l 2, thereby obtaining a center difference value l12 of the standard sphere measured by the first two laser lines, a center difference value l34 of the standard sphere measured by the second two laser lines, a center difference value l56 of the standard sphere measured by the third two laser lines, a center difference value l78 of the standard sphere measured by the fourth two laser lines, and a center difference value l910 of the standard sphere measured by the fifth two laser lines.
Setting the position value of the second laser line in the robot T0 coordinate system minus the position value of the first laser line in the robot T0 coordinate system, e.gThe method comprises the steps of obtaining a difference value P21 of the position values of a first group of two laser lines T0, a difference value P43 of the position values of a second group of two laser lines T0, a difference value P65 of the position values of a third group of two laser lines T0, a difference value P87 of the position values of a fourth group of two laser lines T0 and a difference value P109 of the position values of a fifth group of two laser lines T0.
Order theEqual to formula (3), namely:
Order the
In the formula (c), l12 T、l34T、l56T、l78T、l910T is the transposed matrix of the first group to the fifth group of spherical center vector difference matrices respectively;
Order the
Reconstructing the matrix according to equation (d):
wherein the subscripts 1, 2, 3 in formula (e), formula (f), and formula (g) represent the first, second, and third elements of the respective vectors, respectively.
From the formulas (a) to (g), 9 unknowns in the formula (3) can be calculated as:
The 9 unknowns in the formula (3) calculated by the formulas (h), (i) and (j) are determined and optimized after calculating the 9 unknowns in the formula (3) because various reasons for errors exist in the numerical value measurement and calculation, for example, the pose of the robot T0 is consistent when two laser lines in each group cannot be measured, or the effective numerical value length of the calculated numerical value interception is different, and the like.
The linear laser coordinate system generated from the 3 column vectors in the formula (3) should theoretically be a standard unitized orthogonal coordinate system, but due to the above-mentioned error generation, it is necessary to check and judge the orthogonality and unitization thereof for determining the accuracy of the calculated formula (3).
As another non-limiting embodiment, in step (2-1), the orthogonality is determined using the angles between the 3 column vectors in equation (3).
The formula (k) is used for judging whether the 3 column vectors are orthogonal, if the calculated angle and the difference of 90 degrees are within +/-0.05 degrees, the precision requirement is met, and otherwise, the method is used for measuring and calculating again. Of course, the accuracy range, such as + -0.1 deg., can be properly widened according to the accuracy requirement.
As another non-limiting embodiment, when unitizing the calculated numerical values, three column vectors in the formula (3) are set respectively to obtain the formula (l);
the following is a unitized calculation of 3 column vectors,
Order the
Then
Similarly, the second and third columns of elements in the expression (3) are calculated using the vectors B and C, respectively.
So far, through the three steps of measurement, calculation and optimization, calculating an attitude matrix of the line laser coordinate system under the robot T0 coordinate system:
in this non-limiting embodiment, in the foregoing In the calculation of the matrix, by ensuring that the pose of the robot T0 of each group of two laser lines is the same, the position item of the line laser under the coordinate system of the robot T0 is eliminatedAt decoupling ofThe coupling of the attitude parameters and the position parameters is decoupled at the same time of 9 unknowns in the matrix.
From equation (7), a set of measurements of the same robot pose eliminates the coupling of the pose parameters and the position parameters, after having been calculatedOn the premise of matrix, the matrix calculation needs to be reconstructed
To calculateOne data is extracted from the same posture of each group to form an overdetermined equation group:
wherein in formula (o) For the pose of the line laser in the robot T0 coordinate system,For the position value of the robot T0 coordinate system under the first laser line in the robot world coordinate system,For the position value of the robot T0 coordinate system under the second group of the first laser line under the robot world coordinate system,For the position value of the robot T0 coordinate system under the third group of the first laser line under the robot world coordinate system,For the position value of the robot T0 coordinate system under the fourth group of the first laser line under the robot world coordinate system,The position value of the robot T0 coordinate system under the robot world coordinate system under the first laser line of the fifth group is obtained; The position value of the line laser in the robot T0 coordinate system is calculated by the first laser lines, l1 is the value of the sphere center of the standard sphere calculated by the first laser lines in the line laser coordinate system, l3 is the value of the sphere center of the standard sphere calculated by the second first laser lines in the line laser coordinate system, l5 is the value of the sphere center of the standard sphere calculated by the third first laser lines in the line laser coordinate system, l7 is the value of the sphere center of the standard sphere calculated by the fourth first laser lines in the line laser coordinate system, and l9 is the value of the sphere center of the standard sphere calculated by the first laser lines in the line laser coordinate system.
Simplifying equation set (o), left is the one containing unknown termIs defined by the following items:
the following system of least squares calculation equations (24) is applied, for convenience in mathematical representation, to construct the following matrix:
Based on the coefficient matrices (q), (r), the system of equations (p) is reduced to a matrix equation:
Solving from the matrix equation by using a least square method
The geometric decoupling method for calibrating the line laser in the robot system is verified on the ABB IRB 6700 robot and the LMI 2340 line laser, the line laser system can be calibrated simply, rapidly, accurately and stably, the geometric decoupling is solved, the linear programming calculation of the least square method is realized, and the method has the characteristics of rapid calculation and high precision, and can realize online calibration rapidly.
Therefore, the method solves the problem of nonlinear coupling of Euler angles by using a geometric decoupling method, simultaneously ensures that the rotation matrixes of the equation sets are identical by using the translational motion of the robot to eliminate nonlinear coupling items in the equation sets, and finally solves the linear equation sets by using a least square method to obtain the attitude matrixes of the line lasers and then solves the position variables.
Although preferred embodiments of the present invention have been described in detail herein, it is to be understood that the invention is not limited to the precise construction and steps set forth herein, and that other modifications and variations may be effected by one skilled in the art without departing from the spirit and scope of the invention.