A Robot Weld Seam Recognition Method and System Based on Area Array Structured Light

Through the method based on surface array structured light, the workpiece point cloud data is obtained, noise removal and plane fitting are performed, weld feature points are identified, and weld linear equations are fitted, which solves the problem of insufficient weld recognition accuracy and real-time performance in the prior art, and high-precision and rapid weld recognition are achieved.

CN116604212BActive Publication Date: 2025-07-25NANJING INST OF TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310518561.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-10
Publication Date
2025-07-25
Estimated Expiration
2043-05-10

AI Technical Summary

Technical Problem

The prior art is difficult to achieve high-precision and real-time weld recognition in harsh welding environments. Traditional methods are affected by arc light and noise, resulting in a decrease in welding quality and efficiency.

Method used

The method based on surface array structured light is adopted to obtain point cloud data on the surface of the workpiece, delete noise, perform plane fitting and distance calculations, identify weld feature points, fit weld linear equations, and obtain weld trajectory.

Benefits of technology

It improves the accuracy and speed of weld recognition, and can achieve real-time weld tracking in harsh environments, improving welding quality and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116604212B_ABST
    Figure CN116604212B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for robot weld seam recognition based on area structured light. The method includes obtaining a first point cloud of the workpiece surface; removing the noise of the first point cloud to obtain a second point cloud; performing plane fitting on the points in the second point cloud to obtain the best fitting plane; removing the points included in the best fitting plane in the second point cloud to obtain a third point cloud; calculating the distances from the points in the third point cloud to the best fitting plane to obtain a first distance; determining the points corresponding to the first distance greater than the distance threshold as weld seam feature points to obtain a weld seam feature point set; performing line fitting on the weld seam feature point set to obtain the target weld seam line equation; using the point with the smallest coordinate value and the largest point as the starting point and the ending point of the target weld seam to obtain the target weld seam trajectory. The present invention can discover local outliers at any point and remove the outliers, and find the contour for each point in its local neighborhood, solving the problem that the traditional plane fitting algorithm cannot meet the requirements of real-time weld seam tracking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of robot weld recognition, and in particular relates to a robot weld recognition method and system based on area array structured light. Background Art

[0002] Welding technology is an important achievement in the process of human industrialization and is widely used in industrial manufacturing, infrastructure construction, aerospace and other fields. With the development of computer and robotics technology, welding robots are gradually replacing traditional manual welding and can perform high-intensity work in harsh environments. Today, machine vision technology is developing rapidly, and a variety of sensors for robot welding have appeared on the market, especially visual sensors, which have the characteristics of large amount of information, non-contact and strong flexibility. Combining visual systems with welding robots will be the future development trend. At present, most of the applications of visual sensors in the field of welding are to process welds through two-dimensional images. This method is easily affected by strong arc light and arc noise in the process of determining the welding position, making it difficult to accurately and quickly locate the weld area, which directly affects the quality and efficiency of welding. However, the use of structured light cameras can obtain point cloud data of the workpiece, which includes high-precision three-dimensional information on the surface of the workpiece. Therefore, studying the combination of point cloud data obtained by structured light sensors with robot welding is an important research direction for the development of intelligent welding robots in my country.

[0003] Application number 202210361871.0, patent name is A method for weld identification and robot weld tracking based on 3D point cloud. It proposes to use straight-through filtering, voxel filtering and statistical filtering to remove noise, segment the workpiece point cloud with the help of Euclidean clustering algorithm, segment the two faces of the weldment with the RANSAC algorithm, use KD-tree to search for the overlapping part of the two plane point clouds, that is, the weld point cloud, and use the DH parameter method to perform robot kinematic modeling and weld tracking. However, the RANSAC algorithm requires a large number of iterations and takes a long time to calculate, and often cannot meet the needs of real-time weld tracking during high-speed welding. In addition, classic methods such as least squares method and principal component analysis method are better for weld identification in welding environments with good lighting and low processing accuracy requirements. However, there are still deficiencies in weld identification in harsh environments with high processing accuracy requirements, high noise and strong arc light, which makes it difficult to meet the requirements for welding weld accuracy and speed in actual welding processes, resulting in a decrease in welding quality. Summary of the invention

[0004] In view of the deficiencies in the prior art, the present invention provides a robot weld recognition method and system based on area array structured light.

[0005] In a first aspect, the present invention provides a robot weld recognition method based on area array structured light, comprising:

[0006] Obtain the first point cloud of the workpiece surface;

[0007] Remove the noise of the first point cloud to obtain the second point cloud;

[0008] Perform plane fitting on the points in the second point cloud to obtain the best fitting plane;

[0009] Remove the points included in the best fitting plane in the second point cloud to obtain the third point cloud;

[0010] Calculate the distance from the points in the third point cloud to the best fitting plane to obtain the first distance;

[0011] Determine the points corresponding to the first distance greater than the distance threshold as the weld feature points to obtain the weld feature point set;

[0012] Perform line fitting on the weld feature point set to obtain the linear equation of the target weld;

[0013] Place the linear equation of the target weld in the robot base coordinate system, obtain the point with the minimum coordinate value and the maximum coordinate value on the X axis of the robot base coordinate system, and use the point with the minimum coordinate value and the maximum coordinate value as the starting point and the ending point of the target weld to obtain the trajectory of the target weld.

[0014] Further, the performing plane fitting on the points in the second point cloud to obtain the best fitting plane includes:

[0015] S301, Let G = 1, G is the number of iterations, and create a new list S(λ);

[0016] S302, Use the nearest neighbor search method to obtain multiple points closest to the target point in the second point cloud as the local neighborhood of the target point in the second point cloud;

[0017] S303, Randomly select multiple points from the local neighborhood to form the first subset;

[0018] S304, Calculate the rank of the first subset;

[0019] S305, Determine whether the rank of the first subset is equal to the rank threshold;

[0020] S306, If it is equal to the rank threshold, perform plane fitting on the first subset using the principal component analysis method to obtain the minimum eigenvalue of the fitting plane;

[0021] S307, If it is not equal to the rank threshold, select another point from the local neighborhood and add it to the first subset, and return to execute the operation of step S304;

[0022] S308, In the case where the rank is equal to the rank threshold, calculate the orthogonal distance from all points in the local neighborhood to the fitting plane;

[0023] S309. Ascendingly sort the orthogonal distances, select the points corresponding to multiple orthogonal distances with higher rankings to form a second subset, and store the minimum eigenvalue and the corresponding second subset in the list S(λ).

[0024] S310. Determine whether the number of iterations from step S303 to step S309 is greater than the iteration threshold.

[0025] S311. If it is not greater than the iteration threshold, then G = G + 1, and return to execute the operation in step S303.

[0026] S312. If it is greater than the iteration threshold, then use the second subset corresponding to the minimum value of all minimum eigenvalues in the list S(λ) as the local neighborhood point set.

[0027] S313. In the case of being greater than the iteration threshold, calculate the robust Mahalanobis distance between the target point in the second point cloud and the local neighborhood point set.

[0028] S314. Determine whether the robust Mahalanobis distance is greater than the robust Mahalanobis distance threshold.

[0029] S315. If it is greater than the robust Mahalanobis distance threshold, then delete the target point in the second point cloud.

[0030] S316. If it is not greater than the robust Mahalanobis distance threshold, then use the set of target points in the second point cloud as the fourth point cloud.

[0031] S317. Use the principal component analysis method to perform plane fitting on the fourth point cloud to obtain the best fitting plane in the robot base coordinate system.

[0032] Further, determining the points corresponding to the first distance greater than the distance threshold as weld feature points to obtain a weld feature point set includes:

[0033] Determine whether the first distance is greater than the distance threshold.

[0034] If it is not greater than the distance threshold, then delete the points in the third point cloud corresponding to the first distance.

[0035] If it is greater than the distance threshold, then determine the points in the third point cloud corresponding to the first distance as weld feature points to obtain a weld feature point set.

[0036] Further, performing linear fitting on the weld feature point set to obtain the linear equation of the target weld includes:

[0037] Calculate the weight α of each point in the weld feature point set according to the following formula r :[[]]

[0038]

[0039] Among them, σ r is the position accuracy of the coordinate component of the r-th point in the weld feature point set;

[0040] The straight-line equation of the target weld is constructed as:

[0041]

[0042] Among them, (x, y, z) are the coordinates of the points on the best-fitting plane in the robot base coordinate system; a, b, and c are the direction vectors along the X, Y, and Z axes of the robot base coordinate system respectively, and a 2 + b 2 + c 2 = 1; (x0, y0, z0) are the weighted centroid coordinates of the weld feature point set in the robot base coordinate system; R is the total number of points in the weld feature point set; the coordinate components x r , y r and z r of the r-th point in the weld feature point set are independent of each other and have the same position accuracy σ r ;

[0043] Construct the normal distance D r squared expression of the straight line between the r-th point in the weld feature point set and the target weld:

[0044]

[0045] Among them,

[0046] Construct the target optimization function Ω:

[0047]

[0048] Construct the Lagrangian function K, and use the method of Lagrange multipliers to solve the direction vector components a, b, c, and the Lagrange multiplier w:

[0049]

[0050] Furthermore, placing the straight-line equation of the target weld in the robot base coordinate system, obtaining the point with the minimum coordinate value and the maximum coordinate value on the X axis of the robot base coordinate system, and using the point with the minimum coordinate value and the maximum coordinate value as the starting point and the ending point of the target weld, to obtain the trajectory of the target weld, includes:

[0051] Obtaining the points with the minimum and maximum X coordinates of the fitted weld through projection respectively as the starting point and the ending point of the target weld; let the coordinates of the starting point and the ending point be (xs , y s , z s ), and (x e , y e , z e ); Let the number of welding points be l, the welding step be t, and the components of the welding step along the X-axis, Y-axis, and Z-axis in the robot base coordinate system be t x , t y , and t z , and the weld seam trajectory is obtained as:

[0052]

[0053] X Γ+1 , Y Γ+1 , and Z Γ+1 represent the coordinates of each welding point on the X-axis, Y-axis, and Z-axis of the robot base coordinate system; Г is the serial number of the welding point.

[0054] In the second aspect, the present invention provides a robot weld seam recognition system based on a planar structured light, including:

[0055] A point cloud acquisition module for acquiring a first point cloud on the surface of the workpiece;

[0056] A noise deletion module for deleting the noise of the first point cloud to obtain a second point cloud;

[0057] A plane fitting module for performing plane fitting on the points in the second point cloud to obtain an optimal fitting plane;

[0058] A point deletion module for deleting the points included in the optimal fitting plane in the second point cloud to obtain a third point cloud;

[0059] A distance calculation module for calculating the distance from the points in the third point cloud to the optimal fitting plane to obtain a first distance;

[0060] A feature point determination module for determining the points corresponding to the first distance greater than the distance threshold as weld seam feature points to obtain a weld seam feature point set;

[0061] A straight line fitting module for performing straight line fitting on the weld seam feature point set to obtain the straight line equation of the target weld seam;

[0062] A weld seam trajectory acquisition module for placing the straight line equation of the target weld seam in the robot base coordinate system, obtaining the point with the minimum coordinate value and the maximum coordinate value on the X-axis of the robot base coordinate system, and using the point with the minimum coordinate value and the maximum coordinate value as the starting point and the ending point of the target weld seam to obtain the trajectory of the target weld seam.

[0063] In a third aspect, the present invention provides a computer device comprising a processor and a memory; wherein, when the processor executes a computer program stored in the memory, it implements the steps of the robot weld recognition method based on area array structured light described in the first aspect.

[0064] In a fourth aspect, the present invention provides a computer-readable storage medium for storing a computer program; when the computer program is executed by a processor, the steps of the robot weld recognition method based on area array structured light described in the first aspect are implemented.

[0065] The present invention provides a robot weld recognition method and system based on planar array structured light, wherein the method comprises acquiring a first point cloud on the surface of a workpiece; deleting noise of the first point cloud to obtain a second point cloud; performing plane fitting on points in the second point cloud to obtain a best fitting plane; deleting points contained in the best fitting plane in the second point cloud to obtain a third point cloud; calculating the distance from points in the third point cloud to the best fitting plane to obtain a first distance; determining points corresponding to the first distance being greater than a distance threshold as weld feature points to obtain a weld feature point set; performing straight line fitting on the weld feature point set to obtain a straight line equation of a target weld; placing the straight line equation of the target weld in a robot base coordinate system, acquiring a point with the smallest coordinate value and a point with the largest coordinate value on an X-axis of the robot base coordinate system, using the point with the smallest coordinate value and the point with the largest coordinate value as a starting point and an ending point of the target weld to obtain a trajectory of the target weld. The present invention can discover local outliers at any point and eliminate them, find contours for each point in its local neighborhood, and facilitate the generation of more accurate and robust local significant features from the local neighborhood without outliers. It can also solve the problem that traditional plane fitting algorithms cannot meet the requirements of real-time weld tracking. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0067] Figure 1 A flowchart of a robot weld recognition method based on area array structured light provided by an embodiment of the present invention;

[0068] Figure 2 A schematic diagram of the structure of a device for obtaining a workpiece point cloud provided by an embodiment of the present invention;

[0069] Figure 3 A schematic diagram of the weld types provided by the embodiments of the present invention;

[0070] Figure 4 A flow chart of obtaining the best fitting plane by the CDRA method provided by an embodiment of the present invention;

[0071] Figure 5 Flow chart for obtaining the weld feature point set provided by the embodiment of the present invention;

[0072] Figure 6 Flow chart for the weld line fitting algorithm provided by the embodiment of the present invention;

[0073] Figure 7 Comparison chart of the plane fitting effects of the method of the present invention, RPCA, and RANSAC algorithms provided by the embodiment of the present invention;

[0074] Figure 8 Comparison chart of the plane fitting accuracy rates of the method of the present invention, RPCA, and RANSAC algorithms provided by the embodiment of the present invention;

[0075] Figure 9 Comparison chart of the time taken for plane fitting by the method of the present invention, RPCA, and RANSAC algorithms provided by the embodiment of the present invention;

[0076] Figure 10 Structural diagram of a robot weld recognition system method based on a planar structured light provided by the embodiment of the invention. Detailed implementation manners

[0077] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without making creative efforts shall fall within the protection scope of the present invention.

[0078] In one embodiment, as Figure 1 shown, the embodiment of the present invention provides a robot weld recognition method based on a planar structured light, including:

[0079] Step 101, obtain the first point cloud on the surface of the workpiece.

[0080] Exemplarily, as Figure 2 shown, use a Zivid One structured light camera to photograph the workpiece to be welded, and obtain the first point cloud U1 on the surface of the workpiece. In this embodiment, the first point cloud U1 has a total of 2,234,000 points. Among them, 1. Robot control box; 2. Robot body; 3. Welding torch; 4. Structured light camera; 5. Camera bracket; 6. Host computer terminal; 7. Workpiece to be welded.

[0081] Step 102, remove the noise of the first point cloud to obtain the second point cloud.

[0082] A robot base coordinate system is established, with the center of the robot mounting base as the origin O, the robot's forward direction as the X-axis, the vertically upward direction perpendicular to the robot base as the Z-axis, and the Y-axis is determined according to the right-hand rule to establish the robot base coordinate system OXYZ. The first point cloud U1 is processed by straight-through filtering, and all points with Z-axis coordinate values less than 0 are deleted. The value range of the Z-axis filter is set to (0, ∞) to obtain point cloud U2. In this embodiment, point cloud U2 has a total of 226,342 points.

[0083] The straight-through filtering can be expressed as:

[0084]

[0085] Where X min and X max Corresponding to the minimum and maximum values of the X-axis range respectively; Y min and Y max Corresponding to the minimum and maximum values of the Y-axis range; Z min and Z max The corresponding minimum and maximum values of the Z-axis range; the coordinates of each point in point cloud U2 on the X, Y and Z axes are x i ,y i and z i .

[0086] The point cloud U2 is processed using a voxel filter, and the size of the voxel grid in the X, Y and Z directions is set to cell, where cell = 2 mm. The centroid of all points in each voxel grid is used to represent the points in the grid, and the second point cloud U3 is obtained, with a total of f points, and in this embodiment, f = 29619. In this way, the density of the point cloud can be reduced without affecting the structure of the point cloud itself, and the calculation speed and accuracy can be prevented from being affected by excessive point cloud density.

[0087] Voxel filtering can be expressed as:

[0088]

[0089] Where M, N and L are equal parts in the X, Y and Z directions respectively. Indicates rounding down.

[0090] Step 103: performing plane fitting on the points in the second point cloud to obtain the best fitting plane.

[0091] like Figure 4 As shown, this step includes S301, setting G=1, G is the number of iterations, and creating a new list S(λ).

[0092] S302, using the nearest neighbor search method to obtain multiple (k) points closest to the target point P in the second point cloud U3 as the local neighborhood Lp of the target point in the second point cloud. In this embodiment, k=100.

[0093] S303, randomly select multiple (h0) points from the local neighborhood Lp to form a first subset π.

[0094] S304, calculate the rank of the first subset π. Consider all points in the subset π as column vectors to form a matrix £, perform Gaussian elimination on the matrix £ to obtain a row-simple matrix γ, and calculate the number of non-zero rows in γ, which is the rank of the first subset π.

[0095] S305: Determine whether the rank of the first subset is equal to a rank threshold h0. In this embodiment, h0=3.

[0096] S306: If it is equal to the rank threshold, a principal component analysis method is used to perform plane fitting on the first subset to obtain the minimum eigenvalue λ0 of the fitting plane.

[0097] S307, if it is not equal to the rank threshold, then select another point from the local neighborhood and add it to the first subset, and return to execute the operation of step S304.

[0098] S308, when the rank is equal to the rank threshold, calculating the orthogonal distance ξ from all points in the local neighborhood to the fitting plane.

[0099] The orthogonal distance ξ from a point to the fitting plane is expressed as:

[0100]

[0101] p Δ represents the coordinate vector of the Δth point in the local neighborhood in the robot base coordinate system; and represent the mean vector and normal vector of the fitting plane respectively, and T is the transpose operator.

[0102] S309, sort the orthogonal distances in ascending order, select the points corresponding to the top-ranked orthogonal distances (h points) to form a second subset θ, and store the minimum eigenvalue λ0 and the corresponding second subset into a list S(λ). In this embodiment, h=0.5k.

[0103] S310, determining whether the number of iterations G from step S303 to step S309 is greater than an iteration threshold It. In this embodiment, It=70.

[0104] S311, if it is not greater than the iteration threshold, then G=G+1, and the process returns to step S303.

[0105] S312, if it is greater than the iteration threshold, then use the second subset corresponding to the minimum value among all the minimum eigenvalues in the list S(λ) as the point set MRS of the local neighborhood.

[0106] S313, in the case of being greater than the iteration threshold, calculate the target point E in the second point cloud U3 q and the robust Mahalanobis distance β from the point set MRS of the local neighborhood q .

[0107] Exemplarily, the robust mean vector of MRS is expressed as:

[0108]

[0109] p x 、p y and p z respectively represent the coordinates of the points in MRS on the X-axis, Y-axis, and Z-axis;

[0110] The covariance matrix Ψ of MRS is expressed as:

[0111]

[0112] and respectively represent the coordinates of the points in MRS on the X-axis, Y-axis, and Z-axis, and respectively represent the average values of the coordinates of all points in MRS on the X-axis, Y-axis, and Z-axis;

[0113] The robust Mahalanobis distance β q is expressed as:

[0114]

[0115] represents the robust mean vector of MRS, and Ψ -1 represents the inverse matrix of the covariance matrix Ψ.

[0116] S314, determine whether the robust Mahalanobis distance is greater than the robust Mahalanobis distance threshold

[0117] S315, if it is greater than the robust Mahalanobis distance threshold then delete the target point in the second point cloud.

[0118] S316, if it is not greater than the robust Mahalanobis distance threshold then use the set of target points in the second point cloud as the fourth point cloud U4.

[0119] S317. Use the principal component analysis method to perform plane fitting on the fourth point cloud U4 to obtain the best-fitting plane Ax + By + Cz + D = 0 in the robot base coordinate system. Here, x, y, and z are the coordinates of points on the best-fitting plane in the robot base coordinate system, A, B, and C are the plane equation coefficients, D is the distance from the plane to the origin. The best-fitting plane contains g points in the fourth point cloud U4. In this embodiment, g = 20461.

[0120] Step 104. Delete the points contained in the best-fitting plane in the second point cloud to obtain the third point cloud.

[0121] As Figure 3 and Figure 5 shown, input the preprocessed second point cloud U3, set the threshold coefficient to 0.98, delete the point cloud contained in the best-fitting plane to obtain the third point cloud U5 (i.e., the groove point cloud), with a total of f - g points. In this embodiment, f - g = 9158. Figure 3 In the figure, 11 is the groove, 12 is the weld seam, and 13 is the plane.

[0122] Step 105. Calculate the distance from the points in the third point cloud to the best-fitting plane to obtain the first distance d j .

[0123]

[0124] Step 106. Determine the points corresponding to the first distance greater than the distance threshold as weld feature points to obtain the weld feature point set.

[0125] As Figure 5 shown, in this step, judge whether the first distance d j is greater than the distance threshold (threshold coefficient * d max ). d max is the maximum value in d j .

[0126] If it is not greater than the distance threshold, delete the points in the third point cloud corresponding to the first distance.

[0127] If it is greater than the distance threshold, determine the points in the third point cloud corresponding to the first distance as weld feature points to obtain the weld feature point set U6.

[0128] Step 107. Perform line fitting on the weld feature point set to obtain the line equation of the target weld.

[0129] As Figure 6 shown, assume the coordinate components x r (r = 1, 2, 3,..., 463) of the points N r in the weld feature point set U6, y r and z rIndependent of each other and having the same position accuracy σ r , that is Calculate σ using the least squares method r , then its weight α r is expressed as:

[0130]

[0131] The straight-line equation of the target weld is constructed as:

[0132]

[0133] where (x, y, z) are the coordinates of the points on the best-fitting plane in the robot base coordinate system; a, b, and c are the direction vectors along the X, Y, and Z axes of the robot base coordinate system respectively, and a 2 +b 2 +c 2 =1; (x0, y0, z0) are the weighted centroid coordinates of the weld feature point set in the robot base coordinate system; R is the total number of points in the weld feature point set. In this embodiment, R = 463; the coordinate components x r , y r and z r of the r-th point in the weld feature point set are independent of each other and have the same position accuracy σ r .

[0134] Construct the normal distance D r squared expression of the straight line between the r-th point in the weld feature point set and the target weld:

[0135]

[0136] where and are the residuals in each direction of the point .

[0137] where

[0138] Construct the target optimization function Ω:

[0139]

[0140] Construct the Lagrangian function K and use the Lagrange multiplier method to solve for the direction vector components a, b, c and the Lagrange multiplier w:

[0141]

[0142] Step 108: Place the straight-line equation of the target weld seam in the robot base coordinate system, obtain the point with the minimum coordinate value and the point with the maximum coordinate value on the X-axis of the robot base coordinate system, use the point with the minimum coordinate value and the point with the maximum coordinate value as the starting point and the ending point of the target weld seam, and obtain the trajectory of the target weld seam.

[0143] Exemplarily, obtain the points with the minimum and maximum X coordinates of the fitted weld seam through projection as the starting point and the ending point of the target weld seam respectively; let the coordinates of the starting point and the ending point be (x s , y s , z s ) and (x e , y e , z e ); assume the number of welding points is l, and the components of the welding step length along the X-axis, Y-axis, and Z-axis in the robot base coordinate system are t x , t y , and t z respectively, and obtain the weld seam trajectory as follows:

[0144]

[0145] X Γ+1 , Y Γ+1 , and Z Γ+1 represent the coordinates of each welding point on the X-axis, Y-axis, and Z-axis of the robot base coordinate system; Г is the welding point serial number.

[0146] As Figure 7 shown, the embodiment of the present invention provides a comparison diagram of the plane fitting effects of the method of the present invention with the existing classical robust principal component analysis algorithm (RPCA) and random sample consensus algorithm (RANSAC). Figure 7 Among them, (a) is the original point cloud diagram of the example, (b) is the fitting effect diagram of the RPCA algorithm, (c) is the fitting effect diagram of the RANSAC algorithm, and (d) is the fitting effect diagram of the method of the present invention. It can be Figure 7 seen that compared with RPCA and RANSAC, the method of the present invention can more accurately remove the outlier points in the point cloud data and improve the accuracy of plane fitting.

[0147] As Figure 8 shown, it is a comparison diagram of the plane fitting accuracy of the method of the present invention with the existing classical robust principal component analysis algorithm (RPCA) and random sample consensus algorithm (RANSAC). Figure 8When the proportion of outliers in the initial point cloud is 5%, the accuracies of the RPCA and RANSAC methods for identifying outliers are 94.62% and 36.35% respectively, and the accuracy of the method of the present invention for identifying outliers is 97.94%. The accuracy of the method of the present invention for identifying outliers is increased by 3.32% and 61.59% respectively compared with the RPCA and RANSAC methods. When the proportion of outliers in the initial point cloud is 20%, the accuracies of the RPCA and RANSAC methods for identifying outliers are 97.05% and 47.06% respectively, and the accuracy of the method of the present invention for identifying outliers is 98.2%; the accuracy of the method of the present invention for identifying outliers is increased by 1.15% and 51.14% respectively compared with the RPCA and RANSAC methods for identifying outliers. When the proportion of outliers in the initial point cloud is 40%, the accuracies of the RPCA and RANSAC methods for identifying outliers are 98.97% and 61.44% respectively, and the accuracy of the method of the present invention for identifying outliers is 99.27%; the accuracy of the method of the present invention for identifying outliers is increased by 0.3% and 37.83% respectively compared with the RPCA and RANSAC methods for identifying outliers. Thus, it can be seen that the method of the present invention significantly improves the accuracy of identifying outliers in point cloud data compared with the existing classical methods.

[0148] As Figure 9 shown, the comparison chart of the time used for plane fitting between the method of the present invention and the existing classical robust principal component analysis algorithm (RPCA) and random sample consensus algorithm (RANSAC). Figure 9Among them, when the point cloud has 20 points, the running times of the RPCA and RANSAC methods are 0.8289 s and 0.0714 s respectively, and the running time of the method of the present invention is 0.0079 s; the running times of the method of the present invention are reduced by 0.821 s and 0.0635 s respectively compared with the RPCA and RANSAC methods. When the point cloud has 50 points, the running times of the RPCA and RANSAC methods are 0.8365 s and 0.1282 s respectively, and the running time of the method of the present invention is 0.0084 s; the running times of the method of the present invention are reduced by 0.8281 s and 0.1198 s respectively compared with the RPCA and RANSAC methods. When the point cloud has 100 points, the running times of the RPCA and RANSAC methods are 0.8553 s and 0.1845 s respectively, and the running time of the method of the present invention is 0.0092 s; the running times of the method of the present invention are reduced by 0.8461 s and 0.1753 s respectively compared with the RPCA and RANSAC methods. When the point cloud has 1000 points, the running times of the RPCA and RANSAC methods are 1.0751 s and 0.4318 s respectively, and the running time of the method of the present invention is 0.011 s; the running times of the method of the present invention are reduced by 1.0641 s and 0.4208 s respectively compared with the RPCA and RANSAC methods. When the point cloud has 10000 points, the running times of the RPCA and RANSAC methods are 1.2691 s and 2.3934 s respectively, and the running time of the method of the present invention is 0.0376 s; the running times of the method of the present invention are reduced by 1.2315 s and 2.3558 s respectively compared with the RPCA and RANSAC methods. Thus, it can be seen that the method of the present invention effectively reduces the running time of point cloud plane fitting.

[0149] Based on the same inventive concept, an embodiment of the present invention further provides a robot weld seam recognition system based on a planar structured light. Since the principle of solving problems by this system is similar to that of the robot weld seam recognition method based on a planar structured light, the implementation of this system can refer to the implementation of the robot weld seam recognition method based on a planar structured light, and the repeated parts will not be described again.

[0150] In another embodiment, the robot weld seam recognition system based on a planar structured light provided by the embodiment of the present invention, as Figure 10 shown, includes:

[0151] A point cloud acquisition module 10, configured to acquire a first point cloud on the surface of a workpiece.

[0152] A noise deletion module 20, configured to delete the noise of the first point cloud to obtain a second point cloud.

[0153] A plane fitting module 30, configured to perform plane fitting on the points in the second point cloud to obtain an optimal fitting plane.

[0154] A point deletion module 40, configured to delete the points included in the best-fitting plane in the second point cloud to obtain a third point cloud.

[0155] A distance calculation module 50, configured to calculate the distances from the points in the third point cloud to the best-fitting plane to obtain a first distance.

[0156] A feature point determination module 60, configured to determine the points corresponding to the first distance greater than the distance threshold as weld feature points to obtain a weld feature point set.

[0157] A straight line fitting module 70, configured to perform straight line fitting on the weld feature point set to obtain the straight line equation of the target weld.

[0158] A weld track acquisition module 80, configured to place the straight line equation of the target weld in the robot base coordinate system, acquire the point with the minimum coordinate value and the point with the maximum coordinate value on the X axis of the robot base coordinate system, and use the point with the minimum coordinate value and the point with the maximum coordinate value as the starting point and the ending point of the target weld to obtain the track of the target weld.

[0159] For the more specific working processes of the above-mentioned various modules, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be elaborated herein.

[0160] In another embodiment, the present invention provides a computer device, including a processor and a memory; wherein, when the processor executes the computer program stored in the memory, the steps of the above-mentioned robot weld recognition method based on area structured light are implemented.

[0161] For the more specific process of the above method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be elaborated herein.

[0162] In another embodiment, the present invention provides a computer-readable storage medium for storing a computer program; when the computer program is executed by a processor, the steps of the above-mentioned robot weld recognition method based on area structured light are implemented.

[0163] For the more specific process of the above method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be elaborated herein.

[0164] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the systems, devices, and storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part.

[0165] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solutions in the embodiments of the present invention, in essence, or the parts that contribute to the prior art can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present invention.

[0166] The present invention has been described in detail above in conjunction with specific embodiments and exemplary examples. However, these descriptions should not be construed as limiting the present invention. Those skilled in the art understand that, without departing from the spirit and scope of the present invention, various equivalent substitutions, modifications, or improvements can be made to the technical solutions and their implementation manners of the present invention, and these all fall within the scope of the present invention. The protection scope of the present invention shall be subject to the appended claims.

Claims

1. A robot weld seam recognition method based on area structured light, characterized in that include: Obtain the first point cloud of the workpiece surface; Delete the noise of the first point cloud to obtain the second point cloud; Perform plane fitting on the points in the second point cloud to obtain the best fitting plane; Delete the points contained in the best fitting plane in the second point cloud to obtain the third point cloud; Calculate the distance from the point in the third point cloud to the best fitting plane to obtain a first distance; Determine the point corresponding to the first distance being greater than the distance threshold as a weld feature point, and obtain a weld feature point set; Perform straight line fitting on the weld feature point set to obtain the straight line equation of the target weld; Place the straight-line equation of the target weld seam in the robot base coordinate system to obtain the robot base coordinate system X The point with the minimum coordinate value and the point with the maximum coordinate value on the axis. Use the point with the minimum coordinate value and the point with the maximum coordinate value as the starting point and the ending point of the target weld seam, and obtain the trajectory of the target weld seam; The performing plane fitting on the points in the second point cloud to obtain the best fitting plane includes: S301, let G = 1, G is the number of iterations, and create a new list S (λ); S302, using a nearest neighbor search method to obtain a plurality of points closest to the target point in the second point cloud as a local neighborhood of the target point in the second point cloud; S303, randomly selecting multiple points from the local neighborhood to form a first subset; S304, calculating the rank of the first subset; S305, determining whether the rank of the first subset is equal to a rank threshold; S306, if it is equal to the threshold of the rank, then use the principal component analysis method to perform plane fitting on the first subset to obtain the minimum eigenvalue of the fitting plane; S307, if it is not equal to the rank threshold, then select another point from the local neighborhood and add it to the first subset, and return to execute the operation of step S304; S308, when the rank is equal to the rank threshold, calculating the orthogonal distances from all points in the local neighborhood to the fitting plane; S309, sorting the orthogonal distances in ascending order, selecting points corresponding to a plurality of orthogonal distances with the highest order to form a second subset, and storing the minimum eigenvalue and the corresponding second subset into a list S(λ); S310, determining whether the number of iterations from step S303 to step S309 is greater than an iteration threshold; S311, if it is not greater than the iteration threshold, G=G+1, and the process returns to step S303; S312, if it is greater than the iteration threshold, the second subset corresponding to the minimum value of all minimum eigenvalues in the list S(λ) is used as the point set of the local neighborhood; S313, when the distance is greater than the iteration threshold, calculating the robust Mahalanobis distance between the target point and the point set of the local neighborhood in the second point cloud; S314, determining whether the robust Mahalanobis distance is greater than a robust Mahalanobis distance threshold; S315, if it is greater than the robust Mahalanobis distance threshold, deleting the target point in the second point cloud; S316, if the distance is not greater than the robust Mahalanobis distance threshold, taking the set of target points in the second point cloud as the fourth point cloud; S317, using principal component analysis to perform plane fitting on the fourth point cloud to obtain the best fitting plane in the robot base coordinate system.

2. The method for identifying robot weld seams based on area structured light according to claim 1, wherein The step of determining the point corresponding to the first distance being greater than the distance threshold as a weld feature point to obtain a weld feature point set includes: Determine whether the first distance is greater than a distance threshold; If it is not greater than the distance threshold, the point in the third point cloud corresponding to the first distance is deleted; If it is greater than the distance threshold, the point in the third point cloud corresponding to the first distance is determined as a weld feature point to obtain a weld feature point set.

3. The method for identifying robot weld seams based on area structured light according to claim 2, characterized in that The linear fitting of the weld feature point set to obtain the linear equation of the target weld includes: Calculate the weight of each point in the weld feature point set according to the following formula : ; Among them, σ r is the position accuracy of the coordinate component of the r th point in the weld feature point set; The linear equation of the target weld is: ; Among them, ( x , y , z ) are the coordinates of the points on the best-fit plane in the robot base coordinate system; a 、 b and c are respectively along the X 、 Y and Z axis direction vectors of the robot base coordinate system, a 2 + b 2 + c 2 = 1; is the weighted centroid coordinate of the weld feature point set in the robot base coordinate system; ; ; ; R is the total number of points in the weld feature point set; the coordinate components r of the x r 、 y r and z r of the σ r ; Construct the normal distance of the r th point in the set of weld feature points to the straight line of the target weld D r Square expression: ; Among them, ; ; ; Construct the target optimization function Ω: ; Construct the Lagrangian function K , and use the Lagrange multiplier method to solve for the components of the direction vector a , b , c and the Lagrange multiplier w : 。 4. The method for robot weld seam recognition based on area structured light according to claim 1, wherein The straight-line equation of the weld seam is placed in the robot base coordinate system to obtain the robot base coordinate system X The points with the minimum and maximum coordinate values on the axis are used as the starting point and the ending point of the target weld seam, respectively, to obtain the trajectory of the target weld seam, including: Obtain the fitted weld seam by projection X The points with the minimum and maximum coordinates are respectively used as the starting point and the ending point of the target weld seam; let the coordinates of the starting point and the ending point be ( x s , y s , z s ) and ( x e , y e , z e ); assume the number of welding points is l , and the welding step size is t . The components of the welding step size along the X axis, Y axis, and Z axis in the robot base coordinate system are respectively t x , t y , and t z . The obtained weld seam trajectory is as follows: ; , and represent the coordinates of each welding point on the X-axis, X Y-axis, Y Z-axis Z of the robot base coordinate system; Г is the serial number of the welding point.

5. A robot weld seam recognition system applying the robot weld seam recognition method based on area structured light according to claim 1, characterized in that, Including: A point cloud acquisition module for acquiring the first point cloud on the surface of the workpiece; A noise deletion module for deleting the noise of the first point cloud to obtain a second point cloud; A plane fitting module for performing plane fitting on the points in the second point cloud to obtain the best fitting plane; A point deletion module for deleting the points included in the best fitting plane in the second point cloud to obtain a third point cloud; A distance calculation module for calculating the distance from the points in the third point cloud to the best fitting plane to obtain a first distance; A feature point determination module for determining the points corresponding to the first distance greater than the distance threshold as weld feature points to obtain a weld feature point set; A line fitting module for performing line fitting on the weld feature point set to obtain the linear equation of the target weld; The weld seam trajectory acquisition module is used to place the straight-line equation of the target weld seam in the robot base coordinate system, and obtain the point with the minimum coordinate value and the point with the maximum coordinate value on the robot base coordinate system X axis. The point with the minimum coordinate value and the point with the maximum coordinate value are used as the starting point and the ending point of the target weld seam, and the trajectory of the target weld seam is obtained.

6. A computer device, characterized in that, Including a processor and a memory; wherein, when the processor executes the computer program stored in the memory, the steps of the robot weld recognition method based on area structured light according to any one of claims 1-4 are implemented.

7. A computer-readable storage medium, characterized in that, For storing a computer program; when the computer program is executed by the processor, the steps of the robot weld recognition method based on area structured light according to any one of claims 1-4 are implemented.

Citation Information

Patent Citations

  • Workpiece weld seam positioning method and system based on three-dimensional visual information

    CN113042939A

  • Welding seam identification and robot welding seam tracking method based on 3D point cloud

    CN114571153A