Method for automatically testing welding seam positioning precision and accuracy of intelligent welding robot

By combining machine vision technology with 2D image recognition and 3D spatial pose estimation algorithms, along with a three-color light illumination signal recognition algorithm, an intelligent welding robot weld seam positioning accuracy and precision testing system is automatically constructed. This solves the problems of complexity, large error, and low efficiency in existing testing systems, and achieves efficient and accurate weld seam positioning testing.

CN119282526APending Publication Date: 2025-01-10JIANGSU JIZHI MARINE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411669944.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

Existing industrial robot end-effector positioning testing technologies suffer from problems such as complex mechanical-electrical structures, high sensor costs, poor testing system flexibility, the need for manual intervention, and large system errors, making it impossible to efficiently and accurately test the positioning accuracy and precision of welding robots.

Method used

By employing machine vision technology and 2D image recognition and 3D spatial pose estimation algorithms, combined with a three-color light illumination signal recognition algorithm, an automatic testing system is constructed. Through a 3D vision camera and QR code recognition algorithm, the system achieves automatic testing of weld positioning accuracy and precision, reducing errors introduced by manual intervention and mechanical-electrical-communication processes.

Benefits of technology

It enables automated testing of weld positioning accuracy and precision, rapidly collects large amounts of data, reduces testing costs, minimizes human error, improves testing efficiency and accuracy, and provides comprehensive test conclusions including mean values, distribution types, and confidence levels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119282526A_ABST
    Figure CN119282526A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic test method for welding seam positioning precision and accuracy of an intelligent welding robot, and the method comprises the steps: constructing an automatic test system which comprises a 3D visual camera, a three-color lamp, a one-dimensional truss and a two-dimensional code on a to-be-welded workpiece; a three-color lamp lighting monitoring area is established through a two-dimensional code recognition algorithm, and a welding gun and a to-be-welded component in a scene are captured; a three-color lamp lighting signal identification algorithm is adopted to capture the lighting moment of a specified color lamp from the HSV graph; based on an SVD plane estimation algorithm and a welding gun and welding seam starting point pose estimation algorithm, the welding gun position and the welding seam starting point position of the to-be-welded component are calculated; calculating a sample mean value and a standard deviation of positioning precision and accuracy indexes by adopting a welding seam positioning precision and accuracy statistical algorithm; and a test process overall control algorithm is adopted to realize automatic test of welding seam positioning precision and accuracy. According to the method, the in-place precision index of the welding seam stopping action can be automatically calculated, the index mean value, the statistical distribution type and the confidence coefficient are comprehensively described, and a test conclusion is directly given.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of intelligent welding, and in particular relates to an automatic testing method for the positioning precision and accuracy of a weld of an intelligent welding robot. Background Art

[0002] As the intelligent welding robot technology matures, there are a lot of welding work in the shipbuilding and large-scale complex equipment manufacturing industries. Using welding robots to replace manual welding has become an inevitable trend in the future development of technology. Due to the small production batch of such products and the different dimensions of each workpiece, it is impossible to use traditional automation methods such as manual teaching and offline programming for robot welding, which puts higher requirements on the intelligent weld recognition and positioning capabilities of welding robots. Weld positioning is the core function of intelligent welding robots. Positioning accuracy and precision are key performance indicators to measure the performance of this function. Testing the two indicators is an important task in the research and development of intelligent welding robots. This kind of testing work has high repeatability and low complexity, but it is labor-intensive and time-consuming. It requires a large amount of sample data and ensures that the conditions of each test are the same, without interference from random factors other than human or test objects. Therefore, it can only be carried out in an automated manner, which puts forward the need for the development of automated testing systems.

[0003] The existing industrial robot terminal positioning test technology mainly adopts the traditional mechanical-electrical form, and obtains positioning observation data through laser ranging sensors and proximity sensors arranged at different angles and directions. In practical applications, there are the following shortcomings:

[0004] 1) The mechanical and electrical structure of the test device is complex and the sensor is expensive;

[0005] 2) The test system has poor flexibility and requires a dedicated test environment for each robot and each test scenario, which results in a large workload for software and hardware development;

[0006] 3) Some test methods require manual intervention, or involve too much communication and signal processing between devices and instruments, which inevitably lead to systematic errors and accidental errors.

[0007] In order to overcome the shortcomings of the existing test system, the advantages of machine vision technology, such as flexibility, high efficiency and low requirements for surrounding hardware, can be combined with simple instruments to effectively measure the positioning data of the welding robot. An intelligent welding robot positioning precision and accuracy test system is developed with two-dimensional image recognition and three-dimensional spatial pose estimation algorithm as the core. It automatically completes the large-sample test data collection, recording and analysis work, avoids measurement errors introduced by manual intervention and excessive mechanical, electrical and communication elements, and reduces test costs while ensuring the efficiency, quality and stability of indicator tests. Summary of the invention

[0008] Purpose of the invention: The purpose of the present invention is to provide an automatic testing method for the weld positioning accuracy and precision of an intelligent welding robot, which can automatically calculate the accuracy index of the weld stop action, comprehensively characterize the index mean, statistical distribution type and confidence level, and directly give the test conclusion.

[0009] Technical solution: The automatic testing method for the positioning precision and accuracy of the weld of an intelligent welding robot described in the present invention specifically comprises the following steps:

[0010] (1) Build an automatic testing system, including a 3D vision camera, a three-color light, a one-dimensional truss, and a QR code on the workpiece to be welded;

[0011] (2) Use the QR code recognition algorithm to establish a three-color light monitoring area and capture the welding gun and the components to be welded in the scene;

[0012] (3) When each weld seam starting point positioning movement is completed, the three-color light lights up in a specified color, and the three-color light signal recognition algorithm is used to capture the moment when the specified color light lights up from the HSV map of the camera shooting screen;

[0013] (4) Based on the SVD plane estimation algorithm and the welding gun and weld starting point posture estimation algorithm, the welding gun position and the weld starting point position of the component to be welded are calculated;

[0014] (5) Use the weld positioning accuracy and precision statistical algorithm to calculate the sample mean and standard deviation of the positioning accuracy and precision indicators;

[0015] (6) The overall control algorithm of the test process is used to realize automatic testing of weld positioning precision and accuracy.

[0016] Furthermore, the implementation process of step (2) is as follows:

[0017] Convert the image captured by the 3D vision camera into a grayscale image; traverse each pixel in the grayscale image to determine whether it is a black pixel, and if so, extract the pixel; for each black pixel extracted, determine the colors of the 8 pixels around the pixel, and extract the pixels with more than or equal to 3 black pixels and more than or equal to 3 white pixels from the 8 pixels as candidate pixels for calculating the QR code border;

[0018] Traverse each candidate pixel point and determine whether there is a candidate pixel point among the 8 neighboring pixels around it; if there is, put the pixel point and the surrounding candidate pixels into a container representing the QR code; then determine whether there is a candidate pixel point among the 8 surrounding pixels of each surrounding candidate pixel point, if so, repeat this operation until the last pixel point has no neighboring candidate pixels around it, and the candidate pixels are collected at this time;

[0019] For each pixel container variable after aggregation, extract the pixel with the largest X coordinate and Y coordinate as the vertex of the QR code. Starting from the vertex, find the pixel adjacent to the white pixel among the surrounding black pixels as the edge pixel. Repeat this process until the initial vertex or the next vertex is found, and the complete border pixel of the QR code is obtained.

[0020] For a set of QR code border pixels, the internal pixel coordinates can be determined according to the border line pixel positions, and then the pixels with the same color as the eight surrounding pixels inside the border are taken out as candidate color block pixels;

[0021] For the candidate pixel points of the same color block, find the candidate pixel points of the surrounding adjacent color blocks, group them into a container, and complete the clustering of the same color block pixels. Take the average coordinate of each color block as the coordinate, and construct a matrix with the color of the color block white and black as 0 and 1 respectively; determine the number of the QR code based on the matrix readings 0 and 1.

[0022] Furthermore, the implementation process of the three-color light signal recognition algorithm in step (3) is as follows:

[0023] Create an image pixel matrix with the same pixel size as the camera image and an 8-bit unsigned integer data type; set the H and V values ​​for when the yellow light is on and off, and set the H and V values ​​for when the green light is on, for comparison with the color values ​​of the three-color light collected by the visual camera; traverse the QR codes recognized by the visual camera to find the QR code near the lit area. If no QR code is found, return the information that the light monitoring is not recognized to the user interface; for the QR code near the lit area, average the coordinates of the four vertices of the QR code to obtain the coordinates of the geometric midpoint of the QR code; calculate the coordinate difference between the vertices 0 and 1 of the QR code, square the sum of the coordinate differences and take the square root, and obtain the length of the line segment between the two vertices. A rectangular frame is constructed with the length of the line segment as the short side and twice the length of the line segment as the long side, with the center of the rectangular frame located at a certain distance below the center point of the QR code; each pixel in the rectangular frame is traversed to obtain the HSV information of the pixel; it is determined whether the H value of the pixel is within the H value range of the light color to be identified; if it is within the range, it is further determined whether the V value of the pixel is within the V value range of the light color to be identified; if the H value and V value of the pixel are both within the H value and V value of the light color to be identified, the coordinates of the pixel are recorded; the number of pixels consistent with the light color to be identified is counted, divided by the total number of pixels in the rectangular frame, and the ratio is compared with the threshold. When the threshold is exceeded, the light-on moment is identified.

[0024] Furthermore, the SVD plane estimation algorithm implementation process in step (4) is as follows:

[0025] Take a set of pixel point clouds on the QR code of the welding component, the number is n; calculate the coordinates p of n points in the point cloud i (x i ,y i ,z i ) For each point i in the point cloud, calculate its coordinates p i With the average coordinate The difference between Construct an n×3 matrix A, where the i-th row element is the vector q i The three coordinates of the matrix A; transpose A T Multiply it with matrix A to get n×n square matrix A T A, calculate the eigenvalues ​​and eigenvectors of the matrix; take A T The eigenvector t(a, b, c) corresponding to the minimum eigenvalue of matrix A is used as the normal vector of the estimated plane; the plane equation d is The plane estimation equation is ax+by+cz+d=0.

[0026] Furthermore, the welding gun and weld starting point posture estimation algorithm implementation process in step (4) is as follows:

[0027] Capture the workpiece to be welded from the QR code recognized by the camera; call the plane estimation program to calculate the plane where the QR code is located, and orthogonally project the upper left corner vertex, lower left corner vertex, and upper right corner vertex of the QR code into the estimated plane; use the projection point of the upper left corner vertex of the QR code as the origin, the projection point of the upper right corner vertex, and the projection point of the lower left corner vertex as the vertices in the X-axis and Y-axis directions to establish the local coordinate system posture, and calculate the space transformation matrix through the rigid body Euclidean space transformation principle; calculate the spatial coordinates of the starting point of the weld according to the known relative position relationship between the QR code and the starting point of the weld of the workpiece to be welded; When the three-color light is on, identify the welding gun QR code in the camera screen, call the plane estimation program, project the QR code vertices onto the estimated plane, and use the same method to calculate the QR code local coordinate system and space transformation matrix; calculate the spatial coordinates of the welding gun position through the known relative position relationship between the QR code and the welding gun; repeat the above process multiple times independently, record the welding gun position information each time the light is on, for statistical analysis of positioning accuracy; create a second data recording file, write the welding gun position information and weld starting point position information of each process, for statistical analysis of weld positioning accuracy.

[0028] Furthermore, the implementation process of step (5) is as follows:

[0029] Read the welding gun position when the three-color light is on in each experiment; count the number of samples, find the average of all welding gun position information, and get the sample expectation; calculate the sum of the squares of the differences between the positions of all sample points and the sample expectation, take the square root of the average value to get the sample standard deviation; use the normal distribution method to calculate the confidence interval, and use this value as the weld positioning accuracy indicator; draw a histogram, the origin of the horizontal axis represents the welding gun position expectation when the three-color light is on, and the horizontal axis value is the distance deviation between the sample point and the expectation, divide it into several deviation intervals at equal intervals, and count the number of sample points falling into each deviation interval on the vertical axis, and intuitively display the weld positioning accuracy through the histogram; read the three-color light in each experiment The welding gun position and the weld starting point position when the light is on; calculate the distance difference between the two positions, and further calculate the mean of the distance interpolation of all sample points as the statistical expectation of the weld positioning accuracy; subtract the expectation from the distance difference of all sample points, calculate the mean square error and then take the square root to get the sample standard deviation; use the normal distribution method to calculate the confidence interval, and use this value as the weld positioning accuracy indicator; draw a histogram, the origin of the horizontal axis represents the positioning accuracy expectation, the horizontal axis value is the distance deviation between the sample point and the expectation, divide it into several deviation intervals at equal intervals, and the vertical axis counts the number of sample points falling into each deviation interval, and the weld positioning accuracy is intuitively displayed through the histogram.

[0030] Furthermore, the implementation process of step (6) is as follows:

[0031] S1: Test system startup and initialization; set the number of tests n;

[0032] S2: Perform the i-th test according to the following process:

[0033] The weld start point recognition sensor is activated to identify the weld start point; the one-dimensional truss moves toward the welding component according to the weld start point recognition result and stops at the weld start point recognized by the sensor; after the one-dimensional truss stops moving, the three-color light turns on; the 3D vision camera recognizes the light signal, identifies the welding gun and the welding workpiece from the camera image, and calls the corresponding algorithm to calculate the coordinate positions of the two as the test result and saves them; the one-dimensional truss is reset to the start point, and the single test ends;

[0034] S3: Repeat the test n times; after the n tests are completed, call the statistical analysis algorithm of the weld positioning precision and accuracy index to calculate the mean and variance of the two performance indicators.

[0035] Furthermore, the confidence interval range is 95% of 3σ.

[0036] Beneficial effects: Compared with the prior art, the present invention has the following beneficial effects: the present invention can coordinately control the welding device and the measuring instrument, orderly drive the execution of the weld stop function, the measurement of the weld starting point accuracy, data transmission and storage, the device reset and the next test work cycle, quickly collect a large amount of measurement sample data, and overcome the shortcomings of the existing measurement methods, such as cumbersome steps, low efficiency, and errors introduced by manual operation; the present invention uses machine vision to measure the execution accuracy of the weld stop function, quickly obtains the 3D posture of each stop of the welding device, and automatically calculates the in-place accuracy index of the weld stop action in combination with the 3D posture data of the welded workpiece in the virtual space. After the entire test process is completed, statistical analysis is carried out on the test data set to comprehensively characterize the indicator mean, statistical distribution type and confidence level, and directly give the test conclusion. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A schematic diagram of the automatic testing system proposed by the present invention;

[0038] Figure 2 Paste the Aruco QR code location;

[0039] Figure 3 The welding gun stops at the starting point of the weld.

[0040] Among them: 1- 3D vision camera of perception system, 2- perception system fixed bracket, 3- test workbench, 4- weld positioning device, 5- welding gun device, 6- three-color light, 7- one-dimensional test platform, 8- welding workpiece, 9- central computing platform, 10- industrial control system electrical cabinet, 11- welding gun, 12- QR code on welding workpiece, 13- one-dimensional truss motor, 14- one-dimensional truss lead screw, 15- welding gun QR code, 16- one-dimensional truss moving platform, 17- weld starting point, 18- QR code on the three-color light. DETAILED DESCRIPTION

[0041] The present invention is further described in detail below based on the accompanying drawings.

[0042] The present invention provides an automatic testing method for the positioning precision and accuracy of a weld of an intelligent welding robot, which specifically comprises the following steps:

[0043] Step 1: Build Figure 1 , Figure 2 , Figure 3 The automatic testing system shown includes a 3D vision camera of a perception system, a fixed bracket of a perception system, a test workbench, a weld positioning device, a welding gun device, a three-color light, a one-dimensional testing platform, a welding workpiece, a central computing platform, an industrial control system, a welding gun, a QR code on the welding workpiece, a one-dimensional truss motor, a one-dimensional truss lead screw, a welding gun QR code, a one-dimensional truss moving platform, and a weld starting point.

[0044] The industrial control system notifies the central computing platform to start and run the test program for the weld starting point identification accuracy; the industrial control system notifies the welding gun device to work and the weld starting point identification function is started; the industrial control system notifies the one-dimensional mobile test platform to start moving; the central computing platform and the industrial control system start working in a cycle, with a typical cycle frequency of 30Hz. The welding gun device obtains working status information, namely, whether the welding seam starting point has been reached; the welding gun device sends the working status information to the industrial control system; the industrial control system makes a judgment, and if the status information of the welding device is "reaching the welding seam starting point", the industrial control system notifies the one-dimensional mobile test platform to stop moving; notifies the central computing platform to start calculating the accuracy of the welding seam starting point recognition; the central computing platform notifies the perception system, and the 3D vision camera performs the shooting work; the 3D vision camera of the perception system obtains 2D pictures and 3D point clouds; the perception system sends the 2D pictures and 3D point clouds to the central computing platform; the central computing platform completes the recognition of the welding device; the central computing platform completes the positioning of the welding gun, and obtains the 3D coordinates and 3D posture of the welding gun; the central computing platform completes the recognition and positioning of the welding workpiece; and obtains the 3D coordinates and 3D posture of the welding component; the central computing platform completes the positioning of the weld, and obtains the 3D coordinates and 3D posture of the weld; the central computing platform uses the 3D coordinates and 3D posture of the weld, and the 3D coordinates and 3D posture of the welding gun to calculate the accuracy of the welding seam starting point recognition, and records the calculation results.

[0045] Step 2: Use the QR code recognition algorithm to establish a three-color light monitoring area to capture the welding gun and components to be welded in the scene.

[0046] Convert the image captured by the 3D vision camera into a grayscale image; traverse each pixel in the grayscale image to determine whether it is a black pixel. If so, extract the pixel; for each black pixel extracted, determine the color of the 8 pixels around the pixel, and extract the pixels with more than or equal to 3 black pixels and more than or equal to 3 white pixels among the 8 pixels as candidate pixels for calculating the QR code border. Traverse each candidate pixel to determine whether there is a candidate pixel among the 8 neighboring pixels. If so, put the pixel and the surrounding candidate pixels into a container representing the QR code, and then determine whether there is a candidate pixel among the 8 surrounding pixels. If so, repeat this operation until the last pixel has no neighboring candidate pixels around it, and the collection of candidate pixels is completed.

[0047] For each pixel container variable after aggregation, extract the pixel with the largest X and Y coordinates as the vertex of the QR code. Starting from the vertex, find the pixel adjacent to the white pixel among the surrounding black pixels as the edge pixel. Repeat this process until the initial vertex or the next vertex is found to obtain the complete border pixel of the QR code.

[0048] For a set of QR code border pixels, the internal pixel coordinates can be determined based on the border line pixel positions, and then the pixels inside the border with the same color as the 8 surrounding pixels are taken out as candidate pixels for the color block.

[0049] For the candidate pixels of the same color block, find the candidate pixels of the neighboring color blocks and group them into a container to complete the clustering of the same color block pixels. Take the average coordinate of each color block as the coordinate, and construct a matrix with the color of the color block as 0 and 1 respectively. According to the matrix 0 and 1 readings, determine the number of the QR code.

[0050] Step 3: Use the three-color light signal recognition algorithm to capture the moment when the specified color light is turned on from the HSV image of the camera shooting picture.

[0051] Create an image pixel matrix with the same pixel size as the camera image and an 8-bit unsigned integer data type; set the H and V values ​​for when the yellow light is on and when it is not, and set the H and V values ​​for when the green light is on, for comparison with the color values ​​of the three-color light collected by the visual camera; traverse the QR codes recognized by the visual camera to find the QR code near the lit area. If no QR code is found, return the information that the lit monitoring area is not recognized to the user interface; for the QR code corresponding to the light-on moment, average the coordinates of the four vertices of the QR code to obtain the coordinates of the geometric center point of the QR code; calculate the coordinate difference between the vertices 0 and 1 of the QR code, square the sum of the coordinate differences and take the square root to obtain the length of the line segment between the two vertices. , construct a rectangular frame with the length of the line segment as the short side and twice the length of the line segment as the long side, and the center of the rectangular frame is located at a certain distance below the center point of the QR code; traverse each pixel in the rectangular frame to obtain the HSV information of the pixel; determine whether the H value of the pixel is within the H value range of the light color to be identified. If it is within the range, further determine whether the V value of the pixel is within the V value range of the light color to be identified. If the H value and V value of the pixel are both within the H value and V value of the light color to be identified, then record the coordinates of the pixel; count the number of pixels that are consistent with the light color to be identified, divide it by the total number of pixels in the rectangular frame, and compare the ratio with the threshold. When it exceeds the threshold, the light-on moment is identified.

[0052] Step 4: Based on the SVD plane estimation algorithm and the welding gun and weld starting point posture estimation algorithm, calculate the welding gun position and the weld starting point position of the component to be welded.

[0053] Take a set of pixel point clouds on the QR code of the welding component, the number n>50; calculate the coordinates p of n points in the point cloud i (x i ,y i ,z i ) For each point i in the point cloud, calculate its coordinates p i With the average coordinate The difference between Construct an n×3 matrix A, where the i-th row element is the vector q i The three coordinates of the matrix A; transpose A T Multiply it with matrix A to get n×n square matrix A T A, calculate the eigenvalues ​​and eigenvectors of the matrix; take A T The eigenvector t(a, b, c) corresponding to the minimum eigenvalue of matrix A is used as the normal vector of the estimated plane; the plane equation d is The plane estimation equation is ax+by+cz+d=0.

[0054] Capture the workpiece to be welded from the QR code recognized by the camera; call the plane estimation program to calculate the plane where the QR code is located. Orthogonally project the upper left corner vertex, lower left corner vertex, and upper right corner vertex of the QR code into the estimated plane; take the projection point of the upper left corner vertex of the QR code as the origin, the projection point of the upper right corner vertex, and the projection point of the lower left corner vertex as the vertices in the X and Y axis directions to establish the local coordinate system posture, and calculate the space transformation matrix through the rigid body Euclidean space transformation principle. According to the known relative position relationship between the QR code and the starting point of the weld of the workpiece to be welded, calculate the spatial coordinates of the starting point of the weld; when the three-color light is on, identify the welding gun QR code in the camera screen, call the plane estimation program, project the QR code vertex to the estimated plane, and calculate the local coordinate system and space transformation matrix of the QR code in the same way; calculate the spatial coordinates of the welding gun position through the known relative position relationship between the QR code and the welding gun. Conduct multiple independent repeated experiments, record the welding gun position information at each light-on moment, and use it for positioning accuracy statistical analysis. Create a second data recording file to write the welding gun position information and weld starting point position information for each experiment for statistical analysis of weld positioning accuracy.

[0055] Step 5: Use the weld positioning accuracy and precision statistical algorithm to calculate the sample mean and standard deviation of the positioning accuracy and precision indicators.

[0056] Read the welding gun position when the three-color light is on in each experiment; count the number of samples, average all welding gun position information, and get the sample expectation. Calculate the sum of the squares of the differences between the positions of all sample points and the sample expectation, take the square root of the average value to get the sample standard deviation. Use the normal distribution method to calculate the 3σ range with a confidence interval of 95%, and use this value as the weld positioning accuracy indicator. Draw a histogram, the origin of the horizontal axis represents the welding gun position expectation when the three-color light is on, the horizontal axis value is the distance deviation between the sample point and the expectation, divide it into several deviation intervals at equal intervals, and count the number of sample points falling into each deviation interval on the vertical axis. The weld positioning accuracy is intuitively displayed through the histogram. Read the welding gun position and the weld starting point position when the three-color light is on in each experiment; calculate the distance difference between the two positions, and further calculate the mean of the distance interpolation of all sample points as the statistical expectation of the weld positioning accuracy. Subtract the expectation from the distance difference of all sample points, calculate the mean square error, and then take the square root to get the sample standard deviation. The normal distribution method is used to calculate the 3σ range with a confidence interval of 95%, and this value is used as the weld positioning accuracy indicator. A histogram is drawn, the origin of the horizontal axis represents the expected positioning accuracy, the horizontal axis value is the distance deviation between the sample point and the expectation, and several deviation intervals are divided at equal intervals. The vertical axis counts the number of sample points falling into each deviation interval, and the histogram intuitively displays the weld positioning accuracy.

[0057] Step 6: Use the overall control algorithm of the test process to realize automatic testing of weld positioning precision and accuracy.

[0058] S1: Test system startup and initialization; set the number of tests n.

[0059] S2: Perform the i-th test according to the following process:

[0060] The weld starting point recognition sensor is activated to identify the weld starting point; the one-dimensional truss moves toward the welding component according to the weld starting point recognition result and stops at the weld starting point recognized by the sensor; after the one-dimensional truss stops moving, the three-color light turns on; the 3D vision camera recognizes the light signal, identifies the welding gun and welding workpiece from the camera image, and calls the corresponding algorithm to calculate the coordinate positions of the two as the test result and saves them; the one-dimensional truss resets to the starting point, and the single test ends.

[0061] S3: Repeat the test n times; after the n tests are completed, call the statistical analysis algorithm of the weld positioning precision and accuracy index to calculate the mean and variance of the two performance indicators.

[0062] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be considered as the scope of protection of the present invention.

Claims

1. An automatic testing method for the positioning precision and accuracy of weld seams of an intelligent welding robot, characterized in that: The following steps are involved: (1) Build an automatic testing system, including a 3D vision camera, a three-color light, a one-dimensional truss, and a QR code on the workpiece to be welded; (2) Use the QR code recognition algorithm to establish a three-color light monitoring area and capture the welding gun and the components to be welded in the scene; (3) When each weld seam starting point positioning movement is completed, the three-color light lights up in a specified color, and the three-color light signal recognition algorithm is used to capture the moment when the color light lights up from the HSV map of the camera shooting screen; (4) Based on the SVD plane estimation algorithm and the welding gun and weld starting point posture estimation algorithm, the welding gun position and the weld starting point position of the component to be welded are calculated; (5) Use the weld positioning accuracy and precision statistical algorithm to calculate the sample mean and standard deviation of the positioning accuracy and precision indicators; (6) The overall control algorithm of the test process is used to realize automatic testing of weld positioning precision and accuracy.

2. The automatic testing method for the positioning precision and accuracy of the weld of an intelligent welding robot according to claim 1 is characterized in that: The implementation process of step (2) is as follows: Convert the image captured by the 3D vision camera into a grayscale image; traverse each pixel in the grayscale image to determine whether it is a black pixel, and if so, extract the pixel; for each black pixel extracted, determine the colors of the 8 pixels around the pixel, and extract the pixels with more than or equal to 3 black pixels and more than or equal to 3 white pixels from the 8 pixels as candidate pixels for calculating the QR code border; Traverse each candidate pixel point and determine whether there is a candidate pixel point among the 8 neighboring pixels around it; if there is, put the pixel point and the surrounding candidate pixels into a container representing the QR code; then determine whether there is a candidate pixel point among the 8 surrounding pixels of each surrounding candidate pixel point, if so, repeat this operation until the last pixel point has no neighboring candidate pixels around it, and the candidate pixels are collected at this time; For each pixel container variable after aggregation, extract the pixel with the largest X coordinate and Y coordinate as the vertex of the QR code. Starting from the vertex, find the pixel adjacent to the white pixel among the surrounding black pixels as the edge pixel. Repeat this process until the initial vertex or the next vertex is found, and the complete border pixel of the QR code is obtained. For a set of QR code border pixels, the internal pixel coordinates can be determined according to the border line pixel positions, and then the pixels with the same color as the eight surrounding pixels inside the border are taken out as candidate color block pixels; For the candidate pixel points of the same color block, find the candidate pixel points of the surrounding adjacent color blocks, group them into a container, and complete the clustering of the same color block pixels. Take the average coordinate of each color block as the coordinate, and construct a matrix with the color of the color block white and black as 0 and 1 respectively; determine the number of the QR code based on the matrix readings 0 and 1.

3. The automatic testing method for the positioning precision and accuracy of the weld of an intelligent welding robot according to claim 1 is characterized in that: The implementation process of the three-color light signal recognition algorithm in step (3) is as follows: Create an image pixel matrix with the same pixel size as the camera image and an 8-bit unsigned integer data type; set the H and V values ​​for when the yellow light is on and off, and set the H and V values ​​for when the green light is on, for comparison with the color values ​​of the three-color light collected by the visual camera; traverse the QR codes recognized by the visual camera to find the QR code near the lit area. If no QR code is found, return the information that the lit monitoring area is not recognized to the user interface; for the QR code near the lit area, average the coordinates of the four vertices of the QR code to obtain the coordinates of the QR code geometric point; calculate the coordinates of the QR code vertex 0 and vertex 1 Coordinate difference, calculate the square sum and square root of the coordinate difference to get the length of the line segment between the two vertices, construct a rectangular frame with the length of the line segment as the short side and twice the length of the line segment as the long side, and the center of the rectangular frame is located at a certain distance below the center point of the QR code; traverse each pixel point in the rectangular frame to obtain the HSV information of the pixel point; determine whether the H value of the pixel point is within the H value range of the light color to be identified, if it is within the range, further determine whether the V value of the pixel point is within the V value range of the light color to be identified, if the H value and V value of the pixel point are both within the H value and V value of the light color to be identified, then record the coordinates of the pixel point; Count the number of pixels that match the color of the light to be identified, divide it by the total number of pixels in the rectangular frame, and compare the ratio with the threshold. When it exceeds the threshold, the light is identified.

4. The method for automatically testing the weld positioning precision and accuracy of an intelligent welding robot according to claim 1, characterized in that: The implementation process of the SVD plane estimation algorithm in step (4) is as follows: Take a set of pixel point clouds on the QR code of the welding component, the number is n; calculate the coordinates p of n points in the point cloud i (x i ,y i ,z i ) For each point i in the point cloud, calculate its coordinates p i With the average coordinate The difference between Construct an n×3 matrix A, where the i-th row element is the vector q i The three coordinates of the matrix A; transpose A T Multiply it with matrix A to get n×n square matrix A T A, calculate the eigenvalues ​​and eigenvectors of the matrix; take A T The eigenvector t(a, b, c) corresponding to the minimum eigenvalue of matrix A is used as the normal vector of the estimated plane; the plane equation d is The plane estimation equation is ax+by+cz+d=0.

5. The automatic testing method for weld positioning precision and accuracy of an intelligent welding robot according to claim 1 is characterized in that: The implementation process of the welding gun and weld starting point posture estimation algorithm in step (4) is as follows: Capture the workpiece to be welded from the QR code recognized by the camera; call the plane estimation program to calculate the plane where the QR code is located, and orthogonally project the upper left corner vertex, lower left corner vertex, and upper right corner vertex of the QR code into the estimated plane; use the projection point of the upper left corner vertex of the QR code as the origin, the projection point of the upper right corner vertex, and the projection point of the lower left corner vertex as the vertices in the X-axis and Y-axis directions to establish the local coordinate system posture, and calculate the space transformation matrix through the rigid body Euclidean space transformation principle; calculate the spatial coordinates of the starting point of the weld according to the known relative position relationship between the QR code and the starting point of the weld of the workpiece to be welded; When the three-color light is on, identify the welding gun QR code in the camera screen, call the plane estimation program, project the QR code vertices onto the estimated plane, and use the same method to calculate the QR code local coordinate system and space transformation matrix; calculate the spatial coordinates of the welding gun position through the known relative position relationship between the QR code and the welding gun; repeat the above process multiple times independently, record the welding gun position information each time the light is on, for statistical analysis of positioning accuracy; create a second data recording file, write the welding gun position information and weld starting point position information of each process, for statistical analysis of weld positioning accuracy.

6. The method for automatically testing the weld positioning precision and accuracy of an intelligent welding robot according to claim 1, characterized in that: The implementation process of step (5) is as follows: Read the welding gun position when the three-color light is on in each experiment; count the number of samples, find the average of all welding gun position information, and get the sample expectation; calculate the sum of the squares of the differences between the positions of all sample points and the sample expectation, take the square root of the average value to get the sample standard deviation; use the normal distribution method to calculate the confidence interval, and use this value as the weld positioning accuracy indicator; draw a histogram, the origin of the horizontal axis represents the welding gun position expectation when the three-color light is on, and the horizontal axis value is the distance deviation between the sample point and the expectation, divide it into several deviation intervals at equal intervals, and count the number of sample points falling into each deviation interval on the vertical axis, and intuitively display the weld positioning accuracy through the histogram; read the three-color light in each experiment The welding gun position and the weld starting point position when the light is on; calculate the distance difference between the two positions, and further calculate the mean of the distance interpolation of all sample points as the statistical expectation of the weld positioning accuracy; subtract the expectation from the distance difference of all sample points, calculate the mean square error and then take the square root to get the sample standard deviation; use the normal distribution method to calculate the confidence interval, and use this value as the weld positioning accuracy indicator; draw a histogram, the origin of the horizontal axis represents the positioning accuracy expectation, the horizontal axis value is the distance deviation between the sample point and the expectation, divide it into several deviation intervals at equal intervals, and the vertical axis counts the number of sample points falling into each deviation interval, and the weld positioning accuracy is intuitively displayed through the histogram.

7. The method for automatically testing the weld positioning precision and accuracy of an intelligent welding robot according to claim 1, characterized in that: The implementation process of step (6) is as follows: S1: Test system startup and initialization; set the number of tests n; S2: Perform the i-th test according to the following process: The weld seam starting point recognition sensor is activated to recognize the weld seam starting point; The one-dimensional truss moves toward the welding component according to the weld starting point recognition result and stops at the weld starting point recognized by the sensor; after the one-dimensional truss stops moving, the three-color light turns on; The 3D vision camera recognizes the light signal, identifies the welding gun and welding workpiece from the camera image, and calls the corresponding algorithm to calculate the coordinate positions of the two as the test result and saves them; the one-dimensional truss is reset to the starting point, and the single test ends; S3: Repeat the test n times; after the n tests are completed, call the statistical analysis algorithm of the weld positioning precision and accuracy index to calculate the mean and variance of the two performance indicators.

8. The method for automatically testing the weld positioning precision and accuracy of an intelligent welding robot according to claim 6, characterized in that: The confidence interval range is 95% 3σ.