Welding path planning method, system and equipment and computer storage medium
By combining line laser sensors and NURBS curve fitting interpolation with offline programming, a precise welding path is generated, which solves the problem of workpiece placement errors affecting welding accuracy and stability, and realizes efficient and precise robotic welding.
Patent Information
- Application Number
- CN202511870276.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-01-27
AI Technical Summary
Existing offline programming robot welding technology suffers from reduced welding accuracy and stability when faced with workpiece placement and processing errors.
An initial weld point set is acquired using a line laser sensor. The actual weld point set is generated by NURBS curve fitting and interpolation. The target weld point set is generated using offline programming. The target deviation rotation matrix and welding posture are calculated, and the welding path is generated by matching.
It improves welding accuracy and stability, enhances the flexibility of offline programming welding, adapts to different workpieces and welding requirements, and improves the adaptability and automation level of the production line.
Smart Images

Figure CN121402918A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotic welding technology, and more specifically, to a welding path planning method, system, device, and computer storage medium. Background Technology
[0002] Welding, as a metal processing technology, has been widely applied in various industrial fields. Welding includes manual welding and robotic welding. Manual welding is inefficient and its quality is difficult to guarantee. With the development of technology, robotic welding has gradually become the mainstream, among which offline programmed robotic welding is a highly efficient and precise welding method. Offline programming involves programming the welding path, welding parameters, etc., using specialized software before the welding operation, and then transmitting the programming results to the welding robot, which then performs the welding operation according to the predetermined program. This method greatly improves the efficiency and accuracy of welding and reduces the interference of human factors.
[0003] However, in practical applications, factors such as the placement of the workpieces to be welded and processing errors can affect the accuracy and stability of offline programming welding.
[0004] In conclusion, improving welding precision and stability is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of this application is to provide a welding path planning method that can, to a certain extent, solve the technical problem of how to improve welding accuracy and stability. This application also provides a welding path planning system, electronic equipment, and a computer-readable storage medium.
[0006] To achieve the above objectives, this application provides the following technical solution:
[0007] A welding path planning method, comprising:
[0008] Acquire the initial weld point set obtained after scanning the workpiece to be welded by the line laser sensor;
[0009] The initial weld point set is fitted and interpolated using NURBS curves to obtain the actual weld point set.
[0010] Through offline programming, a target weld point set with the same number of weld points as the actual weld point set is generated, and a target welding posture of the target weld point set is generated.
[0011] Generate the target deviation rotation matrix between the actual weld point set and the target weld point set;
[0012] Based on the target deviation rotation matrix and the target welding posture, the actual welding posture of the actual weld point set is generated;
[0013] The actual weld point set and the actual welding posture are matched to generate a welding path for welding the workpiece to be welded.
[0014] Preferably, the step of fitting and interpolating the initial weld point set using NURBS curves to obtain the actual weld point set includes:
[0015] Generate NURBS curve model;
[0016] Based on the number of weld points in the initial weld point set, the model value points of the NURBS curve model are parameterized to obtain parameterized model value points.
[0017] Based on the parameterized value points, generate node vectors;
[0018] Based on the NURBS curve model and the parametric value points, generate the control point set of the NURBS curve model;
[0019] Based on the NURBS curve model, the node vector, and the control point set, the NURBS curve result of the initial weld point set is generated;
[0020] The NURBS curve results are interpolated to generate the actual weld point set.
[0021] Preferably, generating the control point set of the NURBS curve model based on the NURBS curve model and the parameterized value points includes:
[0022] Based on the NURBS curve model and the parameterized value points, a least squares model is generated;
[0023] The least squares model is processed to generate a control point set for the NURBS curve model.
[0024] Preferably, the step of interpolating the NURBS curve results to generate the actual weld point set includes:
[0025] The total length of the NURBS curve resulting from the calculation;
[0026] Determine the initial interpolation arc length;
[0027] The initial number of interpolation segments is generated based on the ratio of the total length of the curve to the initial interpolation arc length;
[0028] The initial number of interpolation segments is rounded up to generate the target number of interpolation segments;
[0029] Based on the total length of the curve and the number of target interpolation segments, the target interpolation arc length is generated;
[0030] According to the target interpolation arc length, the node vector is interpolated for weld points to generate the actual weld point set.
[0031] Preferably, generating the target deviation rotation matrix between the actual weld point set and the target weld point set includes:
[0032] In the set of actual weld points, select the first and second actual weld points that meet the set distance conditions;
[0033] In the set of target weld points, a first target weld point corresponding to the first actual weld point is determined, and a second target weld point corresponding to the second actual weld point is determined.
[0034] Based on the first actual weld point, the second actual weld point, the first target weld point, and the second target weld point, generate an initial rotation matrix and an initial translation matrix;
[0035] Based on the initial rotation matrix and the initial translation matrix, the target weld point set is transformed to obtain the transformed weld point set;
[0036] The actual weld point set and the transformed weld point set are registered using the ICP algorithm to generate the target deviation rotation matrix.
[0037] Preferably, generating the initial rotation matrix and initial translation matrix based on the first actual weld point, the second actual weld point, the first target weld point, and the second target weld point includes:
[0038] A first vector is generated based on the first actual weld point and the second actual weld point;
[0039] A second vector is generated based on the first target weld point and the second target weld point;
[0040] Generate an initial rotation matrix that makes the directions of the first and second vectors the same;
[0041] Based on the initial rotation matrix, an initial translation matrix is generated.
[0042] Preferably, the step of registering the actual weld point set and the transformed weld point set using the ICP algorithm to generate the target deviation rotation matrix includes:
[0043] Select the first transition weld point from the set of transition weld points;
[0044] Determine the third actual weld point that is closest to the first transition weld point in the concentration of actual weld points;
[0045] In the set of transition weld points, the set of nearest weld points to the first transition weld point is determined according to the distance condition;
[0046] Determine whether the first converted weld point is the closest point of the third actual weld point on the nearest weld point set;
[0047] If yes, then the first transition weld point is matched with the third actual weld point; otherwise, the first transition weld point and the third actual weld point are discarded.
[0048] Based on the corresponding first transformed weld point and third actual weld point, generate the current deviation rotation matrix and generate the error function value of the current deviation rotation matrix;
[0049] If the error function value is greater than a set threshold, then return to the step of selecting the first conversion weld point in the set of conversion weld points;
[0050] If the error function value is less than or equal to a set threshold, the current deviation rotation matrix is used as the target deviation rotation matrix.
[0051] A welding path planning system, comprising:
[0052] The initial weld seam point set acquisition module is used to acquire the initial weld seam point set obtained after the line laser sensor scans the workpiece to be welded.
[0053] The fitting interpolation module is used to perform fitting interpolation on the initial weld point set using NURBS curves to obtain the actual weld point set.
[0054] The offline programming module is used to generate a target weld point set with the same number of weld points as the actual weld point set through offline programming, and to generate the target welding posture of the target weld point set.
[0055] A matrix generation module is used to generate a target deviation rotation matrix between the actual weld point set and the target weld point set;
[0056] The attitude generation module is used to generate the actual welding attitude of the actual weld point set based on the target deviation rotation matrix and the target welding attitude;
[0057] The path generation module is used to match the actual weld point set with the actual welding posture to generate a welding path for welding the workpiece to be welded.
[0058] An electronic device, comprising:
[0059] Memory, used to store computer programs;
[0060] A processor for executing the computer program to implement the steps of any of the welding path planning methods described above.
[0061] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the welding path planning methods described above.
[0062] This application provides a welding path planning method, which involves: acquiring an initial weld point set obtained by scanning the workpiece to be welded using a line laser sensor; fitting and interpolating the initial weld point set using NURBS curves to obtain an actual weld point set; generating a target weld point set with the same number of weld points as the actual weld point set through offline programming, and generating a target welding posture for the target weld point set; generating a target deviation rotation matrix between the actual weld point set and the target weld point set; generating an actual welding posture for the actual weld point set based on the target deviation rotation matrix and the target welding posture; and matching the actual weld point set and the actual welding posture to generate a welding path for welding the workpiece to be welded. In this application, because the line laser sensor is a high-precision and high-sensitivity sensor, using it to obtain the initial weld point set can effectively reduce the differences between the simulation environment and the actual environment caused by factors such as workpiece placement accuracy and processing errors, thereby ensuring the accuracy of the welding position. The NURBS curve has good smoothness and continuity; after processing the initial weld point set, a smoother and more continuous actual weld point set can be obtained. Furthermore, offline programming technology can obtain a precise and ideal target welding pose. Thus, by calculating the rotational deviation between the actual weld point set and the target weld point set, the actual welding posture can be accurately determined, resulting in a precise welding path. This increases the flexibility of offline programming welding and improves welding accuracy and stability. The welding path planning system, electronic device, and computer-readable storage medium provided in this application also solve the corresponding technical problems. Attached Figure Description
[0063] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0064] Figure 1 A flowchart of a welding path planning method provided in an embodiment of this application;
[0065] Figure 2 This is a schematic diagram of the structure of a welding path planning system provided in an embodiment of this application;
[0066] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0067] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0068] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0069] Please see Figure 1 , Figure 1 This is a flowchart of a welding path planning method provided in an embodiment of this application.
[0070] This application provides a welding path planning method, which may include the following steps:
[0071] Step S101: Obtain the initial weld point set obtained after the line laser sensor scans the workpiece to be welded.
[0072] In practical applications, a line laser sensor can be used to scan the workpiece to be welded to obtain an initial set of weld points consisting of m weld points. The line laser sensor can be installed at the end of the robotic arm of a welding robot to control the robot to scan the workpiece as uniformly as possible; the workpiece to be welded can be flexibly determined according to the application scenario, such as a train door, electronic components, etc.; the number m can also be flexibly determined according to the application scenario.
[0073] Step S102: Fit and interpolate the initial weld point set using NURBS curves to obtain the actual weld point set.
[0074] In practical applications, the initial weld point set obtained by scanning the workpiece with a line laser sensor may not meet the welding requirements. Therefore, the initial weld point set can be fitted and interpolated using NURBS curves to obtain an actual weld point set consisting of s weld points. The value of s can be flexibly determined according to the application scenario.
[0075] In an exemplary embodiment, during the process of fitting and interpolating the initial weld point set using NURBS curves to obtain the actual weld point set, a NURBS curve model can be generated. For example, to ensure the NURBS curve has good smoothness and continuity, providing sufficient flexibility to describe complex curve shapes while maintaining high computational efficiency, a degree of 3 can be used. To ensure that each control point of the NURBS curve has the same influence on the curve, making the curve shape determined only by the position and node vector of the control points, maintaining the generality and uniformity of the curve, and simplifying computation, a weight of 1 can be used. Then, the NURBS curve model C(u) can be... Where u represents the parameter in the NURBS curve expression that defines the position of a point on the curve. It is a B-spline basis function. d represents the control point, and i represents the number; based on the number of weld points in the initial weld point set, the model points of the NURBS curve model are parameterized to obtain the parameterized model points. , represented as , This represents the vector norm, here it is the magnitude of the vector, i.e., the size of the vector. This indicates the type value points obtained from the initial weld point set through scanning. Represents a chord vector; generates nodal vectors based on parameterized value points. u j The calculated node vector is represented by n, which represents the number of control points and can be determined by the complexity of the curve. Based on the NURBS curve model and the parameterized value points, the control point set D of the NURBS curve model is generated. Based on the NURBS curve model, node vector, and control point set, the NURBS curve result of the initial weld point set is generated. The NURBS curve result is interpolated to generate the actual weld point set.
[0076] In specific application scenarios, during the process of generating the control point set of the NURBS curve model based on the NURBS curve model and parametric value points, a least squares model can be generated based on the NURBS curve model and parametric value points. J represents the objective of least squares optimization; the least squares model is processed, for example, by generating the control point set of the NURBS curve model through iterative calculation. ,in, , , N n-1,3 This represents a cubic B-spline basis function.
[0077] In specific application scenarios, during the process of interpolating NURBS curve results to generate actual weld point sets, the total curve length L of the NURBS curve results can be generated. C = (Cx, Cy, Cz). express The first derivative; determining the initial interpolation arc length, for example, based on process requirements. Based on the ratio of the total curve length to the initial interpolation arc length, the initial number of interpolation segments w is generated. The initial number of interpolation segments is rounded up to generate the target number of interpolation segments [w]. Based on the total curve length and the target number of interpolation segments, the target interpolation arc length is generated. , According to the target interpolation arc length, the nodal vector is interpolated for weld points to generate the actual weld point set, for example from... Begin interpolation, and record the interpolation point parameters as follows: Let t represent the t-th interpolation point, and let , can be obtained Based on this, the interpolation point parameters are obtained until the cumulative total length of the interpolation points exceeds the total length of the curve. The parameter values of all equal-arc-length interpolation points are then substituted into the NURBS curve model to calculate the spatial coordinates of each interpolation point. The number of weld points obtained through this method is s. Let P be the actual set of weld points obtained by interpolation. .
[0078] Step S103: Generate a target weld point set with the same number of weld points as the actual weld point set through offline programming, and generate the target welding posture of the target weld point set.
[0079] In practical applications, offline programming can be used to select the same number of equally spaced ideal weld points from the ideal model corresponding to the workpiece to be welded, for use in subsequent welding posture generation. That is, a target weld point set Q with the same number of weld points as the actual weld point set can be generated offline. And generate the target welding posture of the target weld point set. .
[0080] Step S104: Generate the target deviation rotation matrix between the actual weld point set and the target weld point set.
[0081] Step S105: Based on the target deviation rotation matrix and the target welding posture, generate the actual welding posture of the actual weld point set.
[0082] In practical applications, since the actual weld point set corresponds to the target weld point set, the target welding posture corresponds to the actual welding posture, and the weld point set is adapted to the welding posture, the actual welding posture can be generated based on the relationship between the weld point sets. That is, the target deviation rotation matrix between the actual weld point set and the target weld point set can be generated. Based on the target deviation rotation matrix and the target welding posture, the actual welding posture of the actual weld point set can be generated.
[0083] In an exemplary embodiment, during the process of generating the target deviation rotation matrix between the actual weld point set and the target weld point set, a first actual weld point that satisfies a set distance condition can be selected from the actual weld point set. Second actual weld point For example, select the first and second actual weld points that are far apart; within the set of target weld points, determine the first target weld point corresponding to the first actual weld point. Determine the second target weld point corresponding to the second actual weld point. Based on the first actual weld point, the second actual weld point, the first target weld point, and the second target weld point, an initial rotation matrix and an initial translation matrix are generated. Based on the initial rotation matrix and the initial translation matrix, the target weld point set is transformed to obtain a coarsely matched transformed weld point set. The actual weld point set and the transformed weld point set are registered using the ICP algorithm to generate the target deviation rotation matrix.
[0084] In specific application scenarios, during the process of generating the initial rotation matrix and initial translation matrix based on the first actual weld point, the second actual weld point, the first target weld point, and the second target weld point, a first vector can be generated based on the first actual weld point and the second actual weld point. Based on the first target weld point and the second target weld point, a second vector is generated. Generate an initial rotation matrix that makes the directions of the first and second vectors the same, that is, if the vectors are rotated in the same direction... and vector If the directions are the same, then... By substituting the coordinates of the point set, the initial rotation matrix can be obtained. Based on the initial rotation matrix, generate the initial translation matrix, which is the point... , , , Initial rotation matrix ,get , , , Then the initial translation matrix It can be obtained by the following formula Finally, the point set effect and The converted weld point set is obtained. .
[0085] In specific application scenarios, during the process of registering the actual weld point set and the transformed weld point set using the ICP algorithm to generate the target deviation rotation matrix, the first transformed weld point can be selected from the transformed weld point set. Determine the third actual weld point that is closest to the first transition weld point in terms of actual weld point concentration. In the set of transition weld points, determine the set of nearest weld points for the first transition weld point according to the distance condition. , It can be A point set consisting of a+1 points (a points before and after), where a can take values of 3, etc.; determine the first transition weld point. Is it the third actual weld point? In the recent weld point set If the first converted weld point is the closest point on the surface, then the first converted weld point is matched with the third actual weld point; otherwise, the first converted weld point and the third actual weld point are discarded. Based on the corresponding first converted weld point and third actual weld point, the current deviation rotation matrix is generated, and the error function value E(R,t) of the current deviation rotation matrix is generated. , and It is a point set and A corresponding set of points in the middle, This is the number of point pairs corresponding to the point set; in response to an error function value greater than a set threshold, the process returns to the step of selecting the first transformed weld point in the transformed weld point set; in response to an error function value less than or equal to the set threshold, the current deviation rotation matrix is used as the target deviation rotation matrix. Accordingly, based on the target deviation rotation matrix and the target welding posture, the actual welding posture of the actual weld point set is generated. , can be represented as .
[0086] Step S106: Match the actual weld point set with the actual welding posture to generate a welding path for welding the workpiece to be welded.
[0087] In practical applications, after obtaining the actual weld point set and the actual welding posture, the actual weld point set and the actual welding posture can be matched. This generates a welding path for welding the workpiece, so that the welding robot can weld the workpiece according to the welding path.
[0088] This application provides a welding path planning method, which involves: acquiring an initial weld point set obtained by scanning the workpiece to be welded using a line laser sensor; fitting and interpolating the initial weld point set using NURBS curves to obtain an actual weld point set; generating a target weld point set with the same number of weld points as the actual weld point set through offline programming, and generating a target welding posture for the target weld point set; generating a target deviation rotation matrix between the actual weld point set and the target weld point set; generating an actual welding posture for the actual weld point set based on the target deviation rotation matrix and the target welding posture; and matching the actual weld point set and the actual welding posture to generate a welding path for welding the workpiece to be welded. In this application, since the line laser sensor is a high-precision and high-sensitivity sensor, using the line laser sensor to obtain the initial weld point set can effectively reduce the differences between the simulation environment and the actual environment caused by factors such as workpiece placement accuracy and processing errors, thereby ensuring the accuracy of the welding position. The NURBS curve has good smoothness and continuity, and after processing the initial weld point set, a smoother and more continuous actual weld point set can be obtained. Furthermore, the offline programming technology can obtain a precise and ideal target welding pose. In this way, by calculating the rotational deviation between the actual weld point set and the target weld point set, the actual welding posture can be accurately determined, thereby obtaining a precise welding path, increasing the flexibility of offline programming welding, and improving welding accuracy and stability.
[0089] Furthermore, the introduction of line laser sensors and NURBS curves in this application allows offline programming welding technology to better adapt to changes in the actual production environment, no longer limited by fixed welding paths. This increased flexibility enables the robotic welding system to more efficiently handle different workpieces and welding requirements, improving the adaptability and flexibility of the production line. Moreover, by integrating line laser sensors and advanced algorithms, automated monitoring and adjustment of the welding process are achieved, further enhancing the automation level of the robotic welding system. This not only reduces the need for manual intervention but also improves production efficiency and safety. Finally, existing intelligent sensor-assisted welding methods generally use industrial cameras to photograph the entire workpiece, followed by extensive and complex calculations such as point cloud reconstruction to obtain the welding path. This is computationally expensive and inefficient. In contrast, this application does not require the introduction of multiple sensors or extensive complex calculations. The workpiece processing error is smaller, and the ideal welding posture, after rotational deviation correction, can meet actual welding requirements, improving planning efficiency while ensuring welding needs are met.
[0090] Please see Figure 2 , Figure 2 This is a schematic diagram of a welding path planning system provided in an embodiment of this application.
[0091] This application provides a welding path planning system, which may include:
[0092] The initial weld point set acquisition module 101 is used to acquire the initial weld point set obtained after the line laser sensor scans the workpiece to be welded.
[0093] The fitting interpolation module 102 is used to perform fitting interpolation on the initial weld point set using the NURBS curve to obtain the actual weld point set.
[0094] The offline programming module 103 is used to generate a target weld point set with the same number of weld points as the actual weld point set through offline programming, and to generate the target welding posture of the target weld point set.
[0095] The matrix generation module 104 is used to generate the target deviation rotation matrix between the actual weld point set and the target weld point set;
[0096] The attitude generation module 105 is used to generate the actual welding attitude of the actual weld point set based on the target deviation rotation matrix and the target welding attitude.
[0097] The path generation module 106 is used to match the actual weld point set with the actual welding posture to generate a welding path for welding the workpiece to be welded.
[0098] This application provides a welding path planning system, wherein the fitting interpolation module may include:
[0099] The model generation unit is used to generate NURBS curve models;
[0100] The parameterization unit is used to parameterize the model points of the NURBS curve model based on the number of weld points in the initial weld point set, so as to obtain the parameterized model points.
[0101] The node vector generation unit is used to generate node vectors based on parameterized value points;
[0102] The control point set generation unit is used to generate the control point set of the NURBS curve model based on the NURBS curve model and the parameterized value points.
[0103] The curve generation unit is used to generate NURBS curve results for the initial weld point set based on the NURBS curve model, node vectors, and control point set.
[0104] The actual weld point set generation unit is used to interpolate the NURBS curve results to generate the actual weld point set.
[0105] This application provides a welding path planning system, wherein the control point set generation unit is used to: generate a least squares model based on the NURBS curve model and parameterized value points; and process the least squares model to generate a control point set of the NURBS curve model.
[0106] This application provides a welding path planning system in which an actual weld point set generation unit is used to: generate the total length of the NURBS curve result; determine the initial interpolation arc length; generate the initial number of interpolation segments based on the ratio of the total curve length to the initial interpolation arc length; round up the initial number of interpolation segments to generate the target number of interpolation segments; generate the target interpolation arc length based on the total curve length and the target number of interpolation segments; and perform weld point interpolation on the node vectors according to the target interpolation arc length to generate the actual weld point set.
[0107] This application provides a welding path planning system, wherein the matrix generation module may include:
[0108] The first selection unit is used to select, from the actual weld point set, the first actual weld point and the second actual weld point that meet the set distance conditions.
[0109] The second selection unit is used to determine, from the target weld point set, a first target weld point corresponding to a first actual weld point, and a second target weld point corresponding to a second actual weld point;
[0110] The initial generation unit is used to generate an initial rotation matrix and an initial translation matrix based on the first actual weld point, the second actual weld point, the first target weld point, and the second target weld point.
[0111] The transformation unit is used to transform the target weld point set based on the initial rotation matrix and the initial translation matrix to obtain the transformed weld point set;
[0112] The registration unit is used to register the actual weld point set and the transformed weld point set using the ICP algorithm, and generate the target deviation rotation matrix.
[0113] This application provides a welding path planning system, wherein the initial generation unit is used to: generate a first vector based on a first actual weld point and a second actual weld point; generate a second vector based on a first target weld point and a second target weld point; generate an initial rotation matrix that makes the first vector and the second vector have the same direction; and generate an initial translation matrix based on the initial rotation matrix.
[0114] This application provides a welding path planning system in which a registration unit is configured to: select a first converted weld point from a set of converted weld points; determine a third actual weld point in the set of actual weld points that is closest to the first converted weld point; determine the set of nearest weld points for the first converted weld point in the set of converted weld points according to distance conditions; determine whether the first converted weld point is the closest point of the third actual weld point in the set of nearest weld points; if so, associate the first converted weld point with the third actual weld point; if not, discard both the first converted weld point and the third actual weld point; generate a current deviation rotation matrix based on the corresponding first converted weld point and the third actual weld point, and generate an error function value for the current deviation rotation matrix; if the error function value is greater than a set threshold, return to the step of selecting the first converted weld point from the set of converted weld points; if the error function value is less than or equal to the set threshold, use the current deviation rotation matrix as the target deviation rotation matrix.
[0115] This application also provides an electronic device and a computer-readable storage medium, both of which have the corresponding effects of the welding path planning method provided in the embodiments of this application. Please refer to... Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0116] An electronic device provided in this application includes a memory 201 and a processor 202. The memory 201 stores a computer program, and the processor 202 executes the computer program to implement the steps of the welding path planning method described in any of the above embodiments.
[0117] Please see Figure 4 Another electronic device provided in this application embodiment may further include: an input port 203 connected to the processor 202 for transmitting commands input from the outside to the processor 202; a display unit 204 connected to the processor 202 for displaying the processing results of the processor 202 to the outside; and a communication module 205 connected to the processor 202 for enabling communication between the electronic device and the outside. The display unit 204 may be a display panel, a laser scanning display, etc.; the communication method adopted by the communication module 205 includes, but is not limited to, Mobile High-Definition Link (MHL), Universal Serial Bus (USB), High-Definition Multimedia Interface (HDMI), wireless connection: Wireless Fidelity (WiFi), Bluetooth communication technology, Bluetooth Low Energy communication technology, and communication technology based on IEEE 802.11s.
[0118] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it performs the steps of the welding path planning method described in any of the above embodiments.
[0119] The computer-readable storage media involved in this application include random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs (compact disc read-only memory), or any other form of storage media known in the art.
[0120] This application provides a computer program product, including a computer program / instructions, which, when executed by a processor, perform the steps of the welding path planning method described in any of the above embodiments.
[0121] For descriptions of relevant parts in the welding path planning system, electronic device, and computer-readable storage medium provided in this application's embodiments, please refer to the detailed description of the corresponding parts in the welding path planning method provided in this application's embodiments; they will not be repeated here. Furthermore, parts of the technical solutions provided in this application that are consistent with the implementation principles of corresponding technical solutions in the prior art have not been described in detail to avoid excessive elaboration.
[0122] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0123] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A welding path planning method, characterized in that, include: Acquire the initial weld point set obtained after scanning the workpiece to be welded by the line laser sensor; The initial weld point set is fitted and interpolated using NURBS curves to obtain the actual weld point set. Through offline programming, a target weld point set with the same number of weld points as the actual weld point set is generated, and a target welding posture of the target weld point set is generated. Generate the target deviation rotation matrix between the actual weld point set and the target weld point set; Based on the target deviation rotation matrix and the target welding posture, the actual welding posture of the actual weld point set is generated; The actual weld point set and the actual welding posture are matched to generate a welding path for welding the workpiece to be welded.
2. The method according to claim 1, characterized in that, The step of fitting and interpolating the initial weld point set using NURBS curves to obtain the actual weld point set includes: Generate NURBS curve model; Based on the number of weld points in the initial weld point set, the model value points of the NURBS curve model are parameterized to obtain parameterized model value points. Based on the parameterized value points, generate node vectors; Based on the NURBS curve model and the parametric value points, generate the control point set of the NURBS curve model; Based on the NURBS curve model, the node vector, and the control point set, the NURBS curve result of the initial weld point set is generated; The NURBS curve results are interpolated to generate the actual weld point set.
3. The method according to claim 2, characterized in that, The step of generating the control point set of the NURBS curve model based on the NURBS curve model and the parameterized value points includes: Based on the NURBS curve model and the parameterized value points, a least squares model is generated; The least squares model is processed to generate a control point set for the NURBS curve model.
4. The method according to claim 2, characterized in that, The step of interpolating the NURBS curve results to generate the actual weld point set includes: The total length of the NURBS curve resulting from the calculation; Determine the initial interpolation arc length; The initial number of interpolation segments is generated based on the ratio of the total length of the curve to the initial interpolation arc length; The initial number of interpolation segments is rounded up to generate the target number of interpolation segments; Based on the total length of the curve and the number of target interpolation segments, the target interpolation arc length is generated; According to the target interpolation arc length, the node vector is interpolated for weld points to generate the actual weld point set.
5. The method according to claim 4, characterized in that, The step of generating the target deviation rotation matrix between the actual weld point set and the target weld point set includes: In the set of actual weld points, select the first and second actual weld points that meet the set distance conditions; In the set of target weld points, a first target weld point corresponding to the first actual weld point is determined, and a second target weld point corresponding to the second actual weld point is determined. Based on the first actual weld point, the second actual weld point, the first target weld point, and the second target weld point, generate an initial rotation matrix and an initial translation matrix; Based on the initial rotation matrix and the initial translation matrix, the target weld point set is transformed to obtain the transformed weld point set; The actual weld point set and the transformed weld point set are registered using the ICP algorithm to generate the target deviation rotation matrix.
6. The method according to claim 5, characterized in that, The step of generating an initial rotation matrix and an initial translation matrix based on the first actual weld point, the second actual weld point, the first target weld point, and the second target weld point includes: A first vector is generated based on the first actual weld point and the second actual weld point; A second vector is generated based on the first target weld point and the second target weld point; Generate an initial rotation matrix that makes the directions of the first and second vectors the same; Based on the initial rotation matrix, an initial translation matrix is generated.
7. The method according to claim 5, characterized in that, The step of registering the actual weld point set and the transformed weld point set using the ICP algorithm to generate the target deviation rotation matrix includes: Select the first transition weld point from the set of transition weld points; Determine the third actual weld point that is closest to the first transition weld point in the concentration of actual weld points; In the set of transition weld points, the set of nearest weld points to the first transition weld point is determined according to the distance condition; Determine whether the first converted weld point is the closest point of the third actual weld point on the nearest weld point set; If yes, then the first transition weld point is matched with the third actual weld point; otherwise, the first transition weld point and the third actual weld point are discarded. Based on the corresponding first transformed weld point and third actual weld point, generate the current deviation rotation matrix and generate the error function value of the current deviation rotation matrix; If the error function value is greater than a set threshold, then return to the step of selecting the first conversion weld point in the set of conversion weld points; If the error function value is less than or equal to a set threshold, the current deviation rotation matrix is used as the target deviation rotation matrix.
8. A welding path planning system, characterized in that, include: The initial weld seam point set acquisition module is used to acquire the initial weld seam point set obtained after the line laser sensor scans the workpiece to be welded. The fitting interpolation module is used to perform fitting interpolation on the initial weld point set using NURBS curves to obtain the actual weld point set. The offline programming module is used to generate a target weld point set with the same number of weld points as the actual weld point set through offline programming, and to generate the target welding posture of the target weld point set. A matrix generation module is used to generate a target deviation rotation matrix between the actual weld point set and the target weld point set; The attitude generation module is used to generate the actual welding attitude of the actual weld point set based on the target deviation rotation matrix and the target welding attitude; The path generation module is used to match the actual weld point set with the actual welding posture to generate a welding path for welding the workpiece to be welded.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the welding path planning method as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the welding path planning method as described in any one of claims 1 to 7.