DH parameter calibration method, device and terminal equipment of robot

By acquiring pose test data to detect and correct joint zero-point offsets, and combining deep learning networks and nonlinear minimum squares method for DH parameter calibration, the problems of complex operation and insufficient accuracy in traditional methods are solved, thereby improving robot control accuracy and calibration efficiency.

CN120503213BActive Publication Date: 2025-10-28MILVUS TECHNOLOGIES LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510994434.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2025-10-28
Estimated Expiration
2045-07-18

AI Technical Summary

Technical Problem

Traditional DH parameter calibration methods are complex, costly, and difficult to adapt to dynamically changing work scenarios. Joint encoder zero-point offset leads to a decrease in the accuracy of the robot's kinematic model, affecting control accuracy.

Method used

By acquiring pose test data, joint zero-point offset is detected, angle offset correction is performed, and DH parameter calibration is performed using deep learning networks and nonlinear minimum squares method, thereby improving calibration accuracy and efficiency.

Benefits of technology

It enables automatic correction of robot joint zero-point offset and efficient calibration of DH parameters, thereby improving robot control accuracy and calibration efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120503213B_ABST
    Figure CN120503213B_ABST
Patent Text Reader

Abstract

This application relates to the field of robotics technology and provides a method, apparatus, and terminal device for DH parameter calibration of a robot. The method involves acquiring pose test data, including at least one set of target pose test data. The target pose test data includes the joint angles of each joint of the robot and the corresponding end-effector pose when the robot's end effector moves from an arbitrary pose to the target pose. The method detects joint zero-point offset based on the joint angles of each joint. If joint zero-point offset is determined based on the joint angles, the joint angles of the offset joints are corrected to obtain corrected joint angles. The corrected joint angles are then input into a DH parameter calibration model for joint feature extraction and DH parameter calibration to obtain the DH parameter calibration result of the robot. The DH parameter calibration model is a trained neural network model, which improves the efficiency and accuracy of DH parameter calibration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of robotics technology, and in particular relates to a method, apparatus and terminal equipment for calibrating the DH parameters of a robot. Background Technology

[0002] Robotic systems are widely used in high-precision scenarios such as industrial manufacturing, medical surgery, and spatial operations, which places extremely high demands on the accuracy of the robot's kinematic model. Robot motion control relies on accurate geometric modeling, and Denavit-Hartenberg (DH) parameters are a crucial foundation for constructing a positive kinematic model. Traditional DH parameter calibration typically relies on manual measurement and complex geometric calculations. These methods are not only complex and costly, but also dependent on environmental conditions, have poor scalability, and are difficult to adapt to dynamically changing working scenarios.

[0003] Furthermore, as the robot is used for a longer period of time, the joint encoders may experience zero-point shifts. Even in the initial state without any movement, the read joint angles will show systematic errors. Once the joint encoders of some joints experience zero-point shifts, it will directly affect the accuracy of the entire kinematic model, causing the originally calibrated DH parameters to become invalid. This may lead to path planning errors, unstable control, or even task failure, thus affecting the robot's control accuracy. Summary of the Invention

[0004] This application provides a method, apparatus, and terminal device for DH parameter calibration of a robot, which can improve the accuracy and efficiency of DH parameter calibration, thereby improving the control precision of the robot.

[0005] In a first aspect, embodiments of this application provide a method for calibrating the DH parameters of a robot, including:

[0006] Acquire pose test data, the pose test data including at least one set of target pose test data, the target pose test data including the joint angles of each joint of the robot and the corresponding end pose when the robot end moves from any pose to the target pose;

[0007] The robot's joint zero-point offset is detected based on the joint angles of each joint.

[0008] If it is determined that the robot has a joint zero-point offset based on the joint angles of each joint, the joint angles of the zero-point offset joints are corrected by angle offset to obtain the corrected joint angles.

[0009] The corrected joint angles are input into the DH parameter calibration model for joint feature extraction and DH parameter calibration to obtain the DH parameter calibration results of the robot; wherein, the DH parameter calibration model is a trained neural network model, which is used to output the corresponding DH parameter calibration results according to the input joint angles.

[0010] In one implementation of the first aspect, before acquiring the pose test data, the method further includes:

[0011] The robot with the installed test fixture is controlled to collect the pose test data according to the pose test data acquisition strategy.

[0012] In one implementation of the first aspect, the joint zero-point offset detection of the robot based on the joint angles of each joint includes:

[0013] Based on the target pose test data for each set, calculate the standard deviation of the joint angle for each joint;

[0014] Gaussian filtering is used to estimate the zero-point offset value of each joint based on the standard deviation of the joint angle of each joint.

[0015] If the zero-point offset of a joint is greater than the offset threshold and the joint standard deviation is less than the stable offset fluctuation threshold, then the joint is determined to have zero-point drift.

[0016] In one implementation of the first aspect, when it is determined that the robot has a joint zero-point offset based on the joint angles of each joint, the joint angles of the zero-point offset joints are corrected by angle offset to obtain the corrected joint angles, including:

[0017] The joint angle of a joint with zero-point offset is corrected based on the zero-point offset model; the zero-point offset model is used to represent the mapping relationship between the target joint angle and the measured joint angle.

[0018] In one implementation of the first aspect, before inputting the corrected joint angle into the DH parameter calibration model for joint feature extraction and DH parameter calibration to obtain the DH parameter calibration result of the robot, the method further includes:

[0019] Determine the transformation relationship between the robot's base coordinate system and the optical tracking coordinate system;

[0020] The pose of the robot end effector is converted to the robot base coordinate system according to the conversion relationship.

[0021] In one implementation of the first aspect, after detecting the joint zero-point offset of the robot based on the joint angles of each joint, the method further includes:

[0022] Joint values ​​that do not require zero-point offset correction are input into the DH parameter calibration model for feature extraction and DH parameter calibration.

[0023] In one implementation of the first aspect, after inputting the corrected joint angle into the DH parameter calibration model for joint feature extraction and DH parameter calibration to obtain the DH parameter calibration result of the robot, the method further includes:

[0024] The calibration results of the DH parameters output by the DH parameter calibration model are optimized using the nonlinear minimum square method to obtain the optimized DH parameter calibration results.

[0025] Secondly, embodiments of this application provide a robot DH parameter calibration device, comprising:

[0026] An acquisition unit is used to acquire pose test data, the pose test data including at least one set of target pose test data, the target pose test data including the joint angles of each joint of the robot and the corresponding end pose when the robot end moves from any pose to the target pose;

[0027] The detection unit is used to detect the joint zero-point offset of the robot based on the joint angles of each joint.

[0028] The correction unit is used to correct the joint angle of the joint with zero-point offset when it is determined that the robot has a joint zero-point offset based on the joint angle of each joint, so as to obtain the corrected joint angle.

[0029] The calibration unit is used to input the corrected joint angles into the DH parameter calibration model for joint feature extraction and DH parameter calibration, so as to obtain the DH parameter calibration result of the robot; wherein, the DH parameter calibration model is a trained neural network model, and the DH parameter calibration model is used to output the corresponding DH parameter calibration result according to the input joint angles.

[0030] Thirdly, embodiments of this application provide a terminal device, the terminal device including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the robot DH parameter calibration method as described in the first aspect or any optional method of the first aspect.

[0031] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the DH parameter calibration method for a robot as described in the first aspect or any alternative method of the first aspect.

[0032] Fifthly, embodiments of this application provide a computer program product that, when run on a terminal device, causes the terminal device to execute the robot DH parameter calibration method described in the first aspect or any optional method of the first aspect.

[0033] Implementing the robot DH parameter calibration method, apparatus, terminal device, computer-readable storage medium, and computer program product provided in the embodiments of this application has the following beneficial effects:

[0034] The DH parameter calibration method for robots provided in this application can correct the zero-point offset of robot joints and automatically calibrate DH parameters based on the corrected joint angles using a deep learning network. This improves the accuracy and efficiency of DH parameter calibration, thereby enhancing the control precision of the robot. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0036] Figure 1 This is a schematic diagram illustrating the implementation process of a robot DH parameter calibration method provided in an embodiment of this application;

[0037] Figure 2 This is a schematic diagram illustrating an implementation scenario of the DH parameter calibration method for a robot provided in this application embodiment;

[0038] Figure 3 This is a flowchart illustrating the specific implementation of step S12 of a robot DH parameter calibration method provided in an embodiment of this application.

[0039] Figure 4 This is a schematic diagram illustrating the implementation process of another robot DH parameter calibration method provided in another embodiment of this application;

[0040] Figure 5 This is a schematic diagram of the structure of a robot DH parameter calibration device provided in an embodiment of this application;

[0041] Figure 6 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation

[0042] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0043] It should be understood that the term "and / or" as used in this application specification and the appended claims refers to any combination of one or more of the associated listed items, as well as all possible combinations, and includes such combinations. Furthermore, in the description of this application specification and the appended claims, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.

[0044] It should also be understood that references to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include the specific features, structures, or characteristics described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0045] As mentioned earlier, the DH parameters of a robot are a crucial foundation for its forward kinematics model. DH parameter calibration refers to the process of determining the actual DH parameter values ​​of the robot, with the aim of improving the accuracy of the robot's kinematic model and reducing the error between the theoretical model and the actual mechanical structure. Currently, DH parameter calibration typically relies on manual measurement and complex geometric calculations, combined with optimization algorithms.

[0046] Existing methods suffer from problems such as complex operation and low calibration efficiency. Furthermore, factors such as encoder installation errors, temperature changes, and mechanical wear may cause zero-point offset in the joint encoder. This zero-point offset causes the originally calibrated DH parameters to become invalid, thereby affecting the robot control accuracy.

[0047] To address the aforementioned issues, this application provides a method for DH parameter calibration of a robot. This method can correct the zero-point offset of the robot's joints and automatically calibrate the DH parameters based on the corrected joint angles using a deep learning network. This improves the accuracy and efficiency of DH parameter calibration, thereby enhancing the robot's control precision.

[0048] The following will provide a detailed description of the DH parameter calibration method for the robot provided in the embodiments of this application:

[0049] Please see Figure 1 , Figure 1 This is a schematic flowchart illustrating a robot DH parameter calibration method provided in this application embodiment. The executing entity of the robot DH parameter calibration method provided in this application embodiment can be a robot, a control system / module within the robot, or a terminal device communicating with the robot. The terminal device can be a mobile terminal such as a smartphone, tablet, or wearable device, or a computer, cloud server, radar-assisted computer, or other equipment in various application scenarios. Of course, the terminal device in this application embodiment can also be the aforementioned robot, which can be applied in scenarios including but not limited to industrial manufacturing, medical, and service industries. By executing the various steps of the method provided in this application embodiment, the terminal device can automatically calibrate the DH parameters, improving the accuracy and efficiency of DH parameter calibration, thereby improving the precision of robot control. The following explanation uses the aforementioned terminal device as the executing entity:

[0050] like Figure 1 As shown, the DH parameter calibration method for a robot provided in this application embodiment may include S11~S14, which are detailed below:

[0051] S11: Obtain pose test data.

[0052] In this embodiment of the application, the pose test data includes at least one set of target pose test data, which includes the joint angles of each joint of the robot and the corresponding end pose when the robot end moves from any pose to the target pose.

[0053] It is understandable that each set of target pose test data may include the joint angles of each joint of the robot and the corresponding end-effector pose when the robot end-effector moves from multiple arbitrary poses to the target pose.

[0054] To more accurately detect the zero-point drift of the joint encoder, the joint angles and corresponding end-effector poses of each joint of the robot can be repeatedly collected as the robot end-effector moves from different arbitrary poses to the target pose. For example, the robot end-effector can be controlled to repeatedly perform the movement from an arbitrary pose to the target pose 100 times, and the joint angles and corresponding end-effector poses of each joint can be recorded each time the robot end-effector moves from an arbitrary pose to the target pose, thus obtaining this set of target pose test data. A new target pose is then set, and the above operation is repeated to obtain the target pose test data corresponding to the new target pose. Multiple sets of target pose test data constitute the aforementioned pose test data.

[0055] It should be noted that the number of times the above-mentioned execution is repeated can be determined according to actual testing needs; the above is only an example and not a limitation.

[0056] As an example of an embodiment of this application, the robot may include a robot body and a robot control cabinet. The robot body may be a robotic arm with a serial structure, comprising multiple joints connected in series to form the robot body. Each joint may include devices such as servo motors, reducers, torque sensors, and position sensors. The end effector of the robot, i.e., the end of the robotic arm, may include a flange for connecting a tool load. The robot control cabinet is responsible for operating the robot control system and drive system. The control system enables the operation of robot applications, such as calculating the kinematics and dynamics of the robot and robotic arm during movement. The drive system drives and controls the servo motors on each joint of the robotic arm, responsible for the motion control of the corresponding joints.

[0057] For example, the robot described above can be a multi-degree-of-freedom industrial robot, a service robot, or a medical robot. As another example, the robotic arm described above can be a seven-degree-of-freedom robotic arm, meaning that the robotic arm has seven joints, and these seven joints form a serial structure that constitutes part of the robot body.

[0058] In this embodiment, a torque sensor and a position encoder (i.e., the joint encoder mentioned above) can be installed on each joint. The torque sensor can be used to collect the magnitude of the torque at each joint position, i.e., the torque value. This torque value can be converted using a dynamic correlation algorithm to obtain the force and torque information of the robotic arm's end effector. The position sensor can be used to determine the current position of each joint, which can refer to the current joint angle. The end effector pose can be obtained using an optical tracker.

[0059] In one embodiment of this application, the following steps may be included before S11:

[0060] S21: Control the robot with the installed test fixture to collect pose test data according to the pose test data acquisition strategy.

[0061] In specific applications, the aforementioned test fixture can be an optical calibration rod, an optical marker ball, etc. The process of installing the test fixture on the robot can be to install an optical calibration rod at the end of the robot and at the same time install no less than 3 optical marker balls on the robot's base coordinate system XY plane.

[0062] The aforementioned pose test data acquisition strategy may specifically include a target pose selection strategy and a control strategy. The target pose selection strategy can be used to determine the target pose that the robot end effector needs to move to, and the control strategy may include a specific control algorithm that controls the robot end effector to move from different arbitrary positions to the target pose.

[0063] As one implementation of this application, the target pose determination strategy can use a random pose determination method to determine the target pose, that is, use a random algorithm to determine the target pose.

[0064] In some embodiments of this application, the target pose determination strategy can also determine the target pose based on the probability of the robot end effector pose appearing during the application process. For example, the pose with a probability greater than a preset probability threshold can be determined as the target pose, or the N (N is a positive integer) poses with the highest probability of appearance can be determined as the target pose.

[0065] It should be noted that the preset probability threshold and the specific value of N can be set according to actual application requirements, and this application does not impose specific restrictions on them.

[0066] For example, please refer to Figure 2 , Figure 2 This illustration shows a schematic diagram of an implementation scenario for the DH parameter calibration method for a robot provided in an embodiment of this application. For example... Figure 2 As shown, 1 represents the robot, 2 represents the optical tracker, 3 represents the optical marker ball, 4 represents the robot's base coordinate system XY plane, and 5 represents the optical calibration rod.

[0067] The position of the optical tracker needs to ensure that all optical marker balls and optical calibration rods are within the effective field of view of the optical tracker.

[0068] Combination Figure 2 In the scenario shown, S21 above may specifically include the following steps:

[0069] 1. Control the robot's end effector to move to any pose and record that pose as the target pose;

[0070] 2. Control the robot to move from any position to the target pose multiple times, repeating more than 100 times, and try to ensure that the starting point of the robot's movement is evenly distributed throughout the robot's entire movement space, and record the joint angles of each joint of the robot.

[0071] 3. Change the target pose;

[0072] 4. Repeat step 2 to record the updated target position and joint angles of each joint;

[0073] 5. Repeat steps 3-4 to collect multiple sets of target pose test data.

[0074] It is understandable that after collecting the above pose test data, the pose test data can be stored, for example, in the storage medium of the terminal device, or in the cloud server. When it is necessary to perform DH parameter calibration of the robot, the pose test data can be obtained from the storage medium or cloud server where the pose test data is stored.

[0075] S12: Detect the zero-point offset of the robot's joints based on the joint angles of each joint.

[0076] In this embodiment, multiple sets of joint angle data corresponding to the same target pose are used to detect joint zero-point offset in order to determine whether the robot's joint encoder has zero-point offset.

[0077] In practical applications, zero-point offset detection can be performed on each joint in each set of target pose test data. If the presence of zero-point offset is determined based on the joint angles of each joint in any set of target pose test data, angle offset correction can be performed.

[0078] Please see Figure 3 , Figure 3 This document illustrates a flowchart of step S12 of a robot DH parameter calibration method provided in an embodiment of this application. Figure 3 As shown in one embodiment of this application, the above-mentioned zero-point offset detection of each joint in each set of target pose test data may specifically include the following steps:

[0079] S121: Calculate the standard deviation of the joint angle for each joint based on the target pose test data for each set.

[0080] S122: Gaussian filtering is performed based on the standard deviation of the joint angle of each joint to estimate the zero-point offset value of each joint.

[0081] S123: If the zero-point offset value of a joint is greater than the offset threshold and the joint standard deviation is less than the stable offset fluctuation threshold, then it is determined that the joint has zero-point drift.

[0082] For example, taking the determination of whether joint i has zero-point drift as an example, the above joint zero-point offset detection can specifically be as follows:

[0083] 1. Calculate the joint mean of the i-th joint:

[0084] (1)

[0085] in, Let represent the joint mean of joint i. Let represent the joint angle recorded at the j-th record of the i-th joint, and n represent the number of joint angles recorded at the i-th joint, where i, j, and n are all positive integers.

[0086] 2. Calculate the standard deviation of the i-th joint:

[0087] (2)

[0088] in, This represents the standard deviation of the i-th joint.

[0089] 3. Perform Gaussian filtering for noise reduction using a filtering window of 2wd+1 to obtain the zero-point offset value of the i-th joint:

[0090] (3)

[0091] in, This is a weighted, smoothed value of the joint angles corresponding to the windows set before and after the i-th recorded joint angle. wd For the set window size, Let be the standard deviation of joint i, which is equivalent to the value in formula (2). , k represents the sample offset relative to the currently recorded joint angle. It is the weight value of the "Gaussian kernel" at offset j.

[0092] , (4)

[0093] in, Let be the zero-point offset value of the i-th joint. This represents the expected value of the ideal zero point. Represents smoothing value The mean.

[0094] 4. Determine whether the i-th joint has a zero-point offset based on the zero-point offset value, offset threshold, joint standard deviation, and stable offset fluctuation threshold:

[0095] like and If a stable zero-point drift exists, zero-point drift correction is required. This is the offset threshold. To determine whether it is a stable offset fluctuation threshold.

[0096] Perform steps 1-4 above for each joint to determine the zero-point offset of each joint.

[0097] It is understandable that the aforementioned offset threshold and stable offset fluctuation threshold can be set according to actual needs. For example, for cases where the zero-point offset requirement is high, the offset threshold and stable offset fluctuation threshold can be set to be smaller to improve detection accuracy.

[0098] In practical applications, for each joint, the joint angles recorded in each set of target pose test data can be calculated and analyzed as described above. If the joint angles recorded in one set of target pose data indicate that the joint has a zero-point offset, then the joint needs to be corrected for the zero-point offset.

[0099] In one embodiment of this application, if it is determined that there is no joint zero-point offset for a certain joint based on the joint angles in all target pose test data, then it means that the joint does not need to be corrected for zero-point offset.

[0100] S13: If it is determined that the robot has a joint zero-point offset based on the joint angles of each joint, the joint angles of the zero-point offset joints are corrected by angle offset to obtain the corrected joint angles.

[0101] In this embodiment, the joint angles of joints with zero-point offset can be corrected based on a zero-point offset model. The aforementioned zero-point offset model represents the mapping relationship between the target joint angle and the measured joint angle.

[0102] Specifically, the above mapping relationship can be expressed as: (5), where Δ q This indicates the offset correction amount. Indicates the ideal value of the joint. This indicates the corrected joint angle.

[0103] In one embodiment of this application, a deep learning network can be constructed, and the constructed deep learning network can be trained based on training samples to obtain a zero-point offset model that can be used to represent the mapping relationship between the target joint angle and the measured joint angle.

[0104] For example, taking the construction and training of a 5-layer BP neural network to obtain a zero-point offset model as an example, the process of constructing and training the zero-point offset model can include the following steps:

[0105] 1. Construct a 5-layer BP neural network, where layer 1 is the input layer, layers 2 to 4 are hidden layers, and layer 5 is the output layer. Layers 2 and 3 use the ReLU activation function, and layer 4 uses the Linear activation function.

[0106] 2. Construct training samples:

[0107] (6)

[0108] in, This represents the ideal value of the i-th joint. This represents the offset correction amount corresponding to the ideal value of the i-th joint, where N is the number of training samples, and i and N are positive integers.

[0109] 3. Normalize the joint values ​​in the training samples.

[0110] 4. During training, mean squared error (MSE) is used as the loss function, the Adam optimizer is used, and a dynamic learning rate of 32 batch size and 1000 epochs is used for model training.

[0111] 5. If the model converges, the trained zero-point offset model is obtained.

[0112] After obtaining the trained zero-point offset model, joint angles can be corrected in real time based on this model. That is, the corrected joint angles can be determined based on the trained zero-point offset model. (7).

[0113] It should be noted that the above is only an illustrative example using a BP neural network. Other deep learning networks can also be used to construct the zero-point offset model, such as the Transformer model with a multi-attention mechanism. This application does not impose any specific restrictions on this.

[0114] It should also be noted that the activation functions used in each layer of the above BP neural network are only examples, and other activation functions can also be used to implement it, such as LeakyReLU. This application does not impose any specific restrictions on this.

[0115] S14: Input the corrected joint angles into the DH parameter calibration model for joint feature extraction and DH parameter calibration to obtain the robot's DH parameter calibration results.

[0116] Among them, the DH parameter calibration model is a trained neural network model, which is used to output the corresponding DH parameter calibration results based on the input joint angle.

[0117] In practical applications, a DH parameter calibration model can be built and trained to achieve automatic DH parameter calibration. This DH parameter calibration model can then be used to automatically calibrate the DH parameters based on the corrected joint angles of each joint of the robot, thereby improving the efficiency of DH parameter calibration.

[0118] In practical applications, the input to the above DH parameter calibration model is the joint angle of each joint. Specifically, for joints requiring zero-point offset correction, the corrected joint angle is used; for joints not requiring zero-point offset correction, the collected joint angle is input. The output of the DH parameter calibration model is the robot DH parameter to be calibrated, which may include link lengths (…). ), connecting rod torque ( ), joint displacement ( ), joint angle ( ).

[0119] For example, a deep learning network (i.e., the initial DH parameter calibration model) can be constructed based on a Transformer network with a multi-attention mechanism. When using the Transformer network structure, the joint angle vectors are taken as input. First, they undergo a linear transformation and are superimposed with position encoding to introduce sequence structure information. Then, a multi-head self-attention mechanism is used to capture the global correlation between different joints. The information captured by the multi-head attention mechanism is then fed into a feedforward neural network (FFN) module, and feature enhancement and stability optimization are performed by combining residual connections and normalization operations. Finally, a DH parameter matrix of shape (n×4) is output, where each row represents the four calibration parameters of each joint, namely the link length (…). ), connecting rod torsion angle ( ), joint displacement ( ), joint angle ( ).

[0120] The DH parameter calibration model described above can be used to construct a forward kinematics model of a robot based on the improved DH (MDH) theory, which can be used for end-effector pose prediction.

[0121] The loss function for constructing the above DH parameter model is as follows:

[0122] (8)

[0123] in, λ 1 and λ 2 represents the model weight coefficients. It is the error term of the member parameters (the sum of squares of expected value and actual value). It is the pose error term. This is the position error term. It is the attitude error term. It is the quaternion corresponding to the attitude, and the subscript imp indicates taking the imaginary part. For L2 regularization terms, This is the regularization intensity coefficient.

[0124] When training the DH parameter calibration model, the training optimizer can be set to RMSprop, and the batch size can be set to 32 and epoch=2000 to obtain the trained DH parameter calibration model.

[0125] In some embodiments of this application, since the pose of the robot's end effector is acquired using an optical tracker, the optical tracking system can also calculate the robot's base coordinate system (x) for ease of subsequent use. r y r b r The transformation relationship between the coordinate system (x2, y2, z2) and the optical tracking coordinate system (x2, y2, z2) is established, and the acquired pose is transformed to the robot base coordinate system.

[0126] For example, taking four optical marker spheres set on the robot's base coordinate system XY plane as an example, assume that the positions of these four optical marker spheres in the optical tracking coordinate system are:

[0127] (9)

[0128] The positions of these four optical marker spheres in the robot's base coordinate system are:

[0129] (10)

[0130] Based on the positions of the four optical marker spheres in the optical tracking coordinate system and their positions in the robot's base coordinate system, the centroid can be calculated as follows:

[0131] (11)

[0132] By performing the centroid removal operation, we obtain:

[0133] (12)

[0134] in, coordinate values The deviation from the corresponding centroid.

[0135] Based on the coordinates after centroid removal, the covariance matrix can be constructed as follows:

[0136] (13)

[0137] Singular value decomposition of the covariance matrix yields:

[0138] (14)

[0139] Calculate the optimal rotation matrix:

[0140] (15)

[0141] Calculate the translation:

[0142] (16)

[0143] The final homogeneous transformation matrix is:

[0144] (17)

[0145] Where H is the Singular Value Decomposition (SVD), U is the left singular vector matrix, which is an orthogonal matrix (or unitary matrix), and V is the right singular vector matrix, which is also an orthogonal matrix. A diagonal singular value matrix, where the diagonal elements are the singular values ​​of H. Expressing the request The determinant of has a value of 1 or -1. This means adding 1, 1, Place these three numbers on the diagonal of a 3×3 matrix, with all other positions containing 0.

[0146] After determining the robot's base coordinate system (x... r y r b r After establishing the transformation relationship between the coordinate system (x2, y2, z2) and the optical tracking coordinate system, the robot's pose can be transformed into the robot's base coordinate system, so as to provide a unified description of the robot's motion and improve the accuracy of the model output.

[0147] As can be seen from the above, the DH parameter calibration method for robots provided in this application embodiment can correct the zero-point offset of the robot's joints, and automatically calibrate the DH parameters based on the corrected joint angles using a deep learning network. This can improve the accuracy and efficiency of DH parameter calibration, thereby improving the control precision of the robot.

[0148] In one embodiment of this application, in order to further improve the accuracy of the automatically calibrated DH parameters, the calibration results of the DH parameters output by the DH parameter calibration model can be optimized based on the nonlinear minimum square method to obtain the optimized DH parameter calibration results.

[0149] In practical applications, the DH parameters output by the DH parameter calibration model are used as initial values. The nonlinear least squares optimization algorithm (Levenberg-Marquardt) is then used to further optimize the parameter results. In the optimization process, structural constraints are set according to the actual configuration of the robot to improve the rationality of the results. For example, some certain DH parameters are set to fixed values.

[0150] Furthermore, positive validation can be performed using unused data from the DH parameter calibration model. The error between the predicted pose and the true pose can be calculated and compared to verify the accuracy of the output results of the DH parameter calibration model. For example, the root mean square error of the position and the attitude angle error between the predicted pose and the true pose can be calculated to verify the prediction accuracy of the DH parameter calibration model.

[0151] In some embodiments, the root mean square error of the position and the attitude angle error between the predicted pose and the actual pose can be plotted as a residual heatmap for visualization analysis.

[0152] Please see Figure 4 , Figure 4 This is a schematic diagram illustrating the implementation process of a robot DH parameter calibration method provided in another embodiment of this application, which differs from... Figure 1 The DH parameter calibration method provided in this application, as shown in the embodiment, includes the following steps:

[0153] S41: Control the robot with the installed test fixture to collect pose test data according to the pose test data acquisition strategy.

[0154] Here, multiple sets of target pose test data can be collected. Each set of target pose test data includes the joint angles of each joint and the target pose when moving from multiple different arbitrary poses to the target pose. The joint angles can be obtained through joint sensors, and the robot's end pose can be obtained through an optical tracker.

[0155] The specific steps of S41 can be found in the relevant description of S21, and will not be repeated here.

[0156] S42: Determine whether there is a zero-point offset in each joint based on the target pose test data for each set. If so, execute S43; otherwise, execute S44.

[0157] The specific implementation of S42 can be found in the description of S12, and will not be repeated here.

[0158] S43: Based on the zero-point offset model, the joint angles of joints with zero-point offset are corrected by angle offset to obtain the corrected joint angles.

[0159] The specific implementation of S43 can be found in the relevant description in S13, and will not be repeated here.

[0160] S44: Input the corrected joint angles and the joint angles that do not need to be corrected into the DH parameter calibration model to obtain the calibration results of the DH parameters.

[0161] For a detailed explanation of the implementation of S44, please refer to the description of S14. It will not be repeated here.

[0162] S45: The DH parameters are optimized based on the nonlinear minimum square method to obtain the optimized DH parameter calibration results.

[0163] As can be seen from the above, the DH parameter calibration method for robots provided in this application can determine the joints with zero-point offset based on pose test data, modify the zero-point offset of the joints with zero-point offset, and then automatically calibrate the DH parameters based on the corrected joint angle using a deep learning network. This can improve the accuracy and efficiency of DH parameter calibration. Furthermore, the DH parameters calibrated automatically can be optimized based on the nonlinear minimum squares method, which can further improve the accuracy of DH parameter calibration and thus improve the control precision of the robot.

[0164] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0165] Based on the DH parameter calibration method for robots provided in the above embodiments, this invention further provides an embodiment of a DH parameter calibration device for robots that implements the above method embodiments.

[0166] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a DH parameter calibration device for a robot provided in an embodiment of this application. In this embodiment, the DH parameter calibration device for the robot includes units used for performing... Figure 1 The steps in the corresponding embodiments. Please refer to the details. Figure 1 as well as Figure 1 The relevant descriptions in the corresponding embodiments are shown below. For ease of explanation, only the parts relevant to this embodiment are shown.

[0167] like Figure 5 As shown, the robot's DH parameter calibration device 50 includes: an acquisition unit 501, a detection unit 502, a correction unit 503, and a calibration unit 504. Wherein:

[0168] The acquisition unit 501 is used to acquire pose test data, which includes at least one set of target pose test data. The target pose test data includes the joint angles of each joint of the robot and the corresponding end pose when the robot end moves from any pose to the target pose.

[0169] The detection unit 502 is used to detect the joint zero-point offset of the robot based on the joint angle of each joint.

[0170] The correction unit 503 is used to correct the joint angle of the joint with zero-point offset when it is determined that the robot has a joint zero-point offset based on the joint angle of each joint, so as to obtain the corrected joint angle.

[0171] The calibration unit 504 is used to input the corrected joint angle into the DH parameter calibration model for joint feature extraction and DH parameter calibration, so as to obtain the DH parameter calibration result of the robot; wherein, the DH parameter calibration model is a trained neural network model, and the DH parameter calibration model is used to output the corresponding DH parameter calibration result according to the input joint angle.

[0172] In one embodiment of this application, the DH parameter calibration device for the robot may further include a control unit. The control unit is used to control the robot with the installed test fixture to collect the pose test data according to the pose test data acquisition strategy.

[0173] In one embodiment of this application, the detection unit 502 is specifically used to calculate the standard deviation of the joint angle of each joint based on each set of target pose test data; perform Gaussian filtering estimation based on the standard deviation of the joint angle of each joint to obtain the zero-point offset value of each joint; if the zero-point offset value of the joint is greater than the offset threshold and the joint standard deviation is less than the stable offset fluctuation threshold, then it is determined that the joint has zero-point drift.

[0174] In one embodiment of this application, the correction unit 503 is further configured to perform angle offset correction on the joint angle of the joint with zero-point offset based on the zero-point offset model; the zero-point offset model is used to represent the mapping relationship between the target joint angle and the measured joint angle.

[0175] In one embodiment of this application, the DH parameter calibration device for the robot further includes a transformation unit. The transformation unit is used to determine the transformation relationship between the robot base coordinate system and the optical tracking coordinate system; and to transform the pose of the robot end effector to the robot base coordinate system according to the transformation relationship.

[0176] In one embodiment of this application, the DH parameter calibration device of the robot further includes an optimization unit. The optimization unit can be used to optimize the calibration results of the DH parameters output by the DH parameter calibration model based on the nonlinear minimum square method to obtain the optimized DH parameter calibration results.

[0177] In one embodiment of this application, the calibration unit is further configured to input joint values ​​that do not require zero-point offset correction into the DH parameter calibration model for feature extraction and DH parameter calibration.

[0178] It should be noted that the information interaction and execution process between the above-mentioned units are based on the same concept as the method embodiments of this application, and their specific functions and technical effects can be referred to the method embodiments section.

[0179] In summary, the DH parameter calibration device for robots provided in this application embodiment can also correct the zero-point offset of the robot's joints, and automatically calibrate the DH parameters based on the corrected joint angles using a deep learning network. This can improve the accuracy and efficiency of DH parameter calibration, thereby improving the control precision of the robot.

[0180] Figure 6 This is a schematic diagram of the structure of a terminal device provided in another embodiment of this application. For example... Figure 6 As shown, the terminal device 600 provided in this embodiment includes: a processor 60, a memory 61, and a computer program 62 stored in the memory 61 and executable on the processor 60, such as an image segmentation program. When the processor 60 executes the computer program 62, it implements the steps in the above embodiments of the DH parameter calibration methods for various robots, for example... Figure 1 S11~S14 are shown. Alternatively, when the processor 60 executes the computer program 62, it implements the functions of each module / unit in the above-described terminal device embodiments, for example... Figure 5 The functions of units 501 to 504 are shown.

[0181] For example, the computer program 62 can be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 60 to complete this application. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 62 in the terminal device 600. For example, the computer program 62 can be divided into multiple units; please refer to the specific functions of each unit. Figure 5 The relevant descriptions in the corresponding embodiments are not repeated here.

[0182] The terminal device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will understand that... Figure 6 This is merely an example of terminal device 600 and does not constitute a limitation on terminal device 600. It may include more or fewer components than shown, or combine certain components, or different components. For example, the terminal device may also include input / output devices, network access devices, buses, etc.

[0183] The processor 60 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware groups, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0184] The memory 61 can be an internal storage unit of the terminal device 600, such as a hard disk or memory of the terminal device 600. The memory 61 can also be an external storage device of the terminal device 600, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the terminal device 600. Furthermore, the memory 61 can include both internal and external storage units of the terminal device 600. The memory 61 is used to store the computer program and other programs and data required by the terminal device. The memory 61 can also be used to temporarily store data that has been output or will be output.

[0185] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, can implement the aforementioned DH parameter calibration method for the robot.

[0186] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the DH parameter calibration method for the robot described above.

[0187] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the terminal device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0188] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, refer to the relevant descriptions of other embodiments.

[0189] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0190] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for calibrating the DH parameters of a robot, characterized in that, include: Acquire pose test data, the pose test data including at least one set of target pose test data, the target pose test data including the joint angles of each joint of the robot and the corresponding end pose when the robot end moves from any pose to the target pose; The robot's joint zero-point offset is detected based on the joint angles of each joint. The step of detecting the joint zero-point offset of the robot based on the joint angles of each joint includes: Based on the target pose test data for each set, calculate the standard deviation of the joint angle for each joint; Gaussian filtering is used to estimate the zero-point offset value of each joint based on the standard deviation of the joint angle. If the zero-point offset value of a joint is greater than the offset threshold and the joint standard deviation is less than the stable offset fluctuation threshold, then it is determined that the joint has zero-point drift. If it is determined that the robot has a joint zero-point offset based on the joint angles of each joint, the joint angles of the zero-point offset joints are corrected by angle offset to obtain the corrected joint angles. When it is determined that the robot has a joint zero-point offset based on the joint angles of each joint, the joint angles of the zero-point offset joints are corrected to obtain the corrected joint angles, including: Angle offset correction is performed on the joint angles of joints with zero-point offset based on the zero-point offset model; the zero-point offset model is used to represent the mapping relationship between the target joint angle and the measured joint angle. The corrected joint angles are input into the DH parameter calibration model for joint feature extraction and DH parameter calibration to obtain the DH parameter calibration results of the robot. The DH parameter calibration model is a trained neural network model used to output corresponding DH parameter calibration results based on the input joint angles. The DH parameter calibration model is constructed based on a Transformer network with a multi-attention mechanism. The input to the DH parameter calibration model is the joint angles of each joint. For joints requiring zero-point offset correction, the corrected joint angles are input; for joints not requiring zero-point offset correction, the collected joint angles are input. The output of the DH parameter calibration model is the DH parameters of the robot to be calibrated, including link length, link torque, joint offset, and joint angles.

2. The DH parameter calibration method for a robot according to claim 1, characterized in that, Before acquiring the pose test data, the method further includes: The robot with the installed test fixture is controlled to collect the pose test data according to the pose test data acquisition strategy.

3. The DH parameter calibration method for a robot according to claim 1, characterized in that, Before inputting the corrected joint angles into the DH parameter calibration model for joint feature extraction and DH parameter calibration to obtain the DH parameter calibration results of the robot, the process also includes: Determine the transformation relationship between the robot's base coordinate system and the optical tracking coordinate system; The pose of the robot end effector is converted to the robot base coordinate system according to the conversion relationship.

4. The DH parameter calibration method for a robot according to any one of claims 1 to 3, characterized in that, After detecting the joint zero-point offset of the robot based on the joint angles of each joint, the method further includes: Joint values ​​that do not require zero-point offset correction are input into the DH parameter calibration model for feature extraction and DH parameter calibration.

5. The DH parameter calibration method for a robot according to claim 1, characterized in that, After inputting the corrected joint angles into the DH parameter calibration model for joint feature extraction and DH parameter calibration to obtain the DH parameter calibration results of the robot, the process further includes: The calibration results of the DH parameters output by the DH parameter calibration model are optimized using the nonlinear minimum square method to obtain the optimized DH parameter calibration results.

6. A DH parameter calibration device for a robot, characterized in that, include: An acquisition unit is used to acquire pose test data, the pose test data including at least one set of target pose test data, the target pose test data including the joint angles of each joint of the robot and the corresponding end pose when the robot end moves from any pose to the target pose; The detection unit is used to detect the joint zero-point offset of the robot based on the joint angles of each joint. The step of detecting the joint zero-point offset of the robot based on the joint angles of each joint includes: Based on the target pose test data for each set, calculate the standard deviation of the joint angle for each joint; Gaussian filtering is used to estimate the zero-point offset value of each joint based on the standard deviation of the joint angle. If the zero-point offset value of a joint is greater than the offset threshold and the joint standard deviation is less than the stable offset fluctuation threshold, then it is determined that the joint has zero-point drift. The correction unit is used to correct the joint angle of the joint with zero-point offset when it is determined that the robot has a joint zero-point offset based on the joint angle of each joint, so as to obtain the corrected joint angle. When it is determined that the robot has a joint zero-point offset based on the joint angles of each joint, the joint angles of the zero-point offset joints are corrected to obtain the corrected joint angles, including: Angle offset correction is performed on the joint angles of joints with zero-point offset based on the zero-point offset model; the zero-point offset model is used to represent the mapping relationship between the target joint angle and the measured joint angle. A calibration unit is used to input the corrected joint angles into a DH parameter calibration model for joint feature extraction and DH parameter calibration, thereby obtaining the DH parameter calibration results of the robot. The DH parameter calibration model is a trained neural network model that outputs corresponding DH parameter calibration results based on the input joint angles. The DH parameter calibration model is constructed based on a Transformer network with a multi-attention mechanism. The input to the DH parameter calibration model is the joint angles of each joint. For joints requiring zero-point offset correction, the corrected joint angles are input; for joints not requiring zero-point offset correction, the collected joint angles are input. The output of the DH parameter calibration model is the DH parameters of the robot to be calibrated, including link length, link torque, joint offset, and joint angles.

7. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the DH parameter calibration method for the robot as described in any one of claims 1 to 5.

8. A computer program product, characterized in that, When the computer program product is run on a terminal device, the terminal device executes the DH parameter calibration method for the robot as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Robot online calibration method and system, storage medium and calibration equipment

    CN111216164A

  • Industrial robot tool coordinate system and zero point self-calibration method

    CN113459094A