An industrial robot TCP automatic correction method and system based on contact positioning and least square method
Patent Information
- Application Number
- CN202610487419.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-14
- Publication Date
- 2026-08-21
AI Technical Summary
[0006]为了弥补以上不足,本发明提供了一种基于接触寻位和最小二乘法的工业机器人TCP自动修正方法及系统,旨在改善现有TCP校准方法因缺乏数据质量保障、姿态优化、加权求解及验证回滚机制而导致修正精度低、可靠性差的问题
1、本发明中,通过机器人关节电流或力传感器实时获取接触力值,并判断其是否处于预设正常范围内。当接触力过小时判定为虚接触,当接触力过大时判定为碰撞,均触发重新执行该姿态的接触寻位。该机制有效避免了因虚接触或碰撞导致的位姿数据失真,保障了后续方程组求解的输入质量,提高了TCP修正的可靠性。
Smart Images

Figure CN122606565A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial robot control technology, and in particular to an automatic TCP correction method and system for industrial robots based on contact positioning and least squares method. Background Technology
[0002] In industrial robot applications, the accuracy of the tool coordinate system directly affects the quality of work. During use, due to collisions, thermal deformation, or long-term wear, the tool coordinate system will gradually shift, requiring periodic calibration.
[0003] Chinese Patent CN109465826B discloses a calibration method for multi-pose contact fixed points, which is achieved by constructing an overdetermined system of equations and solving it using the least squares method. However, this method has the following shortcomings: (1) it requires machine downtime and cannot be automatically executed during production line operation; (2) it uses the ordinary least squares method with equal weighting, without considering the confidence differences of measurement data under different poses; (3) it requires contact positioning in multiple different poses, which is excessively redundant for scenarios where only positional shifts occur (such as welding wire wear).
[0004] Chinese patent application CN106502208A proposes a multi-point TCP calibration method, but the robot posture selection distribution is random, the difference between postures cannot be optimized, and ill-conditioned matrices are easily formed, affecting the calibration accuracy.
[0005] Furthermore, existing methods lack quality assurance mechanisms in the data acquisition stage; virtual contact or collisions can lead to distortion of pose data. They also lack verification mechanisms, and failed corrections may affect subsequent operations. It is worth noting that in scenarios such as welding, tools typically only experience positional shifts while their orientation remains unchanged, yet existing methods still employ complex multi-pose calibration algorithms, resulting in an "over-treatment" problem. Additionally, existing methods are highly dependent on the core algorithms of the robot brand, making cross-brand implementation difficult. Summary of the Invention
[0006] To overcome the above shortcomings, this invention provides an automatic TCP correction method and system for industrial robots based on contact positioning and least squares method. It aims to improve the problems of low correction accuracy and poor reliability caused by the lack of data quality assurance, posture optimization, weighted solution and verification rollback mechanism in existing TCP calibration methods.
[0007] In a first aspect, the present invention provides the following technical solution: an automatic TCP correction method for industrial robots based on contact positioning and least squares method, comprising the following steps: S1. In the standard tool coordinate system, control the robot to approach a fixed reference point in multiple different preset postures through contact positioning, record the first set of pose data of the robot flange in each posture, and obtain the standard tool coordinate system data. S2. In the coordinate system of the tool to be corrected, control the robot to approach the same fixed reference point in the multiple different preset postures by contact positioning, and record the second set of pose data of the robot flange in each posture. S3. Based on the principle of spatial coordinate transformation, using the first set of pose data, the second set of pose data, and the standard tool coordinate system data, construct a set of equations about the tool coordinate system data to be corrected. S4. Solve the system of equations using the weighted least squares method to obtain the coordinate system data of the tool to be corrected; S5. Convert the tool coordinate system data to be corrected into an instruction format that the target robot can recognize, and send it to the robot controller to update the tool coordinate system data; S6. Verify the correction results. If the verification does not meet the preset accuracy requirements, automatically roll back to the tool coordinate system data before correction.
[0008] Preferably, in step S1, the step of recording the first set of pose data of the robot flange in each posture specifically includes: Multiple different preset postures are generated, and the multiple preset postures are linearly independent of each other; For each preset posture, control the robot to move to a preset starting position near the fixed reference point in that posture; The robot is controlled to move slowly from the preset starting position along the preset approach direction until the end of the robot's tool makes contact with the fixed reference point and triggers a contact signal. Record the pose data of the robot flange at the moment of contact, and at the same time obtain the contact force value through the robot joint current or force sensor; Determine whether the contact force value is within a preset normal range. If the contact force value is less than the first threshold, it is determined to be a false contact. If the contact force value is greater than the second threshold, it is determined to be a collision. When it is determined to be a false contact or a collision, the contact positioning of the posture is re-executed. Control the robot to retreat to a safe position in the opposite direction to the preset approach direction; Repeat the above steps of moving, contact positioning, recording, contact force judgment and retraction until contact positioning of all preset postures is completed, and obtain the first set of posture data of the robot flange in each posture.
[0009] Preferably, in step S1, the step of obtaining standard tool coordinate system data specifically includes: By manually teaching, the robot tool end is controlled to approach the fixed reference point in multiple different calibration postures, and the position and pose data of the robot flange under each calibration posture are recorded. Based on the pose data of the robot flange under multiple calibration postures, the standard tool coordinate system data is calculated using a preset calibration algorithm; The standard tool coordinate system data is stored in the database and associated with the current robot.
[0010] Preferably, in step S2, the step of recording the second set of pose data of the robot flange in each posture specifically includes: Retrieve multiple different preset poses that have already been generated; For each preset posture, control the robot to move to a preset starting position near the fixed reference point in that posture; The robot is controlled to move slowly from the preset starting position along the preset approach direction until the end of the robot's tool makes contact with the fixed reference point and triggers a contact signal. Record the pose data of the robot flange at the moment of contact, and at the same time obtain the contact force value through the robot joint current or force sensor; Determine whether the contact force value is within a preset normal range. If the contact force value is less than the first threshold, it is determined to be a false contact. If the contact force value is greater than the second threshold, it is determined to be a collision. When it is determined to be a false contact or a collision, the contact positioning of the posture is re-executed. Control the robot to retreat to a safe position in the opposite direction to the preset approach direction; Repeat the above steps of moving, contact positioning, recording, contact force judgment and retraction until contact positioning of all preset postures is completed, and obtain the second set of posture data of the robot flange in each posture.
[0011] Preferably, in step S3, the step of constructing a system of equations regarding the coordinate system data of the tool to be corrected specifically includes: Establish a correspondence between the first set of pose data and the second set of pose data under the same preset posture; Based on the principle of spatial coordinate transformation, for each preset posture, an equation is constructed with the constraint that the combination of the coordinate system data of the tool to be corrected and the second set of posture data is equal to the combination of the standard tool coordinate system data and the first set of posture data. By combining multiple equations corresponding to each preset posture, a set of equations is generated regarding the coordinate system data of the tool to be corrected.
[0012] Preferably, in step S4, the step of solving the system of equations using the weighted least squares method to obtain the coordinate system data of the tool to be corrected specifically includes: The system of equations is transformed into an overdetermined system of linear equations, wherein the number of equations in the overdetermined system is greater than the number of unknown parameters. Weighting coefficients are assigned to measurement data under different preset postures. The weighting coefficients are set according to the contact force stability, repeatability accuracy, or posture angle size under that posture. The overdetermined system of equations is solved using the weighted least squares method to minimize the weighted sum of squares of the errors in each equation, thereby obtaining the solution for the coordinate system data of the tool to be corrected. Substitute the coordinate system data of the tool to be corrected obtained from the solution into the system of equations for verification to determine whether it meets the preset accuracy requirements. If the preset accuracy requirements are met, the coordinate system data of the tool to be corrected is output.
[0013] Preferably, in step S5, the step of converting the tool coordinate system data to be corrected into an instruction format recognizable by the target robot and sending it to the robot controller to update the tool coordinate system data specifically includes: Identify the brand and model of the target robot; Based on the brand and model of the target robot, determine the corresponding instruction format and communication protocol for the robot; The tool coordinate system data to be corrected is encapsulated according to a defined instruction format to generate a tool coordinate system update instruction; According to the established communication protocol, the tool coordinate system update command is sent to the target robot controller; Receive the update completion signal from the robot controller to confirm that the tool coordinate system data has been successfully updated.
[0014] Preferably, in step S6, the step of verifying the correction result and automatically rolling back to the tool coordinate system data before correction when the verification does not meet the preset accuracy requirements specifically includes: After sending the corrected tool coordinate system data to the robot controller, the robot is controlled to perform contact positioning again in any preset posture, and the position and orientation data of the robot flange at the verification moment are collected. Based on the pose data at the verification time and the corrected tool coordinate system data, calculate whether the tool end has accurately reached the fixed reference point, and obtain the verification deviation value; If the verification deviation value is less than the preset accuracy threshold, the correction is deemed successful, and the corrected tool coordinate system data is saved. If the verification deviation value is greater than or equal to the preset accuracy threshold, the correction is determined to have failed. The tool coordinate system data in the robot controller is restored to the data before the correction, and a correction failure alarm is issued.
[0015] Preferably, when the reference tool coordinate system data is known and the tool only experiences positional shift, steps S1 to S6 are replaced by the following simplified steps: S1': Obtain the coordinate system data of the reference tool; S2' In the reference tool coordinate system, control the robot to approach a fixed reference point in a preset posture through contact positioning, and record the reference pose data of the robot flange at the moment of contact; S3' In the coordinate system of the tool to be corrected, control the robot to approach the same fixed reference point in the same preset posture through contact positioning, and record the current pose data of the robot flange at the moment of contact; S4'. Based on the principle of spatial coordinate transformation, use the reference tool coordinate system data, reference pose data and current pose data to calculate the position offset of the tool coordinate system data to be corrected; S5'. The position offset is superimposed on the reference tool coordinate system data to obtain the tool coordinate system data to be corrected; S6' Convert the tool coordinate system data to be corrected into an instruction format that the target robot can recognize, and send it to the robot controller to update the tool coordinate system data.
[0016] Secondly, the present invention provides the following technical solution: an automatic TCP correction system for industrial robots based on contact positioning and least squares method, the system comprising: The reference data acquisition module is used to control the robot to approach a fixed reference point in multiple different preset postures through contact positioning in the standard tool coordinate system, record the first set of pose data of the robot flange in each posture, and acquire standard tool coordinate system data. The current data acquisition module is used to control the robot to approach the same fixed reference point in multiple different preset postures through contact positioning in the coordinate system of the tool to be corrected, and record the second set of pose data of the robot flange in each posture. The equation system construction module is used to construct a system of equations about the tool coordinate system data to be corrected, based on the principle of spatial coordinate transformation and using the first set of pose data, the second set of pose data, and the standard tool coordinate system data. The weighted least squares solution module is used to solve the system of equations using the weighted least squares method to obtain the coordinate system data of the tool to be corrected. The instruction issuance and update module is used to convert the tool coordinate system data to be corrected into an instruction format that the target robot can recognize, and issue it to the robot controller to update the tool coordinate system data; The verification rollback module is used to verify the correction results. If the verification does not meet the preset accuracy requirements, it automatically rolls back to the tool coordinate system data before the correction.
[0017] The present invention has the following beneficial effects: 1. In this invention, the contact force value is acquired in real time through robot joint current or force sensors, and it is determined whether the value is within a preset normal range. When the contact force is too small, it is determined to be a false contact; when the contact force is too large, it is determined to be a collision, both triggering the re-execution of contact positioning for that posture. This mechanism effectively avoids pose data distortion caused by false contact or collision, ensures the input quality for subsequent equation solving, and improves the reliability of TCP correction.
[0018] 2. In this invention, when generating multiple preset postures, not only are derived postures generated by rotating around the X and Y axes based on the reference posture, but the angular difference between each preset posture is also calculated. When the minimum angular difference is less than a preset threshold, the rotation angle is automatically adjusted to regenerate the derived posture until the posture distribution meets the uniformity requirement. This optimization mechanism ensures that the coefficient matrix of the overdetermined equation system has a good condition number, effectively solving the problem of ill-conditioned matrix and calibration errors caused by uneven posture distribution in the prior art.
[0019] 3. In this invention, a weighted least squares method is used to solve the equation system. Different weighting coefficients are assigned to different measurement data based on the contact force stability, repeatability accuracy, or attitude angle magnitude under each preset attitude. Measurement data with high confidence levels receive higher weights in the solution process, while the weights of measurement data with low confidence levels are correspondingly reduced. Compared to the equal-weighting method of ordinary least squares in existing technologies, the weighted least squares method can effectively smooth out random measurement errors and significantly improve the stability and accuracy of the solution results.
[0020] 4. This invention also provides a simplified and rapid correction scheme, suitable for application scenarios where the baseline TCP data is known and the tool only experiences positional shift. This scheme requires only one contact positioning and can quickly complete TCP correction through single-point offset calculation, without the need for multi-pose motion or least squares solution. The algorithm is simple and computationally inefficient. Furthermore, this scheme achieves compatibility with mainstream robot brands through instruction format library and communication protocol adaptation technology. The entire correction process is fully automated and requires no manual intervention. Compared with multi-pose calibration methods, this simplified scheme better reflects the physical law that welding wire wear only causes positional shift in welding scenarios. It offers fast correction speed, cross-brand compatibility, and ease of operation, making it particularly suitable for mass production scenarios with high correction efficiency requirements. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating an automatic TCP correction method for industrial robots based on contact positioning and least squares proposed in this invention. Figure 2This is a schematic diagram of the software architecture of an industrial robot TCP automatic correction system based on contact positioning and least squares method proposed in this invention. Figure 3 This is a schematic diagram of the calibration block structure of an industrial robot TCP automatic correction system based on contact positioning and least squares method proposed in this invention. Detailed Implementation
[0022] The technical solutions in the embodiments 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, and 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.
[0023] In a first embodiment of the present invention, the present invention provides an automatic TCP correction method for industrial robots based on contact positioning and least squares method, such as... Figures 1-3 As shown, it includes the following steps: S1. In the standard tool coordinate system, control the robot to approach a fixed reference point in multiple different preset postures through contact positioning, record the first set of pose data of the robot flange in each posture, and obtain the standard tool coordinate system data.
[0024] Example 1: Specifically, this example describes the implementation process of controlling a robot to approach a fixed reference point in multiple different preset postures using a contact-based positioning method within a standard tool coordinate system, recording the first set of pose data of the robot flange in each posture, and obtaining standard tool coordinate system data. First, a fixed reference point is set within the robot's workspace. This fixed reference point is a metal calibration block, fixedly installed at an absolute position within the robot's reach range, without affecting normal production operations.
[0025] During the standard tool coordinate system establishment phase, standard tool coordinate system data is acquired through manual teaching. Specifically, the operator controls the robot tool end effector to approach the fixed reference point in multiple different calibration postures, recording the pose data of the robot flange in each calibration posture. In this embodiment, a six-point method is used for calibration, that is, the robot tool end effector is controlled to contact the fixed reference point in six linearly independent postures, and the pose data of the robot flange in the six postures is recorded. Based on the pose data of the robot flange in these six calibration postures, the standard tool coordinate system data is calculated using a preset calibration algorithm, and this data is represented in matrix form. This represents the pose of the tool end effector relative to the flange coordinate system. After the calculation is completed, the standard tool coordinate system data is stored in the database and associated with the current robot.
[0026] After the standard tool coordinate system is established, the system automatically generates multiple different preset postures. The specific steps for generating multiple different preset postures are as follows: The posture in which the Z-axis of the tool coordinate system is perpendicular to the plane containing the fixed reference point is used as the reference posture; the reference posture is rotated around the X-axis of the tool coordinate system by a first preset angle to generate a first derived posture; the reference posture is rotated around the Y-axis of the tool coordinate system by a second preset angle to generate a second derived posture; the reference posture is rotated around the X-axis of the tool coordinate system by a third preset angle and around the Y-axis by a fourth preset angle to generate a third derived posture. In this embodiment, the first, second, third, and fourth preset angles all use angle values between 30 and 45 degrees to ensure that each derived posture is linearly independent of the reference posture.
[0027] After initial generation, the system calculates the angular difference between each preset posture. Specifically, it calculates the spatial angular difference between the base posture and each derived posture, as well as the mutual angular difference between each derived posture. In this embodiment, the preset threshold is set to 15 degrees. If the minimum angular difference is less than 15 degrees, the posture distribution is determined to be uneven, and the system automatically adjusts the rotation angle: for example, adjusting the first preset angle to 40 degrees, the second preset angle to 35 degrees, the third preset angle to 40 degrees, and the fourth preset angle to 35 degrees, regenerating the derived postures, and recalculating the angular difference. This optimization process is repeated until the minimum angular difference is greater than or equal to 15 degrees, ensuring that each preset posture is evenly distributed in space. The base posture, the first derived posture, the second derived posture, and the third derived posture are combined to obtain multiple different preset postures; in this embodiment, the number of preset postures is four.
[0028] After generating the preset posture, the system begins collecting the first set of posture data. For each preset posture, the system performs the following operations: controls the robot to move to a preset starting position near a fixed reference point in that posture. This preset starting position is located directly above or in front of the fixed reference point, at a certain distance to ensure safety; controls the robot to slowly move from the preset starting position along a preset approach direction until the robot's tool end contacts the fixed reference point and triggers a contact signal; records the posture data of the robot flange at the moment of contact, and simultaneously obtains the contact force value in real time through the robot's joint current. In this embodiment, the contact force value between the tool end and the fixed reference point is obtained by reading the joint current feedback value in the robot controller and converting and calculating it. The preset normal range is set to 0.5N to 5.0N. If the contact force value is less than 0.5N, the system determines it as a false contact; if the contact force value is greater than 5.0N, the system determines it as a collision. When a false contact or collision is determined, the system automatically re-executes the contact positioning for that posture until valid contact data is obtained; controls the robot to retreat to a safe position in the opposite direction of the preset approach direction. In this embodiment, the preset approach direction is determined based on the tool coordinate system direction under the current preset posture, using the negative Z-axis direction of the tool coordinate system as the approach direction. The robot's moving speed is set to a low speed of less than five millimeters per second to ensure positioning accuracy and safety at the moment of contact.
[0029] Repeat the above operations of movement, contact positioning, recording, contact force judgment, and retraction until contact positioning in all preset postures is completed, obtaining the first set of pose data for the robot flange in each posture. In this embodiment, four sets of flange pose data corresponding to four preset postures are collected, denoted as follows: The subscript ref indicates that the data is reference data collected in the standard tool coordinate system, and each matrix represents the pose of the flange relative to the robot base coordinate system in the corresponding posture.
[0030] S2. In the coordinate system of the tool to be corrected, control the robot to approach the same fixed reference point in multiple different preset postures through contact positioning, and record the second set of pose data of the robot flange in each posture.
[0031] Example 2: Specifically, this example describes the implementation process of controlling a robot to approach the same fixed reference point in multiple different preset postures using contact positioning in the coordinate system of the tool to be corrected, and recording the second set of pose data of the robot flange in each posture. When the robot tool collides or is suspected of having a shift in the tool coordinate system after a period of use, the automatic correction process is initiated. The system first retrieves multiple different preset postures generated in Example 1 and optimized for uniformity. These preset postures are exactly the same as the preset postures used during the acquisition of the reference data, including the reference posture, the first derived posture, the second derived posture, and the third derived posture, for a total of four preset postures. The minimum angular difference between each posture has been optimized to meet the uniformity requirement of greater than or equal to 15 degrees. For each preset posture, the system performs the following contact positioning operation: The robot is controlled to move to a preset starting position near a fixed reference point in this posture. This preset starting position is the same as the preset starting position used in Embodiment 1, located directly above or in front of the fixed reference point, at a certain distance to ensure safety. The robot is controlled to move slowly from the preset starting position along a preset approach direction. The preset approach direction is the same as the preset approach direction used in Embodiment 1, determined according to the tool coordinate system direction in the current preset posture, using the negative Z-axis direction of the tool coordinate system as the approach direction. The robot's moving speed is set to a low speed of less than five millimeters per second to ensure positioning accuracy and safety at the moment of contact. When the robot tool end contacts the fixed reference point, a contact signal is triggered. The system records the pose data of the robot flange at the moment of contact and simultaneously obtains the contact force value in real time through the robot joint current. In this embodiment, the contact force value between the tool end and the fixed reference point is obtained by reading the joint current feedback value in the robot controller and converting and calculating it. The preset normal range is set to 0.5N to 5.0N. If the contact force value is less than 0.5N, the system determines it as a false contact; if the contact force value is greater than 5.0N, the system determines it as a collision. When a false contact or collision is detected, the system automatically re-executes the contact positioning in that posture until valid contact data is obtained. This pose data is represented in matrix form, indicating the pose of the flange relative to the robot's base coordinate system. The robot is then controlled to retreat to a safe position in the opposite direction to the preset approach direction to avoid secondary collisions with the fixed reference point.
[0032] Repeat the above operations of movement, contact positioning, recording, contact force judgment, and retraction until contact positioning for all preset postures is completed. In this embodiment, four sets of flange posture data corresponding to four preset postures are collected, and are denoted as follows: The subscript curr indicates that the data is the current data collected in the coordinate system of the tool to be corrected, and each matrix represents the pose of the flange relative to the robot's base coordinate system in the corresponding posture. After completing contact positioning in all preset postures, the second set of pose data of the robot flange in each posture is obtained, which is used for subsequent equation construction and solution.
[0033] S3. Based on the principle of spatial coordinate transformation, use the first set of pose data, the second set of pose data, and the standard tool coordinate system data to construct a system of equations about the tool coordinate system data to be corrected.
[0034] Example 3: Specifically, this example describes the implementation process of constructing a set of equations for the coordinate system of the tool to be corrected, based on the principle of spatial coordinate transformation and using the first set of pose data, the second set of pose data, and the standard tool coordinate system data.
[0035] After completing the data acquisition for Embodiments 1 and 2, the system obtained two sets of data: the first set of pose data includes the flange pose matrix acquired under four preset postures. and standard tool coordinate system matrix The second set of pose data includes the flange pose matrices acquired under four preset poses. It should be noted that the above four sets of data are all valid data collected after verification of contact force feedback effectiveness and optimization of posture distribution uniformity, ensuring the quality of the input data. The system first establishes a correspondence between the first set of pose data and the second set of pose data under the same preset posture. Specifically, for preset posture one, and Correspondingly; for preset posture two, and Correspondingly; for preset posture three, and Correspondingly; for preset posture four, and Correspondingly, this correspondence is established based on the same preset posture, ensuring the consistency of the physical meaning of subsequent equations. According to the principle of spatial coordinate transformation, in the standard tool coordinate system, the robot tool end effector satisfies the following relationship when it reaches the fixed reference point: ; in, Represents the standard tool coordinate system matrix. Let P represent the pose matrix of the flange in the i-th preset posture, and let P represent the absolute position of the fixed reference point in the robot's base coordinate system.
[0036] In the coordinate system of the tool to be corrected, the following relationship is satisfied when the end effector of the robot tool reaches the same fixed reference point: ; in, This represents the coordinate system matrix of the tool to be corrected. This represents the pose matrix of the flange under the i-th preset posture.
[0037] Since P is a fixed point, combining the above two equations, we can obtain: ; This equation shows that, for the same preset posture, the combination of the coordinate system of the tool to be corrected and the current flange posture is equal to the combination of the standard tool coordinate system and the reference flange posture.
[0038] For each preset pose i, an equation is constructed with the constraint that the combination of the tool coordinate system data to be corrected and the second set of pose data equals the combination of the standard tool coordinate system data and the first set of pose data. In this embodiment, there are four preset poses, resulting in four equations: ; The four equations corresponding to each preset posture are combined to generate data about the coordinate system of the tool to be corrected. The system of equations. In this system of equations, The unknowns to be determined include six degrees of freedom, namely three position parameters and three attitude angle parameters; and All are known quantities. Since there are four equations and six unknown parameters, this system of equations is an overdetermined system, providing a basis for subsequent solution using the least squares method.
[0039] S4. Solve the system of equations using the weighted least squares method to obtain the coordinate system data of the tool to be corrected.
[0040] Example 4: Specifically, this example describes the implementation process of solving the constructed system of equations using the weighted least squares method to obtain the coordinate system data of the tool to be corrected. After completing the construction of the system of equations in Example 3, the system obtains the matrix of the coordinate system of the tool to be corrected. The system of equations: ; in, The unknowns to be determined include six degrees of freedom, namely three position parameters and three attitude angle parameters; and All of these are known quantities.
[0041] The system first transforms the above system of equations into a linear, overdetermined system of equations. Let the coordinate system matrix of the tool to be corrected be... Let x be the unknown parameter vector, a six-dimensional column vector containing three position parameters and three attitude angle parameters. The system of equations can be linearized into the following form: ; Where A is the coefficient matrix, from and The matrix is composed of known data, with a dimension of twelve rows and six columns; b is a constant vector, derived from... The system consists of known data, with a vector dimension of twelve. In this embodiment, the preset number of poses is four, and each pose provides three equations, for a total of twelve equations. The number of unknown parameters is six, forming an overdetermined system of equations, meaning the number of equations is greater than the number of unknown parameters.
[0042] Before solving, the system assigns weighting coefficients to the measurement data under different preset attitudes. The allocation principle of the weighting coefficients is as follows: First, the system calculates a contact force stability index based on the contact force values recorded during contact positioning in each preset posture. In this embodiment, for each preset posture, the system records the contact force values from multiple repeated contacts in that posture and calculates its standard deviation. The smaller the standard deviation, the more stable the contact force, and the higher the confidence level of the data collected in that posture, thus assigning a higher weight coefficient. Specifically, the weight coefficient is inversely proportional to the standard deviation of the contact force, with the posture having the smallest standard deviation receiving the highest weight. Second, the system evaluates the repeatability accuracy based on the angle of each preset posture. In this embodiment, the larger the posture angle, the greater the impact of robot kinematic errors on positioning accuracy, therefore a lower weight coefficient is assigned. The smaller the posture angle, the higher the weight coefficient is assigned. Considering both factors, the system assigns a weight coefficient to each preset posture i. The weighting coefficients range from 0.5 to 1.5, and the sum of all weighting coefficients equals the preset number of attitudes (4 in this embodiment). For attitudes with stable contact force and small attitude angles, the weighting coefficient is close to 1.5; for attitudes with unstable contact force or large attitude angles, the weighting coefficient is close to 0.5. After the weighting coefficients are assigned, the system uses the weighted least squares method to solve the overdetermined equations. The objective function of the weighted least squares method is: min ; Where n is the total number of equations, which is 12 in this embodiment. Let i be the residual of the i-th equation. These are the weighting coefficients corresponding to the equation. The formula for calculating the weighted least squares solution is: ; Where W is the weight matrix, which is a diagonal matrix, and the diagonal elements are the weight coefficients corresponding to each equation. ; This represents the transpose of matrix A; Representation matrix The inverse matrix of the tool is obtained by calculating the coordinate system matrix of the tool to be corrected using this formula. The unknown parameter vector x is obtained, which gives the coordinate system data of the tool to be corrected.
[0043] The coordinate system data of the tool to be corrected obtained from the solution is substituted into the original equation system for verification to determine whether it meets the preset accuracy requirements. The specific verification process is as follows: The calculated... Substitute into each equation Calculate its relationship with The deviation value is calculated. For each preset attitude, the position deviation and attitude deviation are calculated. If the position deviation and attitude deviation under all preset attitudes are less than the preset threshold, the solution result is determined to meet the accuracy requirements; if the deviation under any attitude is greater than or equal to the preset threshold, the solution result is determined to not meet the accuracy requirements, and the system issues a prompt message, suggesting that the data be re-acquired or that the fixed reference point be checked for movement.
[0044] Under the condition that the preset accuracy requirements are met, the system outputs the coordinate system data of the tool to be corrected. This data represents the corrected pose relationship between the tool coordinate system and the flange coordinate system, and can be used to subsequently update the tool coordinate system parameters in the robot controller.
[0045] S5. Convert the tool coordinate system data to be corrected into an instruction format that the target robot can recognize, and send it to the robot controller to update the tool coordinate system data.
[0046] Example 5: Specifically, this example describes the process of converting the solved tool coordinate system data to be corrected into a command format recognizable by the target robot and sending it to the robot controller to update the tool coordinate system data. After completing the least squares solution in Example 4, the system obtains the tool coordinate system data to be corrected. This data represents the pose relationship between the corrected tool coordinate system and the flange coordinate system, including three position parameters and three attitude angle parameters.
[0047] The system first identifies the brand and model of the target robot. In this embodiment, the system reads the robot's identification information through a communication interface, or determines the brand and model of the target robot based on robot information pre-configured by the user. The target robot may be any of the mainstream brands such as FANUC, ABB, KUKA, and Hyundai.
[0048] Based on the brand and model of the target robot, the system determines the corresponding instruction format and communication protocol. Different brands of robots have different instruction systems and communication methods: FANUC robots use the FOCAS communication protocol, and the tool coordinate system update instruction is in the PR instruction format; ABB robots use the PC Interface communication protocol, and the tool coordinate system update instruction is in the SetTool instruction format of the RAPID instruction; KUKA robots use the Ethernet KRL communication protocol, and the tool coordinate system update instruction is in the (TOOL data update instruction format of the KRL instruction; Hyundai robots use the HRCI communication protocol, and the tool coordinate system update instruction is in a Hyundai-specific instruction format.
[0049] The system encapsulates the tool coordinate system data to be corrected according to a defined instruction format, generating a tool coordinate system update instruction. Taking a FANUC robot as an example, the system will... The position and attitude angle parameters are arranged and encoded according to the format requirements of the PR instruction to generate an update instruction in the form of "PR[1]=UFRAME[1]". Taking the ABB robot as an example, the system will... The data is encapsulated as SetTool commands, in the form of "SetTool tooldata". Taking the KUKA robot as an example, the system will... Data is encapsulated as KRL instructions, such as assignment instructions like ")TOOL=...".
[0050] The system sends the generated tool coordinate system update command to the target robot controller according to the established communication protocol. During transmission, the system establishes a connection with the robot controller, performs authentication according to the requirements of the communication protocol, and then sends the command data packet to the controller's designated interface. After transmission is complete, the system receives an update completion signal from the robot controller. This signal indicates that the robot controller has successfully received the command and completed the update of the tool coordinate system data. If the system does not receive an update completion signal within a preset time, or receives an error signal, the update is considered to have failed, and the system issues a prompt message and records an error log.
[0051] Upon receiving the update completion signal, the system confirms that the tool coordinate system data has been successfully updated. At this point, the tool coordinate system parameters in the robot controller have been updated to the corrected accurate pose data. The system records the time, deviation data, and correction results of this calibration, creating a calibration history archive stored in the database. After completing the above steps, the robot tool coordinate system has been updated to the corrected accurate pose. However, the correction results have not yet been finalized. The system will then proceed to the S6 verification rollback step to ensure the reliability of the correction results.
[0052] S6. Verify the correction results. If the verification does not meet the preset accuracy requirements, automatically roll back to the tool coordinate system data before correction.
[0053] Example 6: Specifically, this example describes the implementation process for verifying the correction results and automatically rolling back to the tool coordinate system data before correction when the verification does not meet the preset accuracy requirements. After completing the instruction issuance and tool coordinate system data update in Example 5, the system enters the correction result verification stage. In this example, the system automatically starts the verification process after the update is completed, without manual intervention.
[0054] First, the system selects a verification posture from a plurality of pre-generated preset postures. In this embodiment, to reduce the impact of the verification process on the production cycle time, the system selects the reference posture with the smallest posture angle as the verification posture, which minimizes the robot's range of motion and shortens the verification time. The system controls the robot to move in this verification posture to a preset starting position near a fixed reference point. This preset starting position is the same as the starting position used in S1 and S2, ensuring the consistency of the verification conditions.
[0055] The system controls the robot to slowly move from a preset starting position along a preset approach direction until the tool tip contacts a fixed reference point and triggers a contact signal. The moving speed remains consistent with steps S1 and S2, set to a low speed of less than five millimeters per second to ensure positioning accuracy at the moment of contact. After contact is triggered, the system records the robot flange pose data at the verification moment, denoted as [data missing]. Simultaneously, the system obtains the contact force value through the robot's joint current to verify whether the contact force is within the preset normal range. If the contact force is abnormal, the system automatically repeats the verification contact, up to three times. If all three repetitions are abnormal, the verification process is deemed invalid, and the system directly enters the rollback process.
[0056] The system uses the pose data at the verification time. and the currently updated tool coordinate system data Calculate the actual position of the end effector in the robot's base coordinate system: ; At the same time, the system uses standard tool coordinate system data. and the reference pose data in the corresponding attitude collected in S1 Calculate the theoretical position of the fixed reference point in the robot's base coordinate system: ; in, To verify the first set of pose data corresponding to the posture, the data was retrieved from S1.
[0057] The system calculates the verification deviation between the actual position and the theoretical position: ; In this embodiment, the preset accuracy threshold is set to 0.2 mm. This threshold is slightly larger than the solution accuracy threshold in S4 to allow for minor errors that may be introduced during the correction process, while ensuring that the corrected tool coordinate system meets the actual operation accuracy requirements.
[0058] If the verification deviation value If the error is less than 0.2mm, the correction is considered successful. The system will then display the corrected tool coordinate system data. Once the data is confirmed as valid, it is saved to the database, and information such as the success status of the correction, the correction time, and the verification deviation value are recorded to form a complete calibration history file.
[0059] If the verification deviation value If the deviation is greater than or equal to 0.2mm, the correction is deemed a failure. The system immediately performs a rollback operation: first, it reads the tool coordinate system data before correction from the database, i.e., the original tool coordinate system data saved before S2 execution, and sends the rollback command to the controller through the robot controller interface to restore the tool coordinate system data to its state before correction. After the rollback is complete, the system issues a correction failure alarm, records the reason for the failure, and displays the alarm information on the human-machine interface, prompting the operator to check whether the fixed reference point has moved, whether the tool end has deformed, or whether the system parameters are configured correctly.
[0060] In this embodiment, the system also includes a rollback verification mechanism: after the rollback operation is completed, the system performs a contact positioning again in the same verification posture to verify whether the tool coordinate system after rollback has accurately recovered to the state before correction. Specifically, the system calculates the deviation between the position of the tool end point reaching the fixed reference point after rollback and the theoretical position. If the deviation is less than 0.1mm, the rollback is confirmed to be successful; if the deviation is greater than or equal to 0.1mm, the rollback is determined to be abnormal, and the system issues an emergency alarm, prompting the operator to intervene immediately. Through the above verification rollback mechanism, this system ensures the safety and reliability of the correction results. Regardless of whether the correction is successful or not, the system can ensure that the tool coordinate system data in the robot controller is in a valid state and will not cause deviations in subsequent operations due to correction failure.
[0061] After completing the verification rollback process, the system controls the robot to automatically return to its original working position and continue performing production tasks. The entire correction and verification process is completed automatically during production line breaks, requiring no manual intervention and not affecting the normal production rhythm.
[0062] When the reference tool coordinate system data is known and the tool only experiences positional shift, steps S1 to S6 are replaced by the following simplified steps: S1': Obtain the coordinate system data of the reference tool; S2' In the reference tool coordinate system, control the robot to approach a fixed reference point in a preset posture through contact positioning, and record the reference pose data of the robot flange at the moment of contact; S3' In the coordinate system of the tool to be corrected, control the robot to approach the same fixed reference point in the same preset posture through contact positioning, and record the current pose data of the robot flange at the moment of contact; S4'. Based on the principle of spatial coordinate transformation, use the reference tool coordinate system data, reference pose data and current pose data to calculate the position offset of the tool coordinate system data to be corrected; S5'. The position offset is superimposed on the reference tool coordinate system data to obtain the tool coordinate system data to be corrected; S6' Convert the tool coordinate system data to be corrected into an instruction format that the target robot can recognize, and send it to the robot controller to update the tool coordinate system data.
[0063] Example 7: Specifically, this example describes a simplified TCP fast correction scheme, which is applicable to application scenarios where the reference tool coordinate system data is known and the tool only experiences positional shift, such as when the welding wire of a welding robot is worn or slightly bent due to long-term use, causing the tool tip position to shift.
[0064] First, obtain the baseline tool coordinate system data. In this embodiment, the baseline TCP data is accurate TCP data obtained through manual teaching when the robot is first installed or the tool is used for the first time. Taking a welding robot as an example, the baseline TCP data is... The first three parameters are the position coordinates (X, Y, Z), and the last three parameters are the attitude angles (Rx, Ry, Rz). This baseline TCP data is stored in the database and associated with the current robot. It should be noted that this embodiment assumes that the tool only experiences positional shifts during use, while the attitude parameters remain unchanged, which conforms to the actual physical laws of wire wear in welding scenarios.
[0065] In the reference tool coordinate system, the robot is controlled to approach a fixed reference point in a preset posture via contact positioning, and the reference pose data of the robot flange at the moment of contact is recorded. Specifically, in this embodiment, the preset posture is one in which the Z-axis of the tool coordinate system is perpendicular to the plane where the fixed reference point is located. The fixed reference point is a metal calibration block, fixedly installed in the robot's workspace at an absolute position, without affecting normal production operations. The contact positioning operation is as follows: the robot is controlled to move to a preset starting position near the fixed reference point in this posture. This preset starting position is located directly above or in front of the fixed reference point, at a certain distance to ensure safety; the robot is controlled to slowly move from the preset starting position along a preset approach direction until the end of the robot's tool contacts the fixed reference point and triggers a contact signal; the reference pose data of the robot flange at the moment of contact is recorded, denoted as . The robot is controlled to retreat to a safe position in the opposite direction of the preset approach direction. In this embodiment, the preset approach direction is the negative Z-axis of the tool coordinate system, and the moving speed is set to a low speed of 3 mm per second to ensure positioning accuracy and safety at the moment of contact.
[0066] When the welding wire wears down or bends slightly due to prolonged use, causing a shift in the tool tip position, an automatic correction process is initiated. In the coordinate system of the tool to be corrected, the robot is controlled to approach the same fixed reference point using the same contact positioning method as in step two, maintaining the same preset posture. Specifically, the robot is moved to the same preset starting position as described above; the robot is slowly moved along the negative Z-axis of the tool coordinate system at a speed of 3 mm per second until the tool tip contacts the fixed reference point and triggers a contact signal; the current pose data of the robot flange at the moment of contact is recorded, denoted as [reference value]. Control the robot to retreat to a safe position along the positive Z-axis.
[0067] Based on the principle of spatial coordinate transformation, the positional offset of the tool coordinate system data to be corrected relative to the reference tool coordinate system data is calculated using the reference tool coordinate system data, the reference pose data, and the current pose data. The specific calculation process is as follows: Based on the coordinate system data of the reference tool and reference pose data Calculate the theoretical position of the fixed reference point in the robot's base coordinate system: ; Based on current pose data In the current tool coordinate system, the actual position of the tool tip reaching the fixed reference point is expressed as follows: ; because and By assuming the same fixed reference point, we can obtain the following: ; This leads to the derivation of the coordinate system data for the tool to be corrected. The calculation formula is as follows: ; in, This represents the inverse matrix of the current pose data. This formula directly calculates the coordinate system data of the tool to be corrected through matrix operations, correcting only the tool's position offset while keeping the attitude parameters unchanged.
[0068] The calculated position offset is superimposed onto the reference tool coordinate system data to obtain the tool coordinate system data to be corrected. This step is implicit in the matrix calculation formula of this embodiment. In the calculation results.
[0069] The system converts the tool coordinate system data to be corrected into a command format recognizable by the target robot and sends it to the robot controller to update the tool coordinate system data. In this embodiment, the system first identifies the brand and model of the target robot. Taking a FANUC robot as an example, the system reads the robot's identification information through the communication interface to determine that the target robot is a FANUC brand. The system retrieves the corresponding PR command format and FOCAS communication protocol for FANUC robots from a preset command format library. The system will... The position and attitude angle parameters are encapsulated according to the format requirements of the PR instruction to generate an update instruction in the form of "PR[1]=UFRAME[1]", which is sent to the robot controller through the FOCAS communication protocol to complete the tool coordinate system data update. If the target robot is an ABB brand, the system automatically retrieves the SetTool instruction format and PC Interface communication protocol; if it is a KUKA brand, the system automatically retrieves the KRL instruction format and Ethernet KRL communication protocol; if it is a Hyundai brand, the system automatically retrieves the HRCI communication protocol and the corresponding dedicated instruction format.
[0070] After completing the above steps, the tool coordinate system data in the robot controller has been updated to the corrected accurate pose. In this embodiment, a welding robot is used as an example for verification: the reference TCP data is Tool5=(200.6,1.4,664.8,0,45,0), the reference point P25 is the fixed reference point position stored under the reference TCP, and the current point P21 is the current tool tip position found through contact positioning. After running the automatic correction program, the tool data is automatically updated, and the accuracy is verified by rotating around the tip. The error of one correction is less than 1mm, and the results of multiple corrections are consistent. The entire correction process only requires one contact positioning, without the need for multi-pose motion or least squares solution. The algorithm is simple, has a small computational load, and is fully automatic without manual intervention. This embodiment can be used as a supplement to the above multi-pose correction scheme. Users can choose to use multi-pose full-degree-of-freedom correction (embodiments one to six) or single-positioning fast correction (this embodiment) according to the actual application scenario. For scenarios where only positional displacement occurs, such as welding wire wear, the simplified solution in this embodiment offers faster correction speed and simpler operation, making it particularly suitable for mass production scenarios with high requirements for correction efficiency. Example
[0071] Existing industrial robot tool coordinate system calibration methods suffer from several problems: strong hardware dependence, high cost, complex and time-consuming operation, requiring downtime and impacting production efficiency, complex algorithms making preventative maintenance difficult, and incompatibility between different brand robot calibration systems leading to difficulties in managing multi-brand production lines. Specifically, in welding production lines, after a welding torch experiences a slight shift due to collision or thermal deformation, operators must stop the machine and manually teach and calibrate, taking ten to thirty minutes with accuracy dependent on experience. In high-precision scenarios such as aerospace component assembly, existing methods cannot automatically perform preventative calibration during production breaks, leading to accumulated tool shifts that affect product quality. In factories with multi-brand mixed production lines, FANUC, ABB, KUKA, and other robots each use dedicated calibration tools and processes, requiring operators to learn multiple operating methods, and calibration records are scattered and difficult to manage uniformly. To address these issues, this invention provides an industrial robot TCP automatic correction system based on contact positioning and least squares method, the structure of which is as follows: Figures 1-3 As shown. The specific implementation process of this system is as follows: The reference data acquisition module is used to control the robot to approach a fixed reference point in multiple different preset postures through contact positioning in the standard tool coordinate system, record the first set of pose data of the robot flange in each posture, and acquire standard tool coordinate system data. The current data acquisition module is used to control the robot to approach the same fixed reference point in multiple different preset postures through contact positioning in the coordinate system of the tool to be corrected, and record the second set of pose data of the robot flange in each posture. The equation system construction module is used to construct a system of equations about the coordinate system of the tool to be corrected, based on the principle of spatial coordinate transformation, using the first set of pose data, the second set of pose data, and the standard tool coordinate system data. The weighted least squares solution module is used to solve the system of equations using the weighted least squares method to obtain the coordinate system data of the tool to be corrected. The instruction issuance and update module is used to convert the tool coordinate system data to be corrected into an instruction format that the target robot can recognize, and issue it to the robot controller to update the tool coordinate system data; The verification rollback module is used to verify the correction results. If the verification does not meet the preset accuracy requirements, it automatically rolls back to the tool coordinate system data before the correction.
[0072] Specifically, the reference data acquisition module is used to control the robot to approach a fixed reference point in multiple different preset postures using a contact-based positioning method in the standard tool coordinate system. It records the first set of pose data for the robot flange in each posture and acquires standard tool coordinate system data. During the contact-based positioning process, contact force values are obtained through robot joint current or force sensors, and it is determined whether they are within a preset normal range to eliminate abnormal data. Simultaneously, when generating preset postures, the angular differences between postures are calculated and optimized until uniformity requirements are met. The current data acquisition module is used to control the robot in the tool coordinate system to be corrected, in a posture identical to that in the reference data acquisition module. Multiple different preset postures are used to approach the same fixed reference point through contact positioning, recording the second set of pose data of the robot flange in each posture. Contact force feedback is also used during the contact positioning process to ensure data acquisition quality. An equation construction module is used to establish a one-to-one correspondence between the first and second sets of pose data under the same preset posture based on the principle of spatial coordinate transformation. A system of equations is constructed about the coordinate system data to be corrected, constrained by the rule that "the combination of the data of the tool coordinate system to be corrected and the second set of pose data is equal to the combination of the data of the standard tool coordinate system and the first set of pose data." A weighted least squares solution module is used to convert the system of equations into a linear form. The system of overdetermined equations is used, and weighting coefficients are assigned to different measurement data based on contact force stability, repeatability, or attitude angle magnitude under each preset posture. The weighted least squares method is employed to minimize the weighted sum of squared errors in each equation, thus obtaining the tool coordinate system data to be corrected, which is then verified for accuracy. An instruction update module identifies the brand and model of the target robot, encapsulates the tool coordinate system data to be corrected into a robot-recognizable instruction format according to a preset instruction format library, and sends it to the robot controller to update the tool coordinate system data. A verification rollback module is used to control the robot to re-execute the contact search in any preset posture after the tool coordinate system data is updated. The system collects the pose data of the robot flange at the verification moment. Based on the pose data at the verification moment and the corrected tool coordinate system data, it calculates whether the tool end effector has accurately reached the fixed reference point and obtains the verification deviation value. If the verification deviation value is less than the preset accuracy threshold, the correction is deemed successful and the corrected data is saved. If the verification deviation value is greater than or equal to the preset accuracy threshold, the correction is deemed unsuccessful, the tool coordinate system data in the robot controller is restored to the data before correction, and a correction failure alarm is issued. Through the sequential collaboration of the above modules, the system completes the entire TCP automatic correction process from standard reference establishment, current data acquisition, equation system construction, weighted least squares solution, command issuance to verification rollback.
[0073] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for automatic TCP correction in industrial robots based on contact positioning and least squares method, characterized in that, Includes the following steps: S1. In the standard tool coordinate system, control the robot to approach a fixed reference point in multiple different preset postures through contact positioning, record the first set of pose data of the robot flange in each posture, and obtain the standard tool coordinate system data. S2. In the coordinate system of the tool to be corrected, control the robot to approach the same fixed reference point in the multiple different preset postures by contact positioning, and record the second set of pose data of the robot flange in each posture. S3. Based on the principle of spatial coordinate transformation, using the first set of pose data, the second set of pose data, and the standard tool coordinate system data, construct a set of equations about the tool coordinate system data to be corrected. S4. Solve the system of equations using the weighted least squares method to obtain the coordinate system data of the tool to be corrected; S5. Convert the tool coordinate system data to be corrected into an instruction format that the target robot can recognize, and send it to the robot controller to update the tool coordinate system data; S6. Verify the correction results. If the verification does not meet the preset accuracy requirements, automatically roll back to the tool coordinate system data before correction.
2. The automatic TCP correction method for industrial robots based on contact positioning and least squares method according to claim 1, characterized in that, In step S1, the step of recording the first set of pose data of the robot flange in each posture specifically includes: Multiple different preset postures are generated, and the multiple preset postures are linearly independent of each other; For each preset posture, control the robot to move to a preset starting position near the fixed reference point in that posture; The robot is controlled to move slowly from the preset starting position along the preset approach direction until the end of the robot's tool makes contact with the fixed reference point and triggers a contact signal. Record the pose data of the robot flange at the moment of contact, and at the same time obtain the contact force value through the robot joint current or force sensor; Determine whether the contact force value is within a preset normal range. If the contact force value is less than the first threshold, it is determined to be a false contact. If the contact force value is greater than the second threshold, it is determined to be a collision. When it is determined to be a false contact or a collision, the contact positioning of the posture is re-executed. Control the robot to retreat to a safe position in the opposite direction to the preset approach direction; Repeat the above steps of moving, contact positioning, recording, contact force judgment and retraction until contact positioning of all preset postures is completed, and obtain the first set of posture data of the robot flange in each posture.
3. The automatic TCP correction method for industrial robots based on contact positioning and least squares method according to claim 1, characterized in that, In step S1, the step of obtaining standard tool coordinate system data specifically includes: By manually teaching, the robot tool end is controlled to approach the fixed reference point in multiple different calibration postures, and the position and pose data of the robot flange under each calibration posture are recorded. Based on the pose data of the robot flange under multiple calibration postures, the standard tool coordinate system data is calculated using a preset calibration algorithm; The standard tool coordinate system data is stored in the database and associated with the current robot.
4. The automatic TCP correction method for industrial robots based on contact positioning and least squares method according to claim 1, characterized in that, In step S2, the step of recording the second set of pose data of the robot flange in each posture specifically includes: Retrieve multiple different preset poses that have already been generated; For each preset posture, control the robot to move to a preset starting position near the fixed reference point in that posture; The robot is controlled to move slowly from the preset starting position along the preset approach direction until the end of the robot's tool makes contact with the fixed reference point and triggers a contact signal. Record the pose data of the robot flange at the moment of contact, and at the same time obtain the contact force value through the robot joint current or force sensor; Determine whether the contact force value is within a preset normal range. If the contact force value is less than the first threshold, it is determined to be a false contact. If the contact force value is greater than the second threshold, it is determined to be a collision. When it is determined to be a false contact or a collision, the contact positioning of the posture is re-executed. Control the robot to retreat to a safe position in the opposite direction to the preset approach direction; Repeat the above steps of moving, contact positioning, recording, contact force judgment and retraction until contact positioning of all preset postures is completed, and obtain the second set of posture data of the robot flange in each posture.
5. The automatic TCP correction method for industrial robots based on contact positioning and least squares method according to claim 1, characterized in that, In step S3, the step of constructing a system of equations for the coordinate system data of the tool to be corrected specifically includes: Establish a correspondence between the first set of pose data and the second set of pose data under the same preset posture; Based on the principle of spatial coordinate transformation, for each preset posture, an equation is constructed with the constraint that the combination of the coordinate system data of the tool to be corrected and the second set of posture data is equal to the combination of the standard tool coordinate system data and the first set of posture data. By combining multiple equations corresponding to each preset posture, a set of equations is generated regarding the coordinate system data of the tool to be corrected.
6. The automatic TCP correction method for industrial robots based on contact positioning and least squares method according to claim 1, characterized in that, In step S4, the step of solving the system of equations using the weighted least squares method to obtain the coordinate system data of the tool to be corrected specifically includes: The system of equations is transformed into an overdetermined system of linear equations, wherein the number of equations in the overdetermined system is greater than the number of unknown parameters. Weighting coefficients are assigned to measurement data under different preset postures. The weighting coefficients are set according to the contact force stability, repeatability accuracy, or posture angle size under that posture. The overdetermined system of equations is solved using the weighted least squares method to minimize the weighted sum of squares of the errors in each equation, thereby obtaining the solution for the coordinate system data of the tool to be corrected. Substitute the coordinate system data of the tool to be corrected obtained from the solution into the system of equations for verification to determine whether it meets the preset accuracy requirements. If the preset accuracy requirements are met, the coordinate system data of the tool to be corrected is output.
7. The automatic TCP correction method for industrial robots based on contact positioning and least squares method according to claim 1, characterized in that, In step S5, the step of converting the tool coordinate system data to be corrected into an instruction format recognizable by the target robot and sending it to the robot controller to update the tool coordinate system data specifically includes: Identify the brand and model of the target robot; Based on the brand and model of the target robot, determine the corresponding instruction format and communication protocol for the robot; The tool coordinate system data to be corrected is encapsulated according to a defined instruction format to generate a tool coordinate system update instruction; According to the established communication protocol, the tool coordinate system update command is sent to the target robot controller; Receive the update completion signal from the robot controller to confirm that the tool coordinate system data has been successfully updated.
8. The automatic TCP correction method for industrial robots based on contact positioning and least squares method according to claim 1, characterized in that, In step S6, the step of verifying the correction result and automatically rolling back to the tool coordinate system data before correction when the verification does not meet the preset accuracy requirements specifically includes: After sending the corrected tool coordinate system data to the robot controller, the robot is controlled to perform contact positioning again in any preset posture, and the position and orientation data of the robot flange at the verification moment are collected. Based on the pose data at the verification time and the corrected tool coordinate system data, calculate whether the tool end has accurately reached the fixed reference point, and obtain the verification deviation value; If the verification deviation value is less than the preset accuracy threshold, the correction is deemed successful, and the corrected tool coordinate system data is saved. If the verification deviation value is greater than or equal to the preset accuracy threshold, the correction is determined to have failed. The tool coordinate system data in the robot controller is restored to the data before the correction, and a correction failure alarm is issued.
9. The automatic TCP correction method for industrial robots based on contact positioning and least squares method according to claim 1, characterized in that, When the reference tool coordinate system data is known and the tool only experiences positional shift, steps S1 to S6 are replaced by the following simplified steps: S1': Obtain the coordinate system data of the reference tool; S2' In the reference tool coordinate system, control the robot to approach a fixed reference point in a preset posture through contact positioning, and record the reference pose data of the robot flange at the moment of contact; S3' In the coordinate system of the tool to be corrected, control the robot to approach the same fixed reference point in the same preset posture through contact positioning, and record the current pose data of the robot flange at the moment of contact; S4'. Based on the principle of spatial coordinate transformation, use the reference tool coordinate system data, reference pose data and current pose data to calculate the position offset of the tool coordinate system data to be corrected; S5'. The position offset is superimposed on the reference tool coordinate system data to obtain the tool coordinate system data to be corrected; S6' Convert the tool coordinate system data to be corrected into an instruction format that the target robot can recognize, and send it to the robot controller to update the tool coordinate system data.
10. An automatic TCP correction system for industrial robots based on contact positioning and least squares method, characterized in that, The system for an automatic TCP correction method for industrial robots based on contact positioning and least squares method as described in any one of claims 1-9, the system comprising: The reference data acquisition module is used to control the robot to approach a fixed reference point in multiple different preset postures through contact positioning in the standard tool coordinate system, record the first set of pose data of the robot flange in each posture, and acquire standard tool coordinate system data. The current data acquisition module is used to control the robot to approach the same fixed reference point in multiple different preset postures through contact positioning in the coordinate system of the tool to be corrected, and record the second set of pose data of the robot flange in each posture. The equation system construction module is used to construct a system of equations about the tool coordinate system data to be corrected, based on the principle of spatial coordinate transformation and using the first set of pose data, the second set of pose data, and the standard tool coordinate system data. The weighted least squares solution module is used to solve the system of equations using the weighted least squares method to obtain the coordinate system data of the tool to be corrected. The instruction issuance and update module is used to convert the tool coordinate system data to be corrected into an instruction format that the target robot can recognize, and issue it to the robot controller to update the tool coordinate system data; The verification rollback module is used to verify the correction results. If the verification does not meet the preset accuracy requirements, it automatically rolls back to the tool coordinate system data before the correction.
Citation Information
Patent Citations
Industrial robot TCP calibration method
CN106502208A
A TCP calibration method for industrial robots based on uniform posture distribution
CN109465826B