A weld adaptive seeking method, device, medium and product
Patent Information
- Application Number
- CN202610953080.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-06-30
AI Technical Summary
基于点云逆向建模的方法对数据完整性高度敏感,局部遮挡即导致整体建模失败,且计算耗时长、难以满足实时节拍要求;基于模型匹配的方法(如ICP及其变体)容易陷入局部最优,缺乏对位姿估计不确定性的量化机制,无法自适应判断结果可靠性;近年来兴起的深度学习方法虽在特征提取方面有所突破,但训练数据获取成本高、域迁移问题突出,且模型决策过程难以解释,给工业现场调试维护带来困难
本申请提供了一种焊缝自适应寻位方法、设备、介质及产品,通过在当前段焊缝区域中,获取当前帧焊缝图像数据,确保工件定位过程中的实时性。通过采用焊缝语义分割模型确定当前帧焊缝图像数据中是否存在焊缝语义区域;当当前帧焊缝图像数据中不存在焊缝语义区域时,获取下一帧的焊缝图像数据以重新确定是否存在焊缝语义区域;当连续多帧的焊缝图像数据中均不存在焊缝语义区域,则生成跳转指令,控制机器人沿理论焊缝轨迹从当前段焊缝区域前进至下一段焊缝区域,进而提高工件定位过程中的遮挡鲁棒性,避免产生误焊、碰撞或焊接设备损坏等问题。若当前帧焊缝图像数据中存在焊缝语义区域,通过确定实际激光点与理论激光点的欧氏距离,并判断欧氏距离是否小于预设容差阈值,当小于预设容差阈值时,生成前进控制指令,控制机器人沿理论焊缝轨迹前进设定步长;并在机器人前进设定步长后,获取当前帧焊缝图像数据以确定是否存在焊缝语义区域;当大于或等于预设容差阈值时,生成搜索指令,控制机器人在当前段焊缝区域中按照设定规则重新采集焊缝图像数据以确定是否存在焊缝语义区域,能够有效应对焊接环境中的遮挡、偏移、缺失等异常,提高焊缝自适应寻位的鲁棒性。当按照设定规则重新采集的焊缝图像数据中存在焊缝语义区域,且对应的欧氏距离仍大于或等于预设容差阈值,则生成跳转指令,控制机器人按照理论焊缝轨迹从当前段焊缝区域前进至下一段焊缝区域,进一步提高工件定位过程中的鲁棒性。
Smart Images

Figure CN122493463B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotic welding technology, and in particular to a weld seam adaptive positioning method, equipment, medium, and product. Background Technology
[0002] Currently, industrial automated welding still primarily relies on the teach-and-playback method, which involves manually teaching and recording the welding torch's trajectory and repeating this process in mass production. While this method has certain advantages in standardized, highly repetitive production scenarios, it still has significant limitations in practical applications. In industries such as heavy industry, shipbuilding, and construction machinery, due to the large size, complex structure, and poor assembly consistency of workpieces, the teach-and-play method struggles to guarantee accurate tracking and adaptability of the weld position. Furthermore, these scenarios involve diverse weld types, large gap variations, and significant heat deformation, further increasing the difficulty of applying teach-and-play welding. Therefore, introducing machine vision into the welding process to perceive the true position of the weld and correct its trajectory has become an inevitable trend in the development of automated welding technology.
[0003] Machine vision acquires images of the weld area using laser area array cameras, line scan cameras, or structured light sensors, and accurately extracts weld boundaries, gap morphology, and centerline positions using image processing or deep learning algorithms. This allows for real-time correction of trajectory deviations caused by tooling positioning errors, workpiece splicing deviations, or thermal deformation, and even complete reconstruction of the welding trajectory. Machine vision-based welding guidance methods significantly improve welding applicability, enhance the robustness of weld positioning, and improve the stability of weld quality, making it one of the core directions for the development of intelligent welding technology.
[0004] The application of vision technology relies on precise workpiece positioning for accurate scanning and locating. Currently, there are two main methods for workpiece positioning: one is to scan the workpiece point cloud with a camera and reverse engineer it into a model; the other is to obtain accurate pose by matching the point cloud with the workpiece model. However, the first method often fails to obtain a complete point cloud in actual production due to occlusion by fixtures, jigs, or other workpieces, leading to reverse modeling failure. The second method, on the other hand, has stringent requirements for model accuracy and struggles to adapt to the common manufacturing tolerances, thermal deformation, and wear deviations between actual workpieces and CAD (Computer Aided Design) models. Therefore, achieving robust and high-precision workpiece positioning under complex conditions where occlusion and model errors coexist has become a key bottleneck restricting the performance improvement of teach-free workstations.
[0005] Existing technologies have significant limitations in addressing the aforementioned issues. Point cloud-based inverse modeling methods are highly sensitive to data integrity; local occlusion can lead to overall modeling failure. Furthermore, they are computationally time-consuming and struggle to meet real-time cycle requirements. Model-matching methods (such as ICP and its variants) are prone to getting trapped in local optima, lack quantification mechanisms for pose estimation uncertainty, and cannot adaptively assess result reliability. While deep learning methods have made breakthroughs in feature extraction in recent years, they suffer from high training data acquisition costs, significant domain transfer problems, and difficulty in interpreting model decision-making processes, posing challenges for industrial debugging and maintenance. Moreover, while multi-view fusion and active vision strategies can alleviate occlusion issues, their low viewpoint planning efficiency and the risk of interference with robotic arm movements limit their practicality in confined workspaces. In summary, existing solutions struggle to simultaneously address occlusion robustness, model error tolerance, and real-time performance during workpiece positioning. Summary of the Invention
[0006] The purpose of this application is to provide a weld seam adaptive positioning method, device, equipment, medium and product that can simultaneously take into account the occlusion robustness and real-time performance during the workpiece positioning process.
[0007] To achieve the above objectives, this application provides the following solution: In a first aspect, this application provides an adaptive weld positioning method, including: Obtain the CAD model and hand-eye calibration matrix of the workpiece; the CAD model includes the theoretical weld trajectory; In the current weld seam region, acquire the weld seam image data of the current frame; A weld semantic segmentation model is used to determine whether a weld semantic region exists in the current frame of weld image data. If there is no weld semantic region in the current frame of weld image data, the next frame of weld image data is obtained to re-determine whether there is a weld semantic region; if there is no weld semantic region in multiple consecutive frames of weld image data, a jump instruction is generated; the jump instruction is used to control the robot to move from the current weld region to the next weld region along the theoretical weld trajectory. If a weld semantic region exists in the current frame weld image data, the actual laser point is determined based on the weld semantic region and the hand-eye calibration matrix. The theoretical laser point is determined based on the CAD model and the flange pose of the robot end effector corresponding to the weld seam image data of the current frame. Determine whether the Euclidean distance between the actual laser point and the theoretical laser point is less than the preset tolerance threshold; If the value is less than the preset tolerance threshold, a forward control command is generated. The forward control command is used to control the robot to move forward a set step length along the theoretical weld seam trajectory. After the robot moves forward a set step length, the weld seam image data of the current frame is obtained to determine whether there is a weld seam semantic region. If the value is greater than or equal to the preset tolerance threshold, a search instruction is generated to control the robot to re-collect weld image data in the current weld area according to the set rules to determine whether there is a weld semantic region. If the weld seam image data re-acquired according to the set rules contains a weld seam semantic region, and the corresponding Euclidean distance is still greater than or equal to the preset tolerance threshold, a jump instruction will be generated.
[0008] In one embodiment, a weld semantic segmentation model is used to determine whether a weld semantic region exists in the current frame weld image data, including: The current frame weld seam image data is subjected to median filtering to obtain the filtered image; An adaptive threshold binarization method is used to obtain a binary image based on the filtered image; The Steger algorithm is used to obtain the processed image based on the binary image; The weld semantic segmentation model is used to determine whether the weld semantic region exists in the processed image.
[0009] In one embodiment, determining the actual laser point based on the weld semantic region and the hand-eye calibration matrix includes: Weld feature points are determined based on the semantic region of the weld. The weld feature points are projected onto the robot base coordinate system using the hand-eye calibration matrix to obtain the actual laser points.
[0010] In one embodiment, if the value is greater than or equal to a preset tolerance threshold, a search instruction is generated to control the robot to re-acquire weld image data in the current weld area according to set rules to determine whether a weld semantic region exists, including: If the value is greater than or equal to the preset tolerance threshold, a local search instruction is generated; the local search instruction is used to control the robot to re-acquire weld seam image data according to the local search rules to determine whether a weld seam semantic region exists. If a weld semantic region exists in the weld image data re-acquired according to the local search rules, and the corresponding Euclidean distance is still greater than or equal to the preset tolerance threshold, then a spiral expansion search instruction is generated; the spiral expansion search instruction is used to control the robot to re-acquire weld image data according to the spiral expansion search rules to determine whether a weld semantic region exists. If a weld semantic region exists in the weld image data re-acquired according to the spiral expansion search rule, and the corresponding Euclidean distance is still greater than or equal to the preset tolerance threshold, a global backtracking search instruction is generated. The global backtracking search instruction is used to control the robot to re-acquire weld image data according to the global backtracking search rule to determine whether a weld semantic region exists.
[0011] In one embodiment, the local search rule includes: generating grid sampling points within a set range of the robot's current position according to a set length, and sequentially controlling the robot to move to each grid sampling point.
[0012] In one embodiment, the spiral expansion search rule includes: taking the robot's current position as the origin, gradually expanding the search radius based on the radius constraint according to the Archimedes spiral path, and controlling the robot to move along the Archimedes spiral path.
[0013] In one embodiment, the global backtracking search rule includes: the robot returns along the theoretical weld trajectory to the position where the Euclidean distance between the previous actual laser point and the theoretical laser point is less than a preset tolerance threshold, and generates a local search instruction; If the Euclidean distance between the actual laser point corresponding to the weld seam image data reacquired according to the local search rules and the theoretical laser point corresponding to the flange pose of the robot end effector reacquired according to the local search rules is still greater than or equal to the preset tolerance threshold, then a spiral expansion search instruction is generated.
[0014] In a second aspect, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the weld adaptive positioning method described in any one of the above.
[0015] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the weld adaptive positioning method described above.
[0016] Fourthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the weld adaptive positioning method described above.
[0017] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides an adaptive weld seam positioning method, device, medium, and product. By acquiring the weld seam image data of the current frame in the current weld seam region, the real-time performance of the workpiece positioning process is ensured. A weld seam semantic segmentation model is used to determine whether a weld seam semantic region exists in the current frame of weld seam image data. If no weld seam semantic region exists in the current frame of weld seam image data, the next frame of weld seam image data is acquired to re-determine whether a weld seam semantic region exists. If no weld seam semantic region exists in multiple consecutive frames of weld seam image data, a jump command is generated to control the robot to move along the theoretical weld seam trajectory from the current weld seam region to the next weld seam region. This improves the robustness of occlusion during workpiece positioning and avoids problems such as mis-welding, collisions, or damage to welding equipment. If a semantic region of the weld seam exists in the current frame of weld seam image data, the Euclidean distance between the actual laser point and the theoretical laser point is determined, and it is judged whether the Euclidean distance is less than a preset tolerance threshold. If it is less than the preset tolerance threshold, a forward control command is generated to control the robot to advance a set step length along the theoretical weld seam trajectory. After the robot advances the set step length, the current frame of weld seam image data is acquired to determine whether a semantic region of the weld seam exists. If it is greater than or equal to the preset tolerance threshold, a search command is generated to control the robot to re-acquire weld seam image data in the current weld seam region according to the set rules to determine whether a semantic region of the weld seam exists. This can effectively cope with anomalies such as occlusion, offset, and missing parts in the welding environment, and improve the robustness of weld seam adaptive positioning. When a semantic region of the weld seam exists in the weld seam image data re-acquired according to the set rules, and the corresponding Euclidean distance is still greater than or equal to the preset tolerance threshold, a jump command is generated to control the robot to advance from the current weld seam region to the next weld seam region according to the theoretical weld seam trajectory, further improving the robustness of the workpiece positioning process. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart of a weld adaptive positioning method according to an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0022] In one exemplary embodiment, such as Figure 1 As shown, an adaptive positioning method for welds is provided, including: Step S1: Obtain the CAD model of the workpiece and the hand-eye calibration matrix. The CAD model includes the theoretical weld trajectory.
[0023] Step S2: In the current weld seam region, acquire the weld seam image data of the current frame.
[0024] Step S3: The weld semantic segmentation model is used to determine whether a weld semantic region exists in the current frame of weld image data. If no weld semantic region exists in the current frame of weld image data, the next frame of weld image data is obtained to re-determine whether a weld semantic region exists. If no weld semantic region exists in multiple consecutive frames of weld image data, a jump command is generated. The jump command is used to control the robot to move from the current weld segment to the next weld segment along the theoretical weld trajectory.
[0025] Step S4: If there is a weld semantic region in the current frame weld image data, determine the actual laser point based on the weld semantic region and the hand-eye calibration matrix.
[0026] Step S5: Determine the theoretical laser point based on the CAD model and the flange pose of the robot end effector corresponding to the weld seam image data of the current frame.
[0027] Step S6: Determine whether the Euclidean distance between the actual laser point and the theoretical laser point is less than a preset tolerance threshold. If it is less than the preset tolerance threshold, generate a forward control command. The forward control command is used to control the robot to move forward a set step length along the theoretical weld seam trajectory. After the robot moves forward the set step length, acquire the weld seam image data of the current frame to determine whether a weld seam semantic region exists. If it is greater than or equal to the preset tolerance threshold, generate a search command to control the robot to re-acquire weld seam image data in the current weld seam region according to the set rules to determine whether a weld seam semantic region exists. If a weld seam semantic region exists in the weld seam image data re-acquired according to the set rules, and the corresponding Euclidean distance is still greater than or equal to the preset tolerance threshold, generate a jump command.
[0028] In one embodiment, after the workpiece is clamped, the weld seam tracking system (including a robot, weld seam sensors, and an image processing module for implementing an adaptive weld seam positioning method) receives a position signal and initializes the robot's controller, weld seam sensors, and image processing module. It then loads the workpiece's CAD model and hand-eye calibration matrix. ).
[0029] In the current weld seam area, the weld seam sensor (in this embodiment, a line laser weld seam sensor) is controlled to perform real-time image acquisition, obtaining a 2D grayscale image of the current frame containing laser stripes (i.e., the weld seam image data of the current frame); the corresponding flange pose of the robot end effector is recorded simultaneously. The flange pose can be read from the robot via robot drive.
[0030] In one embodiment, the process of determining whether a weld semantic region exists in the current frame weld image data using a weld semantic segmentation model in step S3 may include: performing median filtering on the current frame weld image data to obtain a filtered image; using an adaptive threshold binarization method to obtain a binary image based on the filtered image; using the Steger algorithm to obtain a processed image based on the binary image; and using a weld semantic segmentation model to determine whether a weld semantic region exists in the processed image.
[0031] The implementation process of step S4 may include: determining weld feature points based on the weld semantic region; projecting the weld feature points onto the robot base coordinate system using a hand-eye calibration matrix to obtain the actual laser points.
[0032] For example, median filtering is applied to the acquired weld seam image data of the current frame to suppress high-frequency noise, resulting in a filtered image. An adaptive threshold binarization method is then used to separate the foreground laser stripes (white foreground) from the background image in the filtered image, yielding a binary image. Finally, the Steger algorithm (or distance transformation method in this embodiment) is used to extract the sub-pixel-level centerline of the foreground laser stripes in the binary image, resulting in the processed image.
[0033] The offline-trained deep learning semantic segmentation model (i.e., the weld semantic segmentation model) is invoked to perform pixel-level semantic segmentation of the weld region in the input image (i.e., the processed image), and output a semantic segmentation image. The semantic segmentation image includes semantic masks (i.e., weld semantic regions) for different weld types.
[0034] The weld semantic segmentation model was trained using offline supervised learning. The image dataset consisted of weld images collected from actual industrial sites, covering various welding types such as fillet welds, butt welds, and lap welds, and including different materials, surface reflections, spatter interference, lighting variations, weld size variations, and complex background conditions. The sample dataset included weld images from the image dataset and corresponding pixel-level semantic labels (generated through manual annotation). The pixel-level semantic labels included weld regions, background regions, and key structural regions (such as bevel edges and weld center regions). To improve the generalization ability of the weld semantic segmentation model, the data in the sample dataset underwent augmentation processing, including rotation, scaling, mirroring, brightness perturbation, Gaussian noise, blurring, and random occlusion. The augmented sample dataset was then divided into training and validation sets according to a set ratio (7:3 in this embodiment).
[0035] The weld semantic segmentation model is built upon a deep convolutional neural network. The backbone network can employ U-Net, DeepLabV3+, or a lightweight encoder-decoder architecture. The encoder extracts multi-scale weld features from the input image, while the decoder restores spatial resolution, achieving fine segmentation of weld boundaries. Furthermore, residual modules, atrous convolution, and attention mechanisms can be combined to enhance the recognition of fine weld structures and complex edges. For scenarios with high real-time requirements, a lightweight backbone network (such as MobileNet or ShuffleNet) can be used to reduce inference latency.
[0036] The model training process employs a supervised learning strategy, using manually labeled results (i.e., pixel-level semantic labels) from the training set as the true labels. The loss function is composed of a combination of functions, including Cross Entropy Loss, Dice Loss, and Intersection over Union Loss, to simultaneously optimize region classification accuracy and boundary segmentation quality. Specifically: Cross Entropy Loss constrains pixel classification accuracy; Dice Loss alleviates class imbalance; and Intersection over Union Loss improves the overall overlap accuracy of the weld region.
[0037] For locating weld feature points in the weld semantic region after outputting the semantic segmentation image, keypoint regression loss or heatmap loss can be added to improve the accuracy of valley point and intersection point location. After adding keypoint regression loss or heatmap loss, each pixel in the weld semantic region is associated with a weld point confidence value (0~1). The higher the confidence value, the closer the pixel is to the weld point. Through geometric constraints and post-processing algorithms, the point with the highest confidence value is finally selected as the weld feature point.
[0038] Model training is performed on a Graphics Processing Unit (GPU) environment, using the Adam or SGD (Stochastic Gradient Descent) optimizer for parameter updates, and incorporating strategies such as learning rate decay, batch normalization, and early stopping to improve training stability. During training, model performance is continuously evaluated using a validation set. Key evaluation metrics include: pixel accuracy, mIoU (mean intersection-over-union ratio), Dice coefficient, precision / recall, and feature point localization error.
[0039] When the evaluation metrics on the validation set stabilize and show no significant improvement over multiple consecutive epochs (i.e., the rate of change of the evaluation metric value is less than a set threshold after multiple iterations, the set threshold is determined according to actual needs), and the segmentation accuracy and feature point localization error of the weld semantic region in the output semantic segmentation image meet engineering requirements (in this embodiment, the feature point localization error is within ±0.5mm), the model training can be considered complete. Typically, the mIoU of the weld semantic segmentation model can reach over 90%, and the weld feature point localization error can be controlled within the millimeter range.
[0040] After training, the weld semantic segmentation model is exported to an offline inference format (such as ONNX (Open Neural Network Exchange), Tensor RT Engine, or TorchScript), and deployed on an industrial control computing platform. During runtime, the acquired weld image data is used for real-time inference, outputting semantic segmentation images. Subsequently, combined with geometric constraints and post-processing algorithms, weld feature points (such as weld intersections, centerlines, bevel edges, valley points, etc.) are located within the corresponding weld semantic region in the semantic segmentation image. Using a hand-eye calibration matrix, the weld feature points are back-projected onto the robot's base coordinate system to obtain the three-dimensional coordinates of the actual laser points. This provides basic data for subsequent weld seam trajectory planning and robot guidance.
[0041] In one embodiment, based on the obtained flange pose of the robot end effector Based on the theoretical weld trajectory in the CAD model, the intersection point of the laser plane of the weld sensor and the theoretical weld trajectory under ideal conditions is calculated. Then, combining the parameters of the laser plane and the camera intrinsic parameters, the theoretical position of this intersection point in the robot's base coordinate system (i.e., the position of the theoretical laser point) is determined. ).
[0042] In one embodiment, if the value is greater than or equal to a preset tolerance threshold, a search instruction is generated to control the robot to re-acquire weld image data in the current weld area according to set rules to determine whether a weld semantic region exists. Specifically, this includes: 1) If the value is greater than or equal to a preset tolerance threshold, a local search instruction is generated. The local search instruction is used to control the robot to re-acquire weld seam image data according to local search rules to determine whether a weld seam semantic region exists. The local search rules include: generating grid sampling points of a set length within a set range of the robot's current position, and sequentially controlling the robot to move to each grid sampling point.
[0043] 2) If a weld semantic region exists in the weld image data reacquired according to the local search rules, and the corresponding Euclidean distance is still greater than or equal to the preset tolerance threshold, a spiral expansion search instruction is generated. The spiral expansion search instruction controls the robot to reacquire weld image data according to the spiral expansion search rules to determine whether a weld semantic region exists. The spiral expansion search rules include: taking the robot's current position as the origin, gradually expanding the search radius based on radius constraints along an Archimedean spiral path, and controlling the robot to move along the Archimedean spiral path.
[0044] 3) If a weld semantic region exists in the weld image data reacquired according to the spiral expansion search rule, and the corresponding Euclidean distance is still greater than or equal to the preset tolerance threshold, a global backtracking search instruction is generated. The global backtracking search instruction controls the robot to reacquire weld image data according to the global backtracking search rule to determine if a weld semantic region exists. The global backtracking search rule includes: the robot returns along the theoretical weld trajectory to the position where the Euclidean distance between the previous actual laser point and the theoretical laser point is less than the preset tolerance threshold, generating a local search instruction. If a weld semantic region exists in the weld image data reacquired according to the local search rule, and the corresponding Euclidean distance is still greater than or equal to the preset tolerance threshold, a spiral expansion search instruction is generated.
[0045] For example, using formulas Calculate the Euclidean distance between the actual laser point and the theoretical laser point. And the European distance With respect to the preset tolerance threshold Comparison. A preset tolerance threshold can be set in advance, based on occlusion conditions in the welding environment and the error of the weld semantic segmentation model. The smaller the value, the higher the accuracy, but the more difficult the convergence.
[0046] when When the match is successful, the robot enters the weld confirmation state, generates a forward control command, and controls the robot to move forward along the theoretical weld trajectory by a set step size (1.5mm in this embodiment) to ensure that the weld is located in the center of the field of view in the next frame of weld image data.
[0047] when If the match fails, the process enters the weld search state and proceeds hierarchically according to the following set rules: (1) Local Search. Generate a local search command. Within a set range of the robot's current position (±5mm around the current position in this embodiment), generate grid sampling points according to a set length (1mm in this embodiment). Sequentially control the robot to move to each grid sampling point to re-acquire weld seam image data and the flange pose of the robot's end effector. Repeat steps S3 to S5 and recalculate the Euclidean distance. If a weld seam semantic region (i.e., a laser point) exists in the re-acquired weld seam image data at any grid sampling point, and the corresponding Euclidean distance satisfies... If the condition is met, proceed to the weld confirmation state; otherwise, proceed to the next step.
[0048] (2) Spiral Expansion Search. Generate a spiral expansion search command. Using the robot's current position as the origin, gradually expand the search radius according to the Archimedean spiral path based on radius constraints (in this embodiment, the constraints are: initial radius 5mm, maximum radius 20mm). Control the robot to move along the Archimedean spiral path. At each step, collect weld seam image data and the flange pose of the robot's end effector. Repeat steps S3 to S5 and recalculate the Euclidean distance. If a laser point exists in the re-collected weld seam image data at any step, and the corresponding Euclidean distance satisfies... If the match fails when the maximum radius is reached, the weld is entered into the weld confirmation state; if the match still fails when the maximum radius is reached, the weld is entered into the weld loss state.
[0049] (3) Global Backtrack Search (Weld Loss State). Generate a global backtrack search command to control the robot to backtrack along the theoretical weld trajectory to the vicinity of the most recently matched position (i.e., the position where the Euclidean distance between the previous actual laser point and the theoretical laser point is less than the preset tolerance threshold, with a maximum backtrack distance of 20mm), and then perform local search and spiral expansion search in sequence. If the weld is found (i.e., a laser point exists in any re-acquired weld image data, and the corresponding Euclidean distance satisfies the condition), the robot will be successfully backtracked. If the search fails to find a match after re-executing the local search and spiral expansion search, the search fails.
[0050] Specifically, the rules for determining a search failure state include: the absence of laser points in multiple consecutive frames (five consecutive frames in this embodiment) of weld seam image data, or failure to match even after performing a global rollback search. Upon entering the search failure state, a jump command is generated, controlling the robot to advance from the current weld seam area to the next weld seam area according to the theoretical weld seam trajectory.
[0051] Based on the above embodiments, this application has at least the following beneficial effects: 1) High precision: By integrating CAD model priors and visual feedback, the weld positioning error is ≤0.2mm; 2) Strong robustness: The multi-level search mechanism can effectively cope with anomalies such as occlusion, offset, and missing parts in the welding environment; 3) Adaptability: When there is an error between the physical object and the CAD model that results in the weld not being scanned, the weld can be automatically searched, improving the model error tolerance in the workpiece positioning process; 4) Safety: Clear matching failure handling logic avoids problems such as mis-welding, collision, or damage to welding equipment.
[0052] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 2 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data related to the weld seam adaptive positioning method. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a weld seam adaptive positioning method.
[0053] Those skilled in the art will understand that Figure 2 The structures shown are merely block diagrams of some structures related to the present application and do not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements. In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0054] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0055] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0056] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0057] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0058] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0059] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0060] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A weld seam adaptive positioning method, characterized in that, include: Obtain the CAD model and hand-eye calibration matrix of the workpiece; the CAD model includes the theoretical weld trajectory; In the current weld seam region, acquire the weld seam image data of the current frame; A weld semantic segmentation model is used to determine whether a weld semantic region exists in the current frame of weld image data. If the weld semantic region is not present in the current frame of weld image data, the next frame of weld image data is obtained to re-determine whether the weld semantic region exists. If no weld semantic region exists in multiple consecutive frames of weld seam image data, a jump instruction is generated; the jump instruction is used to control the robot to move from the current weld seam region to the next weld seam region along the theoretical weld seam trajectory. If a weld semantic region exists in the current frame weld image data, the actual laser point is determined based on the weld semantic region and the hand-eye calibration matrix. The theoretical laser point is determined based on the CAD model and the flange pose of the robot end effector corresponding to the weld seam image data of the current frame. Determine whether the Euclidean distance between the actual laser point and the theoretical laser point is less than the preset tolerance threshold; If the value is less than the preset tolerance threshold, a forward control command is generated. The forward control command is used to control the robot to move forward a set step length along the theoretical weld seam trajectory. After the robot moves forward a set step length, the weld seam image data of the current frame is obtained to determine whether there is a weld seam semantic region. If the value is greater than or equal to the preset tolerance threshold, a search instruction is generated to control the robot to re-acquire weld image data in the current weld area according to the set rules to determine whether a weld semantic region exists. The set rules are a hierarchical search strategy, including: local search rules, spiral expansion search rules, and global backtracking search rules. If the weld seam image data re-acquired according to the set rules contains a weld seam semantic region, and the corresponding Euclidean distance is still greater than or equal to the preset tolerance threshold, a jump instruction will be generated.
2. The adaptive positioning method for welds according to claim 1, characterized in that, The weld semantic segmentation model is used to determine whether a weld semantic region exists in the current frame of weld image data, including: The current frame weld seam image data is subjected to median filtering to obtain the filtered image; An adaptive threshold binarization method is used to obtain a binary image based on the filtered image; The Steger algorithm is used to obtain the processed image based on the binary image; The weld semantic segmentation model is used to determine whether the weld semantic region exists in the processed image.
3. The adaptive positioning method for welds according to claim 1, characterized in that, The actual laser point is determined based on the weld semantic region and the hand-eye calibration matrix, including: Weld feature points are determined based on the semantic region of the weld. The weld feature points are projected onto the robot base coordinate system using the hand-eye calibration matrix to obtain the actual laser points.
4. The adaptive positioning method for welds according to claim 1, characterized in that, If the value is greater than or equal to a preset tolerance threshold, a search instruction is generated to control the robot to re-acquire weld image data in the current weld area according to the set rules to determine whether a weld semantic region exists, including: If the value is greater than or equal to the preset tolerance threshold, a local search instruction is generated; the local search instruction is used to control the robot to re-acquire weld seam image data according to the local search rules to determine whether a weld seam semantic region exists. If a weld semantic region exists in the weld image data re-acquired according to the local search rules, and the corresponding Euclidean distance is still greater than or equal to the preset tolerance threshold, then a spiral expansion search instruction is generated; the spiral expansion search instruction is used to control the robot to re-acquire weld image data according to the spiral expansion search rules to determine whether a weld semantic region exists. If a weld semantic region exists in the weld image data re-acquired according to the spiral expansion search rule, and the corresponding Euclidean distance is still greater than or equal to the preset tolerance threshold, a global backtracking search instruction is generated. The global backtracking search instruction is used to control the robot to re-acquire weld image data according to the global backtracking search rule to determine whether a weld semantic region exists.
5. The adaptive positioning method for welds according to claim 4, characterized in that, The local search rules include: generating grid sampling points within a set range of the robot's current position according to a set length, and sequentially controlling the robot to move to each grid sampling point.
6. The adaptive positioning method for welds according to claim 4, characterized in that, The spiral expansion search rule includes: taking the robot's current position as the origin, gradually expanding the search radius based on the radius constraint according to the Archimedes spiral path, and controlling the robot to move along the Archimedes spiral path.
7. The adaptive positioning method for welds according to claim 4, characterized in that, The global backtracking search rule includes: the robot returns along the theoretical weld seam trajectory to the position where the Euclidean distance between the previous actual laser point and the theoretical laser point is less than a preset tolerance threshold, and generates a local search instruction; If the Euclidean distance between the actual laser point corresponding to the weld seam image data reacquired according to the local search rules and the theoretical laser point corresponding to the flange pose of the robot end effector reacquired according to the local search rules is still greater than or equal to the preset tolerance threshold, then a spiral expansion search instruction is generated.
8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the weld adaptive positioning method according to any one of claims 1-7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the weld adaptive positioning method according to any one of claims 1-7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the weld adaptive positioning method according to any one of claims 1-7.
Citation Information
Patent Citations
Welding seam positioning and tracking method and system
CN121156436A
Welding seam control method and device, computer equipment, storage medium and program product
CN122184664A