Welding spot error compensation method, device and equipment for automatic welding gun and medium
By collecting the spherical points of the standard ball on the automated welding gun and fitting the theoretical coordinates of the spherical center, iterative processing is carried out to compensate for the solder joint error, the problem of error accumulation in conventional hand-eye calibration methods is solved and the system accuracy is improved.
Patent Information
- Application Number
- CN202510448951.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-06-06
AI Technical Summary
During the measurement process, conventional hand-eye calibration methods are easily affected by the error of sensor collection of contour data, robotic arm motion error and hand-eye calibration error, resulting in cumulative errors and affecting system accuracy.
By controlling the free end of the automated welding gun to touch and collect the spherical points of the standard ball in multiple positions, establish the current section, fit the theoretical coordinates of the spherical center, perform iterative processing until the results converge, and then compensate the welding points for error.
The error of the automated welding gun is accurately measured and error compensation is performed based on the measured error, which reduces error accumulation and improves system accuracy.
Smart Images

Figure CN120095361A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of error processing, and in particular to a method, device, equipment and medium for compensating welding point errors of an automatic welding gun. Background Art
[0002] Line laser sensors are widely used in visual measurement, 3D reconstruction and other fields, with the characteristics of simple structure and non-contact. Line laser sensors are mainly composed of line lasers and cameras. The measurement process is as follows: the line laser projects a light plane that intersects with the object to be measured, forming a light strip on its surface. The shape of the light strip is modulated by the surface morphology of the object and projected into the camera to form an image. According to the relative position relationship between the camera and the light plane, the three-dimensional coordinates of the center of the light strip on the surface of the object relative to the camera coordinate system can be solved. By moving the object to be measured through the scanning device, the light plane can scan the entire surface of the object to be measured, thereby obtaining a complete three-dimensional morphology.
[0003] Hand-eye calibration can establish the transformation matrix relationship between the robot coordinate system and the camera coordinate system, thereby converting the coordinate position and posture obtained by the sensor to the robot coordinate system. In the vision system of the robot, there are generally two ways to install the sensor: non-fixed viewpoint method (eye-in-hand) and fixed viewpoint method (eye-to-hand). The non-fixed viewpoint method is to fix the line laser sensor on the end effector of the robot. At this time, the hand-eye calibration is the relationship between the camera coordinate system and the flange coordinate system at the end of the robot; the fixed viewpoint method is to separate the line laser sensor from the robot and fix it to be stationary. At this time, the hand-eye calibration is the relationship between the camera coordinate system and the base coordinate system of the robot. The fixed viewpoint method may have some visual blind spots during the measurement process. In addition, the measurement accuracy will be reduced during the visual measurement process due to the long measurement distance. Therefore, a non-fixed installation method is often used.
[0004] However, the calibration accuracy obtained by the conventional hand-eye calibration method is easily affected by the error of the sensor collecting contour data, the robot arm movement error and the hand-eye calibration error, and forms cumulative errors in each link, which ultimately affects the system accuracy. Summary of the invention
[0005] The main purpose of the present invention is to propose a method, device, equipment and medium for compensating the welding point error of an automated welding gun, aiming to solve the technical problem that the calibration accuracy obtained by the conventional hand-eye calibration method is easily affected by the error of the sensor collecting contour data, the robot arm movement error and the hand-eye calibration error, and cumulative errors are formed in each link, which ultimately affects the system accuracy.
[0006] To achieve the above object, the present invention proposes a welding point error compensation method for an automatic welding gun, comprising:
[0007] Controlling the free end of the automatic welding gun to touch and collect spherical points of a standard sphere in multiple posture states to obtain corresponding position information;
[0008] Establishing a corresponding current section according to all the position information, and fitting the current coordinates of the center of the standard sphere projected on the corresponding current section;
[0009] According to the obtained theoretical coordinates of the center of the sphere, iterative processing is performed and the corresponding iterative results are outputted until the results converge;
[0010] According to the iteration result, error compensation is performed on the solder joint.
[0011] In one embodiment, before the step of controlling the free end of the automatic welding gun to touch and collect spherical points of a standard sphere in multiple posture states to obtain corresponding position information, the step further includes:
[0012] According to the target light plane formed by cutting the target workspace by the laser beam emitted by the automatic welding gun, the target center coordinates of the target workspace are obtained; wherein the target workspace is a spherical space enclosed by the standard sphere, and the target center coordinates are located outside the target light plane, and the automatic welding gun includes a mechanical arm, and the two ends of the mechanical arm are respectively a connecting end and a free end, and the free end is installed with spaced line laser sensors and a welder, and the line laser sensor is used to emit the laser beam;
[0013] Controlling the automatic welding gun to move around the periphery of the target workspace so that the laser beam emitted by the line laser sensor cuts the target workspace to form a plurality of current light planes; wherein the current light planes are not overlapped and the center coordinates are located outside the current light planes;
[0014] According to the current coordinate system established by each of the current light planes, the target center coordinates are converted to obtain the corresponding current center coordinates; wherein the current coordinate system is the base coordinate system of the robotic arm corresponding to each of the current light planes;
[0015] In combination with the target center coordinates and all the current center coordinates, the automatic welding gun is calibrated by hand and eye, and the obtained hand and eye calibration transformation matrix is used as the initial solution.
[0016] In one embodiment, the step of obtaining the target center coordinates of the target workspace according to the target light plane formed by cutting the target workspace with the laser beam emitted by the automated welding gun comprises:
[0017] According to the target light plane formed by the laser beam emitted by the automatic welding gun cutting the target workspace, the target center coordinates of the target light plane are obtained; wherein, the target light plane is circular, and the target center coordinates are (x cc ,0,z cc );
[0018] According to the geometric characteristics of the target workspace being tangent to the target light plane, the target center coordinates of the target workspace are obtained using Formula 1; wherein the target center coordinates are (x cs ,y cs ,z cs ), the formula 1 is:
[0019]
[0020] ρThe radius of the sphere, y cs The sign of is determined by the relative position of the automated welding gun and the target workspace, and r is the radius of the target light plane.
[0021] In one embodiment, the step of converting the target center coordinates according to the current coordinate system established by each current light plane to obtain the corresponding current center coordinates includes:
[0022] According to the current coordinate system established by each current light plane, a conversion relationship between the target center coordinate and the corresponding current coordinate system is established and the target center coordinate is converted to obtain the corresponding current center coordinate; wherein the conversion relationship is expressed by Formula 2, which is:
[0023]
[0024] p fb is the number of target center coordinates, P csk is the current center coordinate corresponding to the kth current light plane, R bk is a 3×3 rotation matrix, T bk is a 3×1 translation vector, and T bk For O TO -X TO Y TO Z TO to B -X B Y B Z B The known rigid body transformation relationship, R to and T to are the external parameter matrices to be solved, O B -X B Y B ZB is the base coordinate system of the robotic arm of the automated welding gun.
[0025] In one embodiment, the current coordinate system established according to each current light plane establishes a conversion relationship between the target center coordinate and the corresponding current coordinate system and converts the target center coordinate to obtain the corresponding current center coordinate;
[0026] Establishing a corresponding current coordinate system of the robotic arm according to each current light plane;
[0027] A conversion relationship between the target center coordinates and the corresponding current coordinate system is established according to the current coordinate system, and the target center coordinates are converted to obtain the corresponding current center coordinates.
[0028] In one embodiment, the step of performing iterative processing according to the obtained theoretical coordinates of the center of the sphere and outputting the corresponding iterative results until the results converge includes:
[0029] According to the obtained theoretical coordinates of the center of the sphere, a target equation is established based on the principle of minimum error between the theoretical coordinates and the current coordinates; wherein the target equation is expressed by Formula 1, which is:
[0030]
[0031] n com is the total number of times the line laser sensor measures the center coordinates of the target, n com =n t +n r , n t is the number of times the robot arm only translates, n r is the number of times the robot arm performs any posture change, is the estimated value of the number of target center coordinates;
[0032] The LM algorithm is used to iteratively process the target equation and optimize the external parameter matrix until the result converges and the corresponding iterative result is output.
[0033] Based on the same technical concept, in a second aspect, the present invention also proposes a welding point error compensation device for an automatic welding gun, comprising:
[0034] A collection module, used to control the free end of the automatic welding gun to touch and collect spherical points of a standard ball in multiple posture states to obtain corresponding position information;
[0035] A coordinate fitting module, used for establishing a corresponding current section according to all the position information, and fitting a current coordinate of the center of the standard sphere projected on the corresponding current section;
[0036] An iterative calculation module, used for performing iterative processing according to the obtained theoretical coordinates of the center of the sphere and outputting corresponding iterative results until the results converge;
[0037] A processing module is used to perform error compensation on the solder joint according to the iteration result.
[0038] Based on the same technical concept, in the third aspect, the present invention also proposes a weld point error compensation device for an automatic welding gun, the weld point error compensation device for the automatic welding gun comprising a processor and a memory, the memory storing a weld point error compensation program for the automatic welding gun, and when the weld point error compensation program for the automatic welding gun is executed by the processor, the weld point error compensation method for the automatic welding gun described in the first aspect is implemented.
[0039] Based on the same technical concept, in a fourth aspect, the present invention further proposes a welding point error compensation system for an automatic welding gun, comprising:
[0040] A standard sphere, wherein a spherical target working space is formed inside the standard sphere;
[0041] The welding spot error compensation device of the automated welding gun according to the third aspect; and
[0042] An automated welding gun, wherein the automated welding gun is communicatively connected to a welding spot error compensation device of the automated welding gun, wherein the automated welding gun comprises a robotic arm, wherein the two ends of the robotic arm are a connecting end and a free end respectively, wherein the free end is provided with spaced-apart line laser sensors and a welder, wherein the line laser sensors and the welder are both arranged toward the standard ball, and wherein the line laser sensor is used to emit the laser beam.
[0043] Based on the same technical concept, in the fifth aspect, the present invention also proposes a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by one or more processors, the welding point error compensation method of the automatic welding gun described in the first aspect is implemented.
[0044] The technical solution of the present invention controls the automatic welding gun to drive the free end to touch and collect spherical points of the standard sphere in multiple posture states, and collects corresponding position information, establishes a corresponding current section according to all the position information, and fits the current coordinates of the center of the standard sphere projected on the corresponding current section, performs iterative processing according to the obtained theoretical coordinates of the center of the sphere, and outputs the corresponding iterative results until the results converge, and performs error compensation on the weld points according to the iterative results, so that the present invention can accurately measure the error of the automatic welding gun when in use, and then enables the present invention to perform error compensation on the automatic welding gun according to the measured error, thereby reducing error accumulation and improving system accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0046] Figure 1 A flow chart of a welding point error compensation method for an automated welding gun provided by the present invention;
[0047] Figure 2 Flow charts of some specific embodiments of the present invention;
[0048] Figure 3 for Figure 2 Flow chart of step S500 in the example;
[0049] Figure 4 for Figure 2 Flow chart of step S700 in the example;
[0050] Figure 5 for Figure 2 Flow chart of step S300 in the example;
[0051] Figure 6 It is a structural schematic diagram of a welding spot error compensation device of an automatic welding gun according to an example of the present invention;
[0052] Figure 7 Schematic diagram of the relationship between the standard sphere and the laser beam according to the example of the present invention. Description of the drawings:
[0054] 10. Standard ball; 20. Sensor; 30. Laser beam; 40. Section.
[0055] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components in a certain specific posture. If the specific posture changes, the directional indication will also change accordingly.
[0058] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features limited to "first" and "second" may explicitly or implicitly include at least one of the features. In addition, if "and / or" or "and / or" appears in the full text, its meaning includes three parallel solutions. Taking "A and / or B" as an example, it includes solution A, solution B, or solutions that satisfy both A and B. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in this field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0059] The invention provides a welding point error compensation method for an automatic welding gun.
[0060] See also Figures 1 to 7 In one embodiment of the present invention, the welding point error compensation method of the automatic welding gun includes:
[0061] S100, controlling the free end of the automatic welding gun to touch and collect spherical points of a standard sphere in multiple posture states to obtain corresponding position information;
[0062] S200, establishing a corresponding current section 40 according to all the position information, and fitting the current coordinates of the center of the standard sphere 10 projected on the corresponding current section 40;
[0063] S300, performing iterative processing according to the obtained theoretical coordinates of the sphere center and outputting corresponding iterative results until the results converge;
[0064] S400: performing error compensation on the solder joint according to the iteration result.
[0065] The automatic welding gun is controlled to drive the free end to touch and collect spherical points of the standard sphere 10 in multiple posture states, and the corresponding position information is collected, the corresponding current section 40 is established according to all the position information, and the current coordinates of the center of the standard sphere 10 projected on the corresponding current section 40 are fitted, and according to the obtained theoretical coordinates of the center of the sphere, iterative processing is performed and the corresponding iterative results are output when the results converge, and according to the iterative results, the welding points are error compensated, so that the present invention can accurately measure the error of the automatic welding gun when in use, and then the present invention can compensate for the error of the automatic welding gun according to the measured error, thereby reducing error accumulation and improving system accuracy.
[0066] In one embodiment, before step S100, the method further includes:
[0067] S500, according to the target light plane formed by cutting the target workspace by the laser beam 30 emitted by the automatic welding gun, the target center coordinates of the target workspace are obtained; wherein the target workspace is a spherical space enclosed by the standard sphere 10, and the target center coordinates are located outside the target light plane, and the automatic welding gun includes a mechanical arm, and the two ends of the mechanical arm are respectively a connecting end and a free end, and the free end is installed with spaced line laser sensors 20 and a welder, and the line laser sensor 20 is used to emit the laser beam 30;
[0068] S600, controlling the automatic welding gun to move around the periphery of the target workspace, so that the laser beam 30 emitted by the line laser sensor 20 cuts the target workspace to form a plurality of current light planes; wherein the current light planes are not overlapped, and the center coordinates are located outside the current light planes;
[0069] S700, transforming the target center coordinates according to the current coordinate system established by each current light plane to obtain the corresponding current center coordinates; wherein the current coordinate system is the base coordinate system of the robotic arm corresponding to each current light plane;
[0070] S800. Perform hand-eye calibration on the automated welding gun in combination with the target center coordinates and all the current center coordinates, and use the obtained hand-eye calibration transformation matrix as an initial solution.
[0071] In one embodiment, step S500 includes:
[0072] S510, according to the target light plane formed by the laser beam 30 emitted by the automatic welding gun cutting the target workspace, the target center coordinates of the target light plane are obtained; wherein, the target light plane is circular, and the target center coordinates are (x cc ,0,zcc );
[0073] S520, according to the geometric characteristics of the target workspace being tangent to the target light plane, using formula 1 to obtain the target center coordinates of the target workspace; wherein the target center coordinates are (x cs ,y cs ,z cs ), the formula 1 is:
[0074]
[0075] ρThe radius of the sphere, y cs The sign of is determined by the relative position of the automated welding gun and the target workspace, and r is the radius of the target light plane.
[0076] In one embodiment, step S700 includes:
[0077] S710. According to the current coordinate system established by each current light plane, a conversion relationship between the target center coordinate and the corresponding current coordinate system is established, and the target center coordinate is converted to obtain the corresponding current center coordinate; wherein the conversion relationship is expressed by Formula 2, which is:
[0078]
[0079] p fb is the number of target center coordinates, P csk is the current center coordinate corresponding to the kth current light plane, r bk is a 3×3 rotation matrix, t bk is a 3×1 translation vector, and T bk For O TO -X TO y TO z TO to B -x B y B z B The known rigid body transformation relationship, r to and T to are the external parameter matrices to be solved, O B -X B Y B Z B is the base coordinate system of the robotic arm of the automated welding gun.
[0080] In one embodiment, step S710 includes:
[0081] S711, establishing a corresponding current coordinate system of the robotic arm according to each current light plane;
[0082] S712: Establish a conversion relationship between the target center coordinates and the corresponding current coordinate system according to the current coordinate system and convert the target center coordinates to obtain the corresponding current center coordinates.
[0083] In one embodiment, step S300 includes:
[0084] S310, according to the obtained theoretical coordinates of the center of the sphere, a target equation is established based on the principle of minimizing the error between the theoretical coordinates and the current coordinates; wherein the target equation is expressed by Formula 1, which is:
[0085]
[0086] n com is the total number of times the line laser sensor measures the center coordinates of the target, n com =n t +n r , n t is the number of times the robot arm only translates, n r is the number of times the robot arm performs any posture change, is the estimated value of the number of target center coordinates;
[0087] S320, using the LM algorithm to iteratively process the target equation and optimize the external parameter matrix until the result converges and outputs the corresponding iterative result.
[0088] First, the following are the common steps for hand-eye calibration based on a single target ball: For an automated welding system, hand-eye calibration is the process of calibrating the relative coordinate transformation relationship between the welding gun tip and the camera, and the standard ball 10 fixed in the robot workspace is used as the calibration target. When the laser line emitted by the sensor 20 is projected onto the surface of the standard ball 10, the section 40 is circular and the laser line forms an arc.
[0089] Since the center C c lies in the light plane, so C c In the sensor coordinate system O C -X C Y C Z C The coordinates below can be expressed as (x cc ,0,z cc ); By extracting arc points and fitting a circle, the x value of the circle can be obtained. cc , z cc and radius r. Due to the geometric characteristics of the sphere, the Pythagorean theorem is used to obtain the center C of the sphere. s In O C -X C YC Z C The coordinates below are (x cs ,y cs ,z cs ), which is expressed as follows:
[0090]
[0091] Where: ρ is the radius of the sphere, y cs The sign of can be determined by the relative position of the line laser sensor and the standard sphere.
[0092] Keep the center of the sphere unchanged, change the position and posture of the sensor multiple times, and get the center of the sphere at O C -X C Y C Z C The coordinates P csk (x csk ,y csk ,z csk ), where k represents the kth measurement state of the robot arm at different positions and postures. According to the rigid body transformation relationship, the center of the sphere is obtained in the robot arm base coordinate system o B -X B Y B Z B Position P fb With P csk The conversion relationship is expressed as follows:
[0093]
[0094] Where: rotation matrix R bk (3×3) translation vector T bk (3×1) is from O TO -X TO Y TO Z TO to B -X B Y B Z B The rigid body transformation relationship is determined by the robot's own calibration algorithm and can be considered as known; the rotation matrix R to (3×3) translation vector T to (3×1) is from O C -X C Y C Z C to TO -X TO Y TO Z TO The rigid body transformation relationship is the external parameter matrix to be solved.
[0095] First solve the rotation matrix Rto Since the robot arm only undergoes translational motion, the postures at the front and back positions do not change, so TO -X TO Y TO Z TO to B -X B Y B Z B The rotation matrix R bk Remain unchanged, that is, R b1 =R b2 Based on this, it can be deduced that:
[0096]
[0097] in: They are R b1 The inverse and transpose of the matrix, due to R b1 is an orthogonal matrix, so
[0098] When n t (n t ≥4) times of translation to move the robot arm and measure P csk Then, according to formula 3, n t -2 equations, we can get:
[0099] R to A=B,
[0100]
[0101] To get the rotation matrix R to The optimal solution of , referring to the idea of ICP registration algorithm, let H ICP =AB T , for H ICP Perform SVD decomposition to obtain The optimal rotation matrix obtained according to the measurement results is:
[0102]
[0103] Translation vector T to It can be obtained by controlling the robot arm to change the position and posture in an arbitrary rotation and translation manner, and it can be deduced from formula 5:
[0104] (R b1 -R b2 )T to =R b2 R to P cs2 -R b1 R to P cs1+T b2 -T b1 ,
[0105] Change r (n r ≥4) times the robot arm’s position and measure P csk ,available:
[0106] CY to =D
[0107]
[0108] Since the coefficient matrix C is known, the optimal translation vector can be obtained by the least squares method:
[0109] T to =(C T C) -1 C T D
[0110] The transformation matrix parameters between the robot arm and the sensor 20 can be obtained through the above hand-eye calibration method. The above hand-eye calibration algorithm inevitably has errors. The main reasons are: 1) When solving the hand-eye calibration matrix to obtain external parameters, the external parameter calibration equation is established according to the motion constraint. Ideally, the sensor 20 detection data is biased, but there are errors in the sensor 20 internal parameter calibration; 2) The robot arm itself has geometric errors and motion errors, and there are limitations to using only theoretical matrix decomposition for solution; 3) The end of the robot arm is equipped with a simulated welding gun and sensor 20. Under the influence of gravity, the robot arm rods will deform, resulting in deformation errors. The above errors lead to inaccurate theoretical matrix decomposition solution process, and it is difficult to guarantee the accuracy of experimental calibration. In order to solve this problem, a hand-eye calibration error compensation algorithm is proposed:
[0111] Step 1: Use the external parameter R obtained by the hand-eye calibration algorithm described above to , T to As the initial solution;
[0112] Step 2: Control the robot arm to collect the position information of the standard sphere surface points in various positions in different positions with multiple positions while carrying the sensor and welding gun, and fit the C s In O B -X B Y B Z B The coordinates P fb , as C s In O B -X B Y B Z B The actual location of the
[0113] Step 3: The center position P of the sphere measured by the line laser sensor 20 at the kth pose when obtaining the initial solution of the external parameters csk Relative to the welding gun tip O B -X B Y B Z B The pose matrix R bk and T bk Substitute into equation 2 to obtain C s In O B -X B Y B Z B Theoretical position under
[0114] Step 4: Based on the principle of minimizing the error between the theoretical sphere center coordinates and the real sphere center coordinates, the target equation of formula 8 is established, and the LM algorithm is used to iteratively solve formula 8 to optimize the external parameter R of the robot vision guidance system. to , T to , until the result converges.
[0115]
[0116] Where: n com To obtain the initial solution of the external parameters, the total number of times the sensor measures the center of the ball, that is, the number of times the robot arm only translates n t The number of arbitrary posture changes n r sum.
[0117] An error compensation method for line laser hand-eye calibration based on a spherical target, the hand-eye calibration includes a robotic arm, a line laser sensor, a target ball, and a welding gun. The line laser sensor is fixed on the robotic arm, that is, a non-fixed viewpoint method is adopted. The target ball remains fixed, and the welding gun is installed at the end of the robotic arm as an end effector.
[0118] The error compensation method of hand-eye calibration comprises the following steps:
[0119] Step S11: fix the position of the target ball, install the line laser sensor and the welding gun on the end flange of the robot arm, and install the welding gun on the end flange of the robot arm;
[0120] Step S12: TCP calibration is performed on the welding gun tip using a four-point calibration method to obtain the position coordinates of the welding gun at the end of the robot arm in the robot arm base coordinate system, and the posture relationship of the welding gun tip relative to the robot arm base coordinate system is measured using the ABC world coordinate system method. This step is a prior art;
[0121] Step S13: Keep the center of the sphere unchanged, change the position and posture of the sensor multiple times, and obtain the center of the sphere in the sensor coordinate system O C -X C YC Z C The coordinates P csk (x csk ,y csk ,z csk ), where k represents the kth measurement state of the robot arm at different positions and postures. The rotation matrix R is solved according to the above hand-eye calibration algorithm. to and the translation vector T to .
[0122] Step S2: Use the welding gun tip on the robot arm to touch the target ball multiple times in different postures. During the movement of the robot arm, the relative positions of the laser sensor, the welding gun and the flange at the end of the robot arm remain unchanged. When the welding gun tip on the robot arm touches the target ball, the movement of the robot arm is stopped immediately. At the same time, the posture position data of the welding gun tip at the end of the robot arm in the teach pendant are read and recorded, and the posture position data is converted to the coordinate system of the flange at the end of the robot arm through coordinate transformation, so as to obtain multiple real coordinate points on the surface of the target ball in the base coordinate system of the robot arm, and fit the coordinates of the center of the ball in the base coordinate system as the real coordinates.
[0123] Step S3: Aim the laser line of the line laser sensor at the target ball, change the robot's posture to measure the target ball multiple times, take a photo with the camera each time, and use the image processing algorithm to extract the arc of the target ball, and use the arc to fit the center and radius of the ball in the camera coordinate system. When the line laser sensor is used to obtain the initial solution of the external parameters, the center position of the ball measured in each posture and the posture matrix of the sensor relative to the base coordinate system are used to solve the coordinates of the center of the ball in the base coordinate system as the theoretical coordinates.
[0124] Step S4: Establish the target equation based on the principle of minimizing the error between the theoretical sphere center coordinates and the real sphere center coordinates, use the LM algorithm to iteratively solve, optimize the robot hand-eye calibration parameters until the result converges, and complete the error compensation of the hand-eye calibration.
[0125] In step S2, since the robot arm acquires posture position data by touching the target ball with the tip of the welding gun in different postures when the line laser sensor is installed, the posture position data acquired at this time includes the errors caused by the gravity of the robot arm and the line laser sensor in different postures, that is, the errors caused by gravity have been taken into account. Therefore, in the subsequent hand-eye calibration and the movement of the robot arm in different postures and the performance of production tasks, the errors caused by gravity have also been taken into account, that is, the errors caused by gravity have been compensated, which can improve the system accuracy.
[0126] Of course, in some preferred embodiments, the target ball can also be made into a metal ball, and the level-triggered position acquisition function can be realized through a single-chip microcomputer, the high level of the single-chip microcomputer is connected to the welding gun position at the end of the robot arm, and the ground end of the single-chip microcomputer is connected to the metal ball, and the single-chip microcomputer and the robot are respectively connected to the host computer. When the metal needle at the end of the robot arm touches the metal ball, a level trigger is generated through the pin of the single-chip microcomputer and sent to the host computer signal. The host computer receives the signal and controls the robot arm to realize the emergency stop function. At the same time, the position of the tip of the welding gun at the end of the robot arm is saved and recorded to obtain the most accurate coordinate point data on the surface of the metal ball, so as to perform more accurate error compensation.
[0127] Based on the same technical concept, in a second aspect, the present invention also proposes a welding point error compensation device for an automatic welding gun, comprising:
[0128] A collection module, used to control the free end of the automatic welding gun to touch and collect spherical points of a standard ball in multiple posture states to obtain corresponding position information;
[0129] A coordinate fitting module, used for establishing a corresponding current section according to all the position information, and fitting a current coordinate of the center of the standard sphere projected on the corresponding current section;
[0130] An iterative calculation module, used for performing iterative processing according to the obtained theoretical coordinates of the center of the sphere and outputting corresponding iterative results until the results converge;
[0131] A processing module is used to perform error compensation on the solder joint according to the iteration result.
[0132] The weld point error compensation device for an automated welding gun provided in the embodiment of the present application adopts the weld point error compensation method for an automated welding gun in the above embodiment, which can solve the technical problem that the calibration accuracy obtained by the conventional hand-eye calibration method is easily affected by the error of the sensor collecting contour data, the robot arm movement error and the hand-eye calibration error, and forms cumulative errors in various links, which ultimately affects the accuracy of the system. Compared with the prior art, the beneficial effects of the weld point error compensation device for an automated welding gun provided in the embodiment of the present application are the same as the beneficial effects of the weld point error compensation method for an automated welding gun provided in the above embodiment, and the other technical features of the weld point error compensation device for an automated welding gun are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0133] Based on the same technical concept, in the third aspect, the present invention also proposes a weld point error compensation device for an automatic welding gun, the weld point error compensation device for the automatic welding gun comprising a processor and a memory, the memory storing a weld point error compensation program for the automatic welding gun, and when the weld point error compensation program for the automatic welding gun is executed by the processor, the weld point error compensation method for the automatic welding gun described in the first aspect is implemented.
[0134] The welding point error compensation device of the automatic welding gun in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted control terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc.
[0135] The welding spot error compensation device of the automatic welding gun may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the welding spot error compensation device of the automatic welding gun are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the weld point error compensation device of the automated welding gun to communicate wirelessly or wired with other devices to exchange data. Although the weld point error compensation device of the automated welding gun with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.
[0136] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0137] The weld point error compensation device for an automated welding gun provided by the present application adopts the weld point error compensation method for an automated welding gun in the above-mentioned embodiment, which can solve the technical problem that the calibration accuracy obtained by the conventional hand-eye calibration method is easily affected by the error of the sensor collecting contour data, the robot arm movement error and the hand-eye calibration error, and forms cumulative errors in various links, which ultimately affects the accuracy of the system. Compared with the prior art, the beneficial effects of the weld point error compensation device for an automated welding gun provided by the present application are the same as the beneficial effects of the weld point error compensation method for an automated welding gun provided by the above-mentioned embodiment, and the other technical features of the weld point error compensation device for an automated welding gun are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0138] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0139] Based on the same technical concept, in a fourth aspect, the present invention further proposes a welding point error compensation system for an automatic welding gun, comprising:
[0140] A standard sphere, wherein a spherical target working space is formed inside the standard sphere;
[0141] The welding spot error compensation device of the automated welding gun according to the third aspect; and
[0142] An automated welding gun, wherein the automated welding gun is communicatively connected to a welding spot error compensation device of the automated welding gun, wherein the automated welding gun comprises a robotic arm, wherein the two ends of the robotic arm are a connecting end and a free end respectively, wherein the free end is provided with spaced-apart line laser sensors and a welder, wherein the line laser sensors and the welder are both arranged toward the standard ball, and wherein the line laser sensor is used to emit the laser beam.
[0143] In addition, the weld point error compensation system for an automated welding gun provided in the embodiment of the present application can solve the technical problem that the calibration accuracy obtained by the conventional hand-eye calibration method is easily affected by the error of the sensor collecting contour data, the robot arm movement error and the hand-eye calibration error, and forms cumulative errors in each link, which ultimately affects the accuracy of the system. Compared with the prior art, the beneficial effects of the weld point error compensation system for an automated welding gun provided in the embodiment of the present application are the same as the beneficial effects of the weld point error compensation method for an automated welding gun provided in the above embodiment, and the other technical features of the weld point error compensation system for an automated welding gun are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0144] Based on the same technical concept, in the fifth aspect, the present invention also proposes a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by one or more processors, the welding point error compensation method of the automatic welding gun described in the first aspect is implemented.
[0145] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0146] The computer-readable storage medium may be included in the welding spot error compensation device of the automatic welding gun; or may exist independently without being assembled into the welding spot error compensation device of the automatic welding gun.
[0147] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the weld point error compensation device of the automatic welding gun, the weld point error compensation device of the automatic welding gun can implement the weld point error compensation method of the automatic welding gun described above.
[0148] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0149] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0150] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0151] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned method for compensating the weld spot error of the automatic welding gun, and can solve the technical problem that the calibration accuracy obtained by the conventional hand-eye calibration method is easily affected by the error of the sensor collecting contour data, the robot arm movement error, and the hand-eye calibration error, and forms cumulative errors in various links, which ultimately affects the accuracy of the system. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the method for compensating the weld spot error of the automatic welding gun provided by the above-mentioned embodiment, which will not be repeated here.
[0152] Therefore, all the beneficial effects brought by the technical solutions of at least the above embodiments are not described one by one here. The above description is only an exemplary implementation of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the technical concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. A method for compensating welding point errors of an automatic welding gun, characterized in that: include: Controlling the free end of the automatic welding gun to touch and collect spherical points of a standard sphere in multiple posture states to obtain corresponding position information; Establishing a corresponding current section according to all the position information, and fitting the current coordinates of the center of the standard sphere projected on the corresponding current section; According to the obtained theoretical coordinates of the center of the sphere, iterative processing is performed and the corresponding iterative results are outputted until the results converge; According to the iteration result, error compensation is performed on the solder joint.
2. The welding point error compensation method of the automatic welding gun according to claim 1, characterized in that: Before the step of controlling the free end of the automatic welding gun to touch and collect spherical points of a standard sphere in multiple posture states to obtain corresponding position information, the step further includes: According to the target light plane formed by cutting the target workspace by the laser beam emitted by the automatic welding gun, the target center coordinates of the target workspace are obtained; wherein the target workspace is a spherical space enclosed by the standard sphere, and the target center coordinates are located outside the target light plane, and the automatic welding gun includes a mechanical arm, and the two ends of the mechanical arm are respectively a connecting end and a free end, and the free end is installed with spaced line laser sensors and a welder, and the line laser sensor is used to emit the laser beam; Controlling the automatic welding gun to move around the periphery of the target workspace so that the laser beam emitted by the line laser sensor cuts the target workspace to form a plurality of current light planes; wherein the current light planes are not overlapped and the center coordinates are located outside the current light planes; According to the current coordinate system established by each of the current light planes, the target center coordinates are converted to obtain the corresponding current center coordinates; wherein the current coordinate system is the base coordinate system of the robotic arm corresponding to each of the current light planes; In combination with the target center coordinates and all the current center coordinates, the automatic welding gun is calibrated by hand and eye, and the obtained hand and eye calibration transformation matrix is used as the initial solution.
3. The welding point error compensation method of the automatic welding gun according to claim 2, characterized in that: The step of obtaining the target center coordinates of the target workspace according to the target light plane formed by cutting the target workspace with the laser beam emitted by the automated welding gun comprises: According to the target light plane formed by the laser beam emitted by the automatic welding gun cutting the target workspace, the target center coordinates of the target light plane are obtained; wherein, the target light plane is circular, and the target center coordinates are (x cc ,0,z cc ); According to the geometric characteristics of the target workspace being tangent to the target light plane, the target center coordinates of the target workspace are obtained using Formula 1; wherein the target center coordinates are (x cs ,y cs ,z cs ), the formula 1 is: ρThe radius of the sphere, y cs The sign of is determined by the relative position of the automated welding gun and the target workspace, and r is the radius of the target light plane.
4. The welding point error compensation method of the automatic welding gun according to claim 3, characterized in that: The step of converting the target center coordinates according to the current coordinate system established according to each current light plane to obtain the corresponding current center coordinates includes: According to the current coordinate system established by each current light plane, a conversion relationship between the target center coordinate and the corresponding current coordinate system is established and the target center coordinate is converted to obtain the corresponding current center coordinate; wherein the conversion relationship is expressed by Formula 2, which is: P fb is the number of target center coordinates, P csk is the current center coordinate corresponding to the kth current light plane, R bk is a 3×3 rotation matrix, T bk is a 3×1 translation vector, and T bk For O TO -X TO Y TO Z TO to B -X B Y B Z B The known rigid body transformation relationship, R to and T to are the external parameter matrices to be solved, O B -X B Y B Z B is the base coordinate system of the robotic arm of the automated welding gun.
5. The welding point error compensation method of the automatic welding gun according to claim 4, characterized in that: The step of establishing a conversion relationship between the target center coordinates and the corresponding current coordinate system according to the current coordinate system established by each current light plane and converting the target center coordinates to obtain the corresponding current center coordinates includes: Establishing a corresponding current coordinate system of the robotic arm according to each current light plane; A conversion relationship between the target center coordinates and the corresponding current coordinate system is established according to the current coordinate system, and the target center coordinates are converted to obtain the corresponding current center coordinates.
6. The welding point error compensation method of the automatic welding gun according to claim 5, characterized in that: The step of performing iterative processing according to the obtained theoretical coordinates of the sphere center and outputting the corresponding iterative results until the results converge comprises: According to the obtained theoretical coordinates of the center of the sphere, a target equation is established based on the principle of minimizing the error between the theoretical coordinates and the current coordinates; wherein the target equation is expressed by Formula 1, which is: n com is the total number of times the line laser sensor measures the center coordinates of the target, n com =n t +n r , n t is the number of times the robot arm only translates, n r is the number of times the robot arm performs any posture change, is an estimate of the number of target center coordinates; The LM algorithm is used to iteratively process the target equation and optimize the external parameter matrix until the result converges and the corresponding iterative result is output.
7. A welding point error compensation device for an automatic welding gun, characterized in that: include: A collection module, used to control the free end of the automatic welding gun to touch and collect spherical points of a standard ball in multiple posture states to obtain corresponding position information; A coordinate fitting module, used for establishing a corresponding current section according to all the position information, and fitting a current coordinate of the center of the standard sphere projected on the corresponding current section; An iterative calculation module, used for performing iterative processing according to the obtained theoretical coordinates of the center of the sphere and outputting corresponding iterative results until the results converge; A processing module is used to perform error compensation on the solder joint according to the iteration result.
8. A welding point error compensation device for an automatic welding gun, characterized in that: The weld point error compensation device of the automatic welding gun includes a processor and a memory, and the memory stores a weld point error compensation program of the automatic welding gun. When the weld point error compensation program of the automatic welding gun is executed by the processor, the weld point error compensation method of the automatic welding gun as described in any one of claims 1 to 6 is implemented.
9. A welding point error compensation system for an automatic welding gun, characterized in that: include: A standard sphere, wherein a spherical target working space is formed inside the standard sphere ; The welding spot error compensation device of the automatic welding gun as claimed in claim 8; as well as, An automated welding gun, wherein the automated welding gun is communicatively connected to a welding spot error compensation device of the automated welding gun, wherein the automated welding gun comprises a robotic arm, wherein the two ends of the robotic arm are a connecting end and a free end respectively, wherein the free end is provided with spaced-apart line laser sensors and a welder, wherein the line laser sensors and the welder are both arranged toward the standard ball, and wherein the line laser sensor is used to emit the laser beam.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by one or more processors, the method for compensating welding point errors of an automatic welding gun according to any one of claims 1 to 6 is implemented.