Thin plate welding seam polishing control method
By generating point clouds and performing defect judgment and dynamic step size planning, the problems of equipment complexity and insufficient precision in weld grinding in the existing technology are solved, high-precision weld grinding control is achieved, costs are reduced and system compatibility is improved.
Patent Information
- Application Number
- CN202610072643.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-20
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies rely on force control devices during weld grinding, which are complex and costly. They are difficult to maintain fitting accuracy in areas with drastic curvature changes, and they are insufficient in handling highly reflective surfaces and weld slag artifacts. They also lack visual closed-loop estimation, leading to misjudgment or missed judgment.
By acquiring grayscale and depth maps, point clouds are generated and preprocessed. 2D contours are extracted and projected onto 3D point clouds for connectivity segmentation and defect judgment. Dynamic planning of step size generates trajectory lines. Grinding paths are calculated by combining tool radius and posture to form continuous tool pose trajectories. Visual volume estimation is used to form closed-loop judgment.
It achieves accurate differentiation between reflective surfaces and weld slag artifacts, improves the accuracy of defect identification, reduces the rate of missed detections and false detections, enhances the accuracy of path planning, and maintains a stable contact posture in a non-control system, thereby reducing equipment costs.
Smart Images

Figure CN121733436A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent manufacturing, and particularly relates to a thin plate welding seam polishing control method. BACKGROUND
[0002] Welding seam polishing is a common and key post-processing procedure in automobile body-in-white manufacturing. Existing automatic methods mainly focus on the following categories: 1. Obtain the profile by laser line or structured light line scanning and generate the trajectory. The typical implementation is to install a laser or structured light camera at the end of the robot, scan according to the planned path, and extract the profile point cloud. The three-dimensional profile data of the welding seam can be obtained, but the adaptive path point density for complex curvature and the distinction of welding slag and reflection artifacts are not deeply processed.
[0003] 2. Welding seam recognition and tracking method based on point cloud, using point cloud registration, RANSAC plane fitting and space straight line extraction to obtain the welding seam center line and perform trajectory interpolation; this kind of method performs well in simple straight seam or nearly straight curve scene, but is easy to misjudge in local complex profile such as cross lap, welding tumor, etc., and is very dependent on simple equidistant interpolation, resulting in insufficient fitting accuracy at curvature change.
[0004] 3. Constant force or force control polishing scheme, which guarantees the consistency of polishing force through force sensor or constant force mechanism and adjusts the trajectory or grinding wheel diameter accordingly, thereby improving the processing quality; this kind of scheme has strong dependence on device hardware, high cost and high maintenance requirement. For production lines without force control or unwilling to introduce force control, the force control scheme is not a feasible path.
[0005] 4. Pose determination and path tangent calculation, using three-dimensional point cloud and gradient or target projection strategy to calculate the mold pose to improve the pose accuracy; but its algorithm mainly focuses on the pose rather than the curvature driven point interpolation and visual closed loop volume estimation.
[0006] In summary, the main deficiencies of the existing technology are: 1. Dependence on force control or constant force device to ensure removal amount, resulting in complex system and unsuitability for scenes with only visual perception; 2. Equal interval or coarse-grained segmentation is used in path point interpolation, lacking adaptive interpolation strategy coupled with curvature, making it difficult to maintain fitting accuracy at places with sharp curvature changes; 3. Insufficient use of strong reflective surface, welding slag artifacts and two-dimensional image information, leading to misjudgment or omission; 4. Lack of visual-based removal amount estimation closed loop to ensure processing results. SUMMARY
[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 of 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; [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. .
[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 the 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 local surface reference points. 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 one of ordinary skill 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 algorithm then obtains the suggested removal amount for each defect cluster. Defect judgment 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 depression 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. Based on these quantitative indicators, defect categories are determined, and processing priorities and recommended removal amounts are assigned. .
[0049] Recommended 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] Remove depth from the target for the current stage. This refers to the equivalent contact radius of the grinding head. The target removal depth for the current pass is also included. Based on the recommended removal amount Confirmed. In the multi-stage polishing strategy, Decomposed into several passes for target 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 compare it 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; 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 tool position and orientation; and fit the discrete tool position and orientation 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.
2. The method according to claim 1, characterized in that, 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, 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 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.
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 dent 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 5, characterized in that, 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.
6. 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 to both sides of the center line, with an offset distance of... .
7. The method according to claim 6, 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.
8. The method according to claim 7, 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 local surface reference points. 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.
9. 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.
10. 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
Cited By
Method for position guidance of flexible contour grinding of cylindrical shell weld seams
CN122142833A