6D pose measurement error compensation method based on binocular vision

By constructing a multi-output least squares support vector regression model and genetic algorithm optimization of hyperparameters, the problem of inaccurate robot pose data in binocular vision equipment is solved, and high-precision pose measurement error compensation and consistency measurement are achieved.

CN118654696AActive Publication Date: 2024-09-17NANJING UNIV OF AERONAUTICS & ASTRONAUTICS

Patent Information

Application Number
CN202410880365.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-09-17
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

Since the robot's position in the binocular field of view is not unique, the 6D pose data obtained by the binocular vision device cannot accurately and stably compensate for the robot's motion accuracy.

Method used

The multi-output least squares support vector regression model is used to build a single-point measurement error prediction model. The hyper-parameters are optimized through genetic algorithms and combined with the minimization coordinate transformation error function to convert multiple single-point measurement errors into multi-point coupling errors to achieve coordinate tracking. System pose measurement error compensation.

Benefits of technology

It significantly improves the measurement accuracy of binocular vision equipment, reduces the maximum position measurement error and maximum attitude measurement error, and ensures measurement consistency under different observation angles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118654696A
    Figure CN118654696A
Patent Text Reader

Abstract

The invention relates to the technical field of multi-robot cooperative control, solves the technical problem that the motion precision of a robot cannot be accurately and stably compensated by obtained pose data due to the fact that the position of the robot in a binocular visual field is not unique, and particularly relates to a 6D pose measurement error compensation method based on binocular vision. Comprising the following steps: constructing a single-point measurement error prediction model based on a multi-output least square support vector regression model; performing global optimization on hyper-parameters of the single-point measurement error prediction model by adopting a genetic algorithm to obtain an optimal hyper-parameter set; and taking the position coordinates of the plurality of visual mark points under binocular vision as the input of the single-point measurement error prediction model to obtain a predicted single-point measurement error. According to the method, the maximum position measurement error and the maximum attitude measurement error of the tracking coordinate system can be greatly reduced, the measurement precision of binocular vision equipment is remarkably improved, and meanwhile, the measurement consistency at different observation angles is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of multi-robot collaborative control, and in particular to a 6D posture measurement error compensation method based on binocular vision. Background Art

[0002] At present, in the field of robot vision guidance, in order to achieve high-precision positioning of robots, most commercial binocular vision measurement equipment is used to directly obtain the robot's 6D posture information. Since binocular vision equipment has measurement errors, and the error size is inconsistently distributed within the camera's field of view, and the robot is a moving observation object, its position in the binocular field of view is not unique, resulting in the inability of the acquired posture data to accurately and stably compensate for the robot's motion accuracy.

[0003] The invention patent with publication number CN115713554A discloses a system and method for missile loading posture detection based on binocular vision, which can provide real-time status feedback information for missile automatic loading control. This method is only applied to missile loading posture measurement, and does not compensate for posture detection accuracy.

[0004] The invention patent with publication number CN112497216B discloses a method for compensating the posture accuracy of an industrial robot based on deep learning. This method is suitable for compensating the posture accuracy of an industrial robot and is based on a deep learning model, and cannot directly perform accuracy compensation through an algorithm. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention provides a 6D posture measurement error compensation method based on binocular vision, which solves the technical problem that the acquired posture data cannot accurately and stably compensate the robot's motion accuracy due to the non-unique position of the robot in the binocular field of view.

[0006] To solve the above technical problems, the present invention provides the following technical solutions: a 6D posture measurement error compensation method based on binocular vision, the method comprising the following steps: S1. Construct a single-point measurement error prediction model based on a multi-output least squares support vector regression model; S2. Use genetic algorithm to globally optimize the hyperparameters of the single-point measurement error prediction model to obtain the optimal hyperparameter set ; S3, using the position coordinates of multiple visual landmarks under binocular vision as input of a single-point measurement error prediction model to obtain a predicted single-point measurement error; S4. By minimizing the coordinate transformation error function, multiple single-point measurement errors are converted into multi-point coupling errors to achieve position and posture measurement error compensation of the tracking coordinate system.

[0007] Furthermore, in step S1, the specific process includes the following steps: S11, defining an optimization problem, that is, transforming the linear problem of solving the multi-output least squares support vector regression model into the problem of solving the optimal estimation problem; S12, simultaneously minimizing the regression weight vector norm, the single output variable fitting error, and the sample overall fitting error in the optimization problem to obtain a regression function of a multi-output least squares support vector regression model; S13, according to step S12, the position coordinates of the sampling point under binocular vision and the position error under the current coordinates are used as input and output data respectively, and a multi-output least squares support vector regression model is trained to obtain all regression functions, that is, to obtain the final single-point measurement error prediction model.

[0008] Furthermore, in step S12, the specific process includes the following steps: S121, let the multi-output sample set be , then the objective function and constraint equations of the multi-output least squares support vector regression model are: ; (1) In the above formula, Represents the weight coefficient of the j-th dimension output; Represents the penalty coefficient for the sum of squared errors of the sample; Represents the penalty coefficient for the absolute value of the overall error of the sample; represents the j-th dimension output error of the i-th sample; , denote the total number of samples i and dimension j respectively; represents the constraint equation; represents the kernel function; Represents the model parameters of the j-th dimension output; S122. Introduce the Lagrange multiplier in equation (1) , then its Lagrange function is: ; (2) in, represents the Lagrange multiplier; represents the constraint equation; S123, according to the KKT condition, calculate the weight coefficients of formula (2) , , output error as well as The partial derivative of is: ; (3) Where L represents the Lagrange function; S124, eliminate the weight coefficient in formula (3) , output error ,remember , and introduce the Gaussian kernel function , the linear equations are: ; (4) , , , ; in, Represents the calculation process value of the kernel function; , Respectively Input samples and output samples of ; express The kernel function of represents standard deviation; for dimensional column vector, whose value is: ; (5) S125, Solve the linear equations and Get the first dimensional regression function, that is: ; (6) In the above formula, , are input samples and output samples respectively.

[0009] Furthermore, in step S2, the specific process includes the following steps: S21. Initialization: for the hyperparameter set Set the value ranges of the three parameters respectively. , , , the fitness function selects the root mean square error RMSE, which is: ; (7) In the formula, is the predicted value of the validation set; is the actual value of the validation set; M represents the number of samples in the validation set; S22, encoding: encoding the hyperparameters to be optimized; S23, selection, crossover and mutation: Calculate the fitness of all individuals in the current population and select individuals with high fitness to retain, use single-point crossover to randomly select two individuals, and randomly select exchange points in the code to exchange to form two new code sequences, and then randomly change a bit in the code sequence from 1 to 0 or from 0 to 1 according to the mutation probability, so as to obtain a new code sequence; S24, decoding: The encoded sequence after selection, crossover and mutation operations is decoded according to the hyperparameters The encoding length , and The binary codes are split to obtain the respective binary codes, and then the binary codes are decoded to obtain the optimized specific parameter values; S25: Repeat the above steps S21-S25 until the iteration ends and the optimal hyperparameter set is obtained. .

[0010] Furthermore, in step S4, the specific process includes the following steps: S41, according to the visual landmark point in the binocular measurement system coordinate system and tracking coordinate system The linear transformation relationship under , transforms the linear problem of the single-point measurement error prediction model into an optimal estimation problem, that is, minimizing the coordinate transformation error function of formula (12), that is: ; (12) Where n is the number of visual landmarks; S42, solving the optimal rotation matrix according to the minimized coordinate transformation error function R And the optimal translation vector t ; S43, according to the rotation matrix R And the optimal translation vector t Get tracking coordinate system Relative to the binocular measurement system coordinate system The transformation relationship ,Right now: ;(twenty four) S44, according to the transformation relationship From the rotation matrix R And the optimal translation vector t The tracking coordinate system is obtained in Relative to the binocular measurement system coordinate system Compensated posture and position.

[0011] Further, in step S41, the visual marker point is located in the binocular measurement system coordinate system and tracking coordinate system The linear transformation relationship is: ; (11) in, R and t Represents the binocular measurement system coordinate system Transform to tracking coordinate system The rotation matrix and translation vector of The visual landmark point is in the tracking coordinate system The coordinates below.

[0012] Furthermore, in step S42, the specific process includes the following steps: S421, the translation vector in the minimized coordinate transformation error function t Take the partial derivative to get the translation vector t The solution is: ; (15) In the formula, and Respectively represent the geometric center of the visual landmark point in the tracking coordinate system and binocular measurement system coordinate system The coordinates below; R Represents the binocular measurement system coordinate system Transform to tracking coordinate system The rotation matrix of S422, the translation vector t Substitute the solution of into equation (12) to obtain the optimization objective and ,Right now: ; (16) In the formula, and Respectively expressed in the tracking coordinate system and binocular measurement system coordinate system Next, the vectors from the geometric center of all visual landmarks to each landmark; S423, optimize the target and Go a step further and transform the minimum optimization problem into a maximum problem; S424. Perform singular value decomposition on the maximum value problem to obtain the optimal rotation matrix R ; S425, according to the optimal rotation matrix R Solving for the optimal translation vector t , by taking the optimal rotation matrix RSubstituting into equation (15) we can solve the optimal translation vector t .

[0013] Furthermore, in step S423, the optimization objective in equation (16) is further expanded: ; (17) Ignoring the constant term in equation (17), the minimum optimization problem can be transformed into the maximum problem shown in equation (18), that is: ; (18) in, R is the rotation matrix; n is the number of visual landmarks.

[0014] Furthermore, in step S424, the matrix and , then formula (18) is transformed into: ; (19) According to the properties of matrix trace, we can get: ; (20) in, represents the matrix trace; remember , combining equations (19) and (20), and performing singular value decomposition on them to obtain the matrix ,Right now: ;(twenty one) remember , since the matrix obtained by singular value decomposition is , U are all orthogonal matrices, R is an orthogonal rotation matrix, so H It is also an orthogonal matrix. It is known that the orthogonal matrix H The maximum value of each element in does not exceed 1, so: ;(twenty two) To maximize the value of equation (22), the orthogonal matrix H The diagonals must all be 1 to calculate the optimal rotation matrix R ,for: ;(twenty three) in, H is an orthogonal matrix; V Representation Matrix The transpose of Represents an orthogonal matrix U The transpose of .

[0015] By means of the above technical solution, the present invention provides a 6D posture measurement error compensation method based on binocular vision, which has at least the following beneficial effects: 1. The present invention can significantly reduce the maximum position measurement error and the maximum attitude measurement error of the tracking coordinate system, significantly improve the measurement accuracy of the binocular vision device, and ensure the measurement consistency under different observation angles.

[0016] 2. This embodiment of the present invention uses a genetic algorithm to perform hyperparameter optimization to obtain the optimal hyperparameter set, which can eliminate the influence of each hyperparameter in the multi-output least squares support vector regression model on the prediction accuracy of the single-point measurement error prediction model, thereby improving the prediction accuracy of the single-point measurement error prediction model.

[0017] 3. The present invention combines the pose measurement principle to transform the linear problem into an optimal estimation problem. By minimizing the coordinate transformation error function, multiple single-point prediction errors are transformed into multi-point coupling errors, thereby realizing the pose measurement error compensation of the tracking coordinate system. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 Flow chart of the 6D posture measurement error compensation method of the present invention; Figure 2 This is a schematic diagram of the geometric relationship of single-point measurement of the present invention; Figure 3 The present invention is a schematic diagram of a binocular measurement system coordinate system and a tracking coordinate system; Figure 4 This is a schematic diagram of multi-angle measurement of the present invention; Figure 5 This is a schematic diagram of the sampling plan of the present invention. DETAILED DESCRIPTION

[0019] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods, so that the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.

[0020] As a non-contact measurement method, visual measurement has a larger measurement range and faster measurement speed than traditional measurement methods, and is widely used in industrial parts size measurement, industrial robots and mobile robot navigation. At present, in the field of robot vision guidance, in order to achieve high-precision positioning of robots, most commercial binocular vision measurement equipment is used to directly obtain the robot's 6D posture information.

[0021] Since binocular vision devices have measurement errors and the error size is inconsistently distributed within the camera field of view, and the robot, as a moving observation object, is not located in a unique position in the binocular field of view, the acquired posture data cannot accurately and stably compensate for the robot's motion accuracy. Therefore, a more optimized measurement error compensation method is needed for binocular vision devices.

[0022] The invention patent with publication number CN115713554A discloses a system and method for detecting missile loading posture based on binocular vision, including a binocular camera, a sling target group, a missile target group, and a camera controller. It can effectively solve the problem of high-precision positioning of loading operations faced by the vehicle-mounted missile automatic loading system, and has flexible layout, convenient operation, high degree of automation, and can provide real-time status feedback information for missile automatic loading control. This method is only applied to missile loading posture measurement, and does not compensate for the posture detection accuracy.

[0023] The invention patent with publication number CN112497216B discloses a method for industrial robot posture accuracy compensation based on deep learning. A deep learning model for industrial robot posture error compensation is proposed. It combines the advantages of deep learning features with strong expressiveness and strong statistical interpretability, uses robot error similarity as an additional feature for supervised learning, introduces contrast information other than the robot state features themselves, and improves the prediction accuracy of the deep learning model. This method is suitable for industrial robot posture accuracy compensation and is based on a deep learning model. It cannot directly perform accuracy compensation through an algorithm.

[0024] The literature “Huo J, Zhang G, Cui J, et al. Corrected calibration algorithmwith a fixed constraint relationship and an error compensation technique fora binocular vision measurement system[J]. Applied optics, 2018, 57(19): 5492-5504” and “Wei Song, Robot visual servo control system for composite material edge milling processing[D]. Nanjing: Nanjing University of Aeronautics and Astronautics, 2022.” proposed a binocular camera measurement error compensation method based on spatial error similarity. Through spatial sampling, a mapping model between the binocular camera measurement error and the tracking model position was established, and the mapping model was used to realize the position measurement error prediction. Since this method directly samples the coordinate system instead of the visual landmark point, it does not consider the impact of different camera observation angles on the coordinate system measurement error. Therefore, the prediction model obtained by this method has poor universal adaptability.

[0025] Because the robot, as a moving observation object, has measurement errors under binocular vision, it cannot be better optimized and compensated. Please refer to Figure 1 , shows a specific implementation of this embodiment. This embodiment realizes single-point measurement error prediction by constructing a single-point measurement error prediction model, and uses a genetic algorithm to globally optimize the model hyperparameters; combined with the pose measurement principle, the linear problem is transformed into an optimal estimation problem, and by minimizing the coordinate transformation error function, multiple single-point measurement prediction errors are transformed into multi-point coupling errors, thereby realizing the pose measurement error compensation of the tracking coordinate system. This embodiment proposes a 6D pose measurement error compensation method based on binocular vision, and the method includes the following steps: S1. Construct a single-point measurement error prediction model based on a multi-output least squares support vector regression model (MLSSVR); Figure 2 As shown, it is a schematic diagram of the geometric relationship of single-point measurement, where o 1 X 1 Y 1 and o 2 X 2 Y 2 are the image coordinate systems in imaging planes 1 and 2, respectively, and the lines connecting their origins and the centers of their respective camera lenses o 1 O 1 and o 2 O2 forms the optical axis of the two cameras, f 1 and f 2 are the distances from the origin of the two image coordinate systems to the optical center of the lens, O 1 O The line connecting 2 forms a baseline with a length of B , with the line connecting the centers of the two lenses O 1 O Midpoint of 2 O is the origin, O 1 O 2 is the straight line X Axis to establish binocular measurement system coordinate system OXYZ In step S1, the specific process includes the following steps: S11. Define the optimization problem, that is, transform the linear problem of solving the multi-output least squares support vector regression model into the optimal estimation problem; transform the predicted single-point error into a multi-point coupling error to achieve error compensation of the tracking coordinate system, significantly improve the measurement accuracy of the binocular vision equipment, and ensure the measurement consistency under different observation angles.

[0026] S12, the regression weight vector norm, the single output variable fitting error and the sample overall fitting error in the optimization problem are simultaneously minimized to obtain the regression function of the multi-output least squares support vector regression model; in step S12, the specific process includes the following steps: S121, let the multi-output sample set be , then the objective function and constraint equations of the multi-output least squares support vector regression model are: ; (1) In the above formula, Represents the weight coefficient of the j-th dimension output; Represents the penalty coefficient for the sum of squared errors of the sample; Represents the penalty coefficient for the absolute value of the overall error of the sample; represents the j-th dimension output error of the i-th sample; , denote the total number of samples i and dimension j respectively; represents the constraint equation; represents the kernel function; Represents the model parameters of the j-th dimension output; S122. Introduce the Lagrange multiplier in equation (1) , then its Lagrange function is: ; (2) in, represents the Lagrange multiplier; represents the constraint equation; S123, according to the KKT condition, calculate the weight coefficients of formula (2) , , output error as well as The partial derivative of is: ; (3) Where L represents the Lagrange function; S124, eliminate the weight coefficient in formula (3) , output error ,remember , and introduce the Gaussian kernel function , the linear equations are: ; (4) , , , ; in, Represents the calculation process value of the kernel function; , Respectively Input samples and output samples of ; express The kernel function of represents standard deviation; for dimensional column vector, whose value is: ; (5) S125, Solve the linear equations and Get the first dimensional regression function, that is: ; (6) In the above formula, , are input samples and output samples respectively.

[0027] S13, according to step S12, the position coordinates of the sampling point under binocular vision and the position error under the current coordinates are used as input and output data respectively, and the multi-output least squares support vector regression model is trained to obtain all regression functions, that is, to obtain the final single-point measurement error prediction model. Figure 3 and Figure 4 As shown, Figure 3 It is a schematic diagram of the binocular measurement system coordinate system and tracking coordinate system. Figure 4 This is a schematic diagram of multi-angle measurement, that is, sampling at different stations to obtain the corresponding single-point measurement error ,like Figure 5 As shown in the figure, it is a schematic diagram of sampling planning. To ensure uniform sampling, a space cube with a length of 500 mm, a width of 500 mm, and a height of 500 mm is planned as the sampling area within the field of view of the binocular camera. The center position of one end of the cube facing the binocular camera is located in the optimal measurement area within the field of view of the camera.

[0028] Among them, the coordinate system of the binocular measurement system is assumed to be , the tracking coordinate system is , if there are n visual landmarks and tracking coordinate system Binding, you can place the visual marker point in the tracking coordinate system The coordinates below Composition Matrix , which is the position coordinates used as the input of the multi-output least squares support vector regression model. In the binocular measurement system coordinate system The coordinates below Composition Matrix , the single point measurement error obtained by sampling Constructing the measurement error matrix , that is, the position error output by the multi-output least squares support vector regression model, and then the multi-output least squares support vector regression model is trained using the sampling data to obtain a single-point measurement error prediction model.

[0029] S2. Use genetic algorithm to globally optimize the hyperparameters of the single-point measurement error prediction model to obtain the optimal hyperparameter set ; Due to the hyperparameter set The prediction accuracy of the single-point measurement error prediction model is greatly affected and needs to be optimized. Considering that the single-point measurement error prediction model training is performed offline, the time cost of training does not need to be considered. Therefore, this embodiment uses a genetic algorithm with strong global optimization capability to optimize the hyperparameters of the single-point measurement error prediction model. In step S2, the specific process includes the following steps: S21. Initialization: for the hyperparameter set Set the value ranges of the three parameters respectively. , , , the fitness function selects the root mean square error RMSE, which is: ; (7) In the formula, is the predicted value of the validation set; is the actual value of the validation set; M represents the number of samples in the validation set; S22, encoding: encoding the hyperparameters to be optimized; commonly used encoding methods include binary encoding, Gray code, floating point encoding, etc. In this embodiment, binary encoding is selected. Taking the encoding of the hyperparameter C as an example, the encoding calculation is as follows: ; (8) In the formula, is the encoding length of C; S is the search accuracy. Similarly, the hyperparameters can be obtained and The encoding length and .

[0030] S23, selection, crossover and mutation: calculate the fitness of all individuals in the current population and select individuals with high fitness to retain, use single-point crossover to randomly select two individuals, and randomly select the exchange point in the code to exchange to form two new code sequences, and then randomly change a bit in the code sequence from 1 to 0 or from 0 to 1 according to the mutation probability, so as to obtain a new code sequence; specifically, the selection operation needs to calculate the fitness of all individuals in the current population and select individuals with high fitness to retain; the commonly used methods of crossover operation include single-point crossover, multi-point crossover, sequential crossover, etc. This paper selects single-point crossover, that is, randomly select two individuals, and randomly select the exchange point in the code to exchange to form two new code sequences; the mutation operation needs to set the mutation probability to a smaller value, randomly change a bit in the code sequence from 1 to 0 or from 0 to 1, so as to obtain a new code sequence; S24, decoding: The encoded sequence after selection, crossover and mutation operations is decoded according to the hyperparameters The encoding length , and The binary codes are split and then decoded to obtain the optimized specific parameter values. Here, the decoding process of the hyperparameter C is taken as an example. The decoding calculation is as follows: ; (9) Where: is the binary number at the i-th position of the binary code; S25: Repeat the above steps S21-S25 until the iteration ends and the optimal hyperparameter set is obtained. .

[0031] In this embodiment, individuals are screened through selection, crossover, and mutation operations in the genetic process, and the optimal solution to the optimization problem is finally obtained. This embodiment uses a genetic algorithm (GA) to optimize hyperparameters to obtain the optimal hyperparameter set. , which can eliminate the influence of various hyperparameters in the multi-output least squares support vector regression model on the prediction accuracy of the single-point measurement error prediction model, thereby improving the prediction accuracy of the single-point measurement error prediction model.

[0032] S3, taking the position coordinates of multiple visual landmarks under binocular vision as the input of the single-point measurement error prediction model to obtain the predicted single-point measurement error; the prediction error matrix obtained by the trained single-point measurement error prediction model is: , so all visual landmarks are in the coordinate system The coordinate values ​​after compensation are: (10); in, , is the visual landmark point in the binocular measurement system coordinate system The coordinates below The matrix formed.

[0033] S4, by minimizing the coordinate transformation error function, multiple single-point measurement errors are converted into multi-point coupling errors, and the position and posture measurement error compensation of the tracking coordinate system is realized; this embodiment combines the position and posture measurement principle, converts the linear problem into the optimal estimation problem, and by minimizing the coordinate transformation error function, multiple single-point prediction errors are converted into multi-point coupling errors, so as to realize the position and posture measurement error compensation of the tracking coordinate system. In step S4, the specific process includes the following steps: S41, according to the visual landmark point in the binocular measurement system coordinate system and tracking coordinate system The linear transformation relationship under the binocular measurement system is used to transform the linear problem of the single-point measurement error prediction model into an optimal estimation problem, that is, to minimize the coordinate transformation error function of formula (12); where the visual landmark point is in the binocular measurement system coordinate system and tracking coordinate system The linear transformation relationship is: ; (11) in, R and t Represents the binocular measurement system coordinate system Transform to tracking coordinate system The rotation matrix and translation vector of The visual landmark point is in the tracking coordinate system The coordinates below.

[0034] In actual measurement, due to the existence of measurement noise and error, there is usually no coordinate system that satisfies all coordinates. arrive Rotation matrix of linear transformation relationship R and translation vectors tTherefore, the linear problem can be transformed into an optimal estimation problem, that is, minimizing the coordinate transformation error function of equation (12), that is: ; (12) Where n is the number of visual landmarks.

[0035] S42, solving the optimal rotation matrix according to the minimized coordinate transformation error function R And the optimal translation vector t ; In step S42, the specific process includes the following steps: S421, the translation vector in the minimized coordinate transformation error function t Take the partial derivative to get the translation vector t Specifically, for the translation vector in equation (12) t Taking partial derivatives we get: ; (13) Continuing to simplify formula (13), we can obtain: ; (14) Let the term after partial derivative in equation (14) be zero, we can get: ; (15) In the formula, and Respectively represent the geometric center of the visual landmark point in the tracking coordinate system and binocular measurement system coordinate system The coordinates below; R Represents the binocular measurement system coordinate system Transform to tracking coordinate system The rotation matrix of S422, the translation vector t Substitute the solution of into equation (12) to obtain the optimization objective and ,Right now: ; (16) In the formula, and Respectively in the tracking coordinate system and binocular measurement system coordinate system Next, the vector from the geometric center of all visual landmarks to each landmark.

[0036] S423, optimize the target and Further expand and transform the minimum optimization problem into a maximum optimization problem; specifically, the optimization objective in formula (16) is further expanded: ; (17) Ignoring the constant term in equation (17), the minimum optimization problem can be transformed into the maximum problem shown in equation (18), that is: ; (18) in, R is the rotation matrix; n is the number of visual landmarks.

[0037] S424. Perform singular value decomposition on the maximum value problem to obtain the optimal rotation matrix R ; Specifically, construct the matrix and , then formula (18) is transformed into: ; (19) According to the properties of matrix trace, we can get: ; (20) in, represents the matrix trace; remember , combining equations (19) and (20), and performing singular value decomposition on them to obtain the matrix ,Right now: ;(twenty one) remember , since the matrix obtained by singular value decomposition is , U are all orthogonal matrices, R is an orthogonal rotation matrix, so H It is also an orthogonal matrix. It is known that the orthogonal matrix H The maximum value of each element in does not exceed 1, so: ;(twenty two) To maximize the value of equation (22), the orthogonal matrix H The diagonals must all be 1 to calculate the optimal rotation matrix R ,for: ;(twenty three) in, H is an orthogonal matrix; V Representation Matrix The transpose of Represents an orthogonal matrix U The transpose of .

[0038] S425, according to the optimal rotation matrix R Solving for the optimal translation vector t , by taking the optimal rotation matrix R Substituting into equation (15) we can solve the optimal translation vector t .

[0039] S43, according to the rotation matrix R And the optimal translation vector t Get tracking coordinate system Relative to the binocular measurement system coordinate system The transformation relationship ,Right now: ;(twenty four) S44, according to the transformation relationship From the rotation matrix R And the optimal translation vector t The tracking coordinate system is obtained in Relative to the binocular measurement system coordinate system Compensated posture and position.

[0040] The present invention can significantly reduce the maximum position measurement error and the maximum attitude measurement error of the tracking coordinate system, significantly improve the measurement accuracy of the binocular vision device, and ensure the measurement consistency under different observation angles.

[0041] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, so the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0042] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the above embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0043] The above implementation methods have been described in detail. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A 6D posture measurement error compensation method based on binocular vision, characterized in that: The method comprises the following steps: S1. Construct a single-point measurement error prediction model based on a multi-output least squares support vector regression model; S2. Use genetic algorithm to globally optimize the hyperparameters of the single-point measurement error prediction model to obtain the optimal hyperparameter set ; S3, using the position coordinates of multiple visual landmarks under binocular vision as inputs of a single-point measurement error prediction model to obtain a predicted single-point measurement error; S4. By minimizing the coordinate transformation error function, multiple single-point measurement errors are converted into multi-point coupling errors to achieve position and posture measurement error compensation of the tracking coordinate system.

2. The 6D posture measurement error compensation method according to claim 1, characterized in that: In step S1, the specific process includes the following steps: S11, defining an optimization problem, that is, transforming the linear problem of solving the multi-output least squares support vector regression model into the problem of solving the optimal estimation problem; S12, simultaneously minimizing the regression weight vector norm, the single output variable fitting error, and the sample overall fitting error in the optimization problem to obtain a regression function of a multi-output least squares support vector regression model; S13, according to step S12, the position coordinates of the sampling point under binocular vision and the position error under the current coordinates are used as input and output data respectively, and a multi-output least squares support vector regression model is trained to obtain all regression functions, that is, to obtain the final single-point measurement error prediction model.

3. The 6D posture measurement error compensation method according to claim 2, characterized in that: In step S12, the specific process includes the following steps: S121, let the multi-output sample set be , then the objective function and constraint equations of the multi-output least squares support vector regression model are: ;(1) In the above formula, Represents the weight coefficient of the j-th dimension output; Represents the penalty coefficient for the sum of squared errors of the sample; Represents the penalty coefficient for the absolute value of the overall error of the sample; represents the j-th dimension output error of the i-th sample; , denote the total number of samples i and dimension j respectively; represents the constraint equation; represents the kernel function; Represents the model parameters of the j-th dimension output; S122. Introduce the Lagrange multiplier in equation (1) , then its Lagrange function is: ;(2) in, represents the Lagrange multiplier; represents the constraint equation; S123, according to the KKT condition, calculate the weight coefficients of formula (2) , , output error as well as The partial derivative of is: ;(3) Where L represents the Lagrange function; S124, eliminate the weight coefficient in formula (3) , output error ,remember , and introduce the Gaussian kernel function , the linear equations are: ;(4) , , , ; in, Represents the calculation process value of the kernel function; , Respectively Input samples and output samples of ; express The kernel function of represents standard deviation; for dimensional column vector, whose value is: ;(5) S125, Solve the linear equations and Get the first dimensional regression function, that is: ;(6) In the above formula, , are input samples and output samples respectively.

4. The 6D posture measurement error compensation method according to claim 1, characterized in that: In step S2, the specific process includes the following steps: S21. Initialization: for the hyperparameter set Set the value ranges of the three parameters respectively. , , , the fitness function selects the root mean square error RMSE, which is: ;(7) In the formula, is the predicted value of the validation set; is the actual value of the validation set; M represents the number of samples in the validation set; S22, encoding: encoding the hyperparameters to be optimized; S23, selection, crossover and mutation: Calculate the fitness of all individuals in the current population and select individuals with high fitness to retain, use single-point crossover to randomly select two individuals, and randomly select exchange points in the code to exchange to form two new code sequences, and then randomly change a bit in the code sequence from 1 to 0 or from 0 to 1 according to the mutation probability, so as to obtain a new code sequence; S24, decoding: The encoded sequence after selection, crossover and mutation operations is decoded according to the hyperparameters The encoding length , and The binary codes are split to obtain the respective binary codes, and then the binary codes are decoded to obtain the optimized specific parameter values; S25: Repeat the above steps S21-S25 until the iteration ends and the optimal hyperparameter set is obtained. .

5. The 6D posture measurement error compensation method according to claim 1, characterized in that: In step S4, the specific process includes the following steps: S41, according to the visual landmark point in the binocular measurement system coordinate system and tracking coordinate system The linear transformation relationship under , transforms the linear problem of the single-point measurement error prediction model into an optimal estimation problem, that is, minimizing the coordinate transformation error function of formula (12), that is: ;(12) Where n is the number of visual landmarks; S42, solving the optimal rotation matrix according to the minimized coordinate transformation error function R And the optimal translation vector t ; S43, according to the rotation matrix R And the optimal translation vector t Get tracking coordinate system Relative to the binocular measurement system coordinate system The transformation relationship ,Right now: ;(24) S44, according to the transformation relationship From the rotation matrix R And the optimal translation vector t The tracking coordinate system is obtained in Relative to the binocular measurement system coordinate system Compensated posture and position.

6. The 6D posture measurement error compensation method according to claim 5, characterized in that: In step S41, the visual marker point is located in the binocular measurement system coordinate system and tracking coordinate system The linear transformation relationship is: ;(11) in, R and t Represents the binocular measurement system coordinate system Transform to tracking coordinate system The rotation matrix and translation vector of The visual landmark point is in the tracking coordinate system The coordinates below.

7. The 6D posture measurement error compensation method according to claim 5, characterized in that: In step S42, the specific process includes the following steps: S421, the translation vector in the minimized coordinate transformation error function t Take the partial derivative to get the translation vector t The solution is: ;(15) In the formula, and Respectively represent the geometric center of the visual landmark point in the tracking coordinate system and binocular measurement system coordinate system The coordinates below; R Represents the binocular measurement system coordinate system Transform to tracking coordinate system The rotation matrix of S422, the translation vector t Substitute the solution of into equation (12) to obtain the optimization objective and ,Right now: ;(16) In the formula, and Respectively in the tracking coordinate system and binocular measurement system coordinate system Next, the vectors from the geometric center of all visual landmarks to each landmark; S423, optimize the target and Go a step further and transform the minimum optimization problem into a maximum problem; S424. Perform singular value decomposition on the maximum value problem to obtain the optimal rotation matrix R ; S425, according to the optimal rotation matrix R Solving for the optimal translation vector t , by taking the optimal rotation matrix R Substituting into equation (15) we can solve the optimal translation vector t .

8. The 6D posture measurement error compensation method according to claim 7, characterized in that: In step S423, the optimization objective in equation (16) is further expanded: ;(17) Ignoring the constant term in equation (17), the minimum optimization problem can be transformed into the maximum problem shown in equation (18), that is: ;(18) in, R is the rotation matrix; n is the number of visual landmarks.

9. The 6D posture measurement error compensation method according to claim 7, characterized in that: In step S424, the matrix is ​​constructed. and , then formula (18) is transformed into: ; (19) According to the properties of matrix trace, we can get: ; (20) in, represents the matrix trace; remember , combining equations (19) and (20), and performing singular value decomposition on them to obtain the matrix ,Right now: ;(21) remember , since the matrix obtained by singular value decomposition is , U are all orthogonal matrices, R is an orthogonal rotation matrix, so H It is also an orthogonal matrix. It is known that the orthogonal matrix H The maximum value of each element in does not exceed 1, so: ;(22) To maximize the value of equation (22), the orthogonal matrix H The diagonals must all be 1 to calculate the optimal rotation matrix R ,for: ;(23) in, H is an orthogonal matrix; V Representation Matrix The transpose of Represents an orthogonal matrix U The transpose of .

Citation Information

Patent Citations

  • Isotropic vision-sensing stereoscopic spherical target object and calibration method

    CN109079774A

  • High-precision control method for double mobile mechanical arm collaborative machining in large scene

    CN112959325A

  • Industrial robot assembly error detection and precision compensation system calibration method

    CN114905511A

  • Binocular vision inertial odometer method using road sign point offset pose correction

    CN116342661A

  • Robot tail end absolute pose high-precision tracking method based on multi-view vision

    CN117197241A

Cited By

  • Robot collaborative machining method under shape and position error constraint

    CN120326608A

  • Hub machining error compensation method and system

    CN120705516A

  • Position calibration method of blast burner for high-temperature blowing forming of micro-hemispherical harmonic oscillator

    CN122045558A