Multi-layer and multi-pass surfacing dovetail angle robot machining programming method and multi-layer and multi-pass surfacing dovetail angle robot machining programming device
By collecting 3D point cloud data of the workpiece to correct the digital model, an accurate machining geometric model is generated, which solves the problem of geometric deviation caused by welding deformation and realizes high-precision and high-efficiency robotic automated processing. It is suitable for mass production of multi-layer and multi-pass overlay welding dovetail corners.
Patent Information
- Application Number
- CN202610047330.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-14
- Publication Date
- 2026-05-08
AI Technical Summary
Existing robot automation programming methods suffer from discrepancies between theoretical trajectories and actual surfaces when dealing with workpieces with inconsistent geometries due to welding processes. This can lead to overcutting, missed machining, or collisions, and teach-in programming cannot be reused in batches.
By acquiring the 3D point cloud data of the workpiece, correcting the preset standard digital model, generating a corrected 3D digital model that accurately reflects the actual geometry, separating the weld seam and base material information, generating a machining geometry model by combining design parameters, and generating a machining toolpath that can be executed by the robot through Boolean operations and kinematic model transformation.
It achieves high-precision and high-efficiency adaptive robot processing, avoiding the risks of overcutting, missing processing, or collisions, ensuring the feasibility and safety of the processing path, and is suitable for mass production.
Smart Images

Figure CN121995857A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of robot automation, specifically to a programming method and apparatus for multi-layer, multi-pass welding of dovetail corners by a robot. Background Technology
[0002] For the finishing of complex curved surfaces (such as dovetail corners) formed after multi-layer and multi-pass welding, existing robot automation programming methods mainly include teach-in programming and offline programming. Teach-in programming involves an operator holding a teach pendant and manually guiding the robot's end effector on the actual workpiece surface, collecting path points point by point along the desired machining contour to generate an executable motion trajectory program. Offline programming, on the other hand, uses Computer-Aided Manufacturing (CAM) software to plan an ideal machining toolpath in a virtual environment based on a theoretical standard 3D digital model of the workpiece. A post-processor then converts the toolpath file into program code executable by a specific robot model.
[0003] However, the aforementioned existing technologies present significant technical challenges when dealing with workpieces whose geometric shapes are inconsistent due to welding processes. Offline programming based on theoretical models completely ignores the welding deformation and dimensional deviations caused by uneven heat input, residual stress, and other factors on the actual workpiece. This results in a severe discrepancy between the theoretical trajectory and the actual surface to be processed, easily leading to overcutting, missed machining, or collisions. While teach-in programming operates on actual workpieces, the individual differences in the shape of each workpiece mean that a teach-in program generated for one workpiece cannot be reused for other workpieces, negating the significance of automated mass production. Furthermore, for complex curved surfaces, the manual teach-in process itself is extremely time-consuming and its accuracy is difficult to guarantee. Summary of the Invention
[0004] To address the aforementioned technical problems, this application provides a method and apparatus for programming multi-layer, multi-pass welding of dovetail corners using a robot.
[0005] The first aspect of this application provides a robot machining programming method for multi-layer, multi-pass overlay welding of dovetail corners, employing the following technical solution: The three-dimensional point cloud data of the dovetail corner region of the workpiece to be processed is obtained, and the three-dimensional point cloud data is preprocessed to obtain the target three-dimensional point cloud data. The preset standard digital model of the workpiece to be processed is corrected based on the target three-dimensional point cloud data to generate a corrected three-dimensional digital model, which reflects the actual geometric shape of the workpiece to be processed. The weld area information and the base material surface information are separated from the corrected three-dimensional digital model, and the target machining geometry model of the dovetail angle area is generated by combining the preset dovetail angle standard design parameters. Pose matching and Boolean operations are performed on the target machining geometry model and the modified three-dimensional digital model to determine whether the target machining geometry model is completely covered by the modified three-dimensional digital model; When the target machining geometry model is completely covered by the modified three-dimensional digital model, the robot machining toolpath is generated based on the target machining geometry model; Based on the preset kinematic model and program syntax of a specific robot model, the robot machining toolpath is converted into a robot motion trajectory program that can be executed by the specific robot model.
[0006] By adopting the above technical solution, the three-dimensional point cloud data of the actual workpiece is collected to correct the preset standard digital model, generating a corrected three-dimensional digital model that accurately reflects the individual geometric characteristics. This effectively overcomes the problem of shape inconsistency caused by welding deformation, and makes subsequent planning completely based on the actual shape of the workpiece. This fundamentally avoids the risks of overcutting, missing processing, or collision caused by the inconsistency between the theoretical trajectory and the actual surface in offline programming. Furthermore, by automatically generating the target processing geometric model on this model and performing coverage verification, the feasibility and safety of the processing path are ensured. This replaces the time-consuming and accuracy-limited manual teaching programming. While ensuring processing accuracy, it enables the automated program to adapt to the unique shape of each workpiece, successfully solving the core problem that teaching programming cannot be reused in batches. Ultimately, it achieves adaptive robot processing that combines high precision, high efficiency, and suitability for mass production.
[0007] Optionally, the step of correcting the preset standard digital model of the workpiece to be processed based on the target three-dimensional point cloud data to generate a corrected three-dimensional digital model includes: Based on the rate of change of the normal vector of each data point in the target three-dimensional point cloud data, the target three-dimensional point cloud data is divided into a set of base material plane points whose rate of change of the normal vector is lower than a preset segmentation threshold, and a set of weld transition zone points whose rate of change of the normal vector is higher than or equal to the preset segmentation threshold. A preset plane fitting algorithm is applied to the set of points on the base material plane to generate a geometric plane, and a preset surface reconstruction algorithm is applied to the set of points on the weld transition zone to generate a geometric surface. The geometric plane and the geometric surface are then stitched together to obtain a solid model of the target area. The coordinate transformation matrix from the target region entity model to the preset standard digital model is calculated using a preset iterative nearest point algorithm, and the coordinate transformation matrix is applied to register the target region entity model. By using Boolean operations, the corresponding geometric region in the preset standard digital model is replaced with the registered target region entity model to obtain the corrected three-dimensional digital model.
[0008] By adopting the above technical solution, the base material plane and weld transition zone are first intelligently segmented based on the normal vector change rate of the 3D point cloud data. The actual geometric features are then accurately restored through plane fitting and surface reconstruction. The iterative nearest point algorithm is used to achieve high-precision registration with the standard digital model. Finally, Boolean operations are used to generate a corrected model that faithfully reflects the individual shape of the workpiece. This process ensures that the processing datum is highly consistent with the actual workpiece, fundamentally eliminating geometric deviations caused by welding deformation. This allows the subsequently generated machining toolpath to adapt to the unique shape of each workpiece, effectively avoiding the risks of overcutting, missed machining, or collisions. At the same time, it eliminates the need for time-consuming manual teaching, achieving high-precision and high-efficiency automated batch processing.
[0009] Optionally, the step of separating the weld area information and the base material surface information from the corrected 3D digital model, and generating the target machining geometry model of the dovetail corner area in combination with preset dovetail corner standard design parameters includes: Calculate the nearest distance from each point on the surface of the corrected 3D digital model to the surface of the preset standard digital model, and based on the comparison result of the nearest distance and the preset tolerance threshold, divide the surface of the corrected 3D digital model into the weld area information and the base material surface information; The surface information of the parent material is processed by a preset random sample consistency algorithm to determine the root plane of the dovetail corner and extract the center path of the dovetail corner from the preset standard digital model. At the starting point of the center path of the dovetail angle, construct a two-dimensional sketch plane perpendicular to the center path of the dovetail angle, and draw a two-dimensional cross-sectional profile on the two-dimensional sketch plane according to the standard design parameters of the dovetail angle. The two-dimensional cross-sectional profile is moved along the center path of the dovetail angle, and during the movement, the two-dimensional cross-sectional profile is kept perpendicular to the tangent direction of the center path of the dovetail angle to generate the target machining geometry model.
[0010] By adopting the above technical solution, the weld area and the base material surface are first accurately segmented based on the distance from the point to the surface of the theoretical model, realizing intelligent recognition of actual geometric features. Then, a random sample consensus algorithm is used to robustly determine the machining reference plane, and combined with the center path extracted from the standard digital model, the accurate transmission of design intent is ensured. Finally, through the scanning motion of the two-dimensional cross-sectional contour along the center path, an ideal machining geometric model that is completely consistent with the design parameters and adapts to the actual posture of the workpiece is generated. This process, while respecting the actual state of the workpiece, accurately constructs the machining target, ensuring that the final forming dimensions meet the design requirements and that the machining allowance distribution is reasonable, laying a solid foundation for generating high-precision, interference-free machining toolpaths.
[0011] Optionally, generating the robot machining toolpath based on the target machining geometry model includes: Analyze the geometric topology and curvature distribution of the target machining geometric model to identify multiple machining regions with different geometric features in the target machining geometric model; Based on the geometric features of the multiple processing areas, a preset processing strategy is matched for each of the multiple processing areas. The processing strategies include contour processing strategy, planar processing strategy and streamline processing strategy. Configure machining parameters for the machining strategy, including layer spacing parameters, step distance parameters, feed rate and tool attitude control parameters; The robot machining toolpath is calculated and generated based on the machining strategy and the machining parameters.
[0012] By adopting the above technical solution, intelligent region division is first performed based on the geometric topology and curvature distribution of the target machining geometric model, enabling targeted identification of different geometric features. Then, the optimal machining strategy is matched for each region, making full use of the respective advantages of contour machining for steep regions, planar machining for flat regions, and streamline machining for complex curved surfaces. By configuring multi-dimensional machining parameters, including layer spacing, step distance, feed rate, and tool posture, the best balance between machining accuracy and efficiency is achieved. The final generated robot machining toolpath can adapt to the geometric changes of complex curved surfaces, significantly improving machining efficiency while ensuring machining quality, and effectively avoiding the problems of inconsistent surface quality or low machining efficiency caused by traditional single machining strategies.
[0013] Optionally, the step of converting the robot machining toolpath into a robot motion trajectory program executable by the specific robot model based on a preset kinematic model and program syntax includes: The coordinates of the tool center point and the tool axis direction vector are extracted from the robot machining toolpath; Based on the tool center point coordinates, the tool axis direction vector, and the preset tool coordinate system, a target pose homogeneous transformation matrix for the end effector of the specific robot model is constructed. Input the homogeneous transformation matrix of the target pose into the kinematic model to obtain one or more sets of joint angle solutions; The optimal joint angle solution is determined by screening one or more sets of joint angle solutions according to the preset minimum joint travel principle. The optimal joint angle solution sequence is converted into the robot motion trajectory program that conforms to the program syntax.
[0014] By adopting the above technical solution, the abstract machining toolpath is accurately transformed into the specific joint motion of the robot through a kinematic model: by analyzing the tool pose and constructing a homogeneous transformation matrix, the geometric accuracy of the machining trajectory is maintained; by using the robot kinematic model for inverse solution, the accessibility of all tool poses within the robot's workspace is guaranteed; by selecting the optimal solution based on the principle of minimum joint travel, the extreme positions of the joints are effectively avoided and the smoothness of the motion trajectory is optimized, thereby significantly improving the stability and efficiency of the machining process; the finally generated motion trajectory program conforming to specific syntax specifications enables the high-precision machining plan to be executed directly and reliably by the robot, achieving a seamless connection from virtual toolpath to physical machining.
[0015] Optionally, after converting the optimal joint angle sequence into the robot motion trajectory program conforming to the program syntax, the method further includes: Load the robot motion trajectory program, the corrected 3D digital model, and the 3D model of the specific robot model into a preset virtual simulation environment; The simulation of the robot motion trajectory program is executed, and collision detection, singularity analysis, and joint limit checks are performed during the simulation. A simulation verification report is generated based on the results of the collision detection, the singularity analysis, and the joint limit check. When the simulation verification report indicates that the robot motion trajectory program has a preset safety risk, the robot motion trajectory program is readjusted.
[0016] By adopting the above technical solutions, the robot motion trajectory program is verified throughout the entire process in a virtual simulation environment. Through real-time collision detection, singularity analysis, and joint limit checks, potential risks of mechanical interference, motion instability, and overtravel that may occur during actual processing are identified and avoided in advance, effectively preventing equipment damage and processing interruptions. This simulation verification step, as an essential checkpoint from program generation to physical execution, significantly improves the safety and reliability of the processing process, ensuring that the modified and optimized adaptive processing program is highly feasible before being put into actual production. Ultimately, a complete closed-loop quality control system is formed from digital twin verification to physical processing execution.
[0017] Optionally, the method further includes: Obtain the actual clamping position of the workpiece to be processed; Calculate the pose deviation matrix between the actual clamping pose and the theoretical pose preset in the robot motion trajectory program; The robot motion trajectory program is dynamically compensated based on the pose deviation matrix to generate a dynamically compensated robot motion trajectory program. Control the specific model robot to execute the dynamically compensated robot motion trajectory program.
[0018] By adopting the above technical solution, after generating the executable program, the actual clamping pose of the workpiece is further obtained. By calculating the deviation matrix between the workpiece and the theoretical pose and compensating for the motion trajectory in real time, the overall machining deviation caused by clamping and positioning errors is effectively eliminated. This dynamic compensation mechanism ensures that the robot always performs precise machining based on the actual spatial position of the workpiece, thereby incorporating the pose error introduced by the clamping process into closed-loop control. Without reprogramming, the dimensional and positional accuracy of the final machined product is guaranteed, significantly improving the adaptability and robustness of the system in the actual production environment.
[0019] A second aspect of this application provides an electronic device including a processor, a memory, a user interface, and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any of the foregoing.
[0020] A third aspect of this application provides a computer-readable storage medium storing instructions that, when executed, perform the method described in any of the preceding descriptions.
[0021] A fourth aspect of this application provides a computer program product that, when run on an electronic device, causes the electronic device to perform the method as described in any of the preceding claims.
[0022] In summary, one or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: By collecting 3D point cloud data of actual workpieces, a correction model that accurately reflects individual characteristics is constructed, fundamentally eliminating geometric deviations caused by welding deformation. Intelligent segmentation and parametric modeling generate target machining geometric models that conform to design specifications, ensuring the rationality of machining allowance distribution. Adaptive toolpath planning based on geometric features and multi-strategy machining methods achieve a balance between accuracy and efficiency. Kinematic transformation and trajectory optimization ensure reliable execution of the machining trajectory. Combining virtual simulation verification and dynamic compensation mechanisms for clamping posture, a complete quality control closed loop from digital twin to physical machining is formed. Ultimately, a robotic machining system capable of adapting to individual workpiece differences and balancing high precision and high efficiency is constructed, effectively solving core problems of traditional methods when dealing with welded deformed parts, such as overcutting risk, non-reusable programs, and unstable machining quality. Attached Figure Description
[0023] Figure 1This is a schematic diagram of the system architecture of an embodiment of a multi-layer, multi-pass welding dovetail corner robot machining programming method according to this application; Figure 2 This is a flowchart illustrating a multi-layer, multi-pass welding dovetail corner robot machining programming method disclosed in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application.
[0024] Explanation of reference numerals in the attached figures: 100, System architecture; 101, First terminal device; 102, Second terminal device; 103, Third terminal device; 104, Network; 105, Server; 301, Processor; 302, Communication bus; 303, User interface; 304, Network interface; 305, Memory. Detailed Implementation
[0025] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification 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.
[0026] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.
[0027] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0028] Figure 1 This is a schematic diagram of the system architecture of an embodiment of a multi-layer, multi-pass welding dovetail corner robot machining programming method according to this application; like Figure 1As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0029] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as model training applications, video recognition applications, web browser applications, social platform software, etc.
[0030] Terminal devices 101, 102, and 103 can be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with displays, including but not limited to smartphones, tablets, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP3 (Moving Picture Experts Group Audio Layer IV) players, laptops, and desktop computers, etc. When terminal devices 101, 102, and 103 are software, they can be installed in the aforementioned electronic devices. They can be implemented as multiple software programs or software modules (e.g., multiple software programs or software modules used to provide distributed services) or as a single software program or software module. No specific limitations are imposed here.
[0031] This embodiment discloses a robot machining programming method for multi-layer, multi-pass overlay welding of dovetail corners. Figure 2 This is a flowchart illustrating a multi-layer, multi-pass welding dovetail corner robot machining programming method disclosed in an embodiment of this application, as shown below. Figure 2 As shown, the method includes the following steps: S201. Obtain the three-dimensional point cloud data of the dovetail corner region of the workpiece to be processed, and preprocess the three-dimensional point cloud data to obtain the target three-dimensional point cloud data. In a preferred implementation, this step can be accomplished by mounting a high-precision line laser profilometer or structured light scanner as an end effector on an industrial robot and guiding it to perform a planned scan of the area to be processed. Alternatively, a laser tracker or high-precision camera fixedly mounted within the work unit can be used for data acquisition. Since the acquired raw point cloud data often contains noise, outliers, and uneven density, the system then performs a series of preprocessing steps to generate the target 3D point cloud data required for subsequent steps. The preprocessing process may include: First, outlier removal, for example, using a statistical outlier removal algorithm to identify and remove noise based on the average distance from a point to its neighborhood, or using a radius outlier removal algorithm to remove isolated points with insufficient neighboring points within a preset radius; next, data downsampling to regularize the point cloud density and improve processing efficiency, for example, using a voxel grid downsampling method, using the centroid of all points within each voxel to represent that voxel, or, to better preserve geometric features, using a farthest point sampling algorithm to generate a more uniformly distributed subset; finally, estimating the normal vector for each point in the point cloud, which is typically achieved by performing principal component analysis on its neighboring point set, i.e., taking the eigenvector corresponding to the smallest eigenvalue of the local point set covariance matrix as the normal vector of that point, and further ensuring the consistency of the direction of all normal vectors through traversal propagation. After the above preprocessing, the system obtains a clean, uniformly dense target 3D point cloud data with accurate normal vector information for each point, providing high-quality geometric input for subsequent model correction.
[0032] S202. Based on the target three-dimensional point cloud data, the preset standard digital model of the workpiece to be processed is corrected to generate a corrected three-dimensional digital model, which reflects the actual geometric shape of the workpiece to be processed. One specific implementation involves the system first using a preset iterative nearest-point algorithm or its variants (such as feature-based registration) to precisely align the target 3D point cloud data with the preset standard digital model in the same coordinate system. After registration, the system calculates the nearest distance from each point in the point cloud to the surface of the standard digital model and compares it with a preset deviation threshold (e.g., 0.5 mm), thereby automatically segmenting the point cloud into a base material region point cloud that basically matches the standard digital model and a weld region point cloud that deviates significantly. Next, for the weld region point cloud, the system executes a surface reconstruction algorithm to generate a geometric surface that accurately represents its actual shape. A preferred approach is to use non-uniform rational B-spline surface fitting technology to transform the discrete point cloud data into a continuous, smooth, and free-form surface that conforms to CAD (Computer Aided Diagnosis) / CAM system standards. Alternatively, a triangulation algorithm can be used to reconstruct the point cloud data into a high-density polygonal mesh model. Finally, the system uses Boolean operations to replace the corresponding theoretical weld seam region in the original model with a newly generated geometric surface or mesh model within the registered preset standard digital model. This replacement process typically involves trimming the original model and stitching together the old and new geometric boundaries, ultimately generating a complete, closed, and corrected 3D digital model that is consistent with the actual workpiece geometry in key areas, providing a reliable digital benchmark for subsequent machining path planning.
[0033] Optionally, the step of correcting the preset standard digital model of the workpiece to be processed based on the target 3D point cloud data to generate a corrected 3D digital model includes: dividing the target 3D point cloud data into a set of base material plane points with a normal vector change rate lower than a preset segmentation threshold and a set of weld transition zone points with a normal vector change rate higher than or equal to the preset segmentation threshold, based on the normal vector change rate of each data point in the target 3D point cloud data; performing a preset plane fitting algorithm on the base material plane point set to generate a geometric plane, performing a preset surface reconstruction algorithm on the weld transition zone point set to generate a geometric surface, stitching the geometric plane and the geometric surface together to obtain a target region entity model; calculating the coordinate transformation matrix from the target region entity model to the preset standard digital model using a preset iterative nearest point algorithm, and registering the target region entity model using the coordinate transformation matrix; and replacing the corresponding geometric region in the preset standard digital model with the registered target region entity model using Boolean operations to obtain the corrected 3D digital model.
[0034] In one specific embodiment of this application, to extract geometric features more accurately from the target 3D point cloud data, the system first segments the point cloud based on the rate of change of the normal vector of each data point. Specifically, the system can calculate the angle between the normal vectors of each data point and its neighboring data points, or the average of the angles, and set an angle threshold (e.g., 5 degrees) as a preset segmentation threshold. When the rate of change of the normal vector of a point is lower than the threshold, it indicates that the surface of its region is gentle, and the point is classified as a set of points in the base material plane; conversely, if the rate of change of the normal vector is higher than or equal to the threshold, it indicates that the point is in a region with a sharp change in geometry, and is classified as a set of points in the weld transition zone formed by the welding process. As an alternative solution, point cloud segmentation can also be based on the local curvature value of each point or through a region growing algorithm, which starts from a seed point and continuously merges neighboring points with similar normal vectors and curvatures into the same region.
[0035] Furthermore, after dividing the point cloud into a base material plane point set and a weld transition zone point set, the system performs geometric modeling on these two point sets separately. For the base material plane point set, the system can execute a preset plane fitting algorithm, such as the random sample consensus algorithm, which can robustly fit the optimal geometric plane from a point set containing noise and local unevenness. For the weld transition zone point set, the system executes a preset surface reconstruction algorithm, such as applying the non-uniform rational B-spline (NURBS) surface fitting technique to transform the discrete point cloud data into a continuous, smooth, and CAD / CAM system-compliant freeform surface; alternatively, a Poisson surface reconstruction algorithm can be used to generate a watertight triangular mesh model. Finally, the system topologically stitches the fitted geometric plane and the reconstructed geometric surface at their common boundary to generate a seamless, watertight, closed solid model of the target region.
[0036] Furthermore, in this embodiment, registration is performed by executing a preset Iterative ClosestPoint (ICP) algorithm. As a preferred step before starting the ICP algorithm, the system can first perform a coarse registration to provide a good initial pose estimate for the iterative process, thereby avoiding the algorithm getting trapped in local optima and accelerating convergence. This coarse registration can be achieved by extracting significant geometric features (e.g., feature edges or corners of dovetail grooves) from the two models for matching, or by aligning the centroids and principal axis directions of the two models based on principal component analysis. After coarse registration, the system officially initiates the iterative process of the ICP algorithm, which can be broken down into the following iterative sub-steps: First, a set of points is sampled from the surface of the source model (i.e., the target region entity model); second, for each point in the sampled point set, its closest Euclidean distance counterpart or corresponding facet is found on the target model (i.e., the preset standard model); next, by setting a distance threshold, incorrect matching pairs with excessively large distances are eliminated to enhance the robustness of the algorithm; then, based on all valid corresponding point pairs, an objective function (usually the sum of squared distances between point pairs) is constructed, and a rigid body transformation that minimizes this objective function is solved. This transformation consists of a three-dimensional rotation matrix R and a three-dimensional translation vector t; finally, the calculated rigid body transformation is applied to the entire source model, completing one iteration. The above iterative process continues until the change in the transformation matrix between two iterations is less than the preset convergence threshold, or the preset maximum number of iterations is reached. When the algorithm terminates, the final rigid body transformation accumulated from all iterations is integrated into a 4x4 homogeneous coordinate transformation matrix. This matrix precisely describes the initial spatial pose difference between the target region solid model and the preset standard digital model. The system then applies this final coordinate transformation matrix to the target region solid model, perfectly aligning its geometric position and orientation with the corresponding region in the standard digital model, thus completing the registration. As an alternative technical solution, the system can also employ more advanced ICP variant algorithms, such as the "point-to-surface" ICP algorithm. This algorithm minimizes the distance from a point on the source model to the tangent plane containing its corresponding point on the target model, typically achieving faster convergence speed and higher accuracy for structures with flat regions.
[0037] Furthermore, after registration, the final step is to generate the final corrected 3D model through Boolean operations. Specifically, the system removes the theoretical geometric regions that spatially overlap with the target area's solid model from the registered preset standard model through geometric subtraction, essentially "cutting" out a cavity corresponding to the actual weld area from the standard model. Then, geometric addition is used to merge the target area's solid model with the removed standard model. This process ensures that the unchanged parts of the original standard model are preserved, while the critical dovetail regions are replaced with models that accurately reflect the actual geometry of the workpiece, resulting in a corrected 3D model that retains the design baseline while remaining faithful to individual differences, and can be directly used for subsequent processing planning.
[0038] S203. Separate the weld area information and base material surface information from the corrected three-dimensional digital model, and generate the target machining geometry model of the dovetail angle area by combining the preset dovetail angle standard design parameters. One specific implementation involves the system first performing region identification and separation on the corrected 3D digital model. Since the model is formed by merging the reconstructed weld surface with the original base material model through Boolean operations, the topological boundary (i.e., seam edge) information of the two regions is typically retained in the model data structure. The system can directly and efficiently separate the model into weld region geometry and base material surface geometry by querying this topological information. Alternatively, if topological information is unavailable, the system can also perform separation using geometric feature analysis. For example, it can calculate the local curvature of the model surface, set a curvature threshold, identify regions with higher curvature as weld regions, and identify flat regions with near-zero curvature as base material surfaces. After obtaining accurate base material surface information, this surface will serve as a precise reference for subsequent processing. Next, the system loads preset dovetail angle standard design parameters. These parameters typically define an ideal 2D dovetail groove profile, such as the groove angle, depth, and root fillet radius. The system positions this two-dimensional contour onto the surface of the base material, which serves as a reference, and performs virtual scanning or stretching cuts along a specific path (such as the extension direction of the dovetail groove). Through this virtual machining operation based on standard parameters performed on the corrected three-dimensional model, a completely new solid model containing the ideal dovetail angle geometry is generated. This model is the target machining geometry model, which precisely defines the final state that the dovetail angle region should achieve after machining.
[0039] Optionally, the step of separating the weld area information and the base material surface information from the modified 3D model and generating the target machining geometry model of the dovetail angle region by combining it with preset dovetail angle standard design parameters includes: calculating the nearest distance from each point on the surface of the modified 3D model to the preset standard model surface, and dividing the surface of the modified 3D model into the weld area information and the base material surface information according to the comparison result of the nearest distance and the preset tolerance threshold; processing the base material surface information through a preset random sample consensus algorithm to determine the dovetail angle root plane and extracting the dovetail angle center path from the preset standard model; constructing a 2D sketch plane perpendicular to the dovetail angle center path at the starting point of the dovetail angle center path, and drawing a 2D cross-sectional profile on the 2D sketch plane according to the dovetail angle standard design parameters; moving the 2D cross-sectional profile along the dovetail angle center path, and keeping the 2D cross-sectional profile perpendicular to the tangent direction of the dovetail angle center path during the movement, so as to generate the target machining geometry model.
[0040] As a preferred implementation, to separate the weld region from the base material region from the modified 3D model containing the actual weld morphology, the system first executes a segmentation algorithm based on geometric deviation. Specifically, the system traverses every sampling point or mesh vertex on the surface of the modified 3D model and calculates the shortest Euclidean distance from that point to the original, preset standard model surface used as the design reference. The system then compares the calculated distance value with a preset tolerance threshold (e.g., 0.2 mm based on manufacturing precision requirements). If the distance value of a point is less than or equal to the threshold, the point is determined to be within the design tolerance range, belonging to the base material surface portion that has not undergone significant changes, and is marked or classified as base material surface information. Conversely, if the distance value is greater than the threshold, it indicates that the point is located in an area exceeding the original design due to weld deposits, and is thus classified as weld region information. Through this method, the system can accurately segment the modified model surface into two subsets with clear physical meaning.
[0041] To provide a precise and robust machining reference for subsequent ideal geometry construction, the system first processes the surface information of the base material separated in the previous step. Since the actual workpiece's base material surface may have slight unevenness or acquisition noise, the system can robustly fit an optimal geometric plane from the base material point cloud or mesh data containing these outliers by executing a pre-defined random sample consensus algorithm. This plane is then determined as the reference for subsequent machining—the dovetail root plane. Simultaneously, to ensure the machining path follows the original design intent, the system directly extracts the predefined dovetail center path from a pre-defined standard digital model used as the theoretical basis. This path is typically a precise B-spline curve or straight line segment, representing the extended trajectory of the dovetail groove. This approach cleverly combines the surface reference of the actual workpiece with the ideal design path, ensuring the relative positional accuracy of the machining.
[0042] Further, the system enters the stage of defining the ideal machining profile. First, the system constructs a two-dimensional sketch plane at the starting point of the extracted dovetail angle center path. The principle of constructing this plane is that its normal vector at this point completely coincides with the tangent direction of the dovetail angle center path, that is, the plane and the path are strictly perpendicular at this point. Subsequently, on this newly created two-dimensional sketch plane, the system accurately draws the two-dimensional cross-sectional profile of the dovetail groove according to the preset standard design parameters of the dovetail angle. These design parameters include, but are not limited to, key dimensions such as the opening width, root width, depth, sidewall angle, and root fillet radius of the dovetail groove. After drawing, a two-dimensional closed curve defining the ideal machining shape is obtained, i.e., the two-dimensional cross-sectional profile.
[0043] Furthermore, using the paths and contours generated in the aforementioned steps, the final target machining geometry model for the dovetail corner region is generated. The system performs a standardized modeling operation known as "scanning" or "sweeping" in computer-aided design. This operation uses a two-dimensional cross-sectional contour as the scanning volume and the dovetail corner center path as the guide line. The system moves this two-dimensional cross-sectional contour along the dovetail corner center path from the starting point to the ending point, and throughout the movement, dynamically calculates the tangent direction at each point on the path to adjust the orientation of the plane containing the two-dimensional cross-sectional contour in real time, thereby ensuring that the contour always remains perpendicular to the tangent direction of the path. The three-dimensional space swept by this continuous movement and orientation process constitutes a precise, smooth, and fully design-compliant three-dimensional entity, namely the target machining geometry model, which precisely defines the ideal boundary of the volume of excess material that the robot needs to cut away.
[0044] S204. Perform pose matching and Boolean operations on the target machining geometry model and the modified three-dimensional digital model to determine whether the target machining geometry model is completely covered by the modified three-dimensional digital model. One specific implementation involves the system performing a Boolean subtraction operation, subtracting the target machining geometry model as the minuend and the corrected 3D model as the subtrahend. During this operation, the system can configure a Boolean tolerance parameter, for example, set to 1.0E-6 mm, to handle any small gaps or overlaps that may exist between the two model surfaces. If the result of this Boolean operation is an empty geometric set, it indicates that the entire volume of the target machining geometry model is covered by the corrected 3D model. As a second alternative, the system can perform a reverse Boolean subtraction, subtracting the target machining geometry model from the corrected 3D model to generate a 3D model representing the machining allowance to be removed. Subsequently, the system calculates the volumes of the target machining geometry model, the model containing the machining allowance to be removed, and the original corrected 3D model. If the difference between the sum of the volumes of the target machining geometry model and the model containing the machining allowance to be removed and the total volume of the corrected 3D model is less than a preset volume comparison threshold, such as 0.01 cubic millimeters, it can be determined that the model is completely covered. As a third, more efficient approach, the system can invoke the interference detection module within the 3D geometry kernel, setting the detection mode to unidirectional overflow detection to identify any portion of the target machining geometry model that extends beyond the boundaries of the corrected 3D digital model. To improve robustness, a minimum interference volume threshold can be set, for example, 1.0E-9 cubic millimeters. Only when the detected overflow volume exceeds this threshold is it considered invalid interference. If the detection module returns a result indicating that no overflow volume exceeds the threshold, it can be confirmed that the target machining geometry model is completely enclosed.
[0045] S205. When the target machining geometry model is completely covered by the modified three-dimensional digital model, the robot machining toolpath is generated according to the target machining geometry model. Specifically, once the target machining geometry model is confirmed to be completely covered, the system automatically generates the machining toolpath for the robot end effector (e.g., a grinding head or milling cutter) based on the target model. One specific implementation is a contour-based layered machining strategy. The system first slices the machining allowance model, composed of the differences between the corrected 3D model and the target machining geometry model, along a preset machining coordinate axis, such as the Z-axis, using a series of parallel planes. The distance between each slice is defined as the cutting depth, for example, set to 0.5 mm. Subsequently, the system generates a two-dimensional circumferential or filling toolpath for each slice layer. The distance between adjacent toolpaths is controlled by a lateral step distance parameter, for example, configurable as 50% of the tool diameter. Finally, all levels of two-dimensional toolpaths are connected sequentially to form a complete 3D roughing path. As a second alternative technical solution, particularly suitable for the finishing stage, the system can employ a surface streamline machining strategy. This approach directly generates toolpaths on the surface of the target machining geometry. The toolpath moves along the U- or V-axis parametric lines of the surface itself (i.e., isoparametric machining), or forms a series of parallel trajectories on the surface with a fixed projection direction. The distance between adjacent trajectories is precisely controlled by a key machining quality parameter, namely residual height or line spacing, which can be set to 0.02 mm to ensure the final surface finish. As a third, more efficient machining approach, the system can implement adaptive root clearing or volume milling algorithms. This algorithm aims to maintain a constant tool load and dynamically adjusts the toolpath trajectory and feed rate by analyzing the volume of the material to be machined in real time. It generates high-speed, high-efficiency roughing paths with a preset constant tool cutting angle (e.g., a radial contact angle of 60 degrees), which is particularly suitable for quickly removing large amounts of material.
[0046] In a preferred embodiment, when the Boolean operation or interference detection results indicate that the target machining geometry model is not completely covered by the corrected 3D digital model, i.e., there is an area with insufficient machining allowance, the system will execute a preset exception handling procedure. This procedure may include: generating a report containing the location and volume information of the uncovered area; highlighting the area on the user interface and issuing an alarm; and automatically marking the workpiece as a defective product for subsequent manual evaluation, repair welding, or scrapping.
[0047] Optionally, generating the robot machining toolpath based on the target machining geometry model includes: analyzing the geometric topology and curvature distribution of the target machining geometry model, identifying multiple machining regions with different geometric features in the target machining geometry model; matching preset machining strategies to the multiple machining regions according to their geometric features, the machining strategies including contour machining strategies, planar machining strategies, and streamline machining strategies; configuring machining parameters for the machining strategies, the machining parameters including layer spacing parameters, step spacing parameters, feed rate, and tool attitude control parameters; and calculating and generating the robot machining toolpath based on the machining strategies and the machining parameters.
[0048] As a preferred embodiment of toolpath generation, the system first performs in-depth geometric feature analysis on the target machining geometry model. In this step, the system traverses all triangular or curved facets of the model, calculating the normal vector and principal curvature at each location. By comparing the angle between the normal vector at each point and a preset world coordinate system (e.g., the Z-axis of gravity), the system can identify steep and gentle regions. For example, a configurable slope threshold, such as 45 degrees, can be used to distinguish between these two types of regions: angles greater than 45 degrees are classified as steep walls, while angles less than 45 degrees are classified as gentle slopes or top surfaces. Simultaneously, the system analyzes the curvature distribution to identify regions with high curvature variations, such as inner fillets or convex edges, and marks them as feature regions requiring special processing. Finally, the entire target machining geometry model is automatically segmented into multiple sets of machining regions with different geometric properties.
[0049] Furthermore, based on the analysis results from the previous step, the system intelligently matches preset machining strategies to one or more identified machining areas. This matching process can be implemented based on a user-editable rule base. For example, the rule base can specify that for top areas identified as flat or near-flat, the system automatically selects a planar machining strategy, such as reciprocating milling or surround milling; for areas identified as steep walls, the system matches a contour machining strategy to ensure uniform material removal in the vertical direction; and for gentle slope areas with gradual curvature changes and high surface quality requirements, the system preferentially adopts a streamlined machining strategy, allowing the toolpath to conform to the natural direction of the surface. In this way, the system breaks down complex machining tasks into multiple highly targeted sub-tasks.
[0050] Furthermore, after determining a suitable machining strategy for each machining area, the system configures detailed machining parameters for these strategies. These parameters can be configured either by accessing a preset process parameter database or by fine-tuning by the operator. For example, for contour machining strategies, the core parameter is the layer spacing, which can be set to, for example, 0.5 mm, determining the depth of cut in the Z-axis direction for each pass. For planar and streamline machining strategies, the key parameter is the step distance, which can be set to, for example, 70% of the tool radius, controlling the overlap between adjacent toolpaths. In addition, the system configures different feed rates for different areas based on material properties and tool specifications; for example, a higher feed rate (e.g., 2000 mm / min) is set in the roughing area, and a lower rate (e.g., 800 mm / min) is set in the finishing area. Simultaneously, tool attitude control parameters, such as the tool axis tilt angle and lead angle, are also determined to optimize cutting conditions and avoid interference.
[0051] Furthermore, the system integrates all information, independently calculating the sub-toolpaths for each region configured with machining strategies and parameters. Then, all sub-toolpaths are seamlessly connected to form a complete, globally optimized robotic machining toolpath. The calculation process involves converting the ideal tool tip trajectory points into a sequence of six-axis pose points (including X, Y, Z coordinates and A, B, C rotation angles) that the robot can execute. During this process, the system automatically handles transition paths between different machining areas, such as generating smooth tool lift-off, tool feed, and connection movements, ensuring the continuity and efficiency of the entire machining process. The generated final robotic machining toolpath can then be compiled into instruction code that the robot controller can directly interpret and execute.
[0052] S206. Based on the preset kinematic model and program syntax of a specific robot model, the robot machining toolpath is converted into a robot motion trajectory program executable by the specific robot model.
[0053] One specific implementation involves using a dedicated post-processor module. This module is pre-configured with the kinematic model parameters of the target robot (e.g., KUKA KR240), including the DH parameters of each joint (containing four basic parameters: joint rotation angle (θ), link offset (d), link length (a), and link torsion angle (α)), joint motion limits, and singularity regions. The post-processor reads the pose information in the toolpath point by point, calculates the angle values of the six joint axes required to achieve each pose through inverse kinematics, and checks whether the calculation results exceed the joint limits or fall into a singular state. Subsequently, it formats the calculated joint coordinates or Cartesian coordinates into, for example, point-to-point motion or linear motion instructions according to the robot's specific program syntax, and embeds the corresponding velocity, acceleration, and tool coordinate system parameters, ultimately generating an executable program file in .src format. As a second alternative technical solution, the system can generate an intermediate standardized code, such as G-code conforming to ISO (International Organization for Standardization) standards or APT-CL format files. Then, an interpreter or driver runs on the robot control cabinet or an industrial computer connected to it. This driver receives and parses these standardized instructions in real time and dynamically calls the low-level motion command interface provided by the robot controller, translating the standard instructions into robot-executable actions in real time. This method enhances the system's versatility and portability; when changing to a different brand of robot, only the corresponding driver needs to be replaced. As a third, more advanced solution, the system can complete the conversion in an offline programming software environment containing a digital twin model of the robot. The robot's machining toolpath is imported into this virtual simulation environment. The software not only uses the kinematic model for path planning and verification but also performs collision detection, reachability analysis, and cycle time optimization for the entire work cell. After users can visually fine-tune the path in the 3D environment, the OLP software (Industrial Robot Simulation Software) can generate a fully optimized and collision-free TP program for a specific robot model (e.g., FANUC M-20iA) with a single click.
[0054] Optionally, the step of converting the robot machining toolpath into a robot motion trajectory program executable by the specific robot model according to the preset kinematic model and program syntax includes: parsing the tool center point coordinates and tool axis direction vector from the robot machining toolpath; constructing a target pose homogeneous transformation matrix for the end effector of the specific robot model based on the tool center point coordinates, the tool axis direction vector, and a preset tool coordinate system; inputting the target pose homogeneous transformation matrix into the kinematic model to obtain one or more sets of joint angle solutions; filtering the one or more sets of joint angle solutions according to a preset minimum joint travel principle to determine the optimal joint angle solution; and converting the optimal joint angle solution sequence into the robot motion trajectory program that conforms to the program syntax.
[0055] Specifically, the system first parses the general robot machining toolpath file generated in the previous step. This toolpath file is typically a data list containing a series of ordered tool positions (APT or CL-data). In this step, the system extracts two core pieces of information for each tool position: the three-dimensional coordinates of the tool center point in the world coordinate system (e.g., P(x, y, z)) and the direction vector of the tool axis at that point (e.g., V(i, j, k)). These data define the spatial position that the robot's end-effector tip should reach during machining and the orientation it should maintain upon reaching that position.
[0056] Next, based on the coordinate and vector information parsed in the previous step, and combined with a predefined tool coordinate system, the system constructs a 4x4 homogeneous transformation matrix describing the target pose of the robot's end effector. This tool coordinate system precisely defines the geometric relationship between the robot flange center and the actual tool tip, including position offset and orientation rotation. The system uses the tool axis direction vector (V) as the Z-axis of the target tool coordinate system and determines the X and Y axes of the target tool coordinate system by performing a cross product operation with a reference vector (e.g., the Z-axis of the world coordinate system), thus forming a 3x3 rotation matrix. Then, the system uses the tool center point coordinates (P) as the translation vector. Finally, the rotation matrix and translation vector are combined into a complete homogeneous transformation matrix, which uniquely describes the pose that the robot's end effector flange needs to achieve in the world coordinate system.
[0057] Furthermore, the system takes each homogeneous transformation matrix of the target pose calculated in the previous step as input and calls the preset inverse kinematics model of a specific robot model for solution. For a standard six-axis serial robot, its inverse kinematics solution usually yields one or more sets (e.g., up to eight sets) of different joint angle solutions. Each set of solutions enables the robot's end effector to achieve the same target pose. These solutions correspond to different robot configurations, such as elbow up / elbow down, wrist rotation / wrist non-rotation, etc. The kinematic model itself is a mathematical model that includes precise geometric parameters (i.e., DH parameters) such as robot link lengths and joint offsets, ensuring the accuracy of the solution.
[0058] Furthermore, after obtaining multiple sets of candidate joint angle solutions, the system needs to select an optimal solution for each tool position to ensure the smoothness and efficiency of the robot's motion. This step is performed according to a preset minimum joint travel principle. Specifically, for the current tool position, the system calculates the difference between each set of candidate joint angle solutions and the optimal joint angle solution determined at the previous tool position, which is the weighted sum of the rotation angles of all corresponding joints (J1 to J6). The system selects the solution that minimizes this weighted sum as the optimal joint angle solution for the current point. Through this point-by-point comparison and selection method, the system can avoid unnecessary large joint swings and configurational abrupt changes near the wrist singularity, thereby generating a continuous and smooth joint motion trajectory.
[0059] Furthermore, the system converts the selected sequence of optimal joint angles into an executable program conforming to a specific robot programming syntax. For example, if the target is an ABB robot, the system converts each joint angle sequence into joint motion or linear motion instructions in the RAPID language, including preset parameters such as speed and zone (i.e., smoothness). This ultimately generates a .mod or .prg file, which can be directly loaded into the robot controller to drive the physical robot to accurately reproduce the calculated robot motion trajectory.
[0060] Optionally, after converting the optimal joint angle sequence into the robot motion trajectory program conforming to the program syntax, the method further includes: loading the robot motion trajectory program, the corrected 3D digital model, and the 3D model of the specific robot model into a preset virtual simulation environment; executing the simulation run of the robot motion trajectory program, and performing collision detection, singularity analysis, and joint limit checks during the simulation run; generating a simulation verification report based on the results of the collision detection, singularity analysis, and joint limit checks; and readjusting the robot motion trajectory program when the simulation verification report indicates that the robot motion trajectory program has a preset safety risk.
[0061] After the robot motion trajectory program is generated, to ensure its safe and efficient execution on the physical device, this application also provides a verification and optimization method based on virtual simulation. First, the system constructs a digital twin work cell in a pre-defined virtual simulation environment. This is typically done in a professional offline programming (OLP) software (such as ABB's RobotStudio, FANUC's RoboGuide, or the general-purpose Siemens Process Simulate). The system loads three types of core digital assets through a standard interface: first, the newly generated motion trajectory program for a specific robot model (such as a .src or .tp file); second, the corrected 3D digital model of the machining object, typically in STEP or IGES format; and third, a 3D model of the specific robot model that is completely identical to the physical robot and contains a precise kinematic model. To achieve the highest fidelity simulation, the environment can further load other components within the work cell, such as workpiece fixtures, worktables, safety fences, and other equipment models that may interact with the robot.
[0062] Furthermore, the system initiates a simulation of the robot's motion trajectory program within the digital twin environment. The virtual controller parses and executes the program instructions line by line, driving the virtual robot model to accurately reproduce all the program's movements in three-dimensional space. Throughout the simulation, the system continuously performs several key safety analyses at a high frequency (e.g., tens to hundreds of times per second). Among these, collision detection is the most critical component, using a geometric intersection algorithm to determine in real time whether there is interference between the following: links of the robot body (self-collision); the robot body, tools, and flanges with the corrected 3D digital model (workpiece); and the robot with all environmental models such as fixtures and worktables. Simultaneously, the system also performs singularity analysis. By monitoring the determinant value of the robot's kinematic Jacobian matrix, once this value approaches zero, the system can warn that the robot is about to enter a singular pose that may lead to uncontrolled joint velocity. In addition, the system performs joint limit checks, comparing the calculated angles and angular velocities of each joint in real time with the limit values defined in the robot's hardware manual to prevent exceeding the physical range of motion or the motor's capacity limit.
[0063] Furthermore, after the simulation runs, or when any problems are detected, the system generates a detailed simulation verification report. This report is not a simple "pass / fail" conclusion, but a data document containing rich diagnostic information. For example, when a collision is detected, the report records the two specific objects involved in the collision (such as the robot J3 arm and fixture A), the precise simulation timestamp of the collision, the corresponding program line number, and can automatically capture a 3D view at the moment of the collision. When a singularity or joint over-limit is predicted, the report indicates the corresponding joint (such as the J5 wrist joint approaching a singularity or the J2 joint exceeding the positive limit by 3.5 degrees), and also associates it with the program line number and time point. As a preferred implementation, the report may also include the estimated cycle time of the entire machining process, angle and torque variation curves of each joint, and a comparison of the actual and theoretical motion trajectories of the tool center point (TCP), providing data support for process optimization.
[0064] Furthermore, when the simulation verification report explicitly indicates that the robot's motion trajectory program has preset safety risks (e.g., any collisions, singularities, or joint over-limit records in the report), the system will trigger a trajectory readjustment process. This adjustment can be manual or automatic. In manual adjustment mode, the system will highlight the problematic sections in the program and allow the operator to insert one or more intermediate points to bypass obstacles or force the robot to adopt different configurations to avoid singularities by dragging, modifying pose parameters, or other interactive methods in the OLP software. In a more automated adjustment scheme, the system can automatically attempt to repair based on the type of risk. For example, for local collisions, the system can attempt to slightly adjust the tilt angle of the tool axis (i.e., the fourth and fifth axes) to avoid the interference zone while keeping the tool tip position and basic orientation unchanged, and then re-simulate and verify the local section. For joint limit problems, the system can even prompt the operator to suggest that the workpiece be translated or rotated as a whole within the robot's workspace, and then regenerate the entire robot motion trajectory program based on the new workpiece position, fundamentally solving the accessibility problem.
[0065] The method further includes: acquiring the actual clamping pose of the workpiece to be processed; calculating the pose deviation matrix between the actual clamping pose and the preset theoretical pose in the robot motion trajectory program; dynamically compensating the robot motion trajectory program according to the pose deviation matrix to generate a dynamically compensated robot motion trajectory program; and controlling the specific model robot to execute the dynamically compensated robot motion trajectory program.
[0066] Specifically, to achieve adaptive compensation for the actual positional deviation of the workpiece, the method disclosed in this application requires accurate acquisition of the actual clamping pose of the workpiece before processing. A preferred implementation is to use non-contact 3D vision measurement. Specifically, a structured light 3D camera or laser contour scanner, fixedly mounted above the robot's working unit or integrated into the robot's end effector, scans the clamped workpiece to acquire high-precision point cloud data of its surface. Subsequently, the system performs point cloud registration with the theoretical CAD model of the workpiece, for example, using an iterative nearest-point algorithm or its variant (such as Go-ICP). After registration, the system can calculate a 4x4 homogeneous transformation matrix, which accurately describes the rotation and translation relationship from the workpiece's CAD model coordinate system (theoretical pose) to the current point cloud coordinate system (actual pose), which is the actual clamping pose. As an alternative solution, the system can use contact measurement. A high-precision trigger probe is installed at the robot's end effector, and the robot is controlled to follow a predetermined path so that the probe sequentially touches at least three non-collinear reference points or reference surfaces on the workpiece. By recording the joint angles fed back by the robot controller at each trigger and combining this with forward kinematics calculations, the precise coordinates of the probe tip in the robot's base coordinate system can be obtained. Based on the correspondence between these measured coordinate points and theoretical reference points, the system can also calculate the homogeneous transformation matrix describing the actual clamping posture of the workpiece.
[0067] Furthermore, based on the actual clamping pose obtained in the previous step, the system calculates the pose deviation matrix between it and the theoretical pose used in the program generation. In this step, the system first needs to retrieve a preset theoretical pose, which is also stored in the form of a 4x4 homogeneous transformation matrix (hereinafter denoted as T_theoretical). It defines the ideal position and orientation of the workpiece relative to the robot's base coordinate system in the offline programming or simulation environment. The actual clamping pose matrix obtained in the previous step is denoted as T_actual. The pose deviation matrix (denoted as T_deviation) transforms a point in the theoretical workpiece coordinate system to the corresponding point in the actual workpiece coordinate system. The formula for calculating this deviation matrix is: T_deviation = T_actual × inv(T_theoretical), where inv(T_theoretical) represents the inverse matrix of the theoretical pose matrix. The calculated T_deviation matrix itself encapsulates all the three-dimensional spatial translation and rotation information required to transform from the theoretical pose to the actual pose.
[0068] Furthermore, the system uses the pose deviation matrix T_deviation calculated in the previous step to dynamically compensate the original robot motion trajectory program, generating a new, dynamically compensated robot motion trajectory program adapted to the current actual position of the workpiece. This compensation process can be implemented at different levels. The first, and most direct, approach is to implement it at the robot controller level. Many modern robot controllers (such as KUKA's BASE_DATA or FANUC's UserFrame) allow the program to be dynamically multiplied by a pose transformation matrix. The system only needs to send the calculated T_deviation matrix as a base coordinate system offset to the controller. When executing the original program, the controller will automatically multiply the pose of each target point in the program by this offset matrix, thereby "translating" and "rotating" the entire trajectory to the correct position in real time. The second approach is to recalculate the program itself in the host computer or offline programming software. The system iterates through each motion command in the original program (e.g., the target point pose matrix P_original corresponding to LIN or PTP commands) and applies the formula P_compensated = T_deviation × P_original to calculate the new, compensated target point pose P_compensated. Finally, the system replaces the data in the original program with this new pose data, generating a completely new program file. Although this approach involves slightly more steps, it offers greater compatibility and is suitable for older controller models that do not support real-time coordinate transformation.
[0069] It should be noted that the above embodiments of the apparatus are only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0070] This embodiment also discloses an electronic device, as shown in the reference. Figure 3 The electronic device may include: at least one processor 301, at least one communication bus 302, user interface 303, network interface 304, and at least one memory 305.
[0071] The communication bus 302 is used to enable communication between these components.
[0072] The user interface 303 may include a display screen and a camera. Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.
[0073] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0074] The processor 301 may include one or more processing cores. The processor 301 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 305, and by calling data stored in memory 305. Optionally, the processor 301 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 301 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 301 and may be implemented as a separate chip.
[0075] The memory 305 may include random access memory (RAM) or read-only memory. Optionally, the memory 305 may include a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 305 may also be at least one storage device located remotely from the aforementioned processor 301. Figure 3 As shown, the memory 305, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for a multi-layer, multi-pass welding dovetail corner robot machining programming method.
[0076] exist Figure 3 In the electronic device shown, the user interface 303 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 301 can be used to call the application program stored in the memory 305 for a multi-layer multi-pass welding dovetail corner robot processing programming method. When executed by one or more processors 301, the electronic device executes one or more methods as described in the above embodiments.
[0077] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0078] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings or direct couplings or communication connections may be through some service interfaces; indirect couplings or communication connections between apparatuses or units may be electrical or other forms.
[0079] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0080] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory 305 and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned memory 305 includes various media capable of storing program code, such as a USB flash drive, external hard drive, magnetic disk, or optical disk.
[0081] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will be readily apparent to those skilled in the art upon consideration of the disclosure in this specification. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. A robot machining programming method for multi-layer, multi-pass overlay welding of dovetail corners, characterized in that, Applied to a server, the method includes: The three-dimensional point cloud data of the dovetail corner region of the workpiece to be processed is obtained, and the three-dimensional point cloud data is preprocessed to obtain the target three-dimensional point cloud data. The preset standard digital model of the workpiece to be processed is corrected based on the target three-dimensional point cloud data to generate a corrected three-dimensional digital model, which reflects the actual geometric shape of the workpiece to be processed. The weld area information and the base material surface information are separated from the corrected three-dimensional digital model, and the target machining geometry model of the dovetail angle area is generated by combining the preset dovetail angle standard design parameters. Pose matching and Boolean operations are performed on the target machining geometry model and the modified three-dimensional digital model to determine whether the target machining geometry model is completely covered by the modified three-dimensional digital model; When the target machining geometry model is completely covered by the modified three-dimensional digital model, the robot machining toolpath is generated based on the target machining geometry model; Based on the preset kinematic model and program syntax of a specific robot model, the robot machining toolpath is converted into a robot motion trajectory program that can be executed by the specific robot model.
2. The method according to claim 1, characterized in that, The step of correcting the preset standard digital model of the workpiece to be processed based on the target three-dimensional point cloud data to generate the corrected three-dimensional digital model includes: Based on the rate of change of the normal vector of each data point in the target three-dimensional point cloud data, the target three-dimensional point cloud data is divided into a set of base material plane points whose rate of change of the normal vector is lower than a preset segmentation threshold, and a set of weld transition zone points whose rate of change of the normal vector is higher than or equal to the preset segmentation threshold. A preset plane fitting algorithm is applied to the set of points on the base material plane to generate a geometric plane, and a preset surface reconstruction algorithm is applied to the set of points on the weld transition zone to generate a geometric surface. The geometric plane and the geometric surface are then stitched together to obtain a solid model of the target area. The coordinate transformation matrix from the target region entity model to the preset standard digital model is calculated using a preset iterative nearest point algorithm, and the coordinate transformation matrix is applied to register the target region entity model. By using Boolean operations, the corresponding geometric region in the preset standard digital model is replaced with the registered target region entity model to obtain the corrected three-dimensional digital model.
3. The method according to claim 1, characterized in that, The step of separating weld area information and base material surface information from the corrected 3D digital model, and generating the target machining geometry model of the dovetail angle region by combining it with preset dovetail angle standard design parameters includes: Calculate the nearest distance from each point on the corrected 3D model surface to the preset standard model surface, and based on the comparison result of the nearest distance and the preset tolerance threshold, divide the surface of the corrected 3D model into the weld area information and the base material surface information; The surface information of the parent material is processed by a preset random sample consistency algorithm to determine the root plane of the dovetail corner and extract the center path of the dovetail corner from the preset standard digital model. At the starting point of the center path of the dovetail angle, construct a two-dimensional sketch plane perpendicular to the center path of the dovetail angle, and draw a two-dimensional cross-sectional profile on the two-dimensional sketch plane according to the standard design parameters of the dovetail angle. The two-dimensional cross-sectional profile is moved along the center path of the dovetail angle, and during the movement, the two-dimensional cross-sectional profile is kept perpendicular to the tangent direction of the center path of the dovetail angle to generate the target machining geometry model.
4. The method according to claim 1, characterized in that, The step of generating the robot machining toolpath based on the target machining geometry model includes: Analyze the geometric topology and curvature distribution of the target machining geometric model to identify multiple machining regions with different geometric features in the target machining geometric model; Based on the geometric features of the multiple processing areas, a preset processing strategy is matched for each of the multiple processing areas. The processing strategies include contour processing strategy, planar processing strategy and streamline processing strategy. Configure machining parameters for the machining strategy, including layer spacing parameters, step distance parameters, feed rate and tool attitude control parameters; The robot machining toolpath is calculated and generated based on the machining strategy and the machining parameters.
5. The method according to claim 1, characterized in that, The step of converting the robot machining toolpath into a robot motion trajectory program executable by the specific robot model based on a preset kinematic model and program syntax includes: The coordinates of the tool center point and the tool axis direction vector are extracted from the robot machining toolpath; Based on the coordinates of the tool center point, the tool axis direction vector, and the preset tool coordinate system, a target pose homogeneous transformation matrix for the end effector of the specific robot model is constructed. Input the homogeneous transformation matrix of the target pose into the kinematic model to obtain one or more sets of joint angle solutions; The optimal joint angle solution is determined by screening one or more sets of joint angle solutions according to the preset minimum joint travel principle. The optimal joint angle solution sequence is converted into the robot motion trajectory program that conforms to the program syntax.
6. The method according to claim 5, characterized in that, After converting the optimal joint angle solution sequence into the robot motion trajectory program conforming to the program syntax, the method further includes: Load the robot motion trajectory program, the corrected 3D digital model, and the 3D model of the specific robot model into a preset virtual simulation environment; The simulation of the robot motion trajectory program is executed, and collision detection, singularity analysis, and joint limit checks are performed during the simulation. A simulation verification report is generated based on the results of the collision detection, the singularity analysis, and the joint limit check. When the simulation verification report indicates that the robot motion trajectory program has a preset safety risk, the robot motion trajectory program is readjusted.
7. The method according to claim 1, characterized in that, The method further includes: Obtain the actual clamping position of the workpiece to be processed; Calculate the pose deviation matrix between the actual clamping pose and the theoretical pose preset in the robot motion trajectory program; The robot motion trajectory program is dynamically compensated based on the pose deviation matrix to generate a dynamically compensated robot motion trajectory program. Control the specific model robot to execute the dynamically compensated robot motion trajectory program.
8. An electronic device, characterized in that, The device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions. The user interface and the network interface are both used to communicate with other devices. The processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, perform the method as described in any one of claims 1-7.
10. A computer program product, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-7.
