Weld joint path planning method and device, computer equipment and readable storage medium
By clustering and weld endpoint detection of the workpiece surface point cloud of welded workpieces, combined with weld type detection, accurate planning of welding paths is achieved, and the problem of inaccurate weld path planning in the existing technology is solved, and welding efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411692121.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-11
AI Technical Summary
The existing weld path planning method has problems with inaccurate enough, making it difficult to achieve efficient welding of welded workpieces.
By obtaining the workpiece surface point cloud of the workpiece to be welded, clustering is performed to obtain the point cloud clustering cluster, detect the end points of the weld, and detect the type of weld based on the number of end points and the distance between the target vector and the centroid of mass, thereby performing welding path planning.
Accurate planning of weld paths is achieved, the accuracy of welding path planning is improved, and the ability to perform welding is automated without manual operation or model access.
Smart Images

Figure CN119600320A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent manufacturing technology, and in particular to a weld path planning method, device, system, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] With the development of science and technology, welds have become a hot topic of research, especially the technology of weld path planning. By planning the weld path, efficient welding of the workpiece can be achieved.
[0003] In traditional technology, weld path planning is often done by loading the 3D (three-dimensional) model of the workpiece to be welded through software, then manually selecting the weld on the interface to determine the weld scanning path, then using a 3D camera to scan the workpiece to be welded to obtain a three-dimensional point cloud, and finally, using a point cloud registration algorithm to convert the 3D model of the selected weld into a three-dimensional point cloud, and then using the selected weld as a teaching weld to guide the robot to scan the weld with a weld tracking sensor for precise positioning to complete the welding.
[0004] However, the current weld path planning method is not accurate enough. Summary of the invention
[0005] Based on this, it is necessary to provide an accurate weld path planning method, device, system, computer equipment, computer readable storage medium and computer program product to address the above technical problems.
[0006] In a first aspect, the present application provides a weld path planning method, comprising:
[0007] Acquire a workpiece surface point cloud of a workpiece to be welded;
[0008] Clustering the workpiece surface point cloud to obtain point cloud clusters;
[0009] Detecting weld endpoints in the point cloud clusters and determining the number of detected weld endpoints, wherein welds exist between the weld endpoints;
[0010] Detecting a first weld type of the weld based on the number of endpoints;
[0011] Detecting a second weld type of the weld based on a distance between a target vector between end points of the weld and a centroid of a preset region in which the weld is located;
[0012] Based on the first weld type and the second weld type, a welding path is planned for the weld.
[0013] In one embodiment, obtaining a workpiece surface point cloud of a workpiece to be welded includes:
[0014] Acquire a first workpiece point cloud of the workpiece to be welded photographed by a photographing device;
[0015] The first workpiece point cloud is converted into the robot coordinate system to obtain a second workpiece point cloud, and the second workpiece point cloud is denoised to obtain a third workpiece point cloud;
[0016] The bottom surface and the surface in the third workpiece point cloud are segmented to obtain the workpiece surface point cloud.
[0017] In one embodiment, detecting weld endpoints in point cloud clusters includes:
[0018] For any target feature point in the point cloud cluster, determine the first surface feature point farthest from the target feature point;
[0019] Acquire a first vector formed between the first surface feature point and the target feature point, and a second vector generated between the target feature point and the second surface feature point, wherein the second surface feature point is any feature point in the point cloud cluster except the target feature point;
[0020] If the cosine value between the first vector and the second vector is greater than a preset cosine value threshold, the target feature point is determined to be a weld endpoint.
[0021] In one embodiment, detecting a first weld type of a weld according to the number of endpoints includes:
[0022] When the number of endpoints is less than a preset number, determining that the first weld type of the weld is a closed weld;
[0023] When the number of endpoints is equal to the preset number, the distance between the third vectors between all weld endpoints and the point cloud cluster is obtained, and when the distance is less than or equal to the first preset distance threshold, the first weld type is determined to be a flat weld, and when the distance is greater than the first preset distance threshold, the first weld type is determined to be a curved weld;
[0024] When the number of endpoints is greater than a preset number, the first weld type is determined to be a composite weld.
[0025] In one embodiment, detecting a second weld type of a weld based on a distance between a target vector between weld endpoints and a centroid of a preset region where the weld is located includes:
[0026] When the distance between the centroid of the preset area where the weld is located and the target vector is greater than a second preset distance threshold, determining that the second weld type of the weld is a single-sided weld, wherein the target vector is a vector formed between the end points of the weld;
[0027] When the distance between the centroid of the preset area where the weld is located and the target vector is less than or equal to a second preset distance threshold, it is determined that the second weld type of the weld is a polygonal weld.
[0028] In one embodiment, performing welding path planning for a weld based on a first weld type and a second weld type includes:
[0029] If the first weld type is a flat weld, all weld end points of the weld are determined as path points;
[0030] When the second weld type is a single-side weld, a single path edge constructed based on the path points is determined as the welding path;
[0031] When the second weld type is a multi-edge weld, a first path planning graph is generated based on a plurality of path edges between two path points, and a welding path is constructed based on the first path planning graph.
[0032] In one embodiment, performing welding path planning for a weld based on a first weld type and a second weld type includes:
[0033] If the first weld type is a composite weld, the starting endpoint is selected from all weld endpoints;
[0034] Execute the neighborhood endpoint selection step: in the point cloud cluster, extract the neighborhood endpoint from the preset neighborhood range of the starting endpoint, and determine the starting endpoint and the neighborhood endpoint as path points;
[0035] In the case where the second weld type is a single-side weld, a single path edge constructed based on the path point is determined as the first initial welding path, and the neighborhood endpoint is set as a new starting endpoint, and the neighborhood endpoint selection step is returned to execute until the point cloud clustering cluster cannot extract the neighborhood endpoint; a welding path is generated according to all the determined first initial welding paths;
[0036] When the second weld type is a polygonal weld, the multiple path edges constructed based on the path points are determined as the second initial welding path, and the neighborhood endpoint is set as a new starting endpoint, and the neighborhood endpoint selection step is returned to execute until the point cloud clustering cluster cannot extract the neighborhood endpoint; based on all the second initial welding paths, a second path planning graph is generated, and a welding path is constructed based on the second path planning graph.
[0037] In one embodiment, performing welding path planning for a weld based on a first weld type and a second weld type includes:
[0038] If the first weld type is a closed weld, the cluster centroid of the point cloud cluster is detected;
[0039] Determine the polar angle between any two weld endpoints in the point cloud cluster and the centroid of the cluster;
[0040] According to the results of sorting the starting endpoint and all polar angles, the welding path is planned for the weld, wherein the starting endpoint is selected from all weld endpoints.
[0041] In a second aspect, the present application also provides a welding path planning device, comprising:
[0042] A welding seam path planning device, comprising:
[0043] A feature point acquisition module, used to acquire a surface point cloud of a workpiece to be welded;
[0044] The clustering module is used to cluster the point cloud on the workpiece surface to obtain point cloud clusters;
[0045] An endpoint detection module is used to detect weld endpoints in the point cloud clustering clusters and determine the number of endpoints of the detected weld endpoints, wherein welds exist between the weld endpoints;
[0046] A first type determination module, for detecting a first weld type of the weld according to the number of endpoints;
[0047] A second type determination module, for detecting a second weld type of the weld based on a distance between a target vector between weld end points and a centroid of a preset area where the weld is located;
[0048] The path planning module is used to plan the welding path of the weld based on the first weld type and the second weld type.
[0049] In a third aspect, the present application further provides a welding path planning system, the system comprising a controller and a shooting device, the shooting device is used to obtain a workpiece point cloud image of a workpiece to be welded, and the controller is used to perform the following steps:
[0050] Acquire a workpiece surface point cloud of a workpiece to be welded;
[0051] Clustering the workpiece surface point cloud to obtain point cloud clusters;
[0052] Detecting weld endpoints in the point cloud clusters and determining the number of detected weld endpoints, wherein welds exist between the weld endpoints;
[0053] Detecting a first weld type of the weld based on the number of endpoints;
[0054] Detecting a second weld type of the weld based on a distance between a target vector between end points of the weld and a centroid of a preset region in which the weld is located;
[0055] Based on the first weld type and the second weld type, a welding path is planned for the weld.
[0056] In a fourth aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0057] Acquire a workpiece surface point cloud of a workpiece to be welded;
[0058] Clustering the workpiece surface point cloud to obtain point cloud clusters;
[0059] Detecting weld endpoints in the point cloud clusters and determining the number of detected weld endpoints, wherein welds exist between the weld endpoints;
[0060] Detecting a first weld type of the weld based on the number of endpoints;
[0061] Detecting a second weld type of the weld based on a distance between a target vector between end points of the weld and a centroid of a preset region in which the weld is located;
[0062] Based on the first weld type and the second weld type, a welding path is planned for the weld.
[0063] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0064] Acquire a workpiece surface point cloud of a workpiece to be welded;
[0065] Clustering the workpiece surface point cloud to obtain point cloud clusters;
[0066] Detecting weld endpoints in the point cloud clusters and determining the number of detected weld endpoints, wherein welds exist between the weld endpoints;
[0067] Detecting a first weld type of the weld based on the number of endpoints;
[0068] Detecting a second weld type of the weld based on a distance between a target vector between end points of the weld and a centroid of a preset region in which the weld is located;
[0069] Based on the first weld type and the second weld type, a welding path is planned for the weld.
[0070] In a sixth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0071] Acquire a workpiece surface point cloud of a workpiece to be welded;
[0072] Clustering the workpiece surface point cloud to obtain point cloud clusters;
[0073] Detecting weld endpoints in the point cloud clusters and determining the number of detected weld endpoints, wherein welds exist between the weld endpoints;
[0074] Detecting a first weld type of the weld based on the number of endpoints;
[0075] Detecting a second weld type of the weld based on a distance between a target vector between end points of the weld and a centroid of a preset region in which the weld is located;
[0076] Based on the first weld type and the second weld type, a welding path is planned for the weld.
[0077] The above-mentioned weld path planning method, device, system, computer equipment, computer-readable storage medium and computer program product are different from the prior art in which welding path planning of welds is performed by teaching to achieve welding of workpieces to be welded. The present application proposes a teaching-free weld path planning method, which does not require manual operation or model access, and can automatically cluster the surface feature points of the workpiece to be welded to obtain point cloud clustering clusters, and detect the number of endpoints of the weld endpoints and the detected weld endpoints in the point cloud clustering clusters, and detect the first weld type of the weld formed between the weld endpoints based on the number of endpoints, and detect the second weld type of the weld based on the distance between the centroid of the weld in the preset area where the weld is located, so as to realize comprehensive welding path planning of the weld based on the first weld type and the second weld type, thereby improving the accuracy of welding path planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments of the present application or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0079] Figure 1 An application environment diagram of a weld path planning method in an embodiment;
[0080] Figure 2 A schematic diagram of a flow chart of a weld path planning method in one embodiment;
[0081] Figure 3 A schematic diagram of a flow chart of a weld path planning method in another embodiment;
[0082] Figure 4 is a schematic diagram of a three-dimensional point cloud of a workpiece to be welded in one embodiment;
[0083] Figure 5 is a schematic diagram of a point cloud of a workpiece to be welded after data preprocessing in one embodiment;
[0084] Figure 6 A schematic diagram of a weld recognition effect in one embodiment;
[0085] Figure 7 A schematic diagram of the welding path planning effect of a weld in one embodiment;
[0086] Figure 8 A schematic diagram of a local effect of welding path planning of a weld in one embodiment;
[0087] Fig. 9 is a structural block diagram of a weld path planning device in one embodiment;
[0088] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0089] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are used to explain the present application and are not used to limit the present application.
[0090] The weld path planning method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the controller 104 through the network, and the terminal 102 communicates with the shooting device 106, and the shooting device is used to obtain the workpiece point cloud image of the workpiece to be welded. The data storage system can store the data that the controller 104 needs to process. The data storage system can be integrated on the controller 104, or it can be placed on the cloud or other network controllers.
[0091] The user controls the shooting device 106 to shoot the workpiece point cloud image of the workpiece to be welded in the welding path planning interface of the terminal 102, and the shooting device 106 sends the captured image to the terminal 102, and the terminal 102 uploads the acquired image to the controller 104, and the controller 104 analyzes the acquired image, obtains the workpiece surface point cloud of the workpiece to be welded, clusters the workpiece surface point cloud, and obtains the point cloud clustering cluster; detects the weld endpoints in the point cloud clustering cluster, and determines the number of endpoints of the detected weld endpoints, wherein there are welds between the weld endpoints, and detects the first weld type of the weld according to the number of endpoints, detects the second weld type of the weld based on the distance between the target vector between the weld endpoints and the centroid of the preset area where the weld is located, and performs welding path planning for the weld based on the first weld type and the second weld type. Further, the controller 104 sends the welding path planning result of the weld to the welding robot, and the welding robot welds the workpiece to be welded according to the welding path planning result of the weld.
[0092] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc.
[0093] In an exemplary embodiment, Figure 2 As shown, a welding path planning method is provided, which is applied to Figure 1 The controller 104 in FIG. 1 is used as an example for explanation.
[0094] S100, obtaining a surface point cloud of a workpiece to be welded.
[0095] Specifically, the user controls the shooting device to capture the workpiece point cloud image of the workpiece to be welded in the welding path planning interface of the terminal. The shooting device sends the captured image to the terminal. The terminal uploads the acquired image to the controller. The controller performs point cloud data analysis on the acquired image to obtain three-dimensional point cloud data of the workpiece to be welded, that is, the workpiece surface point cloud of the workpiece to be welded.
[0096] S200, clustering the workpiece surface point cloud to obtain point cloud clusters.
[0097] Specifically, the workpiece surface point cloud is clustered, each class represents a type of weld, and the means of clustering the workpiece surface point cloud include but are not limited to: Euclidean clustering, K-means clustering, etc. After the workpiece surface point cloud is clustered, one or more point cloud clusters are obtained.
[0098] S300, detecting weld endpoints in the point cloud clustering cluster, and determining the number of detected weld endpoints.
[0099] There is a weld between the weld end points. The weld formed between the weld end points can be a straight weld or a curved weld.
[0100] Specifically, there are several feature points in each point cloud cluster, and feature extraction is performed on the point cloud cluster to extract the feature points in the point cloud cluster. Further, the point cloud cluster is analyzed to determine the feature points in the point cloud cluster that can be used as weld endpoints.
[0101] When feature points that can be used as weld endpoints are detected, the number of weld endpoints is counted to obtain the number of weld endpoints.
[0102] S400: Detecting a first weld type of the weld according to the number of endpoints.
[0103] Specifically, based on the number of endpoints of the weld endpoints, a first weld type of the weld formed between the weld endpoints is determined, that is, the first weld type refers to the endpoint type of the weld.
[0104] S500, determining a second weld type of the weld based on a distance between a target vector between weld endpoints and a centroid of a preset region where the weld is located.
[0105] Specifically, the target vector between the weld endpoints is obtained, and the bottom surface point cloud data in the preset area around the trajectory point of each weld is obtained, for example, the bottom surface point cloud data in the circular area with a surrounding radius R is obtained, and based on the bottom surface point cloud data in the circular area with a surrounding radius R, the position of the centroid of the circular area is calculated, and based on the position of the centroid, the distance between the centroid and the target vector is obtained. The position of the centroid is the average value of the bottom surface point cloud data in the circular area.
[0106] Furthermore, based on the distance, a second weld type of the weld is determined. The obtained second weld type is actually the type of the weld edge, that is, it is determined which type of edge the weld needs to be welded belongs to.
[0107] S600: Perform welding path planning for the weld based on the first weld type and the second weld type.
[0108] Specifically, the first weld type is the type of the weld endpoint, and the second weld type is the type of the weld edge. Therefore, for each weld, a target weld type can be generated based on the type of the weld endpoint and the type of the weld edge, and the welding path of the weld can be planned based on the target weld type. Further, the controller sends the welding path planning result of the weld to the welding robot, and the welding robot welds the workpiece to be welded according to the welding path planning result of the weld.
[0109] The above-mentioned weld path planning method is different from the prior art in which the welding path planning of the weld is performed by teaching to realize the welding of the workpiece to be welded. The present application proposes a teaching-free weld path planning method, which does not require manual operation or model access. The surface feature points of the workpiece to be welded can be automatically clustered to obtain point cloud clustering clusters, and the number of endpoints of the weld endpoints and the detected weld endpoints in the point cloud clustering clusters is detected. According to the number of endpoints, the first weld type of the weld formed between the weld endpoints is detected, and based on the distance between the centroid of the weld in the preset area where the weld is located and the weld, the second weld type of the weld is detected, so as to realize comprehensive welding path planning for the weld based on the first weld type and the second weld type, thereby improving the accuracy of welding path planning.
[0110] In an exemplary embodiment, obtaining a workpiece surface point cloud of a workpiece to be welded includes:
[0111] A first workpiece point cloud of the workpiece to be welded captured by a shooting device is obtained, the first workpiece point cloud is converted into a robot coordinate system to obtain a second workpiece point cloud, the second workpiece point cloud is denoised to obtain a third workpiece point cloud, the bottom surface and the surface in the third workpiece point cloud are segmented to obtain a workpiece surface point cloud.
[0112] The shooting device is a device used for shooting, including a camera, a video camera, etc. The shooting device in this application is generally a 3D camera, which can be used to shoot the point cloud of an object. Denoising refers to the process of reducing noise in an image.
[0113] Specifically, the controller controls the 3D camera to shoot the workpiece to be welded, and obtains a first workpiece point cloud of the workpiece to be welded. The first workpiece point cloud is three-dimensional point cloud data of the workpiece to be welded, including all detailed information on the workpiece surface, but may also include interference background and noise from the surrounding environment.
[0114] Since the ultimate goal of welding path planning is to enable the welding robot to achieve accurate welding, it is necessary to convert the first workpiece point cloud into the welding robot coordinate system through the hand-eye calibration method to obtain the second workpiece point cloud. The difference between the first workpiece point cloud and the second workpiece point cloud is the different coordinate systems, but they are actually the same workpiece point cloud.
[0115] Next, the second workpiece point cloud is denoised to obtain a third workpiece point cloud. The denoising method includes but is not limited to using a straight-through filter to remove interfering background and part of the noise. In addition, the spatial range of the workpiece can be set according to the actual scene to retain the main part of the workpiece to be welded.
[0116] After denoising the workpiece point cloud, since the upper surface of the workpiece to be welded has more and more realistic features than the bottom surface, the present application also needs to segment the upper surface and the bottom surface of the workpiece to be welded to obtain the workpiece surface point cloud. Furthermore, after obtaining the workpiece surface point cloud, feature extraction can be performed on the workpiece surface point cloud to obtain surface feature points in the workpiece surface point cloud.
[0117] In an exemplary embodiment, before segmenting the bottom surface and the surface in the third workpiece point cloud, it also includes: processing the third workpiece point cloud remaining after denoising by a cluster analysis method, wherein cluster analysis refers to identifying the point cloud belonging to the same workpiece by grouping the third workpiece point cloud according to the distance between the points. By clustering the third workpiece point cloud, a complete point cloud of the workpiece to be welded can be extracted from the overall data, and stray points unrelated to the workpiece can be removed. Finally, the outlier noise points in the point cloud are further removed by using radius filtering, wherein the radius filtering determines whether the point is a noise point by checking the number of neighboring points within a certain radius of each point. If the number of neighboring points of a point is lower than the set threshold, the point is considered to be a noise point and is removed. By using the radius filtering method, isolated points and discontinuous points in the point cloud are effectively removed, and cleaner and more accurate workpiece point cloud data is obtained, providing a reliable basis for subsequent welding path planning of welds.
[0118] In an exemplary embodiment, the bottom surface and the surface in the third workpiece point cloud are segmented, including: fitting the plane equation of the third workpiece point cloud, and segmenting the bottom surface and the upper surface in the third workpiece point cloud by the plane equation of the third workpiece point cloud to obtain the workpiece bottom surface point cloud and the workpiece upper surface point cloud respectively.
[0119] The specific steps are as follows:
[0120] (1) Point cloud plane fitting
[0121] Define the coordinates of each point in the third workpiece point cloud as , where i=1, 2, 3, ..., n, and n is the total number of points in the third workpiece point cloud. Assume that the plane equation to be solved is Ax+By+Cz+D=0, where A, B, C, and D are the parameters of the plane equation. It is necessary to find a set of parameters A, B, C, and D through the least squares method so that the sum of the distances of all points to the plane is minimized while satisfying the distance threshold.
[0122] (2) Segmentation of point cloud
[0123] After fitting the plane to obtain the plane equation, the plane equation is used to segment the third workpiece point cloud, that is, the distance between each point in the third workpiece point cloud and the plane equation is obtained, and the points whose distance is less than or equal to the preset distance threshold are defined as inner points of the plane, that is, as the bottom surface points of the workpiece, and the points whose distance is greater than the preset distance threshold are defined as outer points of the plane, that is, as the upper surface points of the workpiece, so as to segment the bottom surface and the upper surface of the workpiece to obtain the workpiece surface point cloud.
[0124] In an exemplary embodiment, feature extraction is performed on a workpiece surface point cloud, including: projecting the workpiece surface point cloud onto a bottom surface, traversing the workpiece surface point cloud, creating a circle with a radius for the traversed points, calculating the average value of all points in the circle to obtain a centroid point in each circle, deleting the searched points from the point cloud, and obtaining a surface feature point composed of multiple centroid points when the point cloud of the workpiece to be welded is 0.
[0125] In the above embodiment, by denoising and plane segmenting the workpiece point cloud of the workpiece to be welded, the noise on the workpiece surface point cloud affected by the surrounding environment is less before feature extraction is performed on the workpiece surface point cloud, thereby more accurately extracting the features of the workpiece surface point cloud and reducing the possibility of mistaking noise points for feature points. Furthermore, through the fully automated process of the present application, no manual operation or model intervention is required. Once the shooting equipment completes scanning the workpiece to be welded, the controller will automatically extract the weld information and accurately guide the robot to perform position scanning to realize automatic welding. This highly intelligent method significantly improves production efficiency, reduces manual intervention, and truly achieves energy saving and efficiency improvement.
[0126] In an exemplary embodiment, detecting weld end points in point cloud clusters includes:
[0127] For any target feature point in the point cloud cluster, determine the first surface feature point farthest from the target feature point, obtain the first vector formed between the first surface feature point and the target feature point, and the second vector generated between the target feature point and the second surface feature point. If the cosine value between the first vector and the second vector is greater than the preset cosine value threshold, the target feature point is determined to be the weld endpoint.
[0128] The second surface feature point is any feature point in the point cloud cluster except the target feature point.
[0129] Specifically, the weld type of each point cloud cluster is judged. Specifically, firstly, any surface feature point in each point cloud cluster is traversed, and any surface feature point in the point cloud cluster is used as the target feature point P.
[0130] Secondly, determine the first surface feature point B farthest from the target feature point P. The specific steps include: searching for all surface feature points within a radius R from the target feature point P for the target feature point P, constructing a local point cloud, calculating the Euclidean distance between each surface feature point and the target feature point P in the local point cloud, and sorting them in descending order according to the distance, determining the first surface feature point B farthest from the target feature point P in the Euclidean distance, and forming a first vector between the first surface feature point B and the target feature point .
[0131] The local point cloud constructed by traversing is formed by forming a second vector between any surface feature point except the target feature point in the traversed local point cloud, that is, the second surface feature point C and the target feature point P. .
[0132] Finally, based on the cosine value between the first vector and the second vector, it is determined whether the target feature point is the weld end point. With the second vector If the cosine values between are greater than the preset cosine value threshold, the target feature point is determined to be the weld endpoint. With the second vector If the cosine values between are all less than or equal to the preset cosine value threshold, it is determined that the target feature point is not a weld endpoint, and so on, all weld endpoints in the point cloud cluster are calculated. Generally, the preset cosine value threshold is 0.
[0133] Furthermore, after finding the weld endpoints in the point cloud cluster, the weld endpoints can also be filtered. A general filtering method is: merging one of the weld endpoints whose distance between the two weld endpoints is less than a preset distance threshold.
[0134] In the above embodiment, by obtaining the target feature point and the first surface feature point farthest from the target feature point to form a first vector, and then obtaining the target feature point and any second surface feature point to form a second vector, it is possible to accurately determine whether the target feature point is the weld endpoint based on the cosine value between the first vector and the second vector.
[0135] In an exemplary embodiment, a first weld type of a weld is detected based on the number of endpoints, wherein:
[0136] When the number of endpoints is less than a preset number, the first weld type of the weld is determined to be a closed weld. When the number of endpoints is equal to the preset number, the distance between the third vector between all weld endpoints and the point cloud cluster is obtained, and when the distance is less than or equal to a first preset distance threshold, the first weld type is determined to be a flat weld. When the distance is greater than the first preset distance threshold, the first weld type is determined to be a curved weld. When the number of endpoints is greater than the preset number, the first weld type is determined to be a composite weld.
[0137] Among them, closed welds refer to welds that are closed and have no open areas, flat welds refer to welds that are in a horizontal position or with a small inclination angle, and composite welds refer to more complex welds, such as complex welds formed by multiple simple welds. The weld formed between the weld endpoints is different from the third vector formed between the weld endpoints. The weld is not necessarily the third vector. The third vector is the straight line vector formed between the weld endpoints.
[0138] Specifically, according to the number of endpoints, the first weld type of the weld is detected, and there are the following situations:
[0139] First, when the number of endpoints is less than a preset number, the first weld type of the weld is considered to be a closed closed weld.
[0140] The second method is to construct a third vector between all weld endpoints when the number of endpoints is equal to a preset number, and calculate the distance between the corresponding point cloud cluster and the constructed third vector. If the distance is less than or equal to a first preset distance threshold, the first weld type is determined to be a flat weld, and if the distance is greater than the first preset distance threshold, the first weld type is determined to be a curved weld.
[0141] Third, when the number of endpoints is greater than a preset number, the first weld type of the weld is a composite weld. Further, the point cloud clusters are traversed, and a straight line vector formed between the weld endpoints is fitted, and when the fitting result is a straight line, the first weld type is determined to be a linear complex weld, and when the fitting result is a curve, the first weld type is determined to be a curved complex weld.
[0142] In an exemplary embodiment, let the preset number be 2. When the number of endpoints of the weld is less than 2, the first weld type of the weld is determined to be a closed weld. When the number of endpoints of the weld is equal to 2, the distance between the third vector between the two weld endpoints and the point cloud cluster is obtained, and when the distance is less than or equal to the first preset distance threshold, the first weld type is determined to be a flat weld. When the distance is greater than the first preset distance threshold, the first weld type is determined to be a curved weld. When the number of endpoints is greater than 2, the first weld type is determined to be a composite weld, and then a straight line fitting is performed on the weld to determine whether the weld is a straight line weld or a curved weld.
[0143] In the above embodiment, the first weld type of the weld formed between the weld endpoints can be accurately determined based on the number of endpoints. However, this is not the final type of the weld. Further analysis and processing of the weld is required to accurately obtain the final type of the weld in combination with the first weld type.
[0144] In an exemplary embodiment, detecting a second weld type of a weld based on a distance between a target vector between weld endpoints and a centroid of a preset region where the weld is located includes:
[0145] When the distance between the centroid of the preset area where the weld is located and the target vector is greater than a second preset distance threshold, the second weld type of the weld is determined to be a single-sided weld; when the distance between the centroid of the preset area where the weld is located and the target vector is less than or equal to the second preset distance threshold, the second weld type of the weld is determined to be a multilateral weld.
[0146] The target vector is the straight line vector between the weld endpoints.
[0147] Specifically, the bottom surface point cloud data within a preset area around the trajectory point of each weld is obtained, for example, the bottom surface point cloud data within a circular area with a surrounding radius R. Based on the bottom surface point cloud data within the circular area with a surrounding radius R, the position of the center of mass of the circular area is calculated, and based on the position of the center of mass, the distance between the center of mass and the target vector is obtained.
[0148] When the distance is greater than the second preset distance threshold, the second weld type of the weld is determined to be a single-sided weld, and the weld is on one side of the center of mass. When the distance is less than or equal to the second preset distance threshold, the second weld type of the weld is determined to be a multilateral weld, and both sides of the weld need to be welded.
[0149] In an exemplary embodiment, let the preset number be 2, that is, the weld endpoints of the weld are 2. Then, when the distance between the centroid of the preset area where the weld is located and the target vector is less than or equal to the second preset distance threshold, the second weld type of the weld is determined to be a bilateral weld.
[0150] In the above embodiment, by obtaining the distance between the centroid of the weld in the preset area and the target vector formed between the weld end points, it is possible to accurately determine whether the weld is a single-sided weld or a multi-sided weld, thereby accurately realizing the path planning of the weld.
[0151] In an exemplary embodiment, performing welding path planning for a weld based on a first weld type and a second weld type includes:
[0152] If the first weld type is a flat weld, all endpoints of the weld are determined as path points. If the second weld type is a single-sided weld, a single path edge constructed based on the path points is determined as a welding path. If the second weld type is a multi-sided weld, a first path planning graph is generated based on multiple path edges between each pair of path points, and a welding path is constructed based on the first path planning graph.
[0153] Specifically, the process of path planning for flat welds includes: taking all weld endpoints of the weld as path points, if the second weld type of the flat weld is a single-sided weld, then constructing a path edge between all path points, the path edge passes through all weld endpoints, and all weld endpoints are passed only once, at this time, the path edge is a single-sided welding path of the flat weld front; if the second weld type of the flat weld front is a double-sided weld, then constructing multiple path edges between two path points, taking all path points as vertices of the path planning graph, and taking multiple path edges as edges of the path planning graph, constructing a first path planning graph, and constructing a welding path based on the first path planning graph, wherein the welding path is a path that does not repeatedly pass through the same path point.
[0154] Further, the first path planning graph can be represented in the form of an Euler graph, that is, the first path planning graph can be a first path planning Euler graph, and then after a depth-first search of the first path planning Euler graph, a path passing through all edges in the graph and each edge is passed only once is obtained, that is, the first Euler loop, and this first Euler loop is a flat welding front double-sided welding path. Among them, the Euler graph refers to a path passing through all edges in a graph (undirected graph or directed graph) and each edge is passed only once, and the corresponding loop is called an Euler loop, and a graph with an Euler loop is called an Euler graph. Taking the case where the number of endpoints of the weld end point is 2 and the first weld type is a flat weld front as an example, the two endpoints of the flat weld are taken as two path points. If the flat weld front is single-sided, a path edge is constructed between the two path points, and this path is a single-sided welding path of the flat weld front; if the flat weld front is double-sided, multiple path edges are constructed between multiple path points, and the two path points are taken as vertices and the two path edges as edges to construct the first path planning Euler graph. After a depth-first search, the first Euler circuit is obtained, and this circuit is a double-sided welding path of the flat weld front.
[0155] In the above embodiment, when the first weld type is a flat weld and the second weld type is a single-sided weld, a path edge constructed between all path points is determined as a welding path, and when the first weld type is a flat weld and the second weld type is a single-sided weld, based on a first path planning graph generated by multiple path edges constructed between every two path points in all path points, a first loop passing through all edges in the graph and each edge only once is determined, thereby planning a non-repetitive welding path.
[0156] In an exemplary embodiment, Figure 3 As shown, S600 includes:
[0157] S620, if the first weld type is a composite weld, selecting a starting endpoint from all weld endpoints;
[0158] S640, executing a neighborhood endpoint selection step: in the point cloud cluster, extracting neighborhood endpoints from a preset neighborhood range of the starting endpoint, and determining the starting endpoint and the neighborhood endpoint as path points.
[0159] S660, when the second weld type is a single-sided weld, a single path edge constructed based on the path point is determined as the first initial welding path, and the neighborhood endpoint is set as a new starting endpoint, and the neighborhood endpoint selection step is returned to execute until the point cloud clustering cluster cannot extract the neighborhood endpoint; a welding path is generated based on all the determined first initial welding paths.
[0160] S680, when the second weld type is a multi-sided weld, the multiple path edges constructed based on the path points are determined as the second initial welding path, and the neighborhood endpoint is set as a new starting endpoint, and the neighborhood endpoint selection step is returned to execute until the point cloud clustering cluster cannot extract the neighborhood endpoint; based on all the second initial welding paths, a second path planning map is generated, and a welding path is constructed based on the second path planning map.
[0161] Specifically, if the first weld type is a composite weld, it is first necessary to find the starting endpoint closest to the coordinate origin among all weld endpoints. This is to define the composite weld, that is, the starting endpoint of a complex weld, which can also be selected on the software interface.
[0162] After selecting the starting endpoint, the neighborhood endpoint selection step is executed, that is, the neighborhood endpoints are extracted from the preset neighborhood range of the starting endpoint in the point cloud cluster to which it belongs, and the extracted endpoints do not participate in the subsequent loop steps, so as to combine the extracted weld endpoints with the single and double-sided types to which the weld belongs to construct the vertices and edges of the Euler graph, that is, the starting endpoint and the neighborhood endpoints are determined as path points.
[0163] In the case where the second weld type is a single-sided weld, a path edge is constructed between the two path points of the starting endpoint and the neighborhood endpoint, and the path edge is used as the initial welding path. Next, the neighborhood endpoint is determined to be set as the new starting endpoint, and the neighborhood endpoint selection step is returned to execute until the point cloud clustering cluster cannot extract the neighborhood endpoint, and the welding path is generated based on all the determined first initial welding paths. It should be noted that all the determined first initial welding paths are non-repetitive paths, and the path points passed by the path are only passed once, and the same path point will not be passed repeatedly.
[0164] In the case where the second weld type is a multi-sided weld, multiple path edges are constructed between two path points, and the constructed multiple path edges are used as the initial welding path. For example, two path edges are constructed between two path points, and the two constructed path edges are used as the initial welding path. Next, the neighborhood endpoint is set as a new starting endpoint, and the neighborhood endpoint selection step is returned to execute until the point cloud clustering cluster cannot extract the neighborhood endpoint. After the neighborhood endpoints of the point cloud clustering cluster are searched in sequence, the last weld endpoint can be used as the reference point to search for the weld endpoint closest to the point in the remaining point cloud clustering clusters. After the search is completed, the point is updated as the starting endpoint of the new weld and the path edge generation process is repeated. After all weld endpoints are searched, the second path planning graph is constructed, and a depth-first search is performed on the second path planning graph to obtain a loop that traverses all edges in the graph and is not repeated. After the searched path points and path edges are removed, the depth-first search is continued to obtain another loop. By analogy, the second Euler loop and some non-loop paths obtained after the overall search are the welding path of the composite weld. The second path planning graph may be represented in the form of an Euler graph.
[0165] In the above embodiment, for more complex composite welds, a path planning Euler graph can be constructed to efficiently and accurately determine a non-repeating Euler circuit that traverses all edges in the Euler graph, thereby achieving accurate path planning for the weld.
[0166] In an exemplary embodiment, performing welding path planning for a weld based on a first weld type and a second weld type includes:
[0167] If the first weld type is a closed weld, the cluster centroid of the point cloud cluster is detected, the polar angle between any two weld endpoints in the point cloud cluster and the cluster centroid is determined, and the welding path is planned for the weld according to the size sorting result of the starting endpoint and all polar angles.
[0168] The starting endpoint is selected from all weld endpoints.
[0169] Specifically, for closed welds, first, it is also necessary to define the starting endpoint of the closed weld, that is, to find the endpoint closest to the origin of the robot coordinate system from all welds, or to customize a weld endpoint as the starting endpoint. Secondly, detect the cluster centroid of the point cloud cluster, and use the centroid point as the pole to traverse the point cloud cluster of the entire closed weld, calculate the polar angle formed by any two weld endpoints and the pole in the point cloud cluster, and sort the polar angle of the entire closed weld. Finally, find the selected starting endpoint among the sorted weld endpoints to rotate the data, and obtain the path of the closed weld starting from the starting endpoint and finally returning to the starting endpoint.
[0170] In the above embodiment, by sorting the polar angles formed between any two weld endpoints and the centroid in the weld point cloud data and combining them with the preset starting endpoint, the weld path can be accurately planned.
[0171] The specific steps of weld path planning will be described below with a detailed embodiment, including:
[0172] 1. Use 3D camera to obtain point cloud and perform data preprocessing
[0173] 1.1 Get point cloud. Use a 3D camera to take pictures of the workpiece to be welded and obtain the three-dimensional point cloud data of the workpiece. These point cloud data include all the detailed information of the workpiece surface, but may also contain the interference background and noise of the surrounding environment. In order to better illustrate the structure of the workpiece to be welded, the three-dimensional point cloud of the workpiece to be welded is as follows: Figure 4 shown.
[0174] 1.2 Point cloud data preprocessing. First, the conversion matrix obtained by hand-eye calibration is used to convert the point cloud data of the workpiece to be welded into the robot coordinate system. Secondly, the spatial range is set according to the actual scene and the straight-through filter is used to remove the interference background and part of the noise, retaining the main part of the workpiece to be welded. Then the cluster analysis method is used to process the remaining point cloud data, that is, the point cloud data is grouped according to the distance between the points, and the point cloud belonging to the same workpiece is identified. Through cluster analysis, the complete point cloud of the workpiece to be welded can be extracted from the overall data, and the stray points unrelated to the workpiece can be removed. Finally, the radius filter is used to further remove the outlier noise points in the point cloud, that is, by checking the number of neighboring points of each point within a certain radius, it is determined whether the point is a noise point. If the number of neighboring points of a point is lower than the set threshold, the point is considered to be a noise point and removed. In this way, isolated points and discontinuous points in the point cloud can be effectively removed, and cleaner and more accurate point cloud data of the workpiece to be welded can be obtained, providing a reliable basis for subsequent welding path planning. The point cloud image of the workpiece to be welded after data preprocessing is shown in the figure. Figure 5 shown.
[0175] 2. Point cloud feature extraction
[0176] Fit the plane equation of the point cloud of the workpiece to be welded, use the plane equation to split the bottom and top surfaces of the point cloud, obtain the bottom point cloud data and top point cloud data respectively, then cluster the top point cloud, construct a circle with a radius of R to traverse each type of point cloud, calculate the centroid of the point cloud in each circle respectively, and obtain the point cloud features constructed by multiple centroids. The specific steps are as follows:
[0177] (1) Point cloud plane fitting
[0178] Define the coordinates of each point in the preprocessed workpiece point cloud as , where i=1, 2, 3, ..., n, and n is the total number of points in the third workpiece point cloud. Assume that the plane equation to be solved is Ax+By+Cz+D=0, where A, B, C, and D are the parameters of the plane equation. It is necessary to find a set of parameters A, B, C, and D through the least squares method so that the sum of the distances of all points to the plane is minimized while satisfying the distance threshold.
[0179] (2) Segmentation of point cloud
[0180] The plane equation is used to segment the workpiece point cloud. Points whose distance is less than or equal to the preset distance threshold are defined as inner points of the plane, and points whose distance is greater than the preset distance threshold are defined as outer points of the plane, thereby segmenting the bottom and top surfaces of the workpiece.
[0181] (3) Upper surface point cloud feature extraction
[0182] The upper surface point cloud data is projected onto the bottom surface, the upper surface point cloud is traversed, a circle with a radius of is created for the traversed points, the average value of all points in the circle is calculated to obtain the centroid point, and finally the feature points of the upper surface point cloud composed of multiple centroid points are obtained.
[0183] 3. Determination of the endpoint type of the weld
[0184] Cluster the feature points, each category represents a type of weld, and determine the weld type for each category, and finally perform targeted processing based on the weld type. The specific steps are as follows:
[0185] (1) Weld classification
[0186] The feature points are classified using Euclidean clustering, and the weld type is determined for each type of point cloud.
[0187] (2) Determination of weld type
[0188] Traverse each type of point cloud, search for all points within radius R for each point P, and construct a local point cloud. Calculate the Euclidean distance between each point and point P in this local point cloud, and sort them in descending order according to the distance size to obtain the point B farthest from point P, and construct the vector between point P and point B .
[0189] Traverse the constructed local point cloud and construct the vector between each traversal C and point P , calculate the vector and vector The cosine value of point B is calculated. If the cosine value is greater than 0, point B is marked as an endpoint. After finding the endpoints of each type of point cloud, filter the found endpoints and merge the endpoints with close distances. And so on, calculate the endpoints of all types. And process them according to different types as follows:
[0190] The first type, the number of endpoints is equal to 2
[0191] Construct a vector between the two endpoints and calculate the distance from the corresponding class point cloud to the vector. If the distance is less than a first preset distance threshold, the first weld type is a flat weld, and if the preset distance is greater than the first preset distance threshold, the first weld is a curved weld.
[0192] The second type: the number of endpoints is greater than 2
[0193] The number of endpoints is greater than 2, and the first weld type is a composite weld, that is, a more complex weld. It is necessary to traverse the endpoints in this type of point cloud and perform straight line fitting in turn to obtain all straight line welds. The remaining point clouds are curved welds.
[0194] The third type, the number of endpoints is less than 2
[0195] The number of endpoints is less than 2, and the first weld type is a closed weld.
[0196] 4. Single and double side determination of weld edge
[0197] Construct a circular area within the radius R of each weld trajectory point, extract the bottom surface point cloud data within the circular area, calculate the centroid coordinates of the bottom surface point cloud data, and calculate the distance between the vectors formed by the centroid and the two endpoints of the weld. If the distance is greater than the second preset distance threshold, the second weld type is a single-sided weld, and the weld is on one side of the centroid. If the distance is less than the second preset distance threshold, the second weld type is a double-sided weld, and both sides of the flat weld need to be welded.
[0198] 5. Path construction for weld trajectory points
[0199] For each weld, the welding path is constructed according to the first weld type and the second weld type, that is, according to the endpoint type and the single and double-sided properties of the weld edge. The specific steps are as follows:
[0200] (1) Flat welding path structure
[0201] The two endpoints of the flat welding front are taken as two path points. If the flat welding front is single-sided, a path edge is constructed between the two path points, and this path is a single-sided welding path of the flat welding front. If the flat welding front is double-sided, two path edges are constructed between the two path points, and the two path points are used as vertices and the two path edges are used as edges to construct an Euler graph. After performing a depth-first search on the Euler graph, an Euler circuit is obtained, and this circuit is a double-sided welding path of the flat welding front.
[0202] (2) Composite welding path structure
[0203] Use the calibrated matrix to convert the weld point cloud to the robot coordinate system, and find the endpoint closest to the coordinate origin among all welds. This is to define the starting endpoint of a complex weld, which can also be selected on the software interface.
[0204] After selecting the starting endpoint, search for the adjacent weld endpoints in the weld to which it belongs, and construct the vertices and edges of the Euler graph according to the second weld type to which the weld belongs. If the second weld type is single-sided, construct an edge between the two points. If the second weld type is double-sided, construct two edges between the two points. After searching and constructing the path edges between the two adjacent endpoints in sequence, take the last weld endpoint as the reference point, search for the weld endpoint closest to the point in the remaining welds, and after the search is completed, update the point as the new initial point and repeat the above process. After all the weld points are searched and constructed into the Euler graph, a depth-first search is performed on the Euler graph to obtain an Euler circuit. After removing the searched points and edges, a depth-first search is continued to obtain another Euler circuit. By analogy, the Euler circuit and some non-circuit paths obtained after the overall search are the welding paths of complex welds.
[0205] (3) Closed welding path structure
[0206] First, use the matrix obtained by calibration to convert the weld point cloud to the robot coordinate system, and find the endpoint closest to the coordinate origin among all welds. This is to define the starting endpoint of a complex weld, which can also be selected through the software interface. Calculate the centroid of this closed weld, and use the centroid as the pole to traverse the point cloud data of the entire closed weld, calculate the polar angle formed by the two end points and the pole in the point cloud, and sort the polar angle of the entire closed weld. Finally, find the selected weld starting endpoint among the sorted weld endpoints to rotate the data, and obtain the path of the closed weld starting from the starting endpoint and finally returning to the starting endpoint.
[0207] Furthermore, in the above path planning process, the weld recognition effect diagram is as follows: Figure 6 As shown in the figure, the welding path planning effect diagram is as follows Figure 7 As shown in the figure, the local effect diagram of welding path planning taking one of the welds as an example is shown in Figure 8 shown.
[0208] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0209] Based on the same inventive concept, the embodiment of the present application also provides a weld path planning device for implementing the weld path planning method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more weld path planning device embodiments provided below can refer to the limitations of the weld path planning method above, and will not be repeated here.
[0210] In an exemplary embodiment, Fig. 9 As shown, a welding seam path planning device is provided, comprising: a feature point acquisition module 100, a clustering module 200, an endpoint detection module 300, a first type determination module 400, a second type determination module 500 and a path planning module 600, wherein:
[0211] A feature point acquisition module 100 is used to acquire a surface point cloud of a workpiece to be welded;
[0212] The clustering module 200 is used to cluster the workpiece surface point cloud to obtain point cloud clusters;
[0213] An endpoint detection module 300 is used to detect weld endpoints in the point cloud clusters and determine the number of endpoints of the detected weld endpoints, wherein welds exist between the weld endpoints;
[0214] A first type determination module 400 is used to detect a first weld type of the weld according to the number of endpoints;
[0215] A second type determination module 500, for detecting a second weld type of the weld based on a distance between a target vector between weld endpoints and a centroid of a preset region where the weld is located;
[0216] The path planning module 600 is used to plan a welding path for the weld based on the first weld type and the second weld type.
[0217] In one embodiment, the feature point acquisition module 100 is also used to acquire a first workpiece point cloud of the workpiece to be welded captured by a shooting device, convert the first workpiece point cloud into a robot coordinate system to obtain a second workpiece point cloud, denoise the second workpiece point cloud to obtain a third workpiece point cloud, and segment the bottom surface and the surface in the third workpiece point cloud to obtain a workpiece surface point cloud.
[0218] In one embodiment, the first type determination module 400 is also used to determine, for any target feature point in the point cloud clustering cluster, a first surface feature point that is farthest from the target feature point, obtain a first vector formed between the first surface feature point and the target feature point, and a second vector generated between the target feature point and the second surface feature point, wherein the second surface feature point is any feature point in the point cloud clustering cluster except the target feature point, and if the cosine value between the first vector and the second vector is greater than a preset cosine value threshold, the target feature point is determined to be a weld endpoint.
[0219] In one embodiment, the first type determination module 400 is also used to determine that the first weld type of the weld is a closed weld when the number of endpoints is less than a preset number, and when the number of endpoints is equal to the preset number, obtain the distance between the third vector between all weld endpoints and the point cloud cluster, and when the distance is less than or equal to a first preset distance threshold, determine that the first weld type is a flat weld, and when the distance is greater than the first preset distance threshold, determine that the first weld type is a curved weld, and when the number of endpoints is greater than the preset number, determine that the first weld type is a composite weld.
[0220] In one embodiment, the second type determination module 500 is also used to determine that the second weld type of the weld is a single-sided weld when the distance between the centroid of the preset area where the weld is located and the target vector is greater than a second preset distance threshold, wherein the target vector is a vector formed between the end points of the weld, and when the distance between the centroid of the preset area where the weld is located and the target vector is less than or equal to the second preset distance threshold, the second weld type of the weld is determined to be a multilateral weld.
[0221] In one embodiment, the path planning module 600 is also used to determine all weld endpoints of the weld as path points if the first weld type is a flat weld, and to determine a single path edge constructed based on the path points as a welding path if the second weld type is a single-sided weld, and to generate a first path planning graph based on multiple path edges between each pair of path points if the second weld type is a multi-sided weld, and to construct a welding path based on the first path planning graph.
[0222] In one embodiment, the path planning module 600 is also used to select a starting endpoint from all weld endpoints if the first weld type is a composite weld, and perform a neighborhood endpoint selection step: in the point cloud clustering cluster, extract neighborhood endpoints from a preset neighborhood range of the starting endpoint, and determine the starting endpoint and the neighborhood endpoint as path points. When the second weld type is a single-sided weld, determine a single path edge constructed based on the path point as the first initial welding path, and set the neighborhood endpoint as a new starting endpoint, and return to execute the neighborhood endpoint selection step until the point cloud clustering cluster cannot extract the neighborhood endpoint; generate a welding path based on all the determined first initial welding paths, and when the second weld type is a multi-sided weld, determine multiple path edges constructed based on the path point as the second initial welding path, and set the neighborhood endpoint as the new starting endpoint, and return to execute the neighborhood endpoint selection step until the point cloud clustering cluster cannot extract the neighborhood endpoint; generate a second path planning map based on all the second initial welding paths, and construct a welding path based on the second path planning map.
[0223] In one embodiment, the path planning module 600 is also used to detect the cluster centroid of the point cloud cluster if the first weld type is a closed weld, determine the polar angle between any two weld endpoints in the point cloud cluster and the cluster centroid, and plan the welding path for the weld according to the size sorting results of the starting endpoint and all polar angles, wherein the starting endpoint is selected from all weld endpoints.
[0224] Each module in the above-mentioned weld path planning device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0225] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.10As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store workpiece point cloud data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a weld path planning method is implemented.
[0226] Those skilled in the art will understand that Fig.10 The structure shown in the figure is a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0227] In an exemplary embodiment, a weld path planning system is provided, including a controller and a shooting device, the shooting device is used to obtain a workpiece point cloud image of a workpiece to be welded, and the controller is used to execute the steps in the above-mentioned method embodiments.
[0228] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0229] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0230] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0231] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0232] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0233] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A welding seam path planning method, characterized in that: The method comprises: Acquire a workpiece surface point cloud of a workpiece to be welded; Clustering the workpiece surface point cloud to obtain point cloud clusters; Detecting weld endpoints in the point cloud clusters and determining the number of detected weld endpoints, wherein welds exist between the weld endpoints; Detecting a first weld type of the weld according to the number of endpoints; Detecting a second weld type of the weld based on a distance between a target vector between the weld endpoints and a centroid of a preset area where the weld is located; Based on the first weld type and the second weld type, a welding path is planned for the weld.
2. The method according to claim 1, characterized in that The step of obtaining a surface point cloud of a workpiece to be welded comprises: Acquire a first workpiece point cloud of the workpiece to be welded photographed by a photographing device; The first workpiece point cloud is converted into a robot coordinate system to obtain a second workpiece point cloud, and the second workpiece point cloud is denoised to obtain a third workpiece point cloud; The bottom surface and the surface in the third workpiece point cloud are segmented to obtain a workpiece surface point cloud.
3. The method according to claim 1, characterized in that The detecting weld end points in the point cloud clusters comprises: For any target feature point in the point cloud cluster, determining the first surface feature point farthest from the target feature point; Acquire a first vector formed between the first surface feature point and the target feature point, and a second vector generated between the target feature point and a second surface feature point, wherein the second surface feature point is any feature point in the point cloud cluster except the target feature point; If the cosine value between the first vector and the second vector is greater than a preset cosine value threshold, the target feature point is determined to be a weld endpoint.
4. The method according to claim 1, characterized in that The step of detecting the first weld type of the weld according to the number of endpoints includes: When the number of endpoints is less than a preset number, determining that the first weld type of the weld is a closed weld; When the number of endpoints is equal to the preset number, obtaining the distance between the third vectors between all weld endpoints and the point cloud cluster, and determining that the first weld type is a flat weld when the distance is less than or equal to a first preset distance threshold, and determining that the first weld type is a curved weld when the distance is greater than the first preset distance threshold; When the number of endpoints is greater than a preset number, it is determined that the first weld type is a composite weld.
5. The method according to claim 1, characterized in that The detecting the second weld type of the weld based on the distance between the target vector between the weld endpoints and the centroid of the preset area where the weld is located comprises: When the distance between the centroid of the preset area where the weld is located and the target vector is greater than a second preset distance threshold, determining that the second weld type of the weld is a single-sided weld, wherein the target vector is a vector formed between the end points of the weld; When the distance between the centroid of the preset area where the weld is located and the target vector is less than or equal to a second preset distance threshold, it is determined that the second weld type of the weld is a polygonal weld.
6. The method according to claim 1, characterized in that The performing welding path planning for the weld based on the first weld type and the second weld type includes: If the first weld type is a flat weld, all weld end points of the weld are determined as path points; In the case where the second weld type is a single-side weld, determining a single path edge constructed based on the path points as a welding path; In the case where the second weld type is a multi-sided weld, a first path planning graph is generated based on a plurality of path edges between the path points, and a welding path is constructed based on the first path planning graph.
7. The method according to claim 1, characterized in that The performing welding path planning for the weld based on the first weld type and the second weld type includes: If the first weld type is a composite weld, selecting a starting endpoint from all weld endpoints; Execute a neighborhood endpoint selection step: in the point cloud cluster, extract neighborhood endpoints from a preset neighborhood range of the start endpoint, and determine the start endpoint and the neighborhood endpoint as path points; In the case where the second weld type is a single-side weld, a single path edge constructed based on the path point is determined as a first initial welding path, and the neighborhood endpoint is set as a new starting endpoint, and the neighborhood endpoint selection step is returned to be executed until the point cloud clustering cluster cannot extract the neighborhood endpoint; a welding path is generated according to all the determined first initial welding paths; In the case where the second weld type is a multilateral weld, the multiple path edges constructed based on the path points are determined as the second initial welding path, and the neighborhood endpoint is set as a new starting endpoint, and the neighborhood endpoint selection step is returned to be executed until the point cloud clustering cluster cannot extract the neighborhood endpoint; based on all the second initial welding paths, a second path planning map is generated, and a welding path is constructed based on the second path planning map.
8. The method according to claim 1, characterized in that The performing welding path planning for the weld based on the first weld type and the second weld type includes: If the first weld type is a closed weld, detecting the cluster centroid of the point cloud cluster; Determine the polar angle between any two weld endpoints in the point cloud cluster and the centroid of the cluster; The welding path planning is performed on the weld according to the result of sorting the starting endpoint and all polar angles, wherein the starting endpoint is selected from all weld endpoints.
9. A welding seam path planning device, characterized in that: The device comprises: A feature point acquisition module, used to acquire a surface point cloud of a workpiece to be welded; A clustering module, used for clustering the workpiece surface point cloud to obtain point cloud clusters; An endpoint detection module, used for detecting weld endpoints in the point cloud clusters and determining the number of detected weld endpoints, wherein welds exist between the weld endpoints; A first type determination module, configured to detect a first weld type of the weld according to the number of endpoints; A second type determination module, configured to detect a second weld type of the weld based on a distance between a target vector between the weld endpoints and a centroid of a preset area where the weld is located; A path planning module is used to plan a welding path for the weld based on the first weld type and the second weld type.
10. A welding seam path planning system, characterized in that: The system includes a controller and a shooting device, wherein the shooting device is used to obtain a workpiece point cloud image of a workpiece to be welded, and the controller is used to execute the weld path planning method as described in any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Welding path planning method, electronic equipment and computer readable storage medium
CN120080078A
Welding spot detection method and system based on cooperation of double manipulators
CN120286927A
Self-adaptive fusion depth control system for TIG (Tungsten Inert Gas) welding of coiled pipe
CN120572099A
Welding seam information extraction method, device and equipment, storage medium and program product
CN120953278A
Weld information extraction method, device, equipment, storage medium and program product
CN120953278B