A vision-based welding trajectory acquisition method

By combining the visual acquisition unit and the ArUco box with a reference ruler, the welding gun position and motion trajectory are collected in real time, which solves the problems of low measurement accuracy and high cost in traditional methods and realizes high-precision and low-cost welding trajectory collection.

CN120080067BActive Publication Date: 2025-09-05DATANG HUAYIN ELECTRIC POWER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510374897.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-09-05
Estimated Expiration
2045-03-27

AI Technical Summary

Technical Problem

Traditional welding trajectory acquisition methods rely on mechanical sensors or laser tracking systems, which have problems such as low measurement accuracy, high maintenance costs, limited applicability and insufficient real-time performance, especially in complex-shaped welds and high-speed welding processes.

Method used

A vision-based welding trajectory acquisition method is adopted. Through the camera installed on the welding mask and the ArUco box on the welding gun, combined with the reference ruler, the welding gun posture and motion trajectory are collected in real time. The PnP algorithm and coordinate system transformation technology are used to achieve high-precision welding gun posture and motion trajectory acquisition.

Benefits of technology

It realizes high-precision and low-cost acquisition of welding gun posture and motion trajectory, adapts to different welding scenarios, reduces equipment cost and maintenance complexity, and improves real-time performance and measurement accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120080067B_ABST
    Figure CN120080067B_ABST
Patent Text Reader

Abstract

The present invention discloses a vision-based welding trajectory acquisition method, which relates to the field of welding technology. A vision acquisition unit is used to acquire ArUco codes on an ArUco box and a reference ruler installed on a welding gun in real time, and the ID information and position information of the ArUco codes are identified. The ArUco code posture on the ArUco box is used as the welding gun posture, and the ArUco code posture on the reference ruler is used as the reference ruler posture. The postures of the welding gun and the reference ruler in a camera coordinate system of the vision acquisition unit are obtained. The ArUco code posture of the ArUco box on the welding gun is uniformly transformed to the ArUco box geometric center coordinate system, the identified ArUco code posture of the reference ruler is uniformly transformed to the reference ruler global coordinate system, the welding gun posture is transformed from the ArUco box geometric center coordinate system to the reference ruler global coordinate system, and the acquisition data of multiple cameras on the vision acquisition unit are fused and processed to obtain the precise posture and motion trajectory of the welding gun.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of welding technology, and in particular to a vision-based welding trajectory acquisition method. Background Art

[0002] During the welding process, the position and motion trajectory of the welding gun have an important impact on the welding quality. Therefore, a reliable welding trajectory acquisition method is needed to obtain the position and motion trajectory of the welding gun during the welding process.

[0003] Traditional welding trajectory acquisition methods typically rely on mechanical sensors or laser tracking systems. Currently, mechanical sensors primarily use contact measurement methods, which are easily affected by factors such as weld surface roughness, scratches, and spatter, resulting in low measurement accuracy. They are prone to wear during use and require regular replacement or calibration, increasing maintenance costs. They also require the weld to have distinct physical features to function. They are generally suitable for applications where precision is not critical, such as thick straight and circumferential welds, but are difficult to apply to welds with complex shapes or thin plates. During high-speed welding, the data processing speed of mechanical sensors may not keep up with changes in weld position, resulting in delayed correction. Laser tracking systems are susceptible to interference from welding arc light, smoke, and spatter, which degrades image acquisition quality and affects the accurate extraction of weld features. Under complex working conditions, the image processing of laser tracking systems requires removing a large amount of interference information. The algorithms are complex and computationally intensive, which can lead to insufficient real-time performance. Furthermore, laser tracking systems typically require high-precision laser sensors and complex image processing equipment, which are costly and require high maintenance. They also have certain requirements for working environment lighting and temperature conditions. Strong light or high temperatures can affect the performance of laser sensors.

[0004] With the development of computer vision technology, vision-based welding trajectory acquisition methods have gradually become a research hotspot. Therefore, to address the technical issues existing in the above-mentioned existing welding trajectory acquisition methods, we propose a vision-based welding trajectory acquisition method. Summary of the Invention

[0005] The main purpose of this invention is to provide a vision-based welding trajectory acquisition method. By using one or more cameras mounted on the welding mask and an ARUCO box mounted on the welding gun, combined with a reference ruler, this method enables high-precision acquisition of the welding gun's position and trajectory. This method effectively addresses the problems mentioned in the previous article.

[0006] In order to achieve the above purpose, the technical solution adopted by the present invention is:

[0007] A vision-based welding trajectory acquisition method, comprising:

[0008] A visual acquisition unit for real-time acquisition of the position and motion trajectory of the welding gun, wherein the visual acquisition unit includes at least one camera mounted on the welding mask;

[0009] An ArUco box for identifying the position of the welding gun, wherein the ArUco box is a cube mounted on the welding gun, and at least one first ArUco code with a unique ID is set on any face of the cube;

[0010] A reference ruler for providing a stable global reference coordinate system. The reference ruler is a rectangular ruler composed of a series of second ArUco codes with unique IDs, and its surface is covered with several second ArUco codes that can be recognized by the visual acquisition unit;

[0011] The specific steps of the method include:

[0012] Step 1: The visual acquisition unit collects the first ArUco code of the ArUco box installed on the welding gun and the second ArUco code on the reference ruler in real time from different angles;

[0013] Step 2: Identify the ID information and position information of the first and second ArUco codes, use the first ArUco code pose as the welding gun pose, and the second ArUco code pose as the reference ruler pose, and calculate the poses of the welding gun and the reference ruler in the camera coordinate system of the visual acquisition unit respectively;

[0014] Step 3: Coordinate system transformation

[0015] Step S31: uniformly transforming the identified first ArUco code pose on the welding gun into the ArUco box geometric center coordinate system;

[0016] Step S32: uniformly transforming the recognized second ArUco code pose of the reference ruler into the global coordinate system of the reference ruler;

[0017] Step S33: transforming the welding gun posture from the ArUco box geometric center coordinate system to the reference ruler global coordinate system;

[0018] Step 4: Fuse the data collected by multiple cameras on the visual acquisition unit to obtain the precise position and motion trajectory of the welding gun.

[0019] Furthermore, the specific steps of step 2 are:

[0020] Step S21: Obtaining the pixel coordinates of the corner points of the first ArUco code and the second ArUco code;

[0021] Step S22: The obtained pixel coordinates of the corner points of any ArUco code, the actual size and the camera internal parameters are used as the input of the PnP algorithm, wherein the camera internal parameters include the focal length, the principal point and several distortion coefficients;

[0022] Step S23: Output a first rotation and translation matrix from the first ArUco code to the camera space and a second rotation and translation matrix from the second ArUco code to the camera space using a PnP algorithm.

[0023] Furthermore, the specific steps of step S31 are:

[0024] Step S311: define the ArUco box geometric center coordinate system, wherein the ArUco box geometric center coordinate system takes the geometric center of the ArUco box as the origin, and the sides along the length, width, and height of the ArUco box are the X, Y, and Z coordinate axes of the ArUco box geometric center coordinate system respectively;

[0025] Step S312: Calculate the rotation and translation matrix of any first identified ArUco code pose to the ArUco box geometric center coordinate system

[0026] Step S313: Calculate the rotation and translation matrix of the ArUco box geometric center coordinate system to the camera coordinate system using the following formula: The calculation formula is: Where, It is represented as the first rotation and translation matrix of any recognized first ArUco code pose to the camera space;

[0027] Step S314: performing consistency check on the positions of the multiple identified first ArUco codes and removing abnormal values;

[0028] Step S315: according to the capture quality of the multiple identified first ArUco codes, set the confidence of the i-th first ArUco code, use the set confidence value to perform weighted fusion on the ArUco box pose data, and obtain the optimal pose of the geometric center of the ArUco box.

[0029] Furthermore, the specific steps of step S32 are:

[0030] Step S321: defining a global coordinate system of the reference ruler, wherein the global coordinate system of the reference ruler is defined with the center of any fixed second ArUco code on the reference ruler as the origin, and the length direction of the reference ruler is defined as the X axis, the width direction is defined as the Y axis, and the direction perpendicular to the plane of the reference ruler and upward is defined as the Z axis, thereby establishing the global coordinate system of the reference ruler;

[0031] Step S322: define a second ArUco code local coordinate system, wherein any second ArUco code has a corresponding second ArUco code local coordinate system in the plane where it is located, and the second ArUco code local coordinate system takes the center of the second ArUco code as the origin, and the coordinate axis direction is aligned with the edge of the second ArUco code;

[0032] Step S323: Record the coordinates (x j , 0,0), where the X-axis, Y-axis, and Z-axis of the global coordinate system of the reference ruler and the local coordinate system of any second ArUco code are aligned parallel;

[0033] Step S324: For each captured j-th second ArUco code, calculate the rotation and translation matrix of its local coordinate system to the global coordinate system of the reference scale According to the geometric characteristics of the reference ruler, the transformation matrix of the j-th second ArUco code is transformed into the global coordinate system of the reference ruler for: Among them, L j is the distance from the center of the jth second ArUco code to the center of the global coordinate system of the reference scale;

[0034] Step S325: Calculate the rotation and translation matrix of the global coordinate system of the reference ruler to the camera coordinate system using the following formula: The calculation formula is: Where, Expressed as the second rotation and translation matrix of the j-th second ArUco code to the camera space;

[0035] Step S326: performing consistency check on the postures of the multiple identified second ArUco codes and removing abnormal values;

[0036] Step S327: according to the capture quality of the multiple identified second ArUco codes, set the confidence of the j-th second ArUco code, use the set confidence value to perform weighted fusion on the reference scale pose data, and obtain the optimal transformation relationship of the reference scale global coordinate system.

[0037] Furthermore, the specific steps of step S33 are:

[0038] Step S331: Calculate and obtain the position of the welding gun in the camera coordinate system, that is, the rotation and translation matrix of the welding gun in the camera coordinate system

[0039] Step S332: Use the following formula to transform the welding gun posture into the rotation and translation matrix of the global coordinate system of the reference scale: The calculation formula is:

[0040] Step S333: Dynamically output the calculated results of the welding gun's posture in the global coordinate system of the reference scale for collection and analysis of the welding trajectory.

[0041] Furthermore, the specific process of step S314 is as follows:

[0042] Calculate and obtain the coordinates P of the first ArUco code identified by any method and transform it into the coordinate system of the geometric center of the ArUco box in the camera coordinate system. ArUco盒(i) and quaternion Q ArUco盒(i) ;

[0043] Calculate the obtained coordinates P respectively ArUco盒(i) and quaternion Q ArUco盒(i) The mean and The calculation formula is:

[0044]

[0045] Wherein, N is the number of the first ArUco codes identified;

[0046] Calculate the mean value of the first ArUco code to coordinates of the i-th The first displacement error d 1i , the calculation formula is:

[0047] The quaternion Q ArUco盒(i) Convert to Euler angle E(r 2i ,p 2i ,y 2i ) ArUco盒 , the quaternion mean Convert to Euler angles Calculate the first rotation error ΔE of the i-th first ArUco code according to the conversion result 1i , the calculation formula is: Where Δr i =|r 1i -r 2i |,Δp i =|p 1i -p 2i |,Δy i =|y 1i -y 2i |;

[0048] Thresholds for the first displacement error and the first rotation error are set respectively, and values ​​outside the set thresholds are screened out, that is, determined as abnormal values ​​and eliminated.

[0049] Furthermore, the specific process of step S326 is as follows:

[0050] Calculate and obtain the coordinate P of the jth second ArUco code transformed into the global coordinate system of the reference scale in the camera coordinate system Global(j) and quaternion Q Global(j) ;

[0051] Calculate the obtained coordinates P respectively Global(j) and quaternion Q Global(j) The mean and The calculation formula is:

[0052]

[0053] Where M is the number of recognized second ArUco codes;

[0054] Calculate the jth second ArUco code to coordinate mean The second displacement error d 2j , the calculation formula is:

[0055] The quaternion Q Global(j) Convert to Euler angle E(r 2j ,p 2j ,y 2j ) Global , the quaternion mean Convert to Euler angles Calculate the second rotation error ΔE of the j-th second ArUco code according to the conversion result 2j , the calculation formula is: Where Δr j =|r 1j -r 2j |,Δp j =|p 1j -p 2j |,Δy j =|y 1j -y 2j |;

[0056] Thresholds for the second displacement error and the second rotation error are set respectively, and values ​​outside the set thresholds are screened out, that is, determined as abnormal values ​​and eliminated.

[0057] The present invention has the following beneficial effects:

[0058] Compared with the existing technology, the first ArUco code of the ArUco box installed on the welding gun and the second ArUco code on the reference ruler are collected in real time from different angles through the visual acquisition unit, the ID information and position information of the acquired first ArUco code and second ArUco code are identified, the first ArUco code posture is used as the welding gun posture, and the second ArUco code posture is used as the reference ruler posture, and the postures of the welding gun and the reference ruler in the camera coordinate system of the visual acquisition unit are calculated respectively, and the identified first ArUco code posture on the welding gun is uniformly transformed into the ArUco box geometric center coordinate system; the identified second ArUco code posture of the reference ruler is uniformly transformed into the reference ruler global coordinate system; the welding gun posture is transformed from the ArUco box geometric center coordinate system to the reference ruler global coordinate system; the acquisition data of multiple cameras on the visual acquisition unit are fused and processed to obtain the precise posture and motion trajectory of the welding gun. In this solution, high-precision welding gun posture acquisition can be achieved through the calibration of multiple cameras and reference scales; real-time acquisition and processing are achieved by utilizing efficient image processing and optimization algorithms; the number of cameras can be expanded as needed to adapt to different welding scenarios; compared with traditional mechanical sensors and laser tracking systems, this method is lower in cost and easier to install. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 This is a schematic diagram of the overall structure of a vision-based welding trajectory acquisition method of the present invention;

[0060] Figure 2 This is a schematic diagram of the installation structure of the visual acquisition unit in the technical solution of the present invention;

[0061] Figure 3 Schematic diagram of the structure of the ArUco box in the technical solution of the present invention;

[0062] Figure 4 It is a structural schematic diagram of the reference ruler in the technical solution of the present invention.

[0063] In the figure, 1. Welding mask; 2. Vision acquisition unit; 3. Welding gun; 4. ArUco box; 5. First ArUco code; 6. Reference ruler; 7. Second ArUco code. DETAILED DESCRIPTION

[0064] The present invention will be further described below in conjunction with specific embodiments. The accompanying drawings are for illustrative purposes only and represent only schematic diagrams rather than actual drawings. They should not be understood as limiting the present invention. In order to better illustrate the specific embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product.

[0065] The specific implementation process of the technical solution of the present invention includes the following steps:

[0066] Step 1: Camera Installation

[0067] according to Figure 2 As shown, the camera is mounted on the welding helmet and during welding, it should be ensured that the movement range of the welding gun can be covered.

[0068] Adjust the camera angle and position to maximize the capture of the ArUco box and the ArUco code on the ruler.

[0069] Step 2: ArUco Box Fabrication

[0070] Make a cube ArUco box and paste ArUco codes with different IDs on each face, such as Figure 3 shown.

[0071] Ensure that the size and spacing of the ArUco code meet the camera's recognition requirements.

[0072] Step 3: Layout of the reference ruler

[0073] Arrange the reference ruler according to the length of the welding path and ensure that the ArUco code on the reference ruler can be recognized by the camera, such as Figure 4 shown.

[0074] Record the position of each ArUco code on the reference ruler for coordinate system transformation.

[0075] Step 4: System Calibration

[0076] The system is calibrated using the ArUco code on the reference ruler to ensure the accuracy of the collected data.

[0077] Calculate the camera's internal parameters (focal length, principal point, distortion coefficient, etc.) and external parameters (the relative position of the camera and the reference ruler).

[0078] Step 5: Data Collection and Processing

[0079] Step 51: ArUco code detection: Detect the ArUco box on the welding gun and the ArUco code on the reference ruler through the image captured by the camera.

[0080] Step 52: Identify the ID information and position information of the first ArUco code and the second ArUco code, use the first ArUco code pose as the welding gun pose, and the second ArUco code pose as the reference ruler pose, and calculate the poses of the welding gun and the reference ruler in the camera coordinate system of the visual acquisition unit respectively; the specific steps are:

[0081] Step 521: Obtain the pixel coordinates of the corner points of the first ArUco code and the second ArUco code;

[0082] Step 522: The obtained pixel coordinates of the corner points of any ArUco code, the actual size and the camera internal parameters are used as the input of the PnP algorithm, wherein the camera internal parameters include the focal length, the principal point and several distortion coefficients;

[0083] Step 523: Use the PnP algorithm to output a first rotation and translation matrix from the first ArUco code to the camera space and a second rotation and translation matrix from the second ArUco code to the camera space.

[0084] Step 53: Coordinate System Transformation:

[0085] Step 531: uniformly transform the ArUco code pose on the welding gun to the geometric center of the ArUco box. The specific steps are:

[0086] Step 5311: Define the ArUco box geometric center coordinate system, where the ArUco box geometric center coordinate system takes the geometric center of the ArUco box as the origin, and the sides along its length, width, and height are the X, Y, and Z coordinate axes of the ArUco box geometric center coordinate system respectively;

[0087] Step 5312: Calculate the rotation and translation matrix of any first identified ArUco code pose to the ArUco box geometric center coordinate system

[0088] Step 5313: Calculate the rotation and translation matrix of the ArUco box geometric center coordinate system to the camera coordinate system using the following formula: The calculation formula is: Where, It is represented as the first rotation and translation matrix of any recognized first ArUco code pose to the camera space;

[0089] Step 5314: performing consistency check on the postures of the multiple identified first ArUco codes and removing outliers. The specific process of removing outliers is as follows:

[0090] Calculate and obtain the coordinates P of the first ArUco code identified by any method and transform it into the coordinate system of the geometric center of the ArUco box in the camera coordinate system. ArUco盒(i) and quaternion Q ArUco盒(i) ;

[0091] Calculate the obtained coordinates P respectively ArUco盒(i) and quaternion Q ArUco盒(i) The mean and The calculation formula is:

[0092]

[0093] Wherein, N is the number of the first ArUco codes identified;

[0094] Calculate the mean value of the first ArUco code to coordinates of the i-th The first displacement error d 1i , the calculation formula is:

[0095] The quaternion Q ArUco盒(i) Convert to Euler angle E(r 2i ,p 2i ,y 2i ) ArUco盒 , the quaternion mean Convert to Euler angles Calculate the first rotation error ΔE of the i-th first ArUco code according to the conversion result 1i , the calculation formula is: Where Δr i =|r 1i -r 2i |,Δp i =|p 1i -p 2i |,Δy i =|y 1i -y 2i |;

[0096] Thresholds for the first displacement error and the first rotation error are set respectively, and values ​​outside the set thresholds are screened out, i.e., determined as abnormal values, and removed;

[0097] Step 5315: According to the capture quality of the multiple identified first ArUco codes, the confidence of the i-th first ArUco code is set, and the ArUco box pose data is weightedly fused using the set confidence value to obtain the optimal pose of the ArUco box geometric center.

[0098] Step 532: uniformly transform the ArUco code pose on the reference ruler to the global coordinate system of the reference ruler. The specific steps are:

[0099] Step 5321: Define a global coordinate system for the reference ruler, wherein the global coordinate system for the reference ruler takes the center of any fixed second ArUco code on the reference ruler as the origin, defines the X axis along the length direction of the reference ruler, defines the Y axis along the width direction of the reference ruler, and defines the Z axis in the direction perpendicular to the plane of the reference ruler and upward. Establish the global coordinate system for the reference ruler;

[0100] Step 5322: define the second ArUco code local coordinate system, wherein any second ArUco code has a corresponding second ArUco code local coordinate system in the plane where it is located. The second ArUco code local coordinate system takes the center of the second ArUco code as the origin, and the coordinate axis direction is aligned with the edge of the second ArUco code;

[0101] Step 5323: Record the coordinates (x j , 0,0), where the X-axis, Y-axis, and Z-axis of the global coordinate system of the reference ruler and the local coordinate system of any second ArUco code are aligned parallel;

[0102] Step 5324: For each captured j-th second ArUco code, calculate the rotation and translation matrix of its local coordinate system to the global coordinate system of the reference scale According to the geometric characteristics of the reference ruler, the transformation matrix of the j-th second ArUco code is transformed into the global coordinate system of the reference ruler for: Among them, L j is the distance from the center of the jth second ArUco code to the center of the global coordinate system of the reference scale;

[0103] Step 5325: Calculate the rotation and translation matrix of the global coordinate system of the reference ruler to the camera coordinate system using the following formula: The calculation formula is: Where, Expressed as the second rotation and translation matrix of the j-th second ArUco code to the camera space;

[0104] Step 5326: Perform consistency check on the postures of the multiple identified second ArUco codes and remove outliers. The specific process of removing outliers is as follows:

[0105] Calculate and obtain the coordinate P of the jth second ArUco code transformed into the global coordinate system of the reference scale in the camera coordinate system Global(j) and quaternion Q Global(j) ;

[0106] Calculate the obtained coordinates P respectively Global(j) and quaternion Q Global(j) The mean and The calculation formula is:

[0107]

[0108] Where M is the number of recognized second ArUco codes;

[0109] Calculate the jth second ArUco code to coordinate mean The second displacement error d 2j , the calculation formula is:

[0110] The quaternion Q Global(j) Convert to Euler angle E(r 2j ,p 2j ,y 2j ) Global , the quaternion mean Convert to Euler angles Calculate the second rotation error ΔE of the j-th second ArUco code according to the conversion result 2j , the calculation formula is: Where Δr j =|r 1j -r 2j |,Δp j =|p 1j -p 2j |,Δy j =|y 1j -y 2j |;

[0111] Thresholds for the second displacement error and the second rotation error are set respectively, and values ​​outside the set thresholds are screened out, i.e., determined as abnormal values, and removed;

[0112] Step 5327: According to the capture quality of the multiple identified second ArUco codes, the confidence of the j-th second ArUco code is set, and the set confidence value is used to perform weighted fusion on the reference scale pose data to obtain the optimal transformation relationship of the reference scale global coordinate system.

[0113] Step 533: Transform the welding gun posture from the ArUco box geometric center coordinate system to the global coordinate system of the reference scale. The specific process is as follows:

[0114] Calculate the position of the welding gun in the camera coordinate system, that is, the rotation and translation matrix of the welding gun in the camera coordinate system

[0115] Use the following formula to transform the welding gun posture into the rotation and translation matrix of the global coordinate system of the reference scale: The calculation formula is:

[0116] Step 534: Data fusion: The collected data from multiple cameras are fused to obtain the precise position and motion trajectory of the welding gun.

[0117] Step 535: Real-time pose output

[0118] According to the movement of the welding gun, its position and posture in the global coordinate system of the reference scale are updated in real time.

[0119] Connect the continuous pose data to generate the motion trajectory of the welding gun.

[0120] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.

Claims

1. A vision-based welding trajectory acquisition method, characterized in that: include: A visual acquisition unit for real-time acquisition of the position and motion trajectory of the welding gun, wherein the visual acquisition unit includes at least one camera mounted on the welding mask; An ArUco box for identifying the position of the welding gun, wherein the ArUco box is a cube mounted on the welding gun, and at least one first ArUco code with a unique ID is set on any face of the cube; A reference ruler for providing a stable global reference coordinate system. The reference ruler is a rectangular ruler composed of a series of second ArUco codes with unique IDs, and its surface is covered with several second ArUco codes that can be recognized by the visual acquisition unit; The specific steps of the method include: Step 1: The visual acquisition unit collects the first ArUco code of the ArUco box installed on the welding gun and the second ArUco code on the reference ruler in real time from different angles; Step 2: Identify the ID information and position information of the first and second ArUco codes, use the first ArUco code pose as the welding gun pose, and the second ArUco code pose as the reference ruler pose, and calculate the poses of the welding gun and the reference ruler in the camera coordinate system of the visual acquisition unit respectively; Step 3: Coordinate system transformation Step S31: uniformly transforming the identified first ArUco code pose on the welding gun into the ArUco box geometric center coordinate system; Step S32: uniformly transforming the recognized second ArUco code pose of the reference ruler into the global coordinate system of the reference ruler; Step S33: transforming the welding gun posture from the ArUco box geometric center coordinate system to the reference ruler global coordinate system; Step 4: Fuse the data collected by multiple cameras on the visual acquisition unit to obtain the precise position and motion trajectory of the welding gun.

2. The method for collecting welding trajectories based on vision according to claim 1, characterized in that: The specific steps of step 2 are: Step S21: Obtaining the pixel coordinates of the corner points of the first ArUco code and the second ArUco code; Step S22: The obtained pixel coordinates of the corner points of any ArUco code, the actual size and the camera internal parameters are used as the input of the PnP algorithm, wherein the camera internal parameters include the focal length, the principal point and several distortion coefficients; Step S23: Output a first rotation and translation matrix from the first ArUco code to the camera space and a second rotation and translation matrix from the second ArUco code to the camera space using a PnP algorithm.

3. The method for collecting welding trajectories based on vision according to claim 1, characterized in that: The specific steps of step S31 are: Step S311: define the ArUco box geometric center coordinate system, wherein the ArUco box geometric center coordinate system takes the geometric center of the ArUco box as the origin, and the sides along the length, width, and height of the ArUco box are the X, Y, and Z coordinate axes of the ArUco box geometric center coordinate system respectively; Step S312: Calculate the rotation and translation matrix of any first identified ArUco code pose to the ArUco box geometric center coordinate system Step S313: Calculate the rotation and translation matrix of the ArUco box geometric center coordinate system to the camera coordinate system using the following formula: The calculation formula is: Where, It is represented as the first rotation and translation matrix of any recognized first ArUco code pose to the camera space; Step S314: performing consistency check on the positions of the multiple identified first ArUco codes and removing abnormal values; Step S315: according to the capture quality of the multiple identified first ArUco codes, set the confidence of the i-th first ArUco code, use the set confidence value to perform weighted fusion on the ArUco box pose data, and obtain the optimal pose of the geometric center of the ArUco box.

4. The method for collecting welding trajectories based on vision according to claim 1, characterized in that: The specific steps of step S32 are: Step S321: defining a global coordinate system of the reference ruler, wherein the global coordinate system of the reference ruler is defined with the center of any fixed second ArUco code on the reference ruler as the origin, and the length direction of the reference ruler is defined as the X axis, the width direction is defined as the Y axis, and the direction perpendicular to the plane of the reference ruler and upward is defined as the Z axis, thereby establishing the global coordinate system of the reference ruler; Step S322: define a second ArUco code local coordinate system, wherein any second ArUco code has a corresponding second ArUco code local coordinate system in the plane where it is located, and the second ArUco code local coordinate system takes the center of the second ArUco code as the origin, and the coordinate axis direction is aligned with the edge of the second ArUco code; Step S323: Record the coordinates (x j , 0,0), where the X-axis, Y-axis, and Z-axis of the global coordinate system of the reference ruler and the local coordinate system of any second ArUco code are aligned parallel; Step S324: For each captured j-th second ArUco code, calculate the rotation and translation matrix of its local coordinate system to the global coordinate system of the reference scale According to the geometric characteristics of the reference ruler, the transformation matrix of the j-th second ArUco code is transformed into the global coordinate system of the reference ruler for: Among them, L j is the distance from the center of the jth second ArUco code to the center of the global coordinate system of the reference scale; Step S325: Calculate the rotation and translation matrix of the global coordinate system of the reference ruler to the camera coordinate system using the following formula: The calculation formula is: Where, Expressed as the second rotation and translation matrix of the j-th second ArUco code to the camera space; Step S326: performing consistency check on the postures of the multiple identified second ArUco codes and removing abnormal values; Step S327: according to the capture quality of the multiple identified second ArUco codes, set the confidence of the j-th second ArUco code, use the set confidence value to perform weighted fusion on the reference scale pose data, and obtain the optimal transformation relationship of the reference scale global coordinate system.

5. The method for collecting welding trajectories based on vision according to claim 1, characterized in that: The specific steps of step S33 are: Step S331: Calculate and obtain the position of the welding gun in the camera coordinate system, that is, the rotation and translation matrix of the welding gun in the camera coordinate system Step S332: Use the following formula to transform the welding gun posture into the rotation and translation matrix of the global coordinate system of the reference scale: The calculation formula is: Step S333: Dynamically output the calculated results of the welding gun's posture in the global coordinate system of the reference scale for collection and analysis of the welding trajectory.

6. The method for collecting welding trajectories based on vision according to claim 3, characterized in that: The specific process of step S314 is as follows: Calculate and obtain the coordinates P of the first ArUco code identified by any method and transform it into the coordinate system of the geometric center of the ArUco box in the camera coordinate system. ArUco盒(i) and quaternion Q ArUco盒(i) ; Calculate the obtained coordinates P respectively ArUco盒(i) and quaternion Q ArUco盒(i) The mean and The calculation formula is: Wherein, N is the number of the first ArUco codes identified; Calculate the mean value of the first ArUco code to coordinates of the i-th The first displacement error d 1i , the calculation formula is: The quaternion Q ArUco盒(i) Convert to Euler angle E(r 2i ,p 2i ,y 2i ) ArUco盒 , the quaternion mean Convert to Euler angles Calculate the first rotation error ΔE of the i-th first ArUco code according to the conversion result 1i , the calculation formula is: Where Δr i =|r 1i -r 2i |,Δp i =|p 1i -p 2i |,Δy i =|y 1i -y 2i |; Thresholds for the first displacement error and the first rotation error are set respectively, and values ​​outside the set thresholds are screened out, that is, determined as abnormal values ​​and eliminated.

7. The method for collecting welding trajectories based on vision according to claim 4, characterized in that: The specific process of step S326 is: Calculate and obtain the coordinate P of the jth second ArUco code transformed into the global coordinate system of the reference scale in the camera coordinate system Global(j) and quaternion Q Global(j) ; Calculate the obtained coordinates P respectively Global(j) and quaternion Q Global(j) The mean and The calculation formula is: Where M is the number of recognized second ArUco codes; Calculate the jth second ArUco code to coordinate mean The second displacement error d 2j , the calculation formula is: The quaternion Q Global(j) Convert to Euler angle E(r 2j ,p 2j ,y 2j ) Global , the quaternion mean Convert to Euler angles Calculate the second rotation error ΔE of the j-th second ArUco code according to the conversion result 2j , the calculation formula is: Where Δr j =|r 1j -r 2j |,Δp j =|p 1j -p 2j |,Δy j =|y 1j -y 2j |; Thresholds for the second displacement error and the second rotation error are set respectively, and values ​​outside the set thresholds are screened out, that is, determined as abnormal values ​​and eliminated.

Citation Information

Patent Citations

  • Camera external parameter calibration method and system based on aruco code, terminal and medium

    CN111627075A

  • Industrial robot kinematics calibration method based on vision in large-size working space

    CN118322213A