A method for controlling the grinding of a weld seam of a sheet metal part

CN121733436BActive Publication Date: 2026-09-08HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610072643.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-20
Publication Date
2026-09-08
Estimated Expiration
2046-01-20

AI Technical Summary

Technical Problem

能够获得焊缝三维轮廓数据,但针对复杂曲率处的路径点密度自适应与焊渣和反射伪影的区分未做深入处理

Benefits of technology

(1)本发明实现2D与3D图像的同步特征融合,使反光、焊渣伪影与真实焊缝凸起在描述中可区分;缺陷识别准确率较传统单一3D方法有明显提升。漏检率、误检率显著下降,有效支撑后续路径规划精度;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121733436B_ABST
    Figure CN121733436B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of intelligent manufacturing, and provides a kind of sheet piece weld polishing control method, comprising: calculating defect determination parameter for any point in each cluster, and judging whether it is defect point and defect category according to defect determination parameter, clustering defect point to form defect cluster set, and obtaining target removal amount of each defect cluster;The trajectory line is determined for the center of gravity projection point set of defect cluster, and the discrete path point set is generated from the starting point to the terminal point of trajectory line with dynamic step length;Trajectory line includes the center line obtained by curve fitting along the direction of weld;According to tool radius and the expected removal depth of current pass, the position and posture of polishing tool are calculated for each path point;And the discrete tool position and posture are fitted to form continuous tool pose trajectory.The present application is suitable for automatic polishing of automobile door frame type weld, and has the advantages of high engineering implementation, low cost, robustness to welding slag artifacts, etc.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent manufacturing technology, specifically to a method for controlling the grinding of weld seams in thin sheet metal parts. Background Technology

[0002] Weld grinding is a common and critical post-processing step in automotive body-in-white manufacturing. Existing automation methods mainly focus on the following categories: 1. The contour is acquired and a trajectory is generated by scanning with laser lines or structured light. A typical implementation involves mounting a laser or structured light camera at the robot's end effector to scan along a planned path and extract the cross-sectional point cloud. This method can obtain 3D contour data of the weld, but it lacks in-depth processing for adaptive path point density at complex curvatures and the distinction between weld slag and reflection artifacts.

[0003] 2. Point cloud-based weld seam recognition and tracking methods use point cloud registration, RANSAC plane fitting, and spatial line extraction to obtain the weld seam centerline and perform trajectory interpolation. This type of method performs well in simple straight seam or near-straight curve scenarios, but it is prone to misjudgment in local complex contours, such as cross-lap joints, weld beads, and highly reflective surfaces. Furthermore, it relies heavily on simple equal-interval interpolation, resulting in insufficient fitting accuracy at curvature changes.

[0004] 3. Constant force or force-controlled grinding solutions use force sensors or constant force mechanisms to ensure consistent grinding force and adjust the grinding path or wheel diameter accordingly, thereby improving processing quality. These solutions are highly dependent on equipment hardware, costly, and require significant maintenance. For production lines that lack force control or are unwilling to implement it, force control solutions are not a viable option.

[0005] 4. Attitude determination and path tangential calculation: The attitude of the mold is calculated using 3D point cloud and gradient or target projection strategies to improve attitude accuracy; however, the algorithm mainly focuses on attitude rather than curvature-driven point interpolation and visual closed-loop volume estimation.

[0006] In summary, the main shortcomings of existing technologies are: 1. Relying on force control or constant force devices to ensure removal volume results in a complex system that is not suitable for scenarios that rely solely on visual perception; 2. The path point interpolation uses equal spacing or coarse-grained segmentation, lacking an adaptive interpolation strategy coupled with curvature, making it difficult to maintain fitting accuracy at points of drastic curvature change; 3. Insufficient utilization of highly reflective surfaces, weld slag artifacts, and two-dimensional image information leads to misjudgment or missed judgment; 4. Lack of a vision-based closed-loop estimation mechanism to ensure processing results. Summary of the Invention

[0007] To address the shortcomings of existing technologies, this invention provides a method for controlling the grinding of weld seams in thin plates, enabling reliable detection, precise path generation, and controllable removal even under common industrial site conditions, thereby reducing equipment costs and improving production line compatibility.

[0008] This invention provides a method for controlling the grinding of weld seams in thin plates, comprising: Acquire grayscale and depth maps of the target, map pixels to point clouds, and perform preprocessing; Extract the 2D contour and project it onto the 3D point cloud to extract the weld seam neighborhood point cloud. Then, perform connected segmentation to obtain the initial cluster set. ; For each cluster Calculate defect judgment parameters at any point in the system, and determine whether it is a defect point and its defect category based on the relationship between the defect judgment parameters and a preset threshold. Then, cluster the defect points to form a defect cluster set. The target removal amount for each defect cluster is obtained; the defect determination parameters include residual height, grayscale gradient magnitude, local contrast and geometric curvature index. The trajectory line is determined by the set of centroid projection points of the defect cluster, and a set of discrete path points is generated by stepping from the starting point to the ending point of the trajectory line with a dynamic step size. The trajectory line includes the centerline obtained by curve fitting along the weld direction. Based on the tool radius and the expected removal depth for the current pass, for each path point... Calculate the position and orientation of the grinding tool; and fit the discrete position and orientation of the grinding tool to form a continuous tool pose trajectory. Transform the tool pose trajectory to the robot base coordinate system and control the robotic arm to execute the tool pose trajectory.

[0009] Optionally, the initial cluster set Methods of obtaining it include: Extract the 2D contour, project the 2D contour onto the 3D point cloud to extract the weld neighborhood point cloud; assemble the weld neighborhood point cloud. , P For 3D point clouds, Candidate mask for weld seam, For the cutting radius, These are three-dimensional points obtained by pixel mapping; Based on Euclidean clustering pairs Perform a connected partition to obtain the initial cluster set. .

[0010] Optionally, the defect cluster set Methods of obtaining it include: For each initial cluster Take a local window according to the projection direction Fit a local reference surface and calculate the residual. ; At point p neighborhood Calculate the covariance matrix And obtain the geometric curvature index. ; Map the 2D grayscale image I to points get Simultaneously calculate the grayscale gradient magnitude With local contrast ; The relationship between the defect determination parameters and the preset threshold is used to determine whether it is a defect point and the defect category.

[0011] Optionally, the rules for determining defect points and defect categories include: like and If p is a convex defect, then p belongs to the convex defect category. like If p is a concave defect, then p belongs to a depression defect. like and and If p is a welding slag artifact, then p belongs to the welding slag artifact. Otherwise, p is a normal point; The threshold for determining the height of a protruding defect; This represents the curvature threshold used to distinguish between smooth and sharp regions. The threshold for determining the depth of a dent defect; Indicates the threshold for non-significant defects; Indicates the threshold value of the grayscale gradient; This represents the local contrast threshold.

[0012] Optionally, target removal amount , in, The height of the initial point cloud of the defect region on the local reference plane; The height of the ideal weld contour or flat reference surface; For the local area of ​​the weld; This indicates the maximum safe removal depth allowed for a single-piece process.

[0013] Optionally, if the defect width Effective width of the cutting tool The trajectory line also includes parallel offset lines; the parallel offset lines are generated by offsetting to both sides of the center line, with an offset distance of... , k This is a scaling factor.

[0014] Optionally, the dynamic step size ;in, It is the baseline sampling interval. It is the minimum sampling interval. >0、 ≥1 is the adjustment coefficient for controlling sensitivity; One-dimensional curvature , , These are the first and second derivatives of the trajectory line, respectively. This represents the tangential direction vector of the centerline at parameter s; Indicates the direction of curvature change of the trajectory line; the cross product of the two. × The direction of the normal plane used to characterize the curve; This represents the standard vector magnitude.

[0015] Optionally, the step of determining the removal depth for each path point based on the tool radius and the expected removal depth of the current pass is... Calculate the position and orientation of the grinding tool, including: Based on the tool radius Compared with the expected removal depth of the current track Calculate tool position ; , legal direction eig(·) represents finding the eigenvalues ​​and eigenvectors of a matrix, Cov(·) represents the covariance, and the local surface reference point. Local surface point set , Let r be the point cloud of the defect region; Obtain the tool axial vector ; Attitude Hybrid Weight Function , It is an edge protection factor based on local plate thickness and edge curvature. , It is the weighting coefficient.

[0016] Optionally, the two ends of the trajectory line are respectively inserted with an infeed section and a retraction section, wherein the infeed section includes the tool moving from a safe height. The trajectory transitions to the starting point of the trajectory line, and the retraction segment includes a transition from the ending point of the trajectory line to a safe height. The trajectory.

[0017] Optionally, it also includes: After completing the current grinding operation, a closed-loop test is performed, including: Obtain the point cloud before and after the current pass is completed, obtain the residual height field, and obtain the local volume removal amount; If the point cloud projection height value after the current pass is greater than the preset height, or the local volume removal amount is less than the preset threshold, then the next pass needs to be executed; otherwise, the polishing process ends. If the remeasured point cloud deviates too much from the expected value, an anomaly will be triggered.

[0018] By adopting the above technical solution, this application has the following beneficial effects: (1) This invention achieves synchronous feature fusion of 2D and 3D images, making reflections, weld slag artifacts and real weld protrusions distinguishable in the description; the defect identification accuracy is significantly improved compared with the traditional single 3D method. The false negative rate and false positive rate are significantly reduced, effectively supporting the accuracy of subsequent path planning; (2) The present invention plans path points by dynamic step size. When the bending radius of the weld decreases, the algorithm automatically inserts more dense path points in the high curvature area; reduces the number of points in the smooth area to improve efficiency; makes the posture in the high curvature area more in line with the law line, and extends smoothly along the path in the low curvature area; and can still maintain a stable contact posture in the uncontrolled system. (3) The present invention uses visual volume estimation instead of traditional force feedback and forms a closed-loop judgment to confirm whether to continue polishing, thereby improving feasibility. Attached Figure Description

[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.

[0020] Figure 1 A flowchart of a method for controlling the grinding of weld seams in thin plates provided by an embodiment of the present invention is shown. Detailed Implementation

[0021] The embodiments of the technical solution of the present invention will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of the present invention and are therefore merely examples, and should not be construed as limiting the scope of protection of the present invention.

[0022] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application should have the ordinary meaning as understood by those skilled in the art to which this invention pertains.

[0023] In one embodiment, such as Figure 1 As shown, a method for controlling the grinding of weld seams in thin plates is provided, including: S1. Acquire the grayscale image and depth image of the target, map the pixels to point clouds, and perform preprocessing.

[0024] The S110 3D camera scans the weld area at the end effector of the robotic arm, simultaneously acquiring two-dimensional grayscale images. With depth map Using the camera intrinsic parameter matrix Mapping pixels to a 3D point cloud: , in It is the camera intrinsic parameter matrix. Focal length Principal point coordinates Let (u, v) be the depth value of the pixel. These are the coordinates of a three-dimensional point in a point cloud.

[0025] The generated point cloud will be used for subsequent defect detection and trajectory planning.

[0026] S120. To improve point cloud quality and image recognition stability, perform the following preprocessing operations: S121. Depth Map Hole Filling and Bilateral Filtering: , in, This is the depth map after hole filling and filtering. It is a filter window. These are the spatial and intensity (depth) bandwidth parameters for bilateral filtering.

[0027] S122. Removes specular highlights and shadows, improving weld texture contrast.

[0028] S123. Statistical filtering is used, and the neighborhood radius of the point is set. r If the distance from a point to the mean of its neighborhood exceeds If the value is not found, it is identified as an outlier; then PCA is used to decompose the neighborhood covariance matrix to estimate the normal. Here, It represents the statistical standard deviation of spatial distances within a local neighborhood of a point cloud.

[0029] Among them, the neighborhood radius r The neighborhood radius of the point used for point cloud normal estimation or statistical filtering.

[0030] S2. Extract the 2D contour and project it onto the 3D point cloud to extract the weld seam neighborhood point cloud, and perform connected segmentation to obtain the initial cluster set. .

[0031] S210. The specific steps for extracting the 2D contour are as follows: S211. Grayscale images Apply Gaussian blur: , in, For Gaussian kernel, Standard deviation, This is the filtered image.

[0032] S212. Obtain an edge map using Canny edge detection. : , in, The low / high threshold for Canny can be set using Otsu or empirical methods; output This is a binary edge map.

[0033] S213. Morphological operations to fill edge voids and obtain weld seam candidate masks. : , in, kernel It is a morphological convolution kernel.

[0034] S220. Project the 2D contour onto the 3D point cloud to extract the weld seam neighborhood point cloud. The specific implementation is as follows: S221. Mask Pixel with a value of 1 Through depth map With camera internal reference Mapping to point cloud coordinates ; S222. Draw a spatial radius with the projection point as the center. Point cloud clipping yields the weld seam neighborhood point cloud set: , in, For the cutting radius, These are three-dimensional points obtained by pixel mapping.

[0035] S230. Connectivity splitting and preliminary filtering, the specific method is as follows: S231. To Voxel downsampling is performed to reduce the number of points and unify the resolution and voxel size. .

[0036] S232. Based on Euclidean clustering pairs Perform a connected partition to obtain the initial cluster set. Noisy clusters are eliminated based on cluster volume, number of points, and maximum height difference.

[0037] S3. For each cluster Calculate defect judgment parameters at any point in the system, and determine whether it is a defect point and its defect category based on the relationship between the defect judgment parameters and a preset threshold. Then, cluster the defect points to form a defect cluster set. The system then obtains the target removal amount for each defect cluster. Defect determination parameters include residual height, grayscale gradient magnitude, local contrast, and geometric curvature index.

[0038] S310. For each initial cluster Take a local window according to its projection direction (generally the weld seam spanning normal). Fit the local reference plane using the least squares method (or fit the weld baseline using splines and calculate the local bottom plane): , The residual is: . in, These are three-dimensional points; a, b, and c are the parameters of the fitted plane. Positive values ​​indicate convexity, while negative values ​​indicate concavity.

[0039] Among them, the neighborhood Based on a fixed radius Or fix the number of nearest neighbors k Definition: refers to the area around a point p This refers to the neighborhood of a weld cluster within a finite spatial scale. This local scale ensures that the fitting results accurately reflect the geometry near the weld, while avoiding interference from the overall structure or distant, irrelevant points. The selection of the local scale is calibrated based on weld width, point cloud density, and sensor resolution.

[0040] S320. At point p neighborhood Calculate the covariance matrix: , right Find the eigenvalues ​​and let Define the geometric curvature index as .

[0041] in, These are the eigenvalues ​​of the covariance matrix; A larger value indicates a higher point p The greater the curvature, the sharper the surface.

[0042] Calculate the local reference height on the same cross section And define the remaining height: .

[0043] S330. Convert 2D grayscale image Mapped to point cloud points get Simultaneously calculate the grayscale gradient magnitude With local contrast : , , in, It is the grayscale gradient magnitude; This refers to local contrast. (Subscript) loc This represents a local statistic. This indicates that point p is in its local neighborhood. The standard deviation of the internal grayscale value is used to measure the degree of grayscale variation in a local area, thereby reflecting the texture complexity or noise level.

[0044] S340. Let the threshold set { , , , , } represents a pre-calibrated constant, and the threshold set consists of pre-calibrated or empirically set parameters, where: The threshold for determining the height of a protruding defect; The threshold for determining the depth of a dent defect; This represents the curvature threshold used to distinguish between smooth and sharp regions. This represents the grayscale gradient magnitude threshold, used to identify high-frequency texture or noise regions; This represents the local contrast threshold, used to help distinguish weld slag artifacts from real geometric defects. This threshold can be set using calibration samples or experimental data and adjusted according to different materials and process conditions.

[0045] The determination rule is as follows: like and ,but This falls under the category of "protruding defects (weld beads)"; like ,but This falls under the category of "depression defects (collapse)"; like and > and > ,but This belongs to the category of "welding slag artifacts"; When the point is geometrically close to the reference surface, the anomaly is mainly caused by surface texture, weld slag, or imaging noise, rather than significant geometric protrusions or depressions.

[0046] Otherwise, it's normal.

[0047] S350. Perform spatial connectivity clustering on the points identified as defects. This clustering is based on a region growing algorithm to form defect clusters. .

[0048] Calculate the centroid of each cluster. , maximum coheight Maximum depth The principal direction is obtained through the first principal component vector of the cluster's PCA. These quantitative indicators are used to determine the defect category and assign processing priorities and target removal amounts. .

[0049] Target removal amount The maximum material removal depth of the weld defect region in the normal direction is represented by the height difference between the initial defect point cloud and the desired surface model, and can be defined as: , in: The height of the initial point cloud of the defect region on the local reference plane; The height of the ideal weld profile or flat reference surface; For the local area of ​​the weld; This indicates the maximum safe removal depth allowed for a single-piece process.

[0050] This definition ensures that the target removal amount covers the maximum defect without exceeding process and equipment limitations.

[0051] S4. Determine the trajectory line for the centroid projection point set of the defect cluster, and generate a discrete path point set by dynamically increasing the step size from the starting point to the ending point of the trajectory line. The trajectory line includes the centerline obtained by curve fitting along the weld direction.

[0052] S410. For defect clusters By fitting a spline or least-squares curve along the weld direction to the set of centroid projection points, the centerline representation can be obtained. ,parameter This is the arc length parameter.

[0053] S420. Using curve parameterization to find one-dimensional curvature: , in, , These are the first and second derivatives, respectively; This represents the tangential direction vector of the centerline at parameter s; Indicates the direction of curvature change of the centerline; × represents the cross product of vectors. × The direction of the normal plane used to characterize the curve; Represents the standard vector magnitude. Curvature The geometry of the centerline is uniquely determined and is only related to the geometry of the weld centerline, not to the point cloud on the workpiece surface. Its function is to provide geometric constraints for subsequent adaptive sampling and attitude smoothing.

[0054] S430. To increase sampling density at high curvature, define the sampling step size: , in, It is the baseline sampling interval. It is the minimum sampling interval. >0、 ≥1 is the adjustment coefficient for controlling sensitivity. This is the sampling sensitivity adjustment coefficient, used to control the intensity of the influence of curvature on the sampling step size; The weight of the curvature term in step decay is determined. The nonlinear sensitivity of the step size to changes in curvature is determined.

[0055] S440. Generate a set of discrete path points by proceeding step-by-step from the starting point to the ending point of the centerline according to the sampling step size. q i}

[0056] S4 also includes: If the defect width Effective width of the cutting tool Then parallel offset lines are generated on both sides of the center line, with an offset distance of... , k This is a scaling factor, set to 0.6 in an optional mode; it generates a set of discrete path points by dynamically stepping from the start of the offset line.

[0057] Defect width Based on defect clusters The spatial distribution range, calculated in the direction perpendicular to the weld centerline, can be obtained by projecting the defect points and calculating their maximum lateral distance. When the defect width... Greater than the effective width of the tool When a single centerline cannot completely cover the defect area, parallel offset lines are constructed on both sides of the centerline.

[0058] For parallel offset lines, the same processing method as the center line is used, performing the same processing in S420-S430, and generating a set of discrete path points by stepping from the starting point to the ending point of the parallel offset line.

[0059] S5. Based on the tool radius and the expected removal depth of the current lane For each path point Calculate the position and orientation of the grinding tool; and fit the discrete position and orientation of the grinding tool to form a continuous tool pose trajectory.

[0060] S510. For each path point local surface points Calculate the normal direction According to the tool radius With expected removal depth Calculate tool position: , in, , representing a set of points When performing least squares plane fitting or PCA analysis, the eigenvector corresponding to the smallest eigenvalue is the local surface normal vector. Local surface reference point It is used to determine the spatial reference for the offset of the tool along the normal direction.

[0061] For centerline sampling points Construct the corresponding local surface point set This is used to calculate the normal to the workpiece surface. The point cloud represents the defect region, and r is the local neighborhood radius, which is set according to the point cloud density.

[0062] The expected depth to be removed for the current track. This refers to the equivalent contact radius of the grinding head. Wherein, the expected removal depth for the current pass is... Based on the target removal amount Confirmed. In the multi-stage polishing strategy, Decomposed into several passes, expected removal depth It satisfies: , Where N represents the total number of polishing passes; A decreasing allocation strategy is preferred to ensure processing stability. , in, k Indicates the track index; The safety reduction factor is used to control the gradual reduction of the removal depth in subsequent passes; the first pass is responsible for the removal of the main material, and the last pass is used for surface repair.

[0063] S520. By - Tangential direction of differential normalization computation path Constructing a hybrid axial structure: , .

[0064] in, This is the attitude hybrid weighting function, used to comprehensively consider the influence of local curvature and edge risk on tool attitude. Its value ranges from 0 to 1. Mapped to When curvature or edge protection requirements increase, A value closer to 1, meaning more aligned with the normal, is beneficial in flat regions. Biased towards 0, meaning more biased towards the tangential direction; For at the path point q i The tool axial vector determined at the location is derived from the normal direction. and tangential The result is obtained by weighted mixing and normalization, and is used to describe the orientation of the tool. It is an edge protection factor based on local plate thickness and edge curvature. For local plate thickness estimation, This represents the local edge curvature, with a value ranging from 0 to 1. , These are weighting coefficients. It is the tool axial (attitude) vector.

[0065] This step introduces an edge protection factor. and weighting coefficients , This design dynamically balances the surface normal vector and the path tangent. Specifically designed for thin sheet metal components such as automotive door frames, it aims to address the issues of overcutting or collisions that are prone to occur in edge areas.

[0066] S530. Insert the infeed and retraction sections at the beginning and end of each trajectory line respectively: from the safety height. The cutter gradually enters the contact point along a linear or S-curve speed profile, and retracts at the end with an opposite profile to ensure no impact occurs.

[0067] safe height This is a height set to ensure that the tool does not come into unintended contact with the workpiece or fixture during the tool feed and retraction processes. This height can be determined based on the highest point of the workpiece point cloud, the tool geometry, and the system safety margin, or obtained through offline simulation and empirical calibration. The safety height is only used in the trajectory transition section and is not involved in the actual material removal calculation.

[0068] S540. For the final { , The sequence is fitted with cubic B-splines or quintic splines to generate a continuous trajectory. This ensures the first / second order continuity of position and orientation, facilitating robot trajectory interpolation and execution.

[0069] Among them, the attitude vector Indicates the tool at the trajectory point q i The orientation of a point is determined by the following two directional constraints: 1) Tool feed direction constraint: given by the tangential direction of the centerline. ; 2) Surface bonding normal constraint: determined by the local surface normal. Provided.

[0070] The attitude vector can be defined as the weighted composite direction of the two: , in, This represents the attitude weighting coefficient.

[0071] In this step, { , Firstly, it serves as an intermediate result for discrete path points and attitudes; to ensure the continuity of the robotic arm's motion, it... Typically, further spline interpolation or rotational space smoothing is performed. The final output of S5 is not a single point pair, but a continuous, smooth tool pose trajectory: , in Depend on Interpolation yields the spatial position of the tool at the kth trajectory parameter position; From attitude vector The constructed rotation matrix or quaternion interpolation is obtained, representing the tool posture at the corresponding position. This trajectory T is the complete output of step S5, used to describe the continuous motion behavior of the tool throughout the machining process. In the above trajectory representation, Essentially, it is a continuous representation of discrete path points.

[0072] S6. Transform the tool pose trajectory to the robot base coordinate system and control the robotic arm to execute the tool pose trajectory.

[0073] This step is used to convert the tool pose trajectory obtained in step S5 into a grinding system for execution. The grinding system includes: Six-axis robotic arm: used to perform automated grinding tasks, with multi-degree-of-freedom linkage motion capability, and can realize spatial posture adjustment and continuous trajectory motion according to the target weld curve; Floating grinding head: Installed at the end of the robotic arm, it achieves compliant contact between the grinding tool and the workpiece surface through a flexible floating mechanism, maintaining constant contact pressure and ensuring uniform grinding of the weld surface; 3D camera: Installed at the end of the robotic arm and coaxially arranged with the floating grinding head, it is used to acquire two-dimensional images and three-dimensional point cloud data of the weld area in a "hand on eye" configuration to achieve visual guidance and defect detection; Processor: Electrically connected to the 3D camera, it is used to execute visual algorithms such as hand-eye calibration, image preprocessing, weld defect recognition, curvature adaptive interpolation and grinding trajectory generation, and transmits the generated grinding path data to the robotic arm for execution in real time.

[0074] S610. Transform the trajectory points from the camera coordinate system to the robot base coordinate system using the following formula: , in: The homogeneous coordinates of the trajectory points in the camera coordinate system are given according to the tool pose trajectory. T Execution requires point-by-point sampling; any specific location point in trajectory T. When participating in transformation, all are based on When taken as input, the coordinates of a point can be directly represented as the homogeneous coordinates of a 3D point in the camera coordinate system. .

[0075] This is a fixed extrinsic parameter transformation from the camera coordinate system to the tool coordinate system; For fixed installation transformation from the tool coordinate system to the robot end flange coordinate system; This is for real-time pose transformation from the end flange to the robot base.

[0076] Each trajectory point is mapped to coordinates in the manner described above, forming an executable spatial trajectory in the robot's base coordinate system.

[0077] The above transformation matrix is ​​pre-obtained using the following method: First, a 3D camera is mounted at the end effector of the robotic arm, and a checkerboard calibration plate with a calibration dot matrix is ​​used. The robotic arm then acquires calibration image sequences in multiple poses. By combining the robot's end-effector pose information in various postures, the Tsai-Lenz hand-eye calibration algorithm is used to solve for the rigid body transformation matrix from the camera coordinate system to the robot's end-effector flange coordinate system. .

[0078] Secondly, the fixed installation transformation matrix between the tool coordinate system and the robot end flange coordinate system is obtained by using robotic arm tool calibration or CAD installation dimension measurement. Therefore, the extrinsic transformation matrix from the camera coordinate system to the tool coordinate system can be calculated using the coordinate transformation relationship: , Finally, the homogeneous coordinates of any trajectory point in the camera coordinate system It can be mapped to the robot base coordinate system through the following transformation: , This calibration process enables precise mapping between the coordinate systems of the camera, tool, and robotic arm, with the error controlled within 0.15mm.

[0079] S620. Perform offline collision detection using voxelized workpiece points before sending the trajectory; if a collision point is detected, use local replanning.

[0080] Local replanning in this step refers to making limited adjustments to only the local trajectory segment where a potential collision with the workpiece is detected. This adjustment is confined to a small number of continuous path points, eliminating the collision risk through fine-tuning of local height or attitude without changing the overall path sequence and processing flow, thus avoiding the efficiency reduction caused by global replanning. Local replanning in this step can be limited in the following ways: (1) Taking the trajectory point where the collision occurs as the center, select a preset number of adjacent path points before and after it to form a local trajectory segment. This number can be determined according to the trajectory sampling interval or the robot's minimum interpolation length. It is usually a number of consecutive path points to ensure the continuity of the trajectory.

[0081] (2) Local replanning only performs fine-tuning operations on the path points in the above local trajectory segments, including but not limited to: small positional offsets along the surface normal direction; and fine-tuning of the tool attitude within a limited angle range; All of the above adjustments are constrained by preset maximum displacement and maximum attitude change thresholds.

[0082] (3) The order of path points is not changed during the replanning process, no new path branches are introduced, and the overall processing flow is not changed, thereby avoiding the decrease in computational complexity and processing efficiency caused by global replanning.

[0083] By using the above methods, the risk of local collisions can be eliminated while ensuring the continuity of the trajectory and the processing sequence remain unchanged.

[0084] S630. Set maximum speed for the trajectory. acceleration To mitigate jerk limitations, ensure the robotic arm controller can smoothly follow movements and reduce vibration. For example, reduce the cutting speed in sections with large attitude changes. v , making To ensure stable cutting, This is the velocity attenuation coefficient.

[0085] S640. The trajectory is sent to the robotic arm controller in batches. The robotic arm executes according to the desired pose and records the execution trajectory in real time for subsequent closed-loop comparison.

[0086] S7. After completing the current grinding operation, perform closed-loop testing. The steps include: S710. After each pass, high-resolution point clouds are acquired from the same or multiple viewpoints. and compared with the previous execution of the course. Perform ICP registration to obtain the residual height field.

[0087] This represents the point cloud of the workpiece surface before the start of the current grinding pass. In the first pass, This is the initial point cloud of the defect area after acquisition and preprocessing; in subsequent passes, This is what was obtained after the previous step was completed. .

[0088] Calculations are performed on the local mesh of the weld seam: , in,( x , y () represents the two-dimensional parameter coordinates on the local reference plane of the weld. Indicates by The height value obtained by projection and interpolation; Indicates by The height value obtained by projection and interpolation.

[0089] The height difference Used to construct the residual height field and further calculate the material removal volume for multi-pass processing decisions. This involves analyzing the point cloud after each pass processing. Point cloud before processing Registration is performed to obtain the geometric correspondence between the two in a unified coordinate system. The height difference is calculated on the local reference plane of the weld. height difference In the two-dimensional parameter space of the weld region ( x , y The distribution on the surface constitutes the residual height field.

[0090] The role of the residual height field in subsequent steps is reflected in: (1) Its maximum value is used to determine whether the target maximum residual height requirement is met; (2) The material removal volume is calculated by integrating it over the weld area and used for multi-pass processing decisions.

[0091] S720. Calculate the local volume removal amount: ,in This represents the area of ​​a grid cell.

[0092] S730. If ,or ( If ∈(0,1) represents the volume reaching the rate threshold, then the next pass needs to be continued; otherwise, the polishing operation ends. The remaining maximum altitude of the target. Remove volume from the target area. Next pass removal depth. according to: , in, This is a safety reduction factor.

[0093] S740. If the remeasured point cloud deviates too much from the expected value, for example, the registration error > Or local normal deviation > If this occurs, an anomaly is triggered: the robot returns to the safe position, an alarm is triggered, and the log is saved, awaiting manual inspection or recalibration.

[0094] Registration error refers to the error used to measure point cloud registration. and The error index for registration quality can be calculated using methods such as mean square error, root mean square error, or maximum corresponding point distance. Local normal deviation refers to the difference in angle between the surface normals of the point cloud before and after processing within the corresponding weld area, used to reflect whether the surface geometry after processing deviates significantly from the expectation.

[0095] When the registration error or local normal deviation exceeds the preset threshold, it indicates that there is an abnormality in the current measurement result or processing status, which may be caused by calibration error, viewpoint change or sensor abnormality. At this time, the abnormality handling process is triggered to ensure the safety of system operation and the reliability of processing results.

[0096] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for controlling the grinding of weld seams in thin sheet metal parts, characterized in that, include: Acquire grayscale and depth maps of the target, map pixels to point clouds, and perform preprocessing; Extract the 2D contour and project it onto the 3D point cloud to extract the weld seam neighborhood point cloud. Then, perform connected segmentation to obtain the initial cluster set. ; For each cluster Calculate defect judgment parameters at any point in the system, and determine whether it is a defect point and its defect category based on the relationship between the defect judgment parameters and a preset threshold. Then, cluster the defect points to form a defect cluster set. The target removal amount for each defect cluster is obtained; defect determination parameters include residual height, grayscale gradient magnitude, local contrast, and geometric curvature index; target removal amount ,in, The height of the initial point cloud of the defect region on the local reference plane; The height on the ideal weld profile or flat reference surface; For the local area of ​​the weld; Indicates the maximum safe removal depth allowed for a single-piece process; The trajectory line is determined by the set of centroid projection points of the defect cluster, and a set of discrete path points is generated by stepping from the starting point to the ending point of the trajectory line with a dynamic step size. The trajectory line includes the centerline obtained by curve fitting along the weld direction. Based on the tool radius and the expected removal depth of the current pass, for each path point... Calculate the tool position and orientation; fit the discrete tool position and orientation to form a continuous tool pose trajectory; and determine the expected removal depth. By target removal amount Obtained by decomposition, satisfying N represents the total number of polishing passes; Transform the tool pose trajectory to the robot base coordinate system and control the robotic arm to execute the tool pose trajectory.

2. The method according to claim 1, characterized in that, The initial cluster set The methods for obtaining it include: Extract the 2D contour, project the 2D contour onto the 3D point cloud to extract the weld neighborhood point cloud; [Weld neighborhood point cloud set] , P For 3D point clouds, As a candidate mask for weld seams, For the cutting radius, These are three-dimensional points obtained by pixel mapping; Based on Euclidean clustering pairs Perform a connected partition to obtain the initial cluster set. .

3. The method according to claim 2, characterized in that, The defect cluster set The methods for obtaining it include: For each initial cluster Take a local window according to the projection direction Fit a local reference surface and calculate the residual. ; At point p neighborhood Calculate the covariance matrix And obtain the geometric curvature index. ; Map the 2D grayscale image I to points get Simultaneously calculate the grayscale gradient magnitude With local contrast ; The relationship between the defect determination parameters and the preset threshold is used to determine whether it is a defect point and the defect category.

4. The method according to claim 3, characterized in that, The rules for determining defect points and defect categories include: like and ,but This is a raised defect; like ,but This is a concave defect; like and and ,but This is a weld slag artifact; Otherwise, p is a normal point; The threshold for determining the height of a protruding defect; This represents the curvature threshold used to distinguish between smooth and sharp regions. The threshold for determining the depth of a depression defect; Indicates the threshold for non-significant defects; Indicates the threshold value of the grayscale gradient; This represents the local contrast threshold.

5. The method according to claim 1, characterized in that, If the defect width Effective width of the cutting tool The trajectory line also includes parallel offset lines; the parallel offset lines are generated by offsetting from the center line to both sides, with an offset distance of... .

6. The method according to claim 5, characterized in that, The dynamic step size ;in, It is the baseline sampling interval. It is the minimum sampling interval. >0、 ≥1 is the adjustment coefficient for controlling sensitivity; One-dimensional curvature , , These are the first and second derivatives of the trajectory line, respectively. This represents the tangential direction vector of the centerline at parameter s; Indicates the direction of curvature change of the trajectory line; the cross product of the two. × The direction of the normal plane used to characterize the curve; This represents the standard vector magnitude.

7. The method according to claim 6, characterized in that, The process involves determining the removal depth for each path point based on the tool radius and the expected removal depth for the current pass. Calculate the position and orientation of the grinding tool, including: Based on the tool radius Compared with the expected removal depth of the current track Calculate tool position ; , legal direction eig(·) represents finding the eigenvalues ​​and eigenvectors of a matrix, Cov(·) represents the covariance, and the local surface reference point. Local surface point set , Let r be the point cloud of the defect region; Obtain the tool axial vector ; Attitude Hybrid Weight Function , It is an edge protection factor based on local plate thickness and edge curvature. For local plate thickness estimation, For local edge curvature, , It is the weighting coefficient.

8. The method according to claim 1, characterized in that, The trajectory line is further divided into an infeed section and a retraction section at both ends. The infeed section includes the tool moving from a safe height. The trajectory transitions to the starting point of the trajectory line, and the retraction segment includes a transition from the ending point of the trajectory line to a safe height. The trajectory.

9. The method according to claim 1, characterized in that, Also includes: After completing the current grinding operation, a closed-loop test is performed, including: Obtain the point cloud before and after the current pass is completed, obtain the residual height field, and obtain the local volume removal amount; If the point cloud projection height value after the current pass is greater than the preset height, or the local volume removal amount is less than the preset threshold, then the next pass needs to be executed; otherwise, the polishing process ends. If the remeasured point cloud deviates too much from the expected value, an anomaly will be triggered.

Citation Information

Patent Citations

  • Surface weld joint feature recognition and automatic grinding and polishing device and method of complex curved surface

    CN110091333A

  • Welding seam grinding track planning method based on three-dimensional point cloud

    CN117226855A