Robot welding path planning and obstacle avoidance method and system for complex workpieces
By employing multi-scale adaptive weighted curvature estimation and obstacle skeleton graph modeling, the problem of obstacles and process constraints in welding path planning for complex workpieces was solved, achieving efficient and safe welding path optimization and improving welding quality and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-24
- Publication Date
- 2026-03-31
AI Technical Summary
In the welding process of complex workpieces, existing technologies are unable to effectively plan the optimal welding path, taking into account the influence of obstacles, differences in weld position distribution, and various process constraints, resulting in low welding efficiency, unstable quality, and insufficient safety.
A multi-scale adaptive weighted curvature estimation method is used to extract weld seams. The weld seam point cloud is screened by combining the direction-sensitive curvature index and local geometry judgment. Weld seam clustering is performed by constructing a weighted undirected graph based on the obstacle skeleton graph to generate safe transition paths and optimize the welding sequence to meet process constraints.
It enables efficient and safe welding path planning on complex workpieces, improves welding quality and efficiency, reduces computational complexity, ensures that the welding torch does not collide with obstacles, and meets various process requirements.
Smart Images

Figure CN121374653B_ABST
Abstract
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 achieve 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:
[0005] A robotic welding path planning and obstacle avoidance method for complex workpieces includes:
[0006] 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;
[0007] 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 ;
[0008] 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. ;
[0009] S4. With the goal of minimizing the overall cost of the welding path, Find the optimal welding path among the welding paths.
[0010] Preferably, the step S1 of extracting all welds from the workpiece specifically involves:
[0011] S1.1, For each point cloud on the workpiece Define a multi-scale neighborhood radius set and select point clouds from it. optimal scale ;
[0012] 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 ;
[0013] S1.3, based on , , , and Computational point cloud Direction-sensitive curvature index ;
[0014] 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. ;
[0015] 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.
[0016] Preferably, in step S1.4, the specific steps for selecting concave region point clouds from high curvature regions are:
[0017] A1.1 Calculate the center point in a region of high curvature. Concave-convex projection index :
[0018]
[0019] 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;
[0020] A1.2, Based on Concave-Convex Projection Indicators Judgment point The concavity and convexity, point Concavity / convexity discrimination index Represented as:
[0021]
[0022] 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;
[0023] 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.
[0024] Preferably, in step S1, the weld seams are clustered to obtain weld seam grouping results. Specifically:
[0025] B1.1 Use a skeleton extraction algorithm to obtain the skeleton diagram of the obstacle's free space;
[0026] 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;
[0027] 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 ;
[0028] B1.4, Remove eigenvalues Afterwards, Before being selected The eigenvectors corresponding to the smallest eigenvalues constitute the feature matrix. ;
[0029] 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. ;
[0030] 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:
[0031]
[0032] in, , To enhance the coefficient, For weld With weld The results of the connectivity constraint judgment between them.
[0033] Preferably, the method for generating a safe transition path in step S3 is as follows:
[0034] If the distance between the two points to be connected is less than the connection determination threshold If the distance between the two points is not less than the connection determination threshold, then the line connecting the two points will be considered a safe transition path. Then, search for safe transition points around the location, and then construct a safe transition path based on the two safe transition points.
[0035] Preferably, searching for safe transition points around the points that need to be connected specifically involves:
[0036] S3.1, with a point that needs to be connected. A set of transition directions is predefined around the center. :
[0037]
[0038] in, This indicates the total number of transition directions. Indicates the first The unit direction vector of each transition direction;
[0039] S3.2, along each transition direction in steps Perform spatial sampling:
[0040]
[0041] 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;
[0042] S3.3 Calculate the minimum distance from each sampling point to the obstacle point cloud. :
[0043]
[0044] in, For the obstacle point cloud set, Represents a set Any point in it;
[0045] S3.4. Select candidate safe points from each sampling point to obtain the location. The set of candidate safe points is as follows:
[0046] 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.
[0047] 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;
[0048] In each of the retained transition directions, select The largest sampling point is used as a candidate safe point for each transition direction.
[0049] Preferably, the set of candidate safe points for the two points that need to be connected. and In the middle, by minimizing the two candidate safe points and The distance between them is used to obtain a safe transition point pair :
[0050]
[0051] 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;
[0052] Among them, for and Specifically, generating obstacle avoidance paths as safe transition paths involves:
[0053] 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.
[0054] 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:
[0055]
[0056] 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.
[0057] Preferably, a weld construction sequence is generated in step S2. The following conditions must be met:
[0058] The welding motion direction of vertical welds must meet the bottom-up process principle;
[0059] 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.
[0060] 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.
[0061] The present invention also provides a robotic welding path planning and obstacle avoidance system for complex workpieces, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the method described thereon when running the computer program.
[0062] The application of the technical solution of the present invention has the following beneficial effects:
[0063] This invention employs a multi-scale adaptive weighted curvature estimation method. By constructing a multi-scale neighborhood system and adaptively selecting the optimal computational scale based on local geometric characteristics, it introduces a dual weighting mechanism of distance and normal consistency to suppress the influence of noise. Simultaneously, this invention integrates composite indices such as curvature, directionality, and anisotropy to define a direction-sensitive curvature index, specifically enhancing the geometric features of welds, effectively distinguishing welds from other high-curvature features. Finally, the concave region point cloud screening method of this invention combines local geometric determination (normal projection) and global differential geometric determination (curvature) to improve the accuracy and robustness of concave-convex classification.
[0064] This invention models welds and the relationships between welds as a weighted undirected graph based on the skeleton graph of obstacles. Considering the connectivity constraints between adjacent welds, the welds in each weld cluster have strong spatial and structural correlations and can be treated as the same welding task unit in the subsequent path planning stage, thereby reducing the computational complexity of global path optimization.
[0065] This invention fully considers connectivity constraints and safety distance constraints when generating transition paths. It only seeks safe transition points between two points that do not meet connectivity constraints. At the same time, it considers the safety distance between the welding torch and obstacles when generating obstacle avoidance paths. This reduces computational burden and ensures that the welding torch will not collide with obstacles throughout the welding path, thus guaranteeing the safety of the entire welding process.
[0066] This invention fully considers the requirements of welding process when arranging weld clusters and welds within clusters, and can achieve specific welding sequence control (such as starting from key parts, fixed ends or specific assembly directions), thereby improving the overall welding quality and structural stability.
[0067] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the figures. Attached Figure Description
[0068] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:
[0069] Figure 1 This is a flowchart of the robot welding path planning and obstacle avoidance method for complex workpieces according to the present invention. Detailed Implementation
[0070] To facilitate understanding of the present invention, a more complete description is provided below, along with preferred embodiments. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a thorough and complete understanding of the disclosure of the present invention.
[0071] 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 this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0072] Example 1:
[0073] See Figure 1 This embodiment provides a robot welding path planning and obstacle avoidance method for complex workpieces, as detailed below:
[0074] 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;
[0075] Before performing 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 processing weld seam point clouds: first, they are sensitive to noise and outliers, easily generating spurious high curvature responses; second, they struggle to adapt to the multi-scale characteristics of the weld seam, as geometric parameters such as weld width and depth vary significantly at different locations. To address these issues, this embodiment proposes a multi-scale adaptive weighted curvature (MAWC) estimation method. This method constructs a multi-scale neighborhood system and adaptively selects the optimal computational scale based on local geometric characteristics. Simultaneously, it introduces a dual weighting mechanism of distance and normal consistency to suppress the influence of noise, as detailed below:
[0076] S1.1, For each point cloud on the workpiece Define a multi-scale neighborhood radius set and select point clouds from it. optimal scale ;
[0077] Preferably, the set of multi-scale neighborhood radii is represented as:
[0078]
[0079] in, For the first The neighborhood search radius of the layer; The base radius is set according to the point cloud density, and is usually 3-5 times the average point spacing; This is a scale factor that controls the proportional relationship between adjacent scales; a recommended value is 1.5-2.0. This is a scale-level index, starting from 0; This represents the maximum number of layers, typically 3-5.
[0080] To balance data sufficiency and local smoothness, the optimal scale is selected using the following objective function. :
[0081]
[0082] in, To find the one that maximizes the objective function value; For point In scale Point density below; For point In scale Local variance; For balance parameters; It is a natural constant.
[0083] 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 ;
[0084] Preferred, point cloud At the optimal scale Construct a weighted covariance matrix from the neighborhood point set below. Represented as:
[0085]
[0086] in, For point clouds At the optimal scale The neighborhood point set below, For set The first in Neighboring points, For the first The weight coefficients of each neighboring point; For weighted neighborhood centers, among which ;
[0087] Furthermore, the first The weight coefficient of each neighboring point Introducing the concepts of distance and normal consistency, it can be expressed as:
[0088]
[0089] in, Indicates Euclidean distance; For point and neighboring points The normal angle; This is the distance decay parameter, usually set to 1 / 3 of the neighborhood radius, which controls the distance decay rate. This represents the natural exponential function.
[0090] The weighting coefficients in this embodiment It ensures two principles: spatial proximity (points that are closer are more important) and geometric consistency (points with similar normals are more important), effectively suppressing the effects of noise and geometric discontinuities.
[0091] Preferably, in this embodiment, the first principal curvature Second principal curvature They are represented as follows:
[0092]
[0093]
[0094] in, Compared with the traditional definition, the normalized principal curvature definition in this embodiment has two advantages: first, dimensionlessness 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.
[0095] S1.3, Based on eigenvalues , and and the first principal curvature Second principal curvature Computational point cloud Direction-sensitive curvature index ;
[0096] 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:
[0097]
[0098] 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.
[0099] 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. ;
[0100] 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.
[0101] 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. :
[0102]
[0103] 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.
[0104] Preferably, in this embodiment, the specific method for selecting concave region point clouds from high curvature regions is as follows:
[0105] A1.1 Calculate the center point in the high curvature region. Concave-convex projection index :
[0106]
[0107] 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.
[0108] A1.2, Based on Concave-Convex Projection Indicators Judgment point The concavity and convexity, point Concavity / convexity discrimination index Represented as:
[0109]
[0110] 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.
[0111] 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.
[0112] 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:
[0113]
[0114] in, , , , , and All of these are coefficients of the quadratic surface equation;
[0115] 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:
[0116]
[0117] Furthermore, mean curvature This describes the average degree and direction of curvature of the surface:
[0118]
[0119] Furthermore, point The final concavity / convexity determination is expressed as:
[0120]
[0121] in, The AND operator indicates that all conditions must be met simultaneously.
[0122] The preferred final set of weld points Represented as:
[0123]
[0124] in, Point Direction-sensitive curvature index Point Local adaptive adjustment of the threshold.
[0125] The concave region point cloud screening method in this embodiment combines local geometric determination (normal projection) and global differential geometric determination (curvature) to improve the accuracy and robustness of concave-convex classification.
[0126] 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.
[0127] Furthermore, weld point set Although complete, the centerline (i.e., skeleton) of the weld is still needed for applications such as path planning and quality inspection. This embodiment uses a three-dimensional thinning algorithm (preferably the shrinkage method) to extract the topological skeleton, and then uses a three-dimensional B-spline curve for smooth fitting to obtain a continuously differentiable weld centerline expression.
[0128] Furthermore, the shrinkage method described is common knowledge in the art and will not be described in detail in this embodiment. Of course, those skilled in the art can also use other means to collect data from the weld points. The weld skeleton is extracted and then smoothed; among which, a three-dimensional B-spline curve is fitted. Represented as:
[0129]
[0130] in, For B-spline basis functions, As control points, Indicates the number of skeleton points. Let represent the independent variable of the B-spline basis function.
[0131] Furthermore, weld assembly Each weld seam can be viewed as a parametric curve in three-dimensional space:
[0132]
[0133] in, , It is a weld. The parameterized representation, Representing three-dimensional space, It is a weld. Length, Represents 0 to A range of consecutive real numbers.
[0134] For straight weld segments, there are , Indicates weld seam The starting point Indicates weld seam The endpoint; for curved welds, a more complex parameterization is used. Different curved welds have different parameterization forms, which will not be described in detail in this embodiment.
[0135] Preferably, the process constraints in this embodiment include vertical welding direction constraints, connectivity constraints, safety distance constraints, starting welding point constraints, and adjacent weld start and end point selection constraints, each of which is as follows:
[0136] Vertical welding direction constraint: If the height difference between the two ends of the weld in the vertical direction is greater than the threshold value. If the weld is then determined to be a vertical weld, the welding motion direction of the weld must meet the bottom-up process principle.
[0137] Furthermore, the method for determining vertical welding is as follows:
[0138]
[0139] in, It is the threshold for judging vertical welding (e.g., 50mm). Indicates the ordinate of the weld termination point. This represents the ordinate of the weld start point.
[0140] Connectivity constraints: If the weld With weld The distance between the endpoints is less than the threshold Then it is considered that the weld is With weld It is spatially continuous and is considered a weld in path planning. With weld It can transition directly without requiring additional obstacle avoidance operations;
[0141] Furthermore, the determination function for weld connectivity constraints is defined as follows:
[0142]
[0143] in, ; Indicates weld seam The endpoints, Indicates weld seam The endpoints, Indicates weld seam and weld The two nearest endpoints, Indicates weld seam and weld The closest two ends and The Euclidean distance between them; It is the connection determination threshold (usually taken as 1-3mm); For weld With weld The results of the connectivity constraint judgment between them (i.e., the judgment results of whether the welds can be directly connected);
[0144] Safety distance constraint: To avoid interference between the welding torch and the workpiece or other structures during welding, the minimum distance from the transition path (i.e., the movement path of the welding torch when no welding work is being performed) to the obstacle point cloud (i.e., the workpiece point cloud) must be greater than or equal to the safety distance threshold. This ensures that the robot maintains a sufficient gap between the transition path of the robot and the obstacle point cloud (i.e., the workpiece point cloud) when performing welding tasks.
[0145] Furthermore, the safety distance constraint is expressed as:
[0146]
[0147] in, Indicates the transition path To obstacle point cloud The minimum distance, This refers to the safe distance threshold (typically 5-10mm); obstacle point cloud. ,in Representing three-dimensional space, For set The number of point clouds in the image is composed of the point set on the workpiece surface acquired by the 3D scanner, used to describe the obstacle area that the robot must avoid during the 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.
[0148] Starting weld point constraint: To meet process planning or assembly sequence requirements, the starting weld point of a complete weld path must be selected from a predefined set of weld start points.
[0149] Furthermore, let the set of welding start points be... , then the first The first weld point of a complete welding path Should meet ,in, Indicates the first There are several candidate locations for the welding start point.
[0150] Starting weld point constraints can ensure that the path planning results are consistent with the manually set welding start point strategy, and can be used to achieve specific welding sequence control (such as starting from critical parts, fixed ends or specific assembly directions), thereby improving the overall welding quality and structural stability.
[0151] Constraints on the selection of start and end points of adjacent welds: 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, as shown below:
[0152]
[0153] in, 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.
[0154] 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:
[0155] 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:
[0156] 1) Spatial Voxelization: Divide the 3D space, including free space and obstacle point clouds, into several regular cubic meshes, with voxel sizes... mm;
[0157] 2) Range field calculation: For each free voxel in free space Calculate its distance to the nearest obstacle voxel. ;
[0158] 3) Local maximum extraction: retain the distance value within a 26-neighborhood. The local maximum free voxel point is used as the skeleton point;
[0159] Furthermore, the skeleton points in free space can be defined as the set of local maxima of the distance field. :
[0160]
[0161] 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 Centered on A spherical neighborhood with radius , Representing neighborhood points To obstacle point cloud The minimum distance;
[0162] 4) Skeleton graph construction: Connect adjacent skeleton points based on spatial adjacency relationships to obtain an undirected graph structure that approximates a Reeb graph. ,in For the skeleton node set, This is the set of edges connecting nodes.
[0163] 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. , Indicates the first One node; This represents the spatial distance and connection relationship between welds obtained based on the skeleton diagram; Represents the edge weight matrix;
[0164] 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:
[0165]
[0166] in, , To enhance the coefficient, This is used to increase the weight of weld seams, so that the clustering algorithm prioritizes maintaining connectivity. For weld With weld The results of the connectivity constraint judgment between them;
[0167] Furthermore, the weld seam With weld Minimum endpoint distance between Mapping to similarity Represented as:
[0168]
[0169] in, mm is a scale parameter that controls the range of similarity decay. Represents the natural exponential function;
[0170] Furthermore, the weld seam With weld Minimum endpoint distance between Represented as:
[0171]
[0172] in, For weld The end point For weld The starting point For weld The starting point For weld The end point.
[0173] 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 ;
[0174] B1.4, Remove eigenvalues (i.e., after removing the first constant vector) in Before being selected The eigenvectors corresponding to the smallest eigenvalues constitute the feature matrix. :
[0175]
[0176] in, Eigenvalues The corresponding feature vector;
[0177] B1.5, Regarding the characteristic matrix After standardizing each row of feature vectors, the K-means algorithm (i.e., K-means algorithm) is used to cluster them to obtain the final grouping results. .
[0178] Grouping results in this embodiment In this process, the weld seams within each cluster have strong spatial and structural correlations and can be treated as the same welding task unit in the subsequent path planning stage, thereby reducing the computational complexity of global path optimization.
[0179] 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 ;
[0180] Preferably, the grouping results of the welds The specific process for sorting the weld clusters is as follows: construct an inter-cluster relationship graph with the centroid of each weld cluster as the representative node, and the edge weight is the shortest distance or transition cost between clusters; determine the connection order between clusters through the minimum spanning tree (MST) method to obtain several sorting sequences between weld clusters.
[0181] 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.
[0182] 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.
[0183] 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.
[0184] 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.
[0185] 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 .
[0186] 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 The corresponding one is and Then the sorting sequence between weld clusters It can generate four different weld construction sequence sequences, namely , , and Similarly, the sorting sequence between weld clusters It can also generate 4 different weld construction sequence sequences, so a total of 8 different weld construction sequence sequences can be generated.
[0187] It should be noted that the sorting methods between clusters and between welds within a cluster are not limited to those listed in this embodiment. Those skilled in the art can use other methods to complete the sorting between and within clusters. At the same time, depending on the requirements of the welding process, those skilled in the art can also flexibly adjust the process constraints embedded in the sorting.
[0188] 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. ;
[0189] Preferably, in this embodiment, the method for generating a secure transition path is as follows:
[0190] If the distance between the two points to be connected satisfies the connectivity constraint (i.e., is less than the connection determination threshold) If the two points can be directly connected without obstacle avoidance, then the line connecting the two points is considered a safe transition path.
[0191] If the distance between the two points to be connected does not meet the connectivity constraint (i.e., not less than the connection determination threshold), If so, it is necessary to search for safe transition points around the two points respectively, and then construct a safe transition path based on the two safe transition points;
[0192] Furthermore, searching for safe transition points around the points that need to be connected specifically involves:
[0193] S3.1, with a point that needs to be connected. A set of transition directions is predefined around the center. :
[0194]
[0195] in, This indicates the total number of transition directions. Typically, 16 is chosen and evenly distributed across the upper hemisphere to cover feasible transition directions; Indicates the first The unit direction vector of each transition direction.
[0196] S3.2, along each transition direction in steps Perform spatial sampling:
[0197]
[0198] 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;
[0199] S3.3 Calculate the minimum distance from each sampling point to the obstacle point cloud (workpiece point cloud in this embodiment):
[0200]
[0201] in, For the obstacle point cloud set, Represents a set Any point in it;
[0202] S3.4. Select candidate safe points from each sampling point to obtain the location. The set of candidate safe points is as follows:
[0203] 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.
[0204] 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. The set threshold;
[0205] In each of the retained transition directions, select The largest sampling point (i.e. the last sampling point in each direction) is used as a candidate safe point for each transition direction.
[0206] Therefore, the location can be obtained. The corresponding set of candidate safe points is , It is the maximum number of sampling steps that satisfy the constraints. This indicates any one of the two points that need to be connected;
[0207] Let the sets of candidate safe points for the two points that need to be connected be respectively and By minimizing two candidate safe points and The distance between them is used to obtain a safe transition point pair :
[0208]
[0209] in, and All are safe transition points;
[0210] 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 Obstacle avoidance paths are generated between them as safe transition paths.
[0211] Preferred, for and Specifically, generating obstacle avoidance paths as safe transition paths involves:
[0212] 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 (FEM). ,in Represents any position Potential field value at the point; with 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 The obstacle avoidance path between them, when it meets the requirements Path generation is completed in time; among which, Indicates the first The location of the path point after integration. This indicates the convergence tolerance.
[0213] Furthermore, the Laplace equation can be expressed as:
[0214]
[0215] Furthermore, the boundary conditions for the Laplace equation are set as follows:
[0216]
[0217] in, , Represents the Laplace operator. Represents free space. Indicates a harmonic potential field;
[0218] Preferably, the gradient field generation path using the fourth-order Runge-Kutta method is represented as follows:
[0219]
[0220] in, express 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;
[0221] 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.
[0222] 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.
[0223] S4. With the goal of minimizing the overall cost of the welding path, Find the optimal welding path among the welding paths.
[0224] Preferably, the overall cost of the welding path is expressed as:
[0225]
[0226] 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 The second derivative; , and All represent adjustment coefficients.
[0227] By calculating the comprehensive cost of each welding path, the welding path with the minimum comprehensive cost is selected as the optimal welding path. This embodiment solves the welding path planning problem under the combined effects of multiple factors such as obstacle influence, weld seam location differences, and various process constraints, providing a reasonable and optimal path for welding robot operations.
[0228] Example 2:
[0229] This embodiment provides a robot welding path planning and obstacle avoidance system for complex workpieces, including a memory and a processor. The memory stores a computer program, and the processor executes the method in Embodiment 1 when running the computer program.
[0230] Example 3:
[0231] This embodiment provides a storage medium storing a computer program, which, when run, executes the method in Embodiment 1.
[0232] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A robot welding path planning and obstacle avoidance method for complex workpieces, characterized in that, Comprise: S1, extracting all welds from the workpiece, clustering the welds to obtain a weld grouping result wherein, represents the i-th weld cluster; and the i-th weld cluster; S2, grouping result of welds performing ranking between weld clusters and ranking of welds within each weld cluster to generate a weld construction sequence sequence satisfying process constraints wherein, is an integer and ; S3, initial position of welding gun sequence of welding sequence between the first welding point and the last welding point of the welding sequence between the adjacent welds in the welding sequence between the last welding point and the reset position of the welding gun to generate a safe transition path, obtaining a complete welding path ; S4, finding an optimal welding path in the welding path to minimize the comprehensive cost of the welding path, the welding path. The all welds are extracted from the workpiece in step S1, specifically: S1.1, for each point cloud on the workpiece defining a set of multi-scale neighborhood radii from which to select a point cloud optimal scale of the point cloud ; S1.2, to the point cloud In the optimal scale Under the neighborhood point set to construct the weighted covariance matrix , the weighted covariance matrix Eigenvalue decomposition to get eigenvalue , And , based on the eigenvalue , And The first principal curvature And the second principal curvature Of the point cloud Are calculated. S1.3, based on , , , and computing a directionally sensitive curvature indicator for a point cloud ; The direction-sensitive curvature indicator is represented as: wherein is an anisotropy factor, ; S1.4, based on the directional sensitive curvature indicator of each point cloud Filtering out high curvature regions, filtering out concave region point clouds from the high curvature regions as the weld point set ; S1.5, based on the weld point set weld skeleton extraction and smoothing fitting to obtain a weld set wherein represents the i-th weld.
2. The robot welding path planning and obstacle avoidance method for complex workpieces according to claim 1, wherein, The concave area point cloud is screened from the high-curvature area in step S1.4, specifically: A1.
1. Calculate the midpoint of the high curvature region The concave-convex projection index : where, 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 a point in the point cloud at the optimal scale s is the total number of neighbor points at the optimal scale s denotes a set of neighbor points in the point cloud at the optimal scale s is the normal vector of the point A1.2, based on a concave-convex projection index determination point concave-convex of the point concave-convex determination index is expressed as: wherein, is a convex point decision threshold value; is a concave point decision threshold value; then the point is a convex point, then the point is a concave point, then the point is a planar point; A1.3, to the midpoint of a high curvature region Under the optimal scale of the neighborhood range, the quadric surface fitting is carried out, and the Gaussian curvature and the average curvature are calculated based on the quadric surface fitting equation If and , it is considered that the point belongs to the concave region.
3. The robot welding path planning and obstacle avoidance method for complex workpieces according to claim 1, wherein, The welds are clustered in step S1 to obtain a weld grouping result Specifically, B1.1, using a skeleton extraction algorithm to obtain a skeleton graph of the obstacle free space; B1.
2. Model the welds and the relationship between the welds as a weighted undirected graph based on the skeleton graph ; denotes a set of nodes, each node corresponding to a weld; denotes the spatial distance and connection relationship between the welds obtained based on the skeleton graph; denotes an edge weight matrix; B1.
3. Standardizing the Laplacian matrix of the weighted undirected graph and performing an eigenvalue decomposition yields ; B1.
4. removing the eigenvalues After, in The eigenvectors corresponding to the smallest eigenvalues are selected The eigenvectors corresponding to the smallest eigenvalues are selected ; B1.
5. normalizing each row of the feature matrix After normalizing each row of the feature matrix, the K-means algorithm is used to cluster the final grouping result ; 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: wherein, , is an enhancement coefficient, is a weld and the connectivity constraint between the weld is a connection.
4. The robot welding path planning and obstacle avoidance method for complex workpieces according to claim 1, wherein, The safety transition path is generated in step S3 in the following manner: If the distance between the two points to be connected is less than the connection determination threshold the line between the two points is taken as a safe transition path. If the distance between the two point positions to be connected is not less than the connection determination threshold then search for safe transition points around the point positions respectively, and then construct a safe transition path based on the two safe transition points.
5. The robot welding path planning and obstacle avoidance method for complex workpieces according to claim 4, wherein, The safety transition point is searched around the point to be connected, specifically: S3.1, with a point that needs to be connected a set of transition directions is predefined around the center : wherein denotes the total number of transition directions, denotes the unit directional vector of the th transition direction; S3.2, in each transition direction with a step size Spatially sampling: wherein, represents the first sampling point in the th transition direction, represents the first sampling length in the th transition direction, represents the start sampling length, represents the start sampling length, represents the sampling step. S3.3, for each sampling point, compute its minimum distance to the obstacle point cloud : wherein, is a set of obstacle point clouds, denotes any one point in the set of obstacle point clouds. S3.4, screening candidate safety points from each sampling point to obtain point positions a candidate safety point set, specifically: If the transition direction from the position of each sample point increases gradually, the transition direction is retained, otherwise the transition direction is discarded; If the number of sampling points that do not satisfy the safety distance constraint in a certain transition direction exceeds , the transition direction is eliminated; wherein , the sampling point satisfies the safety distance constraint, is a set threshold, is a safety distance threshold. In each of the retained transition directions, the sampling point with the largest value is selected as the candidate safety point for each transition direction. the maximum sampling point as the candidate safety point for each transition direction.
6. The robot welding path planning and obstacle avoidance method for complex workpieces according to claim 5, wherein, In the candidate safety point set of two points needing to be connected And The safety transition point pair : is obtained by minimizing the distance between the two candidate safety points And If the connection between the safe transition point and passes the discrete collision detection, the connection between the safe transition point and is taken as the safe transition path, and if the connection between the safe transition point and fails the discrete collision detection, an obstacle avoidance path is generated between the safe transition point and as the safe transition path; wherein, for and generating an obstacle avoidance path as a safe transition path between the pair of points is specifically: safe transition point and and obstacle point cloud, construct Laplace equation, use finite element method to discretely solve Laplace equation to obtain harmonic potential field ; take the safe transition point as the starting point, take the safe transition point as the end point, based on the harmonic potential field adopt the fourth-order Runge-Kutta method to integrate the gradient field to generate and between the obstacle avoidance path.
7. The robot welding path planning and obstacle avoidance method for complex workpieces according to claim 1, wherein, The first The first , The first The first The first The first The first The first wherein, is the synthetic cost of the th welding path; is the total length of the transition path in the , th welding path, is the th transition path in the th welding path; is the collision risk of the , th welding path, is the position of the th transition path at the th time instant, is the minimum distance to the obstacle point cloud; is the smoothness indicator of the th welding path, , is the second derivative of ; , and each represent a tuning coefficient.
8. The robot welding path planning and obstacle avoidance method for complex workpieces according to claim 1, wherein, The sequence of weld construction orders is generated in step S2 must be satisfied at the time The welding motion direction of the vertical weld must satisfy the principle of top-down process; The two end points with the minimum distance should be selected as the termination point of the previous weld and the starting point of the next weld between adjacent welds; 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.
9. A robot welding path planning and obstacle avoidance system for complex workpieces, characterized by, The device comprises a memory and a processor, the memory stores a computer program, and the processor executes the computer program to perform the method of any one of claims 1-8.
Citation Information
Patent Citations
Weld joint path planning method and device, computer equipment and readable storage medium
CN119600320A