Robot DH parameter calibration method and device and terminal equipment

By obtaining the position test data of the robot joint, detecting and correcting the zero point offset, and using the neural network model to calibrate DH parameters, the complexity and accuracy problems of traditional methods are solved, and the robot control accuracy and calibration efficiency are improved.

CN120503213AActive Publication Date: 2025-08-19MILVUS TECHNOLOGIES LTD
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The traditional DH parameter calibration method is complex in operation, high in cost and difficult to adapt to dynamic changing work scenarios, and the zero point offset of the joint encoder leads to a decrease in the robot's control accuracy.

Method used

By obtaining pose test data, detecting joint zero point offset, performing angular offset correction, and using the trained neural network model for DH parameter calibration to improve calibration accuracy and efficiency.

Benefits of technology

It realizes automatic correction of zero point offset of robot joints and efficient calibration of DH parameters, improving robot control accuracy and calibration efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120503213A_ABST
    Figure CN120503213A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of robots, and provides a robot DH parameter calibration method and device and terminal device.pose test data are obtained, the pose test data comprise at least one set of target pose test data, and the target pose test data comprise at least one set of target pose test data when the tail end of the robot moves from any pose to the target pose; joint angles and corresponding tail end poses of all joints of the robot; performing joint zero offset detection of the robot according to the joint angle of each joint; under the condition that it is determined that the robot has joint zero-point offset according to the joint angles of all the joints, angle offset correction is conducted on the joint angles of the joints with the zero-point offset, and the corrected joint angles are obtained; the corrected joint angle is input into a DH parameter calibration model for joint feature extraction and DH parameter calibration, and a DH parameter calibration result of the robot is obtained; wherein the DH parameter calibration model is a trained neural network model, and the efficiency and accuracy of DH parameter calibration can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of robotics technology, and in particular relates to a DH parameter calibration method, apparatus, and terminal device for a robot. Background Art

[0002] Robotic systems are widely used in high-precision scenarios such as industrial manufacturing, medical surgery, and space operations, placing extremely high demands on the accuracy of the robot's kinematic models. Robotic motion control relies on precise geometric modeling, and Denavit-Hartenberg (DH) parameters are a key foundation for building forward kinematic models. Traditional DH parameter calibration typically relies on manual measurement and complex geometric calculations. These methods are not only complex and costly, but also depend on environmental conditions, have poor scalability, and are difficult to adapt to dynamically changing work scenarios.

[0003] Furthermore, as a robot ages, its joint encoders may experience zero-point offset. Even in the initial, motionless state, the read joint angles may exhibit systematic errors. Once the joint encoders of certain joints experience zero-point offset, this will directly affect the accuracy of the entire kinematic model, invalidating the previously calibrated DH parameters. This can lead to path planning errors, unstable control, and even mission failure, compromising the robot's control accuracy. Summary of the Invention

[0004] The embodiments of the present application provide a robot DH parameter calibration method, apparatus, and terminal device, which can improve the accuracy and efficiency of DH parameter calibration, thereby improving the control accuracy of the robot.

[0005] In a first aspect, an embodiment of the present application provides a method for calibrating DH parameters of a robot, comprising: Acquire posture test data, wherein the posture test data includes at least one set of target posture test data, wherein the target posture test data includes joint angles of various joints of the robot and corresponding end postures when the end of the robot moves from any posture to the target posture; Performing joint zero offset detection of the robot according to the joint angles of the respective joints; When it is determined that the robot has a joint zero offset according to the joint angles of the joints, performing angle offset correction on the joint angles of the joints with the zero offset to obtain corrected joint angles; The corrected joint angle is input into the DH parameter calibration model for joint feature extraction and DH parameter calibration 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.

[0006] In an implementation of the first aspect, before acquiring the posture test data, the method further includes: The robot on which the test fixture is installed is controlled to collect the posture test data according to the posture test data collection strategy.

[0007] In an implementation of the first aspect, performing joint zero offset detection of the robot according to the joint angles of the respective joints includes: According to each set of target posture test data, calculate the standard deviation of the joint angle of each joint; Gaussian filtering is performed on the standard deviation of the joint angle of each joint to obtain the zero 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, it is determined that the joint has zero point drift.

[0008] In an implementation of the first aspect, when it is determined that the robot has a joint zero offset according to the joint angles of the respective joints, performing angle offset correction on the joint angles of the joints with the zero offset to obtain the corrected joint angles includes: Angle offset correction is performed on the joint angle of the joint with zero offset based on a zero offset model; the zero offset model is used to represent the mapping relationship between the target joint angle and the measured joint angle.

[0009] In an implementation of the first aspect, before inputting the corrected joint angle into a DH parameter calibration model to perform joint feature extraction and DH parameter calibration to obtain a DH parameter calibration result of the robot, the method further includes: Determine the transformation relationship between the robot base coordinate system and the optical tracking coordinate system; The position and posture of the robot end are converted into the robot base coordinate system according to the conversion relationship.

[0010] In an implementation of the first aspect, after performing joint zero offset detection of the robot according to the joint angles of the respective joints, the method further includes: The joint values that do not require zero offset correction are input into the DH parameter calibration model for feature extraction and DH parameter calibration.

[0011] In an implementation of the first aspect, after inputting the corrected joint angle into a DH parameter calibration model to perform joint feature extraction and DH parameter calibration, and obtaining the DH parameter calibration result of the robot, the method further includes: The calibration results of the DH parameters output by the DH parameter calibration model are optimized based on the nonlinear minimum square method to obtain optimized DH parameter calibration results.

[0012] In a second aspect, an embodiment of the present application provides a DH parameter calibration device for a robot, comprising: an acquisition unit, configured to acquire posture test data, wherein the posture test data includes at least one set of target posture test data, wherein the target posture test data includes joint angles of respective joints of the robot and corresponding end postures when the end of the robot moves from any posture to a target posture; a detection unit, configured to detect the joint zero offset of the robot according to the joint angles of the joints; a correction unit for, when it is determined based on the joint angles of the respective joints that the robot has a joint zero offset, performing angle offset correction on the joint angles of the joints with the zero offset to obtain corrected joint angles; A calibration unit is used to input the corrected joint angle into a DH parameter calibration model to perform joint feature extraction and DH parameter calibration to obtain a 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 a corresponding DH parameter calibration result according to the input joint angle.

[0013] In a third aspect, an embodiment of the present application provides a terminal device, comprising 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, the robot DH parameter calibration method as described in the first aspect or any optional method of the first aspect is implemented.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the DH parameter calibration method of the robot as described in the first aspect or any optional method of the first aspect.

[0015] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the robot DH parameter calibration method described in the first aspect or any optional method of the first aspect.

[0016] The implementation of the robot DH parameter calibration method, apparatus, terminal device, computer-readable storage medium, and computer program product provided in the embodiments of the present application has the following beneficial effects: The DH parameter calibration method of the robot provided in the embodiment of the present application can perform zero-point offset correction on the joints of the robot, and realize automatic calibration of the DH parameter calibration according to the corrected joint angles based on the deep learning network, which can improve the accuracy and efficiency of the DH parameter calibration, thereby improving the control accuracy of the robot. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0018] Figure 1 This is a schematic diagram of the implementation flow of a DH parameter calibration method for a robot provided in an embodiment of the present application; Figure 2 Schematic diagram of an implementation scenario of the DH parameter calibration method for a robot provided in an embodiment of the present application; Figure 3 This is a specific implementation flow chart of S12 of a robot DH parameter calibration method provided in one embodiment of the present application; Figure 4 1 is a schematic diagram of an implementation flow of another robot DH parameter calibration method provided in another embodiment of the present application; Figure 5 Schematic diagram of the structure of a DH parameter calibration device for a robot provided in an embodiment of the present application; Figure 6 This is a structural diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0019] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0020] It should be understood that the term "and / or" used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations. In addition, in the description of this specification and the appended claims, the terms "first," "second," "third," etc. are used only to distinguish descriptions and are not to be understood as indicating or implying relative importance.

[0021] It should also be understood that references to "one embodiment" or "some embodiments" in the present specification mean that one or more embodiments of the present application include a particular feature, structure, or characteristic described in conjunction with that embodiment. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in 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 "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0022] As mentioned previously, a robot's DH parameters are the key foundation of its forward kinematics model. DH parameter calibration is the process of determining the robot's actual DH parameter values. This process aims to improve the accuracy of the robot's kinematic model and reduce 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.

[0023] The existing methods have problems such as complex operation and low calibration efficiency. In addition, factors such as encoder installation error, temperature change, and mechanical wear may cause zero point offset of the joint encoder. The zero point offset of the joint encoder causes the originally calibrated DH parameters to become invalid, thereby affecting the robot control accuracy.

[0024] In response to the above problems, an embodiment of the present application provides a DH parameter calibration method for a robot, which can perform zero-point offset correction on the robot's joints, and realize automatic calibration of the DH parameters according to the corrected joint angles based on a deep learning network, which can improve the accuracy and efficiency of the DH parameter calibration, thereby improving the control accuracy of the robot.

[0025] The following is a detailed description of the DH parameter calibration method of the robot provided in the embodiment of the present application: See also Figure 1 , Figure 1It is a schematic flow chart of a DH parameter calibration method for a robot provided in an embodiment of the present application. The execution subject of the DH parameter calibration method for a robot provided in an embodiment of the present application can be a robot, or a control system / module inside the robot, or a terminal device connected to the robot for communication. The above-mentioned terminal device can be a mobile terminal such as a smart phone, a tablet computer or a wearable device, or a computer, a cloud server, a radar-assisted computer and other devices in various application scenarios. Of course, the terminal device in the embodiment of the present application can also be the above-mentioned robot, and the robot can be applied to scenarios including but not limited to industrial manufacturing, medical treatment, and services. By executing the various steps of the method provided in the embodiment of the present application, the above-mentioned terminal device can realize automatic calibration of DH parameters, improve the accuracy and efficiency of DH parameter calibration, and thereby improve the accuracy of robot control. The following is explained by taking the execution subject as the above-mentioned terminal device as an example: like Figure 1 As shown, the DH parameter calibration method of the robot provided in the embodiment of the present application may include S11 to S14, which are detailed as follows: S11: Obtain pose test data.

[0026] In an embodiment of the present application, the above-mentioned posture test data includes at least one set of target posture test data, and the target posture test data includes the joint angles of each joint of the robot and the corresponding end posture when the robot end moves from any posture to the target posture.

[0027] It can be understood that each set of target posture test data may include the joint angles of each joint of the robot and the corresponding end posture when the robot end moves from multiple arbitrary postures to the target posture.

[0028] In order to more accurately detect the zero-point drift of the joint encoder, the joint angles of each joint of the robot and the corresponding end postures can be collected multiple times when the robot end moves from different arbitrary postures to the target posture. For example, the robot end can be controlled to repeatedly perform the action of moving from an arbitrary posture to the target posture 100 times, and the joint angles of each joint and the corresponding end posture of the robot can be recorded each time the robot end moves from an arbitrary posture to the target posture, thereby obtaining the set of target posture test data. And reset a target posture, and then repeat the above operation to obtain the target posture test data corresponding to the reset target posture. Multiple sets of target posture test data are the above-mentioned posture test data.

[0029] It should be noted that the number of times the above-mentioned repetitions are performed can be determined according to actual test requirements. The above is only an example and not a limitation.

[0030] As an example of an embodiment of the present 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, and the robotic arm may include multiple joints, each joint being connected in series to form the robot body. Each joint may include devices such as a servo motor, a reducer, a torque sensor, and a position sensor. The end of the robot, that is, the end of the robotic arm, may include a flange for connecting a tool load. The robot control cabinet is responsible for running the robot control system and drive system. The control system can realize the operation of the robot application, such as realizing the kinematic and dynamic calculation process of the robot and the robotic arm during movement. The drive system is used to realize the drive and control of the servo motor on each joint of the robotic arm, and is responsible for realizing the motion control of the corresponding joint.

[0031] For example, the robot may be a multi-degree-of-freedom industrial robot, a service robot, or a medical robot. Furthermore, for example, the robotic arm may be a seven-degree-of-freedom robotic arm, i.e., a robotic arm having seven joints connected in series to form the robotic arm as part of the robot body.

[0032] In an embodiment of the present application, a torque sensor and a position encoder (i.e., the aforementioned joint encoder) 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 dynamics-related algorithm to obtain force and torque information at the end of the robotic arm. The position sensor can be used to determine the current position of each joint, which can refer to the current joint angle of each joint. The aforementioned end position can be obtained using an optical tracker.

[0033] In an embodiment of the present application, before S11, the following steps may be further included: S21: Control the robot on which the test fixture is installed to collect posture test data according to the posture test data collection strategy.

[0034] In specific applications, the above-mentioned 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 specifically to install the optical calibration rod at the end of the robot and install no less than 3 optical marker balls on the XY plane of the robot's base coordinate system.

[0035] The above-mentioned posture test data acquisition strategy can specifically include a target posture selection strategy and a control strategy. The above-mentioned target posture selection strategy can be used to determine the target posture to which the robot end is to move. The above-mentioned control strategy can include a specific control algorithm for controlling the robot end to move from different arbitrary positions to the target posture.

[0036] As an implementation method of an embodiment of the present application, the target posture determination strategy can use a random posture determination method to determine the target posture, that is, use a random algorithm to determine the target posture.

[0037] In some embodiments of the present application, the target posture determination strategy can also determine the target posture based on the probability of the robot end executing the posture during the application process, for example, determining the posture with a probability greater than a preset probability threshold as the target posture, or determining the N (N is a positive integer) postures with the highest probability of occurrence as the target posture, etc.

[0038] 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 any specific restrictions on this.

[0039] For example, see Figure 2 , Figure 2 Schematic diagram of the implementation scenario of the DH parameter calibration method of the robot provided in the embodiment of the present application is shown. Figure 2 As shown, 1 represents the robot, 2 is the optical tracker, 3 is the optical marker ball, 4 is the XY plane of the robot's base coordinate system, and 5 is the optical calibration rod.

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

[0041] Combine Figure 2 In the scenario shown, the above S21 may specifically include the following steps: 1. Control the robot end to move to any position and record the position as the target position; 2. Control the robot to move from any position to the target position multiple times, repeating the number of times more than 100 times, trying to ensure that the robot's movement starting points are evenly distributed throughout the robot's entire motion space, and record the joint angles of each joint of the robot; 3. Change the target pose; 4. Repeat step 2 and record the updated target position and joint angles of each joint; 5. Repeat steps 3-4 to complete the collection of multiple sets of target pose test data.

[0042] It can be understood that after the above-mentioned posture test data is collected, the above-mentioned posture test data can be stored, for example, it can be stored in the storage medium of the terminal device, or it can be stored in the cloud server. When the DH parameter calibration of the robot is required, the posture test data is obtained from the storage medium or cloud server storing the posture test data.

[0043] S12: Perform joint zero offset detection of the robot according to the joint angles of each joint.

[0044] In an embodiment of the present application, multiple sets of joint angle data corresponding to the same target posture are used to perform joint zero point offset detection to determine whether there is zero point offset in the joint encoder of the robot.

[0045] In specific applications, zero-point offset detection can be performed on each joint in each set of target posture test data. When the existence of zero-point offset is determined based on the joint angle of each joint in any set of target posture test data, angle offset correction can be performed.

[0046] See also Figure 3 , Figure 3 FIG. 1 shows a specific implementation flow chart of S12 of a robot DH parameter calibration method provided in an embodiment of the present application. Figure 3 As shown, in one embodiment of the present application, the zero offset detection of each joint in each set of target posture test data may specifically include the following steps: S121: Calculate the joint angle standard deviation of each joint based on each set of target posture test data.

[0047] S122: Perform Gaussian filtering estimation based on the joint angle standard deviation of each joint to obtain the zero point offset value of each joint.

[0048] S123: 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, it is determined that the joint has zero point drift.

[0049] For example, taking the determination of whether joint i has zero-point drift as an example, the joint zero-point offset detection may specifically be: 1. Calculate the joint mean of the i-th joint: (1) in, represents the joint mean of joint i, represents the joint angle of the jth record of the i-th joint, and n represents the number of joint angles recorded for the i-th joint, where i, j, and n are all positive integers.

[0050] 2. Calculate the joint standard deviation of the i-th joint: (2) in, represents the joint standard deviation of the i-th joint.

[0051] 3. Perform Gaussian filtering with a filter window of 2wd+1 to remove noise and obtain the zero offset value of the i-th joint: (3) in, is the weighted smooth value of the joint angle corresponding to each window set before and after the joint angle of the i-th record, wd To set the window size, is the standard deviation of joint i, which is equivalent to the , k represents the sample offset relative to the currently recorded joint angle, It is the weight value of the "Gaussian kernel" at offset j.

[0052] , (4) in, is the zero offset value of the i-th joint, represents the expected value of the ideal zero point, Represents the smoothed value The mean of .

[0053] 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 of the i-th joint: like and , then there is a stable zero drift, and zero drift correction is required, where is the offset threshold, To determine whether it is a stable offset fluctuation threshold.

[0054] Repeat steps 1-4 above for each joint to determine the zero offset of each joint.

[0055] It can be understood that the above-mentioned offset threshold and stable offset fluctuation threshold can be set according to actual needs. For example, when the zero point offset requirement is high, the offset threshold can be set smaller and the stable offset fluctuation threshold can also be set smaller to improve the detection accuracy.

[0056] In specific applications, for each joint, the joint angles recorded in each set of target posture test data can be calculated and analyzed as described above. If the joint angles recorded in one set of target posture data determine that the joint has a zero point offset, it is determined that the joint needs to be corrected for the zero point offset.

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

[0058] S13: When it is determined that the robot has a joint zero point offset according to the joint angles of the joints, an angle offset correction is performed on the joint angles of the joints with the zero point offset to obtain a corrected joint angle.

[0059] In the embodiment of the present application, the joint angle of the joint with zero offset can be corrected based on the zero offset model. The zero offset model is used to represent the mapping relationship between the target joint angle and the measured joint angle.

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

[0061] In one embodiment of the present application, a deep learning network can be constructed and 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.

[0062] For example, taking the construction and training of a 5-layer BP neural network to obtain a zero offset model as an example, the process of constructing and training the zero offset model may include the following steps: 1. Construct a 5-layer BP neural network, where the first layer is the input layer, the second to fourth layers are hidden layers, and the fifth layer is the output layer. The second and third layers use the ReLU activation function, and the fourth layer uses the Linear activation function.

[0063] 2. Construct training samples: (6) in, represents the ideal value of the i-th joint, represents the offset correction corresponding to the ideal value of the i-th joint, and N is the number of training samples, where i and N are positive integers.

[0064] 3. Normalize the joint values in the training samples.

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

[0066] 5. When the model converges, the trained zero-point offset model is obtained.

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

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

[0069] It should also be noted that the activation function used in each layer of the above-mentioned BP neural network is only an example, and other activation functions can also be used to implement it, for example, activation functions such as LeakyReLU can be used, and this application does not impose specific restrictions on this.

[0070] S14: Input the corrected joint angles into the DH parameter calibration model to perform joint feature extraction and DH parameter calibration to obtain the DH parameter calibration results of the robot.

[0071] Among them, 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.

[0072] In specific applications, a DH parameter calibration model can be constructed and trained to realize automatic calibration of DH parameters, so that the DH parameter calibration model can be used to automatically calibrate the DH parameters according to the corrected joint angles of each joint of the robot to improve the efficiency of DH parameter calibration.

[0073] In a specific application, the input of the DH parameter calibration model is the joint angle of each joint. Specifically, for the joints that need to be corrected for zero offset, the corrected joint angle is used, and for the joints that do not need to be corrected for zero offset, the collected joint angle is input. The output of the DH parameter calibration model is the robot DH parameter that needs to be calibrated, which can specifically include the connecting rod length ( ), connecting rod torsion ( ), joint offset ( ), joint angle ( ).

[0074] For example, a deep learning network (i.e., the initial DH parameter calibration model) can be constructed based on a multi-attention mechanism Transformer network. When using the Transformer network structure, the joint angle vector is used as input, first undergoes a linear transformation and superimposed position encoding to introduce sequence structure information, and then the global correlation between different joints is captured through a multi-head self-attention mechanism (Multi-HeadSelf-Attention). The information captured by the multi-head attention mechanism is passed to the feedforward neural network module (FFN), and residual connections and normalization operations are combined for feature enhancement and stability optimization. Finally, a DH parameter matrix of shape (n×4) is output, in which each row represents the four calibration parameters of each joint, namely, the connecting rod length ( )、Connecting rod torsion angle( ), joint offset ( ), joint angle ( ).

[0075] The above DH parameter calibration model can be used to construct the robot's forward kinematics model based on the improved DH (MDH) theory for the prediction of the end pose.

[0076] Construct the loss function of the above DH parameter model: (8) in, λ 1 and λ 2 is the model weight coefficient, is the member parameter error term (the sum of squares of expected value and true value), is the pose error term, is the position error term, is the attitude error term, is the quaternion corresponding to the attitude, and the subscript imp indicates the imaginary part. is the L2 regularization term, is the regularization strength coefficient.

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

[0078] In some embodiments of the present application, since the position of the robot end is collected by an optical tracker, in order to facilitate subsequent use, the robot base coordinate system (x r ,y r , b r) and the optical tracking coordinate system (x2, y2, z2), and transforms the acquired pose into the robot base coordinate system.

[0079] For example, take four optical marker balls set on the XY plane of the robot's base coordinate system as an example, assuming that the positions of these four optical marker balls in the optical tracking coordinate system are: (9) The positions of these four optical marker balls in the robot base coordinate system are: (10) The center of mass can be calculated based on the positions of the four optical marker balls in the optical tracking coordinate system and the robot base coordinate system: (11) Performing the centroid removal operation, we can obtain: (12) in, is the coordinate value Deviation from the corresponding centroid.

[0080] The covariance matrix is constructed based on the coordinates after removing the centroid: (13) Performing singular value decomposition on the covariance matrix yields: (14) Compute the optimal rotation matrix: (15) Calculate the translation: (16) The final homogeneous transformation matrix is: (17) Among them, H is the singular value decomposition (SVD), U is the left singular vector matrix, U is an orthogonal matrix (or unitary matrix), V is the right singular vector matrix, which is also an orthogonal matrix. Diagonal singular value matrix, where the diagonal elements are the singular values of H. Express request The determinant of , whose value is 1 or -1. Indicates 1, 1, These three numbers are placed on the diagonal of a 3×3 matrix, and the rest of the positions are all 0.

[0081] After determining the robot base coordinate system (x r ,yr , b r ) and the optical tracking coordinate system (x2, y2, z2), the robot's position and posture can be transformed into the robot base coordinate system to uniformly describe the robot's motion and improve the accuracy of the model output.

[0082] From the above, it can be seen that the DH parameter calibration method of the robot provided in the embodiment of the present application can perform zero-point offset correction on the joints of the robot, and realize automatic calibration of the DH parameter calibration according to the corrected joint angles based on the deep learning network, which can improve the accuracy and efficiency of the DH parameter calibration, thereby improving the control accuracy of the robot.

[0083] In one embodiment of the present 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 also be optimized based on the nonlinear minimum squares method to obtain the optimized DH parameter calibration results.

[0084] In specific applications, the DH parameters output by the DH parameter calibration model are used as initial values, and the parameter results are further optimized using the nonlinear least squares optimization algorithm (Levenberg-Marquardt). During the optimization conditions, structural constraints are set according to the actual configuration of the robot to improve the rationality of the results, such as setting some determined DH parameters to fixed values.

[0085] Furthermore, the data not used by the DH parameter calibration model can be used for forward verification, and the error between the predicted pose and the actual pose can be calculated and compared to verify the accuracy of the output results of the DH parameter calibration model. For example, the position root mean square error and attitude angle error between the predicted pose and the actual pose can be calculated to verify the prediction accuracy of the DH parameter calibration model.

[0086] In some embodiments, the position root mean square error, attitude angle error and other parameters of the calculated predicted pose and the actual pose error can be plotted into a residual heat map for visual analysis.

[0087] See also Figure 4 , Figure 4 This is a schematic diagram of the implementation flow of the DH parameter calibration method of the robot provided in another embodiment of the present application, which is different from Figure 1 In the embodiment shown, the DH parameter calibration method provided in the embodiment of the present application includes the following steps: S41: Control the robot on which the test fixture is installed to collect posture test data according to the posture test data collection strategy.

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

[0089] The specific steps of S41 can refer to the relevant description of S21 and will not be repeated here.

[0090] S42: Determine whether each joint has zero point offset according to each set of target posture test data. If so, execute S43; otherwise, execute S44.

[0091] The specific implementation of the above S42 can be found in the description of S12 and will not be elaborated here.

[0092] S43: performing angle offset correction on the joint angle of the joint with the zero point offset based on the zero point offset model to obtain a corrected joint angle.

[0093] The specific implementation of the above S43 can refer to the relevant description in S13 and will not be repeated here.

[0094] S44: Inputting the corrected joint angles and the joint angles that do not require correction into the DH parameter calibration model to obtain the calibration results of the DH parameters.

[0095] For the specific implementation of the above S44, please refer to the description of S14, which will not be repeated here.

[0096] S45: Optimize the DH parameters based on the nonlinear minimum square method to obtain an optimized DH parameter calibration result.

[0097] From the above, it can be seen that the DH parameter calibration method of the robot provided in the embodiment of the present application can determine the joints with zero point offset based on the posture test data, and modify the zero point offset of the joints with zero point offset, and then realize automatic calibration of the DH parameter calibration based on the corrected joint angle based on the deep learning network, which can improve the accuracy and efficiency of the DH parameter calibration, and can also optimize the automatically calibrated DH parameters based on the nonlinear minimum squares method, which can further improve the accuracy of the DH parameter calibration, and thus improve the control accuracy of the robot.

[0098] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean 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.

[0099] Based on the DH parameter calibration method of the robot provided in the above embodiment, the embodiment of the present invention further provides an embodiment of a DH parameter calibration device for the robot that implements the above method embodiment.

[0100] See also 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 the present application. In the embodiment of the present application, the DH parameter calibration device for a robot includes various units for performing Figure 1 Each step in the corresponding embodiment. Please refer to Figure 1 as well as Figure 1 For the sake of convenience, only the parts related to this embodiment are shown.

[0101] like Figure 5 As shown, the robot DH parameter calibration device 50 includes: an acquisition unit 501, a detection unit 502, a correction unit 503 and a calibration unit 504. The acquisition unit 501 is used to acquire posture test data, wherein the posture test data includes at least one set of target posture test data, wherein the target posture test data includes the joint angles of each joint of the robot and the corresponding end posture when the robot end moves from any posture to the target posture; The detection unit 502 is used to detect the joint zero offset of the robot according to the joint angles of the joints; The correction unit 503 is configured to, when it is determined based on the joint angles of the joints that the robot has a joint zero offset, perform angle offset correction on the joint angles of the joints with the zero offset to obtain corrected joint angles; The calibration unit 504 is used to input the corrected joint angle into the DH parameter calibration model to perform joint feature extraction and DH parameter calibration 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.

[0102] In one embodiment of the present application, the DH parameter calibration device for the robot may further include a control unit configured to control the robot equipped with the test fixture to collect the posture test data according to the posture test data collection strategy.

[0103] In one embodiment of the present application, the above-mentioned detection unit 502 is specifically used to calculate the standard deviation of the joint angle of each joint based on each set of target posture 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, it is determined that the joint has zero point drift.

[0104] In one embodiment of the present application, the correction unit 503 is further used to perform angle offset correction on the joint angle of the joint with zero point offset based on a 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.

[0105] In one embodiment of the present application, the DH parameter calibration device of the robot further includes a conversion unit. The conversion unit is configured to determine a conversion relationship between a robot base coordinate system and an optical tracking coordinate system, and convert the position of the robot end into the robot base coordinate system according to the conversion relationship.

[0106] In one embodiment of the present application, the DH parameter calibration device of the above-mentioned robot also includes an optimization unit, which can be used to perform parameter optimization on the calibration results of the DH parameters output by the DH parameter calibration model based on the nonlinear minimum squares method to obtain the optimized DH parameter calibration results.

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

[0108] It should be noted that the information interaction, execution process, etc. between the above-mentioned units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be specifically referred to the method embodiment part.

[0109] In summary, the DH parameter calibration device of the robot provided in the embodiment of the present application can also perform zero-point offset correction on the joints of the robot, and realize automatic calibration of the DH parameter calibration according to the corrected joint angles based on the deep learning network, which can improve the accuracy and efficiency of the DH parameter calibration, thereby improving the control accuracy of the robot.

[0110] Figure 6 This is a schematic diagram of the structure of a terminal device provided by another embodiment of the present application. Figure 6As 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, the steps in the above-mentioned DH parameter calibration method embodiments of each robot are implemented, such as Figure 1 Alternatively, when the processor 60 executes the computer program 62, the functions of the modules / units in the above-mentioned terminal device embodiments are realized, for example, Figure 5 The functions of units 501 to 504 are shown.

[0111] For example, the computer program 62 may be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more modules / units may be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program 62 in the terminal device 600. For example, the computer program 62 may be divided into multiple units, and the specific functions of each unit may be described in detail in the following sections. Figure 5 The relevant descriptions in the corresponding embodiments are not repeated here.

[0112] 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 It is merely an example of the terminal device 600 and does not constitute a limitation on the terminal device 600. The terminal device 600 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.

[0113] The processor 60 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0114] The memory 61 can be an internal storage unit of the terminal device 600, such as a hard drive 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 drive, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. equipped with the terminal device 600. Furthermore, the memory 61 can include both the internal storage unit of the terminal device 600 and an external storage device. 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 is about to be output.

[0115] The present application also provides a computer-readable storage medium that stores a computer program, which, when executed by a processor, can implement the above-mentioned robot DH parameter calibration method.

[0116] An embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to implement the DH parameter calibration method of the above-mentioned robot.

[0117] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by 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 embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0118] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0119] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel 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.

[0120] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A DH parameter calibration method for a robot, characterized in that: include: Acquire posture test data, wherein the posture test data includes at least one set of target posture test data, wherein the target posture test data includes joint angles of various joints of the robot and corresponding end postures when the end of the robot moves from any posture to the target posture; Performing joint zero offset detection of the robot according to the joint angles of the respective joints; When it is determined that the robot has a joint zero offset according to the joint angles of the joints, performing angle offset correction on the joint angles of the joints with the zero offset to obtain corrected joint angles; The corrected joint angle is input into the DH parameter calibration model for joint feature extraction and DH parameter calibration 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.

2. The DH parameter calibration method of a robot according to claim 1, characterized in that: Before acquiring the posture test data, the method further includes: The robot on which the test fixture is installed is controlled to collect the posture test data according to the posture test data collection strategy.

3. The DH parameter calibration method of a robot according to claim 1, characterized in that: The detecting of the joint zero offset of the robot according to the joint angles of the respective joints comprises: According to each set of target posture test data, calculate the standard deviation of the joint angle of each joint; Gaussian filtering is performed on the standard deviation of the joint angle of each joint to obtain the zero 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, it is determined that the joint has zero point drift.

4. The DH parameter calibration method of a robot according to claim 1, characterized in that: When it is determined that the robot has a joint zero offset according to the joint angles of the joints, performing angle offset correction on the joint angles of the joints with the zero offset to obtain corrected joint angles, the method includes: Angle offset correction is performed on the joint angle of the joint with zero offset based on a zero offset model; the zero offset model is used to represent the mapping relationship between the target joint angle and the measured joint angle.

5. The DH parameter calibration method of a robot according to claim 1, characterized in that: Before inputting the corrected joint angles into the DH parameter calibration model to perform joint feature extraction and DH parameter calibration to obtain the DH parameter calibration result of the robot, the method further includes: Determine the transformation relationship between the robot base coordinate system and the optical tracking coordinate system; The position and posture of the robot end are converted into the robot base coordinate system according to the conversion relationship.

6. The DH parameter calibration method of a robot according to any one of claims 1 to 5, characterized in that: After performing joint zero offset detection of the robot according to the joint angles of the respective joints, the method further includes: The joint values that do not require zero offset correction are input into the DH parameter calibration model for feature extraction and DH parameter calibration.

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

8. A DH parameter calibration device for a robot, characterized in that: include: an acquisition unit, configured to acquire posture test data, wherein the posture test data includes at least one set of target posture test data, wherein the target posture test data includes joint angles of respective joints of the robot and corresponding end postures when the end of the robot moves from any posture to a target posture; a detection unit, configured to detect the joint zero offset of the robot according to the joint angles of the joints; a correction unit for, when it is determined based on the joint angles of the respective joints that the robot has a joint zero offset, performing angle offset correction on the joint angles of the joints with the zero offset to obtain corrected joint angles; A calibration unit is used to input the corrected joint angle into a DH parameter calibration model to perform joint feature extraction and DH parameter calibration to obtain a 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 a corresponding DH parameter calibration result according to the input joint angle.

9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the DH parameter calibration method of the robot according to any one of claims 1 to 7 is implemented.

10. A computer program product, characterized in that When the computer program product runs on a terminal device, the terminal device implements the robot DH parameter calibration method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Industrial robot DH parameter calibration and zero position calibration method based on laser tracker

    CN106338990A

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

    CN111216164A

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

    CN113459094A