Off-line program calibration method and system of automobile welding production line robot
By using robot calibration software for offline program calibration in the automotive welding production line, and employing ICP and Levenberg-Marquardt algorithm calibration calculations, the problem of deviation between the robot's offline program and actual operation was solved, improving accuracy and efficiency and reducing the need for on-site debugging.
Patent Information
- Application Number
- CN202511779896.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-02-17
AI Technical Summary
In automotive welding production lines, discrepancies exist between the robot's offline program and actual operation, requiring significant manpower and resources for on-site calibration, which impacts efficiency and accuracy.
By setting up the user interface through robot calibration software, theoretical and actual data are obtained. The ICP algorithm and Levenberg-Marquardt algorithm are used for calibration calculation to obtain the TCP offset, thereby improving the accuracy of simulation and reducing on-site debugging time.
It improves the accuracy of offline robot simulation programs, reduces the on-site debugging time for simulation personnel, and lowers human and material costs.
Smart Images

Figure CN121535718A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive automated production technology, and in particular to an offline program calibration method and system for automotive welding production line robots. Background Technology
[0002] Currently, the calibration method for offline programs of robots in automotive welding production lines involves the following: A large number of industrial robots are used for automated production in automotive welding production lines. In a 3D simulation environment, offline programs need to be output to the robots, which then perform tasks according to the paths set in the simulation. However, errors that cannot be eliminated by human intervention exist during equipment processing, installation, and ground marking. Furthermore, the installation environment significantly impacts accuracy; for example, ground flatness can cause substantial positional errors in the equipment. Accumulated errors result in varying degrees of deviation between the robot's offline program and the actual operation, requiring simulation personnel and robot debugging personnel to perform further on-site calibration, thus wasting significant human and material resources. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide an offline program calibration method and system for automotive welding production line robots, improve the accuracy of robot simulation offline programs, reduce the on-site debugging time of simulation personnel, and thus reduce human and material costs.
[0004] In a first aspect, embodiments of the present invention provide an offline program calibration method for a robot on an automotive welding production line, the method comprising: Configure the user interface and initialize variables using the robot calibration software; Obtain theoretical and actual data imported by the user on the user interface; The theoretical data and the actual data are matched to obtain the matched data; When the number of matching points in the matching data reaches a preset threshold, the TCP offset is obtained and a background calibration thread is started. Based on the background calibration thread, the theoretical data, the actual data, and the TCP offset are calibrated and calculated using the ICP algorithm and the Levenberg-Marquardt algorithm to obtain the calibration result. The main UI thread receives the calibration result sent by the background calibration thread and displays the calibration result.
[0005] Furthermore, obtaining the TCP offset includes: Obtain the TCP offset input by the user on the user interface; or, The TCP offset is automatically calculated using the robot calibration software.
[0006] Furthermore, the user interface includes an input parameter area, buttons, a progress bar, a result display area, and a log area; the initialization variables include theoretical data, actual data, and the TCP offset.
[0007] Furthermore, based on the background calibration thread, the theoretical data, the actual data, and the TCP offset are calibrated using the ICP algorithm and the Levenberg-Marquardt algorithm to obtain calibration results, including: The optimal rigid body transformation is obtained by using the theoretical data, the actual data, and the TCP offset through the ICP algorithm. The optimal rigid body transformation is then processed using the Levenberg-Marquardt algorithm to obtain the rigid body transformation matrix. Calculate the inverse of the rigid body transformation matrix to obtain the inverse transformation; The inverse transformation is then subjected to inverse translation calculation to obtain the error at each point.
[0008] Furthermore, the optimal rigid body transformation is obtained by applying the theoretical data, the actual data, and the TCP offset to the ICP algorithm, including: Calculate the theoretical point cloud data based on the theoretical data and the TCP offset; Calculate the centroid of the theoretical point cloud data and the actual point cloud data in the actual data; The theoretical point cloud data and the actual point cloud data are respectively centered to obtain centered theoretical point cloud data and centered actual point cloud data. Multiply the transpose of the centered theoretical point cloud data with the centered actual point cloud data to obtain the covariance matrix; The covariance matrix is decomposed by SVD to obtain the left singular vector, singular values, and transpose of the right singular vector; The initial rotation matrix is calculated based on the transpose of the left singular vector and the right singular vector. Then, the process is iterated multiple times until convergence, resulting in the optimal rigid body transformation under the least squares method.
[0009] Furthermore, the optimal rigid body transformation is processed using the Levenberg-Marquardt algorithm to obtain the rigid body transformation matrix, including: Define the residual function; The difference between each point after the optimal rigid body transformation and the actual point is calculated based on the residual function. Then, the residuals of all points are stacked, and the sum of squared residuals of all points is minimized by the Levenberg-Marquardt algorithm to obtain the rigid body transformation matrix.
[0010] Secondly, embodiments of the present invention provide an offline program calibration system for a robot on an automotive welding production line, the system comprising: The setup module is used to set up the user interface and initialize variables through the robot calibration software; The import module is used to acquire theoretical and actual data imported by the user on the user interface. The matching module is used to match the theoretical data and the actual data to obtain matching data; The acquisition module is used to acquire the TCP offset and start the background calibration thread when the number of matching points in the matching data reaches a preset threshold. The calibration calculation module is used to perform calibration calculations on the theoretical data, the actual data, and the TCP offset based on the background calibration thread using the ICP algorithm and the Levenberg-Marquardt algorithm to obtain the calibration results. The display module is used by the main UI thread to receive the calibration results sent by the background calibration thread and display the calibration results.
[0011] Furthermore, the acquisition module is specifically used for: Obtain the TCP offset input by the user on the user interface; or, The TCP offset is automatically calculated using the robot calibration software.
[0012] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the method described above.
[0013] Fourthly, embodiments of the present invention provide a computer-readable medium having processor-executable non-volatile program code that causes the processor to perform the method described above.
[0014] This invention provides an offline program calibration method and system for an automotive welding production line robot, comprising: setting a user interface and initializing variables through robot calibration software; acquiring theoretical and actual data imported by the user on the user interface; matching the theoretical and actual data to obtain matching data; when the number of matching points in the matching data reaches a preset threshold, acquiring the TCP offset and starting a background calibration thread; based on the background calibration thread, performing calibration calculations on the theoretical data, actual data, and TCP offset using the ICP algorithm and the Levenberg-Marquardt algorithm to obtain calibration results; the main UI thread receiving the calibration results sent by the background calibration thread and displaying the calibration results; improving the accuracy of the robot simulation offline program, reducing the on-site debugging time for simulation personnel, thereby reducing manpower and material costs.
[0015] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0016] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is a flowchart of an offline program calibration method for an automotive welding production line robot provided in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the software input interface provided in Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of an offline program calibration system for an automotive welding production line robot provided in Embodiment 2 of the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] To facilitate understanding of this embodiment, the embodiments of the present invention will be described in detail below.
[0021] Example 1: Figure 1 This is a flowchart of an offline program calibration method for an automotive welding production line robot provided in Embodiment 1 of the present invention.
[0022] Reference Figure 1 The method includes the following steps: Step S101: Set the user interface and initialize variables using the robot calibration software; Here, when the program starts, the RobotCalibrationApp class is instantiated. It sets up the UI and initializes variables (such as theoretical data, actual data, and TCP offsets), and creates the tab layout.
[0023] Step S102: Obtain the theoretical and actual data imported by the user on the user interface; Here, the imported theoretical data is matched with the actual data by matching based on point names. Even if the data order is different, it can still match accurately. It also checks whether the number of matched points after importing meets the preset requirements. If the requirements are met, the next step is performed. If the requirements are not met, an error message is displayed to prompt the user.
[0024] Step S103: Match the theoretical data with the actual data to obtain the matched data; Step S104: When the number of matching points in the matching data reaches a preset threshold, obtain the TCP offset and start the background calibration thread; Here, when the user clicks the "Start Calibration" button, the start_calibration method is triggered. This method checks if the data exists, obtains the offset, and then starts the background calibration thread CalibrationWorker.
[0025] Step S105: Based on the background calibration thread, the theoretical data, actual data, and TCP offset are calibrated and calculated using the ICP algorithm and the Levenberg-Marquardt algorithm to obtain the calibration results; In step S106, the main UI thread receives the calibration result sent by the background calibration thread and displays the calibration result.
[0026] Specifically, refer to Figure 2 The calibration results are the conversion from the reference coordinate system to the robot base coordinate system, and the conversion from the robot base coordinate system to the reference coordinate system. It also includes the input of the TCP offset, or the automatic calculation of the TCP offset.
[0027] In this application, multi-format robot programming files are used as input. By automatically matching theoretical targets with actual measurement points, and in the case of unknown TCP offset, a hierarchical optimization strategy is used to obtain the optimal rigid body transformation from the robot base coordinate system to the measurement coordinate system. Combined with interactive error elimination and multi-format report output, high-precision, fully automatic, and iterative robot base coordinate system calibration is achieved.
[0028] Furthermore, step S104 includes the following steps: Get the TCP offset entered by the user on the user interface; or, The TCP offset is automatically calculated using robot calibration software.
[0029] Specifically, users can input the TCP offset (X, Y, Z) in the UI, or select the "Automatically calculate TCP offset" checkbox. If automatic calculation is selected, the program will automatically calculate the offset during calibration.
[0030] Furthermore, the user interface includes an input parameter area, buttons, a progress bar, a result display area, and a log area; initialization variables include theoretical data, actual data, and TCP offset.
[0031] Furthermore, step S105 includes the following steps: Step S201: The theoretical data, actual data, and TCP offset are used to obtain the optimal rigid body transformation through the ICP algorithm; Step S202: The optimal rigid body transformation is obtained by using the Levenberg-Marquardt algorithm to obtain the rigid body transformation matrix; Step S203: Calculate the inverse of the rigid body transformation matrix to obtain the inverse transformation; Step S204: Perform inverse translation calculation on the inverse transform to obtain the error at each point.
[0032] Furthermore, step S201 includes the following steps: Step S301: Calculate the theoretical point cloud data based on the theoretical data and TCP offset; Step S302: Calculate the centroids of the theoretical point cloud data and the actual point cloud data in the actual data. Step S303: The theoretical point cloud data and the actual point cloud data are centered respectively to obtain the centered theoretical point cloud data and the centered actual point cloud data. Step S304: Multiply the transpose of the centralized theoretical point cloud data with the centralized actual point cloud data to obtain the covariance matrix; Step S305: Perform SVD decomposition on the covariance matrix to obtain the left singular vector, singular values, and transpose of the right singular vector; Step S306: Calculate the initial rotation matrix based on the transpose of the left and right singular vectors, and then iterate multiple times until convergence to obtain the optimal rigid body transformation under the least squares method.
[0033] Furthermore, step S202 includes the following steps: Step S401, define the residual function; Step S402: Calculate the difference between each point after the optimal rigid body transformation and the actual point based on the residual function. Then, stack the residuals of all points and use the Levenberg-Marquardt algorithm to minimize the sum of squared residuals of all points to obtain the rigid body transformation matrix.
[0034] Specifically, the TCP offset (target coordinates) is automatically calculated using the matched data. This application employs unconstrained nonlinear optimization and uses the Levenberg-Marquardt algorithm to solve for the base coordinate system transformation and TCP offset, optimizing all nine parameters together (the six-degree-of-freedom transformation of the base coordinate system and the three coordinates of the TCP offset). This avoids the accumulation of errors from distributed calculations and finally outputs the TCP offset (because the base coordinate system here is only a "byproduct" with low precision requirements and will not be used in subsequent algorithms).
[0035] The ICP algorithm is used to iteratively find the nearest point and update the rigid body transformation to achieve point cloud registration. The inputs are theoretical point cloud data and actual point cloud data; the theoretical point cloud data can be used as the theoretical target point cloud.
[0036] Calculate the centroids of the two point clouds, then center the two point clouds (the purpose is to eliminate translation and only calculate rotation relationship), multiply the transpose of the centered point cloud data with the centered actual point cloud data to obtain the covariance matrix H, then perform SVD decomposition on the covariance matrix H to obtain the left singular vector U, singular value S, and the transpose of the right singular vector Vt.
[0037] Then the initial rotation matrix can be obtained. This process is iterated multiple times until convergence, yielding the optimal rigid body transformation using the least squares method. Here, R is the initial rotation matrix. It is the transpose of the transpose of the right singular vector. It is the transpose of the left singular vector.
[0038] The Levenberg-Marquardt algorithm is used again in the main program, and this method accepts the results of the ICP algorithm. First, the residual function is defined, and the difference between each point after transformation and the actual point is calculated. Then, the residuals of all points are stacked, and the Levenberg-Marquardt algorithm is used to minimize the sum of squared residuals of all points to obtain a more refined rigid body transformation matrix. ICP registration provides a good convergence starting point for this step, which significantly reduces the number of iterations required by the LM algorithm.
[0039] Finally, the inverse of the final rigid body transformation matrix is calculated to obtain the inverse transformation. Inverse translation is then performed, and the error at each point is obtained. This application uses Euclidean distance as the error statistics method, which provides a more intuitive view of the deviation at each point.
[0040] In summary, the calculation method of this application is to add TCP offset to the original theoretical data through rotation matrix transformation, and then subtract the actual value from the theoretical target position.
[0041] Once the calibration calculation is complete, CalibrationWorker emits a finished signal, which the main UI thread receives and updates the calibration result display. The calibration result includes coordinate system transformation parameters (Euler angles or quaternions) and errors. The coordinate system transformation parameters include the optimal rigid body transformation and the inverse of the rigid body transformation matrix.
[0042] Users can view the error at each point in the "Error Analysis" tab. Points with high error can be selected, deleted, and the system recalibrated.
[0043] Users can save the calibration report as a text file, which includes calibration parameters, results, error analysis, etc.
[0044] The robot calibration software in this application is optimized for specific robot types, such as six-axis industrial robots and automotive welding.
[0045] This application provides a high-precision robot base coordinate system calibration solution through systematic process design and advanced algorithm implementation, which significantly improves calibration efficiency and accuracy.
[0046] Example 2: Figure 3 This is a schematic diagram of an offline program calibration system for an automotive welding production line robot provided in Embodiment 2 of the present invention.
[0047] Reference Figure 3 The system includes: The setup module is used to set up the user interface and initialize variables through the robot calibration software; The import module is used to obtain theoretical and actual data imported by the user on the user interface; The matching module is used to match theoretical data with actual data to obtain matched data; The acquisition module is used to acquire the TCP offset and start the background calibration thread when the number of matching points in the matching data reaches a preset threshold. The calibration calculation module is used to perform calibration calculations on theoretical data, actual data, and TCP offset using the ICP algorithm and the Levenberg-Marquardt algorithm based on the background calibration thread, and obtain the calibration results. The display module is used by the main UI thread to receive the calibration results sent by the background calibration thread and display the calibration results.
[0048] Furthermore, the acquisition module is specifically used for: Get the TCP offset entered by the user on the user interface; or, The TCP offset is automatically calculated using robot calibration software.
[0049] This invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the offline program calibration method for the automotive welding production line robot provided in the above embodiments.
[0050] This invention also provides a computer-readable medium having processor-executable non-volatile program code, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of the offline program calibration method for the automotive welding production line robot described above.
[0051] The computer program product provided in this embodiment of the invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0052] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0053] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0054] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0055] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0056] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, 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 the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. An offline program calibration method for a robot in an automotive welding production line, characterized in that, The method includes: Configure the user interface and initialize variables using the robot calibration software; Obtain theoretical and actual data imported by the user on the user interface; The theoretical data and the actual data are matched to obtain the matched data; When the number of matching points in the matching data reaches a preset threshold, the TCP offset is obtained and a background calibration thread is started. Based on the background calibration thread, the theoretical data, the actual data, and the TCP offset are calibrated and calculated using the ICP algorithm and the Levenberg-Marquardt algorithm to obtain the calibration result. The main UI thread receives the calibration result sent by the background calibration thread and displays the calibration result.
2. The offline program calibration method for an automotive welding production line robot according to claim 1, characterized in that, To obtain the TCP offset, including: Obtain the TCP offset input by the user on the user interface; or, The TCP offset is automatically calculated using the robot calibration software.
3. The offline program calibration method for an automotive welding production line robot according to claim 1, characterized in that, The user interface includes an input parameter area, buttons, a progress bar, a result display area, and a log area; the initialization variables include theoretical data, actual data, and the TCP offset.
4. The offline program calibration method for an automotive welding production line robot according to claim 1, characterized in that, Based on the background calibration thread, the theoretical data, the actual data, and the TCP offset are calibrated using the ICP algorithm and the Levenberg-Marquardt algorithm to obtain calibration results, including: The optimal rigid body transformation is obtained by using the theoretical data, the actual data, and the TCP offset through the ICP algorithm. The optimal rigid body transformation is then processed using the Levenberg-Marquardt algorithm to obtain the rigid body transformation matrix. Calculate the inverse of the rigid body transformation matrix to obtain the inverse transformation; The inverse transformation is then subjected to inverse translation calculation to obtain the error at each point.
5. The offline program calibration method for an automotive welding production line robot according to claim 4, characterized in that, The optimal rigid body transformation is obtained by applying the theoretical data, the actual data, and the TCP offset to the ICP algorithm, including: Calculate the theoretical point cloud data based on the theoretical data and the TCP offset; Calculate the centroid of the theoretical point cloud data and the actual point cloud data in the actual data; The theoretical point cloud data and the actual point cloud data are respectively centered to obtain centered theoretical point cloud data and centered actual point cloud data. Multiply the transpose of the centered theoretical point cloud data with the centered actual point cloud data to obtain the covariance matrix; The covariance matrix is decomposed by SVD to obtain the left singular vector, singular values, and transpose of the right singular vector; The initial rotation matrix is calculated based on the transpose of the left singular vector and the right singular vector. Then, the process is iterated multiple times until convergence, resulting in the optimal rigid body transformation under the least squares method.
6. The offline program calibration method for an automotive welding production line robot according to claim 4, characterized in that, The optimal rigid body transformation is then processed using the Levenberg-Marquardt algorithm to obtain the rigid body transformation matrix, which includes: Define the residual function; The difference between each point after the optimal rigid body transformation and the actual point is calculated based on the residual function. Then, the residuals of all points are stacked, and the sum of squared residuals of all points is minimized by the Levenberg-Marquardt algorithm to obtain the rigid body transformation matrix.
7. An offline program calibration system for an automotive welding production line robot, characterized in that, The system includes: The setup module is used to set up the user interface and initialize variables through the robot calibration software; The import module is used to acquire theoretical and actual data imported by the user on the user interface. The matching module is used to match the theoretical data and the actual data to obtain matching data; The acquisition module is used to acquire the TCP offset and start the background calibration thread when the number of matching points in the matching data reaches a preset threshold. The calibration calculation module is used to perform calibration calculations on the theoretical data, the actual data, and the TCP offset based on the background calibration thread using the ICP algorithm and the Levenberg-Marquardt algorithm to obtain the calibration results. The display module is used by the main UI thread to receive the calibration results sent by the background calibration thread and to display the calibration results.
8. The offline program calibration system for an automotive welding production line robot according to claim 7, characterized in that, The acquisition module is specifically used for: Obtain the TCP offset input by the user on the user interface; or, The TCP offset is automatically calculated using the robot calibration software.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the method described in any one of claims 1 to 6.
10. A computer-readable medium having processor-executable non-volatile program code, characterized in that, The program code causes the processor to execute the method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Kinematic parameter calibration method and calibration system of industrial robot and electronic equipment
CN108705531A
Workpiece coordinate system calibration method and related device
CN111780698A
Six-axis collaborative robot calibration method based on Levenberg-Marquard algorithm
CN114714362A
Calibration system for robot
WO1991012935A1