Complex workpiece-oriented robot welding path planning and obstacle avoidance method and system

By using multi-scale adaptive weighted curvature estimation and obstacle skeleton graph modeling, the problems of obstacles and process constraints in welding path planning for complex workpieces are solved, and efficient and safe welding path optimization is achieved.

CN121374653AActive Publication Date: 2026-01-23HUNAN UNIV
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202511965400.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-01-23
Estimated Expiration
2045-12-24

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively plan optimal welding paths for complex workpieces, taking into account the effects of obstacles, differences in weld seam location distribution, and various process constraints, resulting in low welding efficiency, unstable quality, and insufficient safety.

Method used

We extract weld seams using a multi-scale adaptive weighted curvature estimation method, and filter weld seam point clouds by combining direction-sensitive curvature indices and local geometric judgments. We model weld seam relationships based on obstacle skeleton diagrams, generate safe transition and obstacle avoidance paths, and optimize welding path planning.

Benefits of technology

It improves the efficiency and quality of welding path planning, ensures the safety of the welding process, reduces computational complexity, and meets various process constraints.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121374653A_ABST
    Figure CN121374653A_ABST
Patent Text Reader

Abstract

The invention provides a robot welding path planning and obstacle avoidance method and system for a complex workpiece, and the method comprises the steps: extracting all welding seams from a workpiece, and carrying out the clustering of the welding seams, and obtaining a welding seam grouping result; sorting the welding seam clusters and sorting the welding seams in each welding seam cluster according to the welding seam grouping result, and generating G welding seam construction sequence sequences meeting the process constraint; safe transition paths are generated between the initial position of the welding gun and the first welding point of the welding seam construction sequence, between adjacent welding seams in the welding seam construction sequence and between the last welding point of the welding seam construction sequence and the reset position of the welding gun, and a complete welding path is obtained; and with the aim of minimizing the comprehensive cost of the welding paths, the optimal welding path is searched in the G welding paths. According to the method, the welding path planning problem under the comprehensive action of multiple factors such as obstacle influence, welding seam position distribution difference and multiple process constraints is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent welding technology, specifically to a method and system for robot welding path planning and obstacle avoidance for complex workpieces. Background Technology

[0002] Path planning, as one of the core technologies of welding robot systems, directly affects welding efficiency, quality, and safety. An excellent path planning scheme not only needs to determine a reasonable welding sequence to minimize idle travel time, but also needs to generate safe and smooth transition paths to avoid collisions with the workpiece, while simultaneously satisfying various welding process constraints. In typical steel structure welding scenarios, the workpiece geometry is complex and varied, with numerous obstacles such as columns, beams, and stiffening plates. There are a large number of welds, typically between twenty and one hundred, distributed in different locations and directions in three-dimensional space. Simultaneously, multiple process constraints must be met, such as vertical welding must proceed from bottom to top to prevent molten metal from flowing downwards, adjacent welds must be welded consecutively to improve efficiency, and smooth transitions in posture are required to ensure welding quality. The combined effect of these factors makes welding path planning a complex optimization problem with high dimensions, multiple constraints, and strong coupling.

[0003] Therefore, there is an urgent need for a robot welding path planning and obstacle avoidance method and system for complex workpieces, which can realize the planning of the optimal welding path under the premise of considering the influence of obstacles, the difference in weld position distribution and various process constraints. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for robot welding path planning and obstacle avoidance for complex workpieces. It aims to solve the problem of optimal welding path planning under the combined effects of multiple factors such as obstacle influence, differences in weld seam location distribution, and various process constraints. The specific technical solution is as follows: A robotic welding path planning and obstacle avoidance method for complex workpieces includes: S1. Extract all welds from the workpiece and cluster the welds to obtain weld grouping results. ,in, Indicates the first A cluster of weld seams; S2, Results of weld grouping The sorting of weld clusters and the sorting of individual welds within each weld cluster are performed to generate... A sequence of weld construction operations that satisfies process constraints ,in, Integer and ; S3, Initial position of welding torch Sequence of weld construction The sequence of welding points and weld construction The sequence of adjacent welds and the order of weld construction. The last welding point and the welding torch reset position A safe transition path is generated between them to obtain a complete welding path. ; S4. With the goal of minimizing the overall cost of the welding path, Find the optimal welding path among the welding paths.

[0005] Preferably, in step S1, extracting all welds from the workpiece specifically involves: S1.1, For each point cloud on the workpiece Define a multi-scale neighborhood radius set and select point clouds from it. optimal scale ; S1.2, Point Cloud At the optimal scale Construct a weighted covariance matrix from the neighborhood point set below. For the weighted covariance matrix Eigenvalues ​​are obtained by performing eigenvalue decomposition. , and Based on eigenvalues , and Point cloud obtained by calculation First principal curvature Second principal curvature ; S1.3, based on , , , and Computational point cloud Direction-sensitive curvature index ; S1.4, Direction-Sensitive Curvature Index Based on Each Point Cloud High curvature regions were selected, and concave region point clouds were selected from these regions to form the weld point set. ; S1.5, Based on weld point set Weld skeleton extraction and smooth fitting are performed to obtain weld sets. ,in Indicates the first A weld seam.

[0006] Preferably, in step S1.4, the specific steps for selecting concave region point clouds from high curvature regions are: A1.1 Calculate the center point in a region of high curvature. Concave-convex projection index : wherein, is the concave-convex projection index, ranging [-1, 1]; is the sign function, returning +1 for positive numbers, -1 for negative numbers, and 0 for zero; denotes the point under the optimal scale ; is the point cloud under the optimal scale ; denotes any one of the neighborhood points in the set ; is the normal vector of the point ; A1.2, judging the concave-convex of the point based on the concave-convex projection index , the concave-convex discrimination index of the point is denoted as: wherein, is the convex point discrimination threshold; is the concave point discrimination threshold; then the point is considered as a convex point, then the point is considered as a concave point, then the point is considered as a planar point; A1.3, performing quadratic surface fitting on the neighborhood range of the point under the optimal scale in the high-curvature region, calculating the Gaussian curvature and the mean curvature based on the quadratic surface fitting equation, if and and then the point is considered as belonging to a concave region.

[0007] Preferably, the welding seams are clustered in step S1 to obtain a welding seam grouping result , specifically: B1.1, using a skeleton extraction algorithm to obtain a skeleton graph of the obstacle free space; B1.2, modeling the welding seams and the relationship between the welding seams as a weighted undirected graph based on the skeleton graph; denotes a node set, each node corresponding to a welding seam; denotes the spatial distance and connection relationship between the welding seams obtained based on the skeleton graph;​ representing an edge weight matrix; B1.3, constructing a normalized Laplacian matrix of the weighted undirected graph and performing eigenvalue decomposition to obtain eigenvalues and corresponding eigenvectors, wherein ; B1.4, removing the eigenvalues , and selecting eigenvectors corresponding to the first minimum eigenvalues in to form an eigenvector matrix ; B1.5, after normalizing each row eigenvector of the eigenvector matrix , clustering is performed using a K-means algorithm to obtain a final grouping result ; wherein the minimum end point distance between the weld and the weld is mapped to a similarity using a Gaussian kernel function, and the weight between the weld and the weld in the edge weight matrix is represented as: wherein , is an enhancement coefficient, and is a connectivity constraint judgment result between the weld and the weld .

[0008] Preferably, the manner of generating a safe transition path in step S3 is: if the distance between two point positions to be connected is less than a connection determination threshold , the line between the two point positions is taken as a safe transition path; if the distance between two point positions to be connected is not less than the connection determination threshold , safe transition points are searched around the point positions, and then a safe transition path is constructed based on the two safe transition points.

[0009] Preferably, searching for a safe transition point around a point position to be connected is specifically: S3.1, taking one point position to be connected as the center, a set of transition direction sets is predefined: wherein represents the total number of transition directions, and Indicates the first The unit direction vector of each transition direction; S3.2, along each transition direction in steps Perform spatial sampling: in, Indicates the first The first transition direction One sampling point, Indicates the first Each sampling length, Indicates the initial sampling length. Indicates the sampling step size; S3.3 Calculate the minimum distance from each sampling point to the obstacle point cloud. : in, For the obstacle point cloud set, Represents a set Any point in it; S3.4. Select candidate safe points from each sampling point to obtain the location. The set of candidate safe points is as follows: If a certain transition direction is from Location starting from each sampling point If the transition direction is gradually increased, it will be retained; otherwise, it will be eliminated. If the number of sampling points that do not meet the safety distance constraint in a certain transition direction exceeds [a certain number]... If there are [number] cases, then that transition direction is eliminated; where, if [number] cases are involved... Then sampling points Meet safety distance constraints. For the set threshold, It is the safe distance threshold; In each of the retained transition directions, select The largest sampling point is used as a candidate safe point for each transition direction.

[0010] Preferably, the set of candidate safe points for the two points that need to be connected. and In the middle, by minimizing two candidate safe points and The distance between them is used to obtain a safe transition point pair : If a safe transition point and If the connection between them passes discrete collision detection, then... and The connection between them serves as a safe transition path; if it fails discrete collision detection, then... and An obstacle avoidance path is generated between them as a safe transition path; Among them, for and Specifically, generating obstacle avoidance paths as safe transition paths involves: For safe transition points and The Laplace equation is constructed from the obstacle point cloud, and the harmonic potential field is obtained by discretizing and solving the Laplace equation using the finite element method. ; to a safe transition point Starting from a safe transition point As the endpoint, based on the harmonic potential field Gradient field generation using the fourth-order Runge-Kutta method and Obstacle avoidance paths between them.

[0011] Preferred, the first The welding path is represented as , Indicates the first The first of the welding paths One weld seam Indicates the first The first of the welding paths The total cost of each transition path is expressed as follows: in, For the first The overall cost of a single welding path; For the first The total length of the transition path in the welding path, , For the first The first of the welding paths A transition path; For the first Collision risk of welding paths , Indicates the first The transition path in the first Location at any given moment express Minimum distance to the point cloud of the obstacle; Indicates the first The smoothness index of the welding path. , express The second derivative; , and all represent the adjustment coefficient.

[0012] Preferably, in step S2, the weld construction sequence is generated when meeting the following requirements: The welding motion direction of the vertical weld must meet the principle of top-down process; The two end points with the minimum distance between adjacent welds should be selected as the termination point of the previous weld and the starting point of the next weld; The starting point of the first weld in the first weld cluster after sorting should be a point in the preset starting welding point set.

[0013] The application also provides a robot welding path planning and obstacle avoidance system for a complex workpiece, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the method.

[0014] The technical scheme of the application has the following beneficial effects: The application adopts a multi-scale adaptive weighted curvature estimation method, constructs a multi-scale neighborhood system, and adaptively selects an optimal calculation scale according to local geometric characteristics, introduces a distance and normal consistency double weighting mechanism to suppress the influence of noise; at the same time, the application defines a direction-sensitive curvature index by fusing composite indexes such as curvature, directionality and anisotropy, and specially enhances the geometric characteristics of the weld, which can effectively distinguish the weld from other high-curvature features; finally, the concave region point cloud screening method of the application combines local geometric judgment (normal projection) and global differential geometric judgment (curvature) to improve the accuracy and robustness of concave-convex classification.

[0015] The application models the weld and the relationship between the welds as a weighted undirected graph based on the skeleton graph of the obstacles, considers the connectivity constraint between adjacent welds, and obtains the welds in each cluster in each weld cluster, which have strong spatial and structural correlation, and can be processed as the same welding task unit in the subsequent path planning stage, thereby reducing the computational complexity of global path optimization.

[0016] The application fully considers the connectivity constraint and the safety distance constraint when generating the transition path, only finds a safe transition point between two points that do not meet the connectivity constraint, and considers the safety distance between the welding torch and the obstacle when generating the obstacle avoidance path, which not only reduces the calculation pressure, but also ensures that the welding torch will not collide with the obstacle in the entire welding path, and ensures the safety of the entire welding process.

[0017] The application fully considers the requirements of the welding process when sequencing the weld clusters and sequencing the welds in the clusters, and can realize specific welding sequence control (such as starting from a key part, a fixed end or a specific assembly direction), thereby improving the overall welding quality and structural stability.

[0018] In addition to the purposes, features and advantages described above, the present application has other purposes, features and advantages. The present application will be further described below with reference to the drawings. BRIEF DESCRIPTION OF DRAWINGS

[0019] The accompanying drawings, which form a part of this application, are included to provide a further understanding of the application, illustrate the preferred embodiments of the application and assist in the explanation of the application. In the drawings: Figure 1 is a flowchart of the robot welding path planning and obstacle avoidance method for complex workpieces of the present application. DETAILED DESCRIPTION

[0020] In order to facilitate the understanding of the present application, the present application will be described more fully below, and preferred embodiments of the present application will be given. However, the present application can be realized in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used in the specification of the present application herein are only for the purpose of describing the specific embodiments and are not intended to limit the present application.

[0022] Example 1 Referring to Figure 1 , the present embodiment provides a robot welding path planning and obstacle avoidance method for complex workpieces, specifically as follows: S1, extracting all welds from the workpiece, clustering the welds to obtain a weld grouping result , wherein, represents the th weld cluster; Before optimal path planning and obstacle avoidance, the weld seam of the workpiece should be extracted quickly, accurately and robustly. Traditional curvature estimation methods face two major challenges when dealing with weld seam point clouds: first, they are sensitive to noise and outliers, which can easily produce false high curvature responses; second, they are difficult to adapt to the multi-scale characteristics of the weld seam, as the geometric parameters such as weld seam width and depth vary significantly at different locations. To solve these problems, the embodiment proposes a multi-scale adaptive weighted curvature (MAWC) estimation method. This method constructs a multi-scale neighborhood system and adaptively selects the optimal calculation scale according to local geometric characteristics, while introducing a distance and normal consistency double weighting mechanism to suppress the influence of noise. Specifically as follows: S1.1, for each point cloud on the workpiece define a multi-scale neighborhood radius set, from which the optimal scale of the point cloud is selected ; Preferably, the multi-scale neighborhood radius set is represented as: wherein, is the neighborhood search radius of the layer; is the base radius, which is set according to the point cloud density, usually 3-5 times the average point spacing; is the scale factor, which controls the proportional relationship between adjacent scales, with a recommended value of 1.5-2.0; is the scale level index, starting from 0; is the maximum number of scales, usually 3-5.

[0023] To balance data sufficiency and local smoothness, the optimal scale is selected by the following objective function : wherein, is the value that maximizes the objective function; is the point density at scale ; is the local variance of point at scale ; is the balance parameter; is a natural constant.

[0024] S1.2, for the point cloud , construct a weighted covariance matrix for the neighborhood point set at the optimal scale , and​ Eigenvalues are obtained by eigenvalue decomposition 、 and Eigenvalues 、 and are calculated to obtain the first principal curvature and the second principal curvature of the point cloud ; Preferably, the weighted covariance matrix of the point cloud is constructed based on the neighborhood point set under the optimal scale , and is expressed as: wherein, is the neighborhood point set of the point cloud under the optimal scale , is the i-th neighborhood point in the set , and is the weight coefficient of the i-th neighborhood point. is the weighted neighborhood center, wherein ; Further, the weight coefficient of the i-th neighborhood point introduces distance and normal consistency, and is expressed as: wherein, represents the Euclidean distance; is the normal angle between the point and the neighborhood point ; is the distance decay parameter, which is usually set to 1 / 3 of the neighborhood radius, and controls the distance decay speed; represents the natural exponential function. The weight coefficient in the embodiment ensures two principles: spatial proximity (points with short distances are more important) and geometric consistency (points with similar normals are more important), effectively suppressing the influence of noise and geometric discontinuous points.

[0025] Preferably, the first principal curvature and the second principal curvature in the embodiment are respectively expressed as:

[0026] wherein, ​​​​​​Compared with the traditional definition, the normalized principal curvature definition in this embodiment has two advantages: first, the dimensionless nature makes different point clouds comparable; second, it is more robust to noise, and the difference in eigenvalues ​​is more stable than the relative absolute value.

[0027] S1.3, Based on eigenvalues , and and the first principal curvature Second principal curvature Computational point cloud Direction-sensitive curvature index ; Furthermore, the weld seam geometrically manifests as a strip-shaped high-curvature region extending along the welding direction, exhibiting strong directionality and anisotropy. The magnitude of curvature alone cannot distinguish the weld seam from other high-curvature features (such as pores, edges, etc.). This embodiment designs a composite index integrating curvature, directionality, and anisotropy, defining the Directional Sensitive Curvature Index (DSCI), specifically designed to enhance the geometric features of the weld seam; a larger DSCI value indicates a higher likelihood of a weld seam. The DSCI is expressed as: in, For anisotropy factor, The direction-sensitive curvature index designed in this embodiment can simultaneously characterize the curvature magnitude, directionality, and geometric anisotropy, effectively distinguishing the weld from other high-curvature features.

[0028] S1.4, Direction-Sensitive Curvature Index Based on Each Point Cloud High curvature regions were selected, and concave region point clouds were selected from these regions to form the weld point set. ; Preferred, if point cloud Direction-sensitive curvature index Larger than point cloud Corresponding threshold Then it is considered that point cloud It belongs to a high curvature region; otherwise, it is considered a point cloud. It does not belong to the high curvature region; by traversing each point in the workpiece point cloud data set, all point cloud sets belonging to the high curvature region can be filtered out.

[0029] Furthermore, since a globally fixed threshold is difficult to adapt to the geometric differences and point cloud quality variations at different locations of the weld, this embodiment employs a local adaptive thresholding strategy, dynamically adjusting the segmentation threshold based on the neighborhood features of each point. This approach aims to reduce the false positive rate while maintaining a high detection rate. Specifically, this embodiment employs the Otsu method (i.e., the maximum inter-class variance method) to adaptively determine the initial threshold on the DSCI channel. Then, a local adaptive threshold adjustment is introduced. : in, For adjustment coefficients, For point At the optimal scale The standard deviation of DSCI for each point within the neighborhood range below. For point At the optimal scale The mean DSCI of each point within the neighborhood range below.

[0030] Preferably, in this embodiment, the specific method for selecting concave region point clouds from high curvature regions is as follows: A1.1 Calculate the center point in the high curvature region. Concave-convex projection index : in, For concave and convex projection indices, the range is [-1, 1]. This is a sign function; it returns +1 for positive numbers, -1 for negative numbers, and 0 for zero. Point At the optimal scale The total number of neighboring points; For point clouds At the optimal scale The neighborhood point set below; Represents a set Any neighboring point in the array; For point The normal vector.

[0031] A1.2, Based on Concave-Convex Projection Indicators Judgment point The concavity and convexity, point Concavity / convexity discrimination index Represented as: in, The recommended threshold for determining convexity is 0.3-0.5. The threshold for determining concave points is usually related to... equal; Then consider the point For convex dots, Then consider the point It is a concave point. Then consider the point For planar points; this piecewise function introduces a tolerance band for decision-making, avoiding frequent jumps in flat areas or at boundaries, thus improving the stability of classification.

[0032] A1.3, For the center of a high curvature region At the optimal scale A quadratic surface is fitted within the neighborhood of the given area, and the Gaussian curvature is calculated based on the quadratic surface fitting equation. and mean curvature ,like and and Then consider the point It belongs to the concave region.

[0033] Specifically, for the center of a high curvature region At the optimal scale The quadratic surface fitting of the neighborhood range below is expressed as: in, , , , , and All of these are coefficients of the quadratic surface equation; Gaussian curvature is an intrinsic geometric quantity of a surface, depending only on the surface itself and not on the embedding space. It is a fundamental quantity in differential geometry describing the curvature of a surface. Represented as: Furthermore, mean curvature This describes the average degree and direction of curvature of the surface: Furthermore, point The final concavity / convexity determination is expressed as: in, The AND operator indicates that all conditions must be met simultaneously.

[0034] The preferred final set of weld points Represented as: in, Point Direction-sensitive curvature index Point Local adaptive adjustment of the threshold.

[0035] The concave region point cloud screening method in the embodiment combines local geometric determination (normal projection) and global differential geometric determination (curvature) to improve the accuracy and robustness of concave-convex classification.

[0036] S1.5, based on the weld point set Weld skeleton extraction and smoothing fitting are performed to obtain a weld set wherein represents the i-th weld.

[0037] Further, the weld point set Although complete, the center line (i.e., skeleton) of the weld still needs to be extracted for path planning, quality detection, and other applications. The embodiment uses a three-dimensional thinning algorithm (preferably a shrinkage method) to extract a topological skeleton, and then uses a three-dimensional B-spline curve for smoothing fitting to obtain a continuous and differentiable weld center line expression.

[0038] Further, the shrinkage method is common knowledge in the art, and will not be described in detail in the embodiment. Of course, those skilled in the art can also use other means to extract the weld skeleton from the weld point set and then perform smoothing fitting; wherein the three-dimensional B-spline curve is expressed as: wherein is a B-spline basis function, is a control point, represents the number of skeleton points, represents a B-spline basis function argument.

[0039] Further, the weld set Each weld in the weld set can be regarded as a parameterized curve in three-dimensional space: wherein , is a parameterized representation of the weld , represents three-dimensional space, is the length of the weld , represents a continuous real number in the range of 0 to .

[0040] For a straight line segment weld, , represents the starting point of the weld , represents the end point of the weld ​the end point of the curve weld; for the curve weld, a more complex parametric form is used, and different curve weld parametric forms are different, which are not described one by one in the embodiment.

[0041] Preferably, the process constraints in the embodiment include vertical welding direction constraints, connectivity constraints, safety distance constraints, starting welding point constraints and adjacent weld seam start and end point selection constraints, each of which is as follows: Vertical welding direction constraint: if the height difference of the two end points of the weld seam in the vertical direction is greater than a threshold value , it is determined that the weld seam is vertical welding, and the welding motion direction of the weld seam must meet the process principle of from bottom to top.

[0042] Further, the judgment method of vertical welding is represented as: , wherein is the threshold value (such as 50mm) for judging vertical welding, represents the longitudinal coordinate of the end point of the weld seam, represents the longitudinal coordinate of the starting point of the weld seam.

[0043] Connectivity constraint: if the end point distance between the weld seam and the weld seam is less than a threshold value , it is considered that the weld seam and the weld seam are continuous in space, and are considered as the weld seam and the weld seam can be directly connected without additional obstacle avoidance operation during path planning; Further, the judgment function of the weld seam connectivity constraint is defined as: , wherein ; represents the end point of the weld seam , represents the end point of the weld seam , represents the two closest end points of the weld seam and the weld seam , represents the Euclidean distance between the two closest end points of the weld seam and the weld seam ; , and , and , and is the connection judgment threshold value (usually 1-3mm); is the connectivity constraint judgment result between the weld seam and the weld seam (i.e. the judgment result of whether the welding can be directly connected); ​​Safety distance constraint: To avoid interference between the welding torch and the workpiece or other structures during the welding process, the minimum distance between the transition path (i.e., the movement path of the welding torch when not performing welding work) and the obstacle point cloud (i.e., the workpiece point cloud) is required to be greater than or equal to the safety distance threshold , ensuring that the robot always maintains a sufficient gap between the transition path and the obstacle point cloud (i.e., the workpiece point cloud) when performing the welding task.

[0044] Further, the safety distance constraint is expressed as: wherein, represents the transition path to the obstacle point cloud , the minimum distance, is the safety distance threshold (usually 5-10 mm); the obstacle point cloud , wherein represents a three-dimensional space, is the number of point clouds in the set , which is composed of the workpiece surface point set obtained by the three-dimensional scanner, and is used to describe the obstacle area that must be avoided during the robot welding process. Of course, depending on the welding process, the obstacle point cloud set may also include point cloud data of other components, such as point cloud data of tooling fixtures used to assist welding, or point cloud data of components that must be avoided during the welding process.

[0045] Starting welding point constraint: To meet the process planning or assembly sequence requirements, the starting welding point of a complete welding path must be selected from a predefined set of welding starting points.

[0046] Further, let the set of welding starting points be , then the first welding point of the th complete welding path should satisfy , wherein, represents the th selectable welding starting point candidate position.

[0047] The starting welding point constraint can ensure that the path planning result is consistent with the manually set welding starting point strategy, and can be used to implement specific welding sequence control (such as starting from critical parts, fixed ends, or specific assembly directions), thereby improving overall welding quality and structural stability.

[0048] Adjacent weld seam start and end point selection constraint: The two end points with the minimum distance between adjacent weld seams should be selected as the termination point of the previous weld seam and the starting point of the next weld seam, expressed as: wherein, Indicates weld seam With weld The endpoint and the starting point between them Indicates weld seam The endpoint, Indicates weld seam The starting point, For weld The first endpoint, For weld The second endpoint, For weld The first endpoint, For weld The second endpoint.

[0049] Preferably, this embodiment employs spectral clustering to group weld seams while satisfying connectivity constraints. Unlike traditional Euclidean distance-based clustering algorithms, spectral clustering can simultaneously consider the spatial proximity and connectivity between weld seams, achieving more reasonable grouping results based on the global graph structure. This provides prior topological information for batch planning and path optimization of welding tasks, as detailed below: B1.1 To effectively represent the topological structure of free space in complex obstacle environments, this embodiment first uses a skeletonization algorithm to obtain the skeleton diagram of the obstacle free space, specifically: 1) Spatial Voxelization: Divide the 3D space, including free space and obstacle point clouds, into several regular cubic meshes, with voxel sizes... mm; 2) Range field calculation: For each free voxel in free space Calculate its distance to the nearest obstacle voxel. ; 3) Local maximum extraction: retain the distance value within a 26-neighborhood. The local maximum free voxel point is used as the skeleton point; Furthermore, the skeleton points in free space can be defined as the set of local maxima of the distance field. : in, Represents any voxel point in free space. For point Neighboring points within a spherical neighborhood, Represents free space. It is a point To obstacle point cloud The minimum distance, Therefore for the center, a spherical neighborhood with radius denotes a neighborhood point to the obstacle point cloud the minimum distance; 4) Skeleton graph construction: connecting adjacent skeleton points based on spatial adjacency relationship to obtain an undirected graph structure similar to Reeb graph wherein is a skeleton node set, is an edge set between nodes.

[0050] B1.2, modeling the relationship between welds and welds based on the skeleton graph as a weighted undirected graph , denotes a node set, each node corresponding to a weld, , denotes the th node; denotes the spatial distance and connection relationship between welds obtained based on the skeleton graph; denotes the edge weight matrix; wherein the minimum end point distance between weld and weld is mapped to similarity , then the weight between weld and weld in the edge weight matrix is represented as: wherein , is an enhancement coefficient, used to improve the weight of the connected weld, so that the clustering algorithm preferentially maintains the connection relationship, is the connectivity constraint judgment result between weld and weld ; Further, the minimum end point distance between weld and weld is mapped to similarity , which is represented as: wherein mm is a scale parameter, which controls the similarity decay range; denotes a natural exponential function; Further, the minimum end point distance between weld and weld is represented as: wherein, is the end point of the weld , is the start point of the weld , is the start point of the weld , is the end point of the weld .

[0051] B1.3, construct a normalized Laplacian matrix of the weighted undirected graph and perform eigenvalue decomposition to obtain eigenvalues and corresponding eigenvectors, wherein ; B1.4, after removing the eigenvalue (i.e. removing the first constant vector), select the eigenvectors corresponding to the first smallest eigenvalues in to form an eigenvector matrix : wherein, is the eigenvector corresponding to the eigenvalue ; B1.5, after normalizing each row eigenvector of the eigenvector matrix , use K-means algorithm (i.e. K average algorithm) to cluster to obtain the final grouping result .

[0052] In the grouping result of the embodiment, the welds in each cluster have strong spatial and structural correlation, which can be processed as the same welding task unit in the subsequent path planning stage, thereby reducing the computational complexity of global path optimization.

[0053] S2, sort the welding seam clusters and sort the welding seams in each welding seam cluster based on the welding seam grouping result to generate a welding seam construction sequence sequence satisfying the process constraints , wherein, is an integer and ; Preferably, the sorting of the welding seam clusters based on the welding seam grouping result is specifically: constructing an inter-cluster relationship graph with the center of gravity of each welding seam cluster as a representative node, and the edge weight is the nearest distance or transition cost between clusters; determining the connection order between clusters by the minimum spanning tree (MST) method to obtain a plurality of welding seam cluster sorting sequences.

[0054] Preferably, the sequencing of welds within a weld cluster aims to determine the execution order of each weld within the same cluster, ensuring continuous welding, a reasonable direction, and compliance with process requirements. The specific process of sorting the welds within a cluster is as follows: treat the welds as nodes, the transition cost between welds as edge weights, and obtain several sorting sequences between welds within a cluster by solving the Traveling Salesman Problem (TSP) through dynamic programming. The solution process incorporates process constraints, requiring that the sorting sequence of welds generated within a cluster satisfy the vertical welding direction constraint and the selection constraint of the start and end points of adjacent welds. Furthermore, it requires that the first welding point of the first weld in the first weld cluster after sorting satisfies the starting welding point constraint (i.e., the obtained weld construction sequence). The first welding point of the first weld seam satisfies the starting welding point constraint.

[0055] Specifically, generating a sequence of weld construction steps. The following conditions must be met: 1) The welding movement direction of the vertical weld must meet the bottom-up process principle, that is, the starting point of the vertical weld should be the endpoint with the smaller z-coordinate and the ending point should be the endpoint with the larger z-coordinate; 2) The two endpoints with the smallest distance between adjacent welds should be selected as the ending point of the previous weld and the starting point of the next weld; 3) The starting point of the first weld in the first weld cluster after the cluster is sorted should be the point of the preset starting welding point concentration.

[0056] Furthermore, in this embodiment, the transition cost refers to the time, distance, or resource consumption required to move from one weld end position to another weld start position in welding path planning.

[0057] By first sorting each weld cluster among themselves, and then sequentially sorting the welds within each weld cluster in the sorted sequence among themselves, a process is generated. A sequence of weld construction operations that satisfies process constraints .

[0058] Those skilled in the art will understand that: it is assumed that the weld clusters are respectively and weld cluster There is a weld in the middle and weld cluster There is a weld in the middle and Assuming that any sorting method between weld clusters and between welds within a single cluster satisfies process constraints, then two sorting sequences between weld clusters can be generated, namely... and Each weld cluster can generate two sorting sequences between welds within the cluster. The corresponding one is and , weld cluster corresponding to and ; then the weld cluster inter-sequencing sequence can correspond to generate 4 kinds of weld construction sequence sequence, namely , , and ; similarly, the weld cluster inter-sequencing sequence can also correspond to generate 4 kinds of weld construction sequence sequence, so a total of 8 kinds of weld construction sequence sequence can be generated.

[0059] It should be noted that the inter-cluster sequencing method and the sequencing method between the welds in the cluster are not limited to the ones listed in the embodiment. Those skilled in the art can use other methods to complete the inter-cluster and intra-cluster sequencing. Meanwhile, according to the different requirements of the welding process, those skilled in the art can also flexibly adjust the process constraints embedded in the sequencing.

[0060] S3, the initial position of the welding gun and the first welding point of the weld construction sequence sequence , the adjacent welds in the weld construction sequence sequence , and the last welding point of the weld construction sequence sequence and the reset position of the welding gun to generate a safe transition path, and obtain a complete welding path ; Preferably, the way to generate a safe transition path in the embodiment is: If the distance between the two points to be connected satisfies the connectivity constraint (i.e. less than the connection determination threshold ), it is considered that the two points can be directly connected without obstacle avoidance operation, and the line between the two points is taken as the safe transition path; If the distance between the two points to be connected does not satisfy the connectivity constraint (i.e. not less than the connection determination threshold ), safe transition points need to be searched around the two points respectively, and then a safe transition path is constructed based on the two safe transition points; Further, the safe transition points around the points to be connected are searched as follows: S3.1, taking one of the points to be connected as the center, a set of transition direction set is predefined: wherein represents the total number of transition directions, usually takes 16, and is uniformly distributed in the upper hemisphere to cover the feasible transition directions; denotes a unit directional vector representing the th transition direction.

[0061] S3.2, spatially sampling along each transition direction with a step size : wherein, denotes the th sampling point in the th transition direction, denotes the th sampling length, denotes the initial sampling length, denotes the sampling step size; S3.3, calculating the minimum distance from each sampling point to the obstacle point cloud (in this embodiment, the workpiece point cloud): wherein, is the obstacle point cloud set, denotes any one point in the set ; S3.4, screening candidate safety points from the sampling points to obtain a candidate safety point set of point positions , specifically: if the th sampling point gradually increases from the th sampling point in a certain transition direction, the transition direction is retained, otherwise the transition direction is excluded; if the number of sampling points in a certain transition direction that do not satisfy the safety distance constraint exceeds , the transition direction is excluded; wherein, if , the sampling point satisfies the safety distance constraint, is a set threshold value; in the retained transition directions, the sampling point with the largest value (i.e., the last sampling point in each direction) is selected as the candidate safety point of each transition direction.

[0062] Thus, the point position is obtained, the corresponding candidate safety point set is , is the maximum sampling step number that satisfies the constraint, denotes any one of the two point positions that need to be connected; let the candidate safety point sets of the two point positions that need to be connected be and , the two candidate safety points and ​the distance between the safe transition points : wherein and are safe transition points; if the line connecting the safe transition points and passes the discrete collision detection, the line connecting the safe transition points and is taken as the safe transition path, and if the line does not pass the discrete collision detection, an obstacle avoidance path is generated between the safe transition points and as the safe transition path.

[0063] Preferably, the generation of the obstacle avoidance path between the safe transition points and as the safe transition path is specifically: a Laplace equation is constructed using the safe transition points and and the obstacle point cloud, and the Laplace equation is discretely solved using a finite element method (FEM) to obtain a harmonic potential field , wherein represents the potential field value at any position ; the safe transition point is taken as the starting point, and the safe transition point is taken as the end point, and based on the harmonic potential field , a fourth-order Runge-Kutta method is used to integrate the gradient field to generate the obstacle avoidance path between the safe transition points and , and the path generation is completed when is satisfied; wherein represents the position of the path point after the th integration, represents the convergence tolerance.

[0064] Further, the Laplace equation is represented as: Further, the boundary condition of the Laplace equation is set as: wherein , represents the Laplace operator, represents the free space, represents the harmonic potential field; Preferably, the integration of the gradient field using the fourth-order Runge-Kutta method to generate the path is represented as: wherein represents The location of obstacle avoidance path points at all times. Indicates the step size parameter. Represents the gradient operator, Indicates at the waypoint Potential field value at the location; Due to the harmonic potential function It satisfies the maximum principle, meaning it does not take an extreme value within the region; therefore, its gradient field... The value is non-zero at any point in free space, which theoretically guarantees that the integral along the gradient direction can monotonically converge to the target point without local traps.

[0065] Preferably, all safe transition paths are generated for a single weld construction sequence, resulting in a weld path representation as follows: ,in, Indicates the first The first weld in the welding path, Indicates the first The first of the welding paths One weld seam Indicates the first The first of the welding paths A transition path.

[0066] S4. With the goal of minimizing the overall cost of the welding path, Find the optimal welding path among the welding paths.

[0067] Preferably, the overall cost of the welding path is expressed as: in, For the first The overall cost of a welding path, ; For the first The total length of the transition path in the welding path, , For the first The first of the welding paths A transition path; For the first Collision risk of welding paths , Indicates the first The transition path in the first Location at any given moment express Minimum distance to the point cloud of the obstacle; Indicates the first The smoothness index of the welding path. , express second derivative of the function f(x) ; , and each represent a regulation coefficient.

[0068] The optimal welding path is selected by calculating the comprehensive cost of each welding path, and selecting the welding path corresponding to the minimum comprehensive cost as the optimal welding path. The method of the embodiment solves the welding path planning problem under the combined action of multiple factors such as obstacles, differences in weld position distribution, and various process constraints, and provides a reasonable and optimal path for the welding operation of the welding robot.

[0069] Embodiment 2: The embodiment provides a robot welding path planning and obstacle avoidance system for a complex workpiece, including a memory and a processor, the memory stores a computer program, and the processor executes the method in embodiment 1 when the computer program is executed.

[0070] Embodiment 3: The embodiment provides a storage medium, and the storage medium stores a computer program, and the computer program executes the method in embodiment 1 when the computer program is executed.

[0071] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Those skilled in the art can make various modifications and changes to the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A robot welding path planning and obstacle avoidance method for complex workpieces, characterized in that, include: S1. Extract all welds from the workpiece and cluster the welds to obtain weld grouping results. ,in, Indicates the first A cluster of weld seams; S2, Results of weld grouping The sorting of weld clusters and the sorting of individual welds within each weld cluster are performed to generate... A sequence of weld construction operations that satisfies process constraints ,in, Integer and ; S3, Initial position of welding torch Sequence of weld construction The sequence of welding points and weld construction The sequence of adjacent welds and the order of weld construction. The last welding point and the welding torch reset position A safe transition path is generated between them to obtain a complete welding path. ; S4. With the goal of minimizing the overall cost of the welding path, Find the optimal welding path among the welding paths.

2. The robot welding path planning and obstacle avoidance method for complex workpieces according to claim 1, characterized in that, Step S1, which involves extracting all weld seams from the workpiece, specifically includes: S1.1, For each point cloud on the workpiece Define a multi-scale neighborhood radius set and select point clouds from it. optimal scale ; S1.2, Point Cloud At the optimal scale Construct a weighted covariance matrix from the neighborhood point set below. For the weighted covariance matrix Eigenvalues ​​are obtained by performing eigenvalue decomposition. , and Based on eigenvalues , and Point cloud obtained by calculation First principal curvature Second principal curvature ; S1.3, based on , , , and Computational point cloud Direction-sensitive curvature index ; S1.4, Direction-Sensitive Curvature Index Based on Each Point Cloud High curvature regions were selected, and concave region point clouds were selected from these regions to form the weld point set. ; S1.5, Based on weld point set Weld skeleton extraction and smooth fitting are performed to obtain weld sets. ,in Indicates the first A weld seam.

3. The robot welding path planning and obstacle avoidance method for complex workpieces according to claim 2, characterized in that, Step S1.4, specifically selecting concave region point clouds from high curvature regions, involves: A1.1 Calculate the center point in a region of high curvature. Concave-convex projection index : in, For concave and convex projection indices, the range is [-1, 1]. This is a sign function; it returns +1 for positive numbers, -1 for negative numbers, and 0 for zero. Point At the optimal scale The total number of neighboring points; For point clouds At the optimal scale The neighborhood point set below; Represents a set Any neighboring point in the array; For point The normal vector; A1.2, Based on Concave-Convex Projection Indicators Judgment point The concavity and convexity, point Concavity / convexity discrimination index Represented as: in, Threshold for determining convexity; The threshold for determining concave points; Then consider the point For convex dots, Then consider the point It is a concave point. Then consider the point A point in a plane; A1.3, For the center of a high curvature region At the optimal scale A quadratic surface is fitted within the neighborhood of the given area, and the Gaussian curvature is calculated based on the quadratic surface fitting equation. and mean curvature ,like and and Then consider the point It belongs to the concave region.

4. The robot welding path planning and obstacle avoidance method for complex workpieces according to claim 1, characterized in that, In step S1, the weld seams are clustered to obtain the weld seam grouping results. Specifically: B1.1 Use a skeleton extraction algorithm to obtain the skeleton diagram of the obstacle's free space; B1.

2. Based on the skeleton graph, the weld and the relationships between welds are modeled as a weighted undirected graph. ; This represents a set of nodes, where each node corresponds to a weld seam. This represents the spatial distance and connection relationship between welds obtained based on the skeleton diagram; Represents the edge weight matrix; B1.

3. Construct the normalized Laplacian matrix of the weighted undirected graph and perform eigenvalue decomposition to obtain... eigenvalues and the corresponding feature vector, where ; B1.4, Remove eigenvalues Afterwards, Before the election The eigenvectors corresponding to the smallest eigenvalues ​​constitute the feature matrix. ; B1.5, Regarding the characteristic matrix After standardizing each row of feature vectors, the K-means algorithm is used for clustering to obtain the final grouping results. ; Among them, the Gaussian kernel function is used to analyze the weld seam. With weld Minimum endpoint distance between Mapping to similarity Then the edge weight matrix Intermediate weld With weld Weights between Represented as: in, , To enhance the coefficient, For weld With weld The results of the connectivity constraint judgment between them.

5. The robot welding path planning and obstacle avoidance method for complex workpieces according to claim 1, characterized in that, The method for generating a safe transition path in step S3 is as follows: If the distance between the two points to be connected is less than the connection determination threshold Then the line connecting the two points will be used as a safe transition path; If the distance between the two points to be connected is not less than the connection determination threshold Then, search for safe transition points around the location, and then construct a safe transition path based on the two safe transition points.

6. The robot welding path planning and obstacle avoidance method for complex workpieces according to claim 5, characterized in that, Searching for safe transition points around the points that need to be connected specifically involves: S3.1, with a point that needs to be connected. A set of transition directions is predefined around the center. : in, This indicates the total number of transition directions. Indicates the first The unit direction vector of each transition direction; S3.2, along each transition direction in steps Perform spatial sampling: in, Indicates the first The first transition direction One sampling point, Indicates the first Each sampling length, Indicates the initial sampling length. Indicates the sampling step size; S3.3 Calculate the minimum distance from each sampling point to the obstacle point cloud. : in, For the obstacle point cloud set, Represents a set Any point in it; S3.

4. Select candidate safe points from each sampling point to obtain the location. The set of candidate safe points is as follows: If a certain transition direction is from Location starting from each sampling point If the transition direction is gradually increased, it will be retained; otherwise, it will be eliminated. If the number of sampling points that do not meet the safety distance constraint in a certain transition direction exceeds [a certain number]... If there are 1, then the transition direction is removed; where, if Then sampling point Meet safety distance constraints. For the set threshold, It is the safe distance threshold; In each of the retained transition directions, select The largest sampling point is used as a candidate safe point for each transition direction.

7. The robot welding path planning and obstacle avoidance method for complex workpieces according to claim 6, characterized in that, The set of candidate safe points for the two points that need to be connected. and In the middle, by minimizing two candidate safe points and The distance between them is used to obtain a safe transition point pair : If a safe transition point and If the connection between them passes discrete collision detection, then... and The connection between them serves as a safe transition path; if it fails discrete collision detection, then... and An obstacle avoidance path is generated between them as a safe transition path; Among them, for and Specifically, generating obstacle avoidance paths as safe transition paths involves: For safe transition points and The Laplace equation is constructed from the obstacle point cloud, and the harmonic potential field is obtained by discretizing and solving the Laplace equation using the finite element method. ; to a safe transition point Starting from a safe transition point As the endpoint, based on the harmonic potential field Gradient field generation using the fourth-order Runge-Kutta method and Obstacle avoidance paths between them.

8. The robot welding path planning and obstacle avoidance method for complex workpieces according to claim 1, characterized in that, No. The welding path is represented as , Indicates the first The first of the welding paths One weld seam Indicates the first The first of the welding paths The total cost of each transition path is expressed as follows: in, For the first The overall cost of a single welding path; For the first The total length of the transition path in the welding path, , For the first The first of the welding paths A transition path; For the first Collision risk of welding paths , Indicates the first The transition path in the first Location at any given moment express Minimum distance to the point cloud of the obstacle; Indicates the first The smoothness index of the welding path. , express The second derivative; , and All represent adjustment coefficients.

9. The robot welding path planning and obstacle avoidance method for complex workpieces according to claim 1, characterized in that, In step S2, a weld construction sequence is generated. The following conditions must be met: The welding motion direction of vertical welds must meet the bottom-up process principle; The two endpoints with the smallest distance between adjacent welds should be selected as the end point of the previous weld and the start point of the next weld. The starting point of the first weld in the first weld cluster after cluster sorting should be the point of the preset starting weld point set.

10. A robot welding path planning and obstacle avoidance system for complex workpieces, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the method as described in any one of claims 1-9 when running the computer program.

Citation Information

Patent Citations

  • Spot welding robot path determination method and device, computer equipment, storage medium and computer program product

    CN118832356A

  • Weld joint path planning method and device, computer equipment and readable storage medium

    CN119600320A

  • Self-adaptive generation method and system for multi-layer and multi-pass welding path of robot

    CN119870820A

  • Automatic tracking system and method for large-scale space welding seam mobile mechanical arm

    CN120206516A

  • Welding robot, welding track planning method and device thereof, storage medium and computer program product

    CN120326640A