Welding robot welding path determining method and device, welding robot and medium
Through the welding path sorting algorithm based on TSP and dynamic programming, the shortest path and posture adjustment of the welding robot are determined, and the welding efficiency and coherence problems under the traditional manual teaching method are solved, and an efficient and stable welding process is achieved.
Patent Information
- Application Number
- CN202510493531.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-07-01
AI Technical Summary
When facing complex welding tasks of multiple welds, it is difficult to find the global optimal solution, resulting in inconsistent welding processes, time-consuming and labor-consuming, and improper adjustment of welding posture affects efficiency and quality.
The welding path sorting algorithm based on TSP and dynamic programming is used to determine the arrangement and combination of multiple welding paths, find the shortest path, and adjust the welding posture through the movable joints of the welding robot to optimize the welding process.
The manual teaching steps are reduced, the welding efficiency and process stability are improved, the global optimal solution is found, and the operation efficiency of the welding robot is optimized.
Smart Images

Figure CN120228475A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of welding robots, and in particular to a method for determining a welding path of a welding robot, a device for determining a welding path of a welding robot, a welding robot, and a computer-readable storage medium. Background Art
[0002] With the rapid development of industrial vision hardware, computer vision algorithms, and industrial robots, vision and its controller act as the eyes and brain of the robot, enabling the robot to play a more important role in industrial automated production lines.
[0003] Through traditional image processing algorithms and deep learning algorithms, the vision controller can perform real-time analysis and interpretation of the acquired image information. This includes functions such as object recognition, position localization, dimension measurement, and environmental map construction. Finally, it provides real-time feedback and intelligent decision-making capabilities for the robot. The robot, combined with vision, robot kinematics, and path planning, has a large application scenario in the industrial production of welded workpieces with multiple welds.
[0004] In some industrial production scenarios, the workpieces to be welded often have multiple weld tracks. These welds not only have a large number but also a large span, and their placed poses are relatively random. Facing such complex situations, it becomes extremely difficult and complicated to plan the weld tracks through the traditional method of manual teaching:
[0005] First, due to the large number and uneven distribution of welds, it is extremely laborious and time-consuming to accurately record the welding postures and welding sequences of each weld one by one through the teaching method.
[0006] Second, in the actual operation process, due to the limited movement range of the robot, welds at some special positions or angles may not be reachable, resulting in interruptions in the welding process and affecting the coherence and integrity of the welding operation. Summary of the Invention
[0007] In view of the above problems, a method for determining a welding path of a welding robot, a device for determining a welding path of a welding robot, a welding robot, and a computer-readable storage medium are provided to overcome or at least partially solve the above problems, including:
[0008] A method for determining a welding path of a welding robot, the welding robot including a plurality of movable joints, the method including:
[0009] Determine multiple welding paths and determine multiple permutation and combination paths composed of the multiple welding paths;
[0010] Determine a first shortest path from the multiple permutation and combination paths;
[0011] Determine the initial poses of multiple welding points on the first shortest path, and determine the target welding path for the welding robot according to the initial poses of the welding points and the adjustable ranges of the movable joints.
[0012] Optionally, a welding path includes a welding start point and a welding end point; the determination of various permutation and combination paths composed of multiple welding paths includes:
[0013] Determine the first welding path corresponding to the welding path with the welding start point as the starting welding point, and the second welding path with the welding end point as the starting welding point;
[0014] Generate various permutation and combination paths according to the first welding path and the second welding path corresponding to each welding path.
[0015] Optionally, the determination of the first shortest path from various permutation and combination paths includes:
[0016] Generate an adjacency matrix for the permutation and combination paths, and establish a dynamic programming matrix according to the adjacency matrix;
[0017] Determine the first shortest path according to the dynamic programming matrix.
[0018] Optionally, the determination of the first shortest path according to the dynamic programming matrix includes:
[0019] Determine the second shortest path corresponding to each dynamic programming matrix according to the dynamic programming matrix corresponding to each permutation and combination path;
[0020] Determine the first shortest path from multiple second shortest paths.
[0021] Optionally, the determination of the target welding path for the welding robot according to the initial poses of the welding points and the adjustable ranges of the movable joints includes:
[0022] Adjust the initial pose of the welding point to obtain the first weld pose of the welding point;
[0023] Adjust the first weld pose according to the adjustable ranges of the movable joints to obtain the target welding path.
[0024] Optionally, the first weld pose includes the first X-direction pose, the first Y-direction pose, and the first Z-direction pose;
[0025] The adjustment of the initial pose of the welding point to obtain the first weld pose of the welding point includes:
[0026] Determine the initial pose of the initial welding point, where the initial pose includes an initial X-direction pose, an initial Y-direction pose, and an initial Z-direction pose;
[0027] According to the initial X-direction pose, determine the first X-direction pose of the second welding point; and, according to the initial Z-direction pose, determine the first Z-direction pose of the second welding point; and according to the first X-direction pose and the first Z-direction pose, determine the first Y-direction pose of the second welding point;
[0028] According to the first X-direction pose of the Mth welding point, determine the first X-direction pose of the Nth welding point; and, according to the first Z-direction pose of the Mth welding point, determine the first Z-direction pose of the Nth welding point; and, according to the first X-direction pose and the first Z-direction pose of the Nth welding point, determine the first Y-direction pose of the Nth welding point; where N = M + 1, M > 2, and M and N are positive integers.
[0029] Optionally, the first X-direction pose is the direction pointing to the weld corresponding to the welding point;
[0030] The first Z-direction pose is the normal direction pointing to the normal of the weld corresponding to the welding point.
[0031] Optionally, the adjusting the first weld pose according to the adjustable range of each movable joint to obtain the target welding path includes:
[0032] Determine a rotation matrix according to the adjustable range of the movable joint and a preset adjustment step size;
[0033] Determine a second weld pose according to the rotation matrix and the first weld pose;
[0034] Determine the target welding path according to the second weld pose.
[0035] Optionally, the method further includes:
[0036] Control the welding robot according to the target welding path.
[0037] An embodiment of the present invention further provides a device for determining a welding path of a welding robot. The welding robot includes a plurality of movable joints, and the device includes:
[0038] An arrangement module, configured to determine multiple welding paths and determine multiple arrangement combination paths composed of the multiple welding paths;
[0039] A first determination module, configured to determine a first shortest path from the multiple arrangement combination paths;
[0040] A second determination module, configured to determine initial poses of multiple welding points on the first shortest path, and determine a target welding path for the welding robot according to the initial poses of the welding points and the adjustable ranges of the movable joints.
[0041] Optionally, a welding path includes a welding start point and a welding end point; the arrangement module is configured to determine a first welding path corresponding to the welding path with the welding start point as the starting welding point, and a second welding path with the welding end point as the starting welding point; and generate multiple permutation and combination paths according to the first welding path and the second welding path corresponding to each welding path.
[0042] Optionally, the first determination module is configured to generate an adjacency matrix for the permutation and combination paths, and establish a dynamic programming matrix according to the adjacency matrix; and determine the first shortest path according to the dynamic programming matrix.
[0043] Optionally, the first determination module is configured to determine a second shortest path corresponding to each dynamic programming matrix according to the dynamic programming matrices corresponding to the permutation and combination paths; and determine the first shortest path from multiple second shortest paths.
[0044] Optionally, the second determination module is configured to adjust the initial poses of the welding points to obtain first weld poses of the welding points; and adjust the first weld poses according to the adjustable ranges of the movable joints to obtain the target welding path.
[0045] Optionally, the first weld pose includes a first X-axis pose, a first Y-axis pose, and a first Z-axis pose;
[0046] The second determination module is configured to determine initial poses of the initial welding points, where the initial poses include an initial X-axis pose, an initial Y-axis pose, and an initial Z-axis pose; determine a first X-axis pose of the second welding point according to the initial X-axis pose; and determine a first Z-axis pose of the second welding point according to the initial Z-axis pose; and determine a first Y-axis pose of the second welding point according to the first X-axis pose and the first Z-axis pose; determine a first X-axis pose of the Nth welding point according to the first X-axis pose of the Mth welding point; and determine a first Z-axis pose of the Nth welding point according to the first Z-axis pose of the Mth welding point; and determine a first Y-axis pose of the Nth welding point according to the first X-axis pose and the first Z-axis pose of the Nth welding point; where N = M + 1, M > 2, and M and N are positive integers.
[0047] Optionally, the first X-axis pose is the direction pointing to the weld corresponding to the welding point; the first Z-axis pose is the normal direction pointing to the normal of the weld corresponding to the welding point.
[0048] Optionally, the second determination module is configured to determine a rotation matrix according to the adjustable range of the movable joint and a preset adjustment step; determine a second weld pose according to the rotation matrix and the first weld pose; and determine the target welding path according to the second weld pose.
[0049] Optionally, the apparatus further comprises:
[0050] a control module, configured to control the welding robot according to the target welding path.
[0051] An embodiment of the present invention further provides a welding robot, including a processor, a memory, and a computer program stored on the memory and capable of running on the processor. When the computer program is executed by the processor, the welding robot welding path determination method as described above is implemented.
[0052] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the welding robot welding path determination method as described above is implemented.
[0053] The embodiment of the present invention has the following advantages:
[0054] In the embodiment of the present invention, multiple welding paths are determined, and multiple permutation and combination paths composed of the multiple welding paths are determined; from the multiple permutation and combination paths, a first shortest path is determined; initial poses of multiple welding points on the first shortest path are determined, and according to the initial poses of the respective welding points and the adjustable ranges of the respective movable joints, a target welding path for the welding robot is determined. The embodiment of the present invention proposes a welding path sorting algorithm based on TSP and dynamic programming, finds the global optimal solution, reduces the manual teaching steps, and improves the robot operation efficiency. In addition, the embodiment of the present invention also proposes automatic optimization of the welding posture. Based on the initial pose of the welding robot corresponding to the welding point and the adjustable ranges of the respective movable joints of the welding robot, the welding posture of the welding robot at each welding point is automatically adjusted, improving the welding efficiency and making the welding process stable. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the present invention, the drawings required for the description of the present invention will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0056] Figure 1 It is a flowchart of the steps of a method for determining the welding path of a welding robot according to an embodiment of the present invention;
[0057] Figure 2 It is a flowchart of the steps of another method for determining the welding path of a welding robot according to an embodiment of the present invention;
[0058] Figure 3 It is a flowchart of the steps of yet another method for determining the welding path of a welding robot according to an embodiment of the present invention;
[0059] Figure 4 It is a flowchart of the steps of still another method for determining the welding path of a welding robot according to an embodiment of the present invention;
[0060] Figure 5 It is a flowchart of the steps of yet another method for determining the welding path of a welding robot according to an embodiment of the present invention;
[0061] Figure 6a It is a flowchart of the steps of a method for determining the welding path according to an embodiment of the present invention;
[0062] Figure 6b It is a schematic diagram of the principle of planning multiple welding paths according to an embodiment of the present invention;
[0063] Figure 6c It is a schematic diagram of an initial welding pose according to an embodiment of the present invention;
[0064] Figure 6d It is a schematic diagram of rough adjustment and optimization of a welding pose according to an embodiment of the present invention;
[0065] Figure 6e It is a flowchart of fine adjustment and optimization of a welding pose according to an embodiment of the present invention;
[0066] Figure 6f It is a schematic diagram of fine adjustment and optimization of a welding pose according to an embodiment of the present invention;
[0067] Figure 7 It is a schematic diagram of the structure of a device for determining the welding path of a welding robot according to an embodiment of the present invention. Detailed implementation manners
[0068] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation manners. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0069] In the teaching-based method, when presetting the welding sequences of different weld seams, operators usually set the welding sequences based on experience and intuition. However, it is very difficult to consider all possible path combinations in this manual setting method, and it is often impossible to find the global optimal solution. Moreover, the changes in the workpiece pose and the changes in the welding start and end points are ignored. These changes may cause the originally set path distance to no longer be optimal.
[0070] In view of this, the embodiment of the present invention proposes a welding path sorting algorithm based on TSP (Traveling Salesman Problem) and dynamic programming to find the global optimal solution, reduce the manual teaching steps, and improve the operation efficiency of the robot.
[0071] In addition, in the teaching-based method, when presetting the welding postures on the welding path, the postures of the welding start and end points are not considered: the teaching method usually only focuses on the path of the weld seam and ignores the postures of the welding start and end points. If the initial posture setting is not ideal enough, it will lead to large posture adjustments during the welding process, which increases the rotation angle of the robot joints, thereby increasing the movement time and energy consumption, reducing the welding efficiency, and may also cause unstable welding quality and affect the overall welding effect.
[0072] In view of this, the embodiment of the present invention proposes automatic optimization of the welding posture. Based on the initial posture of the welding robot corresponding to the welding point and the adjustable range of each movable joint of the welding robot, the welding posture of the welding robot at each welding point is automatically adjusted to improve the welding efficiency and make the welding process stable.
[0073] Exemplarily, reference may be made to Figure 1 , which shows the step flowchart of a method for determining the welding path of a welding robot according to an embodiment of the present invention.
[0074] As Figure 1 shown, the method for determining the welding path of the welding robot may include the following steps:
[0075] Step 101, determine multiple welding paths and determine various permutation and combination paths composed of the multiple welding paths.
[0076] In practical applications, the welding robot may be provided with multiple movable joints; when performing a welding task, the controller of the welding robot can control the rotation of each movable joint so that the welding torch of the welding robot reaches the welding area to weld the object to be welded.
[0077] In an embodiment of the present invention, multiple welding paths may be determined first; each welding path may include a welding start point and a welding end point; in practical applications, the welding start point may be the point where the welding of the welding path starts or the point where the welding of the welding path ends; correspondingly, the welding end point may be the point where the welding of the welding path ends or the point where the welding of the welding path starts, and the embodiment of the present invention does not limit this.
[0078] After determining multiple welding paths, various permutation and combination paths composed of multiple welding paths may be determined based on the welding sequence of the welding start point and the welding end point in the welding path.
[0079] Exemplarily, assuming that the welding paths include the following three: from A to B, from C to D, and from E to F, then the following eight permutation and combination paths may be obtained from these welding paths:
[0080] From A to B, from C to D, from E to F; from A to B, from D to C, from E to F; from A to B, from C to D, from F to E; from A to B, from D to C, from F to E; from B to A, from C to D, from E to F; from B to A, from D to C, from E to F; from B to A, from C to D, from F to E; from B to A, from D to C, from F to E.
[0081] Step 102: Determine the first shortest path from various permutation and combination paths.
[0082] After determining various permutation and combination paths, the path with the shortest welding path in each permutation and combination path may be determined based on these various permutation and combination paths; then, from the paths with the shortest welding paths in various permutation and combination paths, the shortest path, that is, the first shortest welding path, may be determined.
[0083] Step 103: Determine the initial poses of multiple welding points on the first shortest path, and determine the target welding path for the welding robot according to the initial poses of each welding point and the adjustable range of each movable joint.
[0084] After determining the first shortest path, a preset weld seam recognition program may generate the initial poses of multiple welding points on the first shortest path, and form an initial pose sequence H0 = {h0, h 01 , h 02 ,..., h 0n} from these initial poses of multiple welding points; where h0 is the initial pose of the welding torch at the starting point, which is a fixed pose and cannot be changed; h 0n is the initial pose corresponding to the nth welding point. The Z-axis direction of the initial pose is the weld seam normal vector, that is, the welding orientation of the welding torch, which may be generated by a preset weld seam recognition algorithm and is generally the angle bisector of the two welded planes.
[0085] The X-axis of the initial pose points to the direction of the current weld seam, and the Y-axis of the initial pose is determined by the right-hand rule Y = X × Z.
[0086] After determining the initial poses of multiple welding points on the first shortest path, the target welding path for the welding robot can be determined based on the initial poses of each welding point and the adjustable ranges of each movable joint; wherein, the adjustable ranges of the movable joints can be preset.
[0087] In the embodiments of the present invention, multiple welding paths are determined, and various permutation and combination paths composed of the multiple welding paths are determined; from the various permutation and combination paths, the first shortest path is determined; the initial poses of multiple welding points on the first shortest path are determined, and according to the initial poses of each welding point and the adjustable ranges of each movable joint, the target welding path for the welding robot is determined. The embodiments of the present invention propose a welding path sorting algorithm based on TSP and dynamic programming, find the global optimal solution, reduce the manual teaching steps, and improve the robot operation efficiency. In addition, the embodiments of the present invention also propose automatic optimization of the welding posture. Based on the initial pose of the welding robot corresponding to the welding point and the adjustable ranges of each movable joint of the welding robot, the welding posture of the welding robot at each welding point is automatically adjusted, improving the welding efficiency and making the welding process stable.
[0088] Refer to Figure 2 , which shows the flowchart of steps of another method for determining the welding path of a welding robot according to an embodiment of the present invention, and may include the following steps:
[0089] Step 201: Determine multiple welding paths.
[0090] In the embodiments of the present invention, multiple welding paths can be determined first; each welding path may include a welding start point and a welding end point. In practical applications, the welding start point can be used as the point where the welding of this welding path starts, or as the point where the welding of this welding path ends; correspondingly, the welding end point can be used as the point where the welding of this welding path ends, or as the point where the welding of this welding path starts, and the embodiments of the present invention do not limit this.
[0091] Step 202: A welding path includes a welding start point and a welding end point; determine the first welding path corresponding to the welding path with the welding start point as the starting welding point, and the second welding path with the welding end point as the starting welding point.
[0092] After determining multiple welding paths, various permutation and combination paths composed of the multiple welding paths can be determined based on the welding sequence of the welding start point and the welding end point in the welding path.
[0093] Specifically, for any welding path, the starting point of the welding path can be used as the starting welding point and the ending point of the welding path can be used as the ending welding point to obtain the first welding path; in addition, the ending point of the welding path can be used as the starting welding point and the starting point of the welding path can be used as the ending point to obtain the second welding path.
[0094] For each welding path, the first welding path and the second welding path can be obtained respectively.
[0095] Step 203: Generate multiple permutation and combination paths according to the first welding path and the second welding path corresponding to each welding path.
[0096] After determining the first welding path and the second welding path corresponding to each welding path, multiple permutation and combination paths can be generated based on the first welding path and the second welding path corresponding to each welding path.
[0097] Exemplarily, assume that the welding path includes: from A to B; where point A is the starting point of welding and point B is the ending point of welding. Then, from A to B can be the first welding path, and from B to A can be the second welding path. The embodiments of the present invention are not limited thereto.
[0098] Step 204: Determine the first shortest path from multiple permutation and combination paths.
[0099] After determining each permutation and combination path, based on these multiple permutation and combination paths, determine the path with the shortest welding path among each permutation and combination path.
[0100] Then, determine the shortest path from the paths with the shortest welding path among various permutation and combination paths, that is, the first shortest welding path.
[0101] Step 205: Determine the initial poses of multiple welding points on the first shortest path, and determine the target welding path for the welding robot according to the initial poses of each welding point and the adjustable range of each movable joint.
[0102] After determining the first shortest path, a preset weld seam recognition program can generate the initial poses of multiple welding points on the first shortest path, and form an initial pose sequence H0 = {h0, h 01 , h 02 ,..., h 0n} with these initial poses of multiple welding points.
[0103] After determining the initial poses of multiple welding points on the first shortest path, based on the initial poses of each welding point and the adjustable range of each movable joint, the target welding path for the welding robot can be determined; where the adjustable range of the movable joint can be preset.
[0104] In an embodiment of the present invention, multiple welding paths are determined; one welding path includes a welding start point and a welding end point; a first welding path corresponding to the welding path with the welding start point as the starting welding point and a second welding path with the welding end point as the starting welding point are determined; according to the first welding path and the second welding path corresponding to each welding path, multiple permutation and combination paths are generated; from the multiple permutation and combination paths, a first shortest path is determined; the initial poses of multiple welding points on the first shortest path are determined, and according to the initial poses of each welding point and the adjustable range of each movable joint, a target welding path for the welding robot is determined. An embodiment of the present invention proposes a welding path sorting algorithm based on TSP and dynamic programming, which finds the global optimal solution, reduces the manual teaching steps, and improves the operation efficiency of the robot. In addition, an embodiment of the present invention also proposes automatic optimization of the welding posture. Based on the initial pose of the welding robot corresponding to the welding point and the adjustable range of each movable joint of the welding robot, the welding posture of the welding robot at each welding point is automatically adjusted, improving the welding efficiency and making the welding process stable.
[0105] Referring to Figure 3 , a flowchart of steps of another method for determining the welding path of a welding robot according to an embodiment of the present invention is shown, which may include the following steps:
[0106] Step 301, determine multiple welding paths.
[0107] In an embodiment of the present invention, multiple welding paths may be determined first; each welding path may include a welding start point and a welding end point. In practical applications, the welding start point may be used as the point where welding starts for this welding path or as the point where welding ends for this welding path; correspondingly, the welding end point may be used as the point where welding ends for this welding path or as the point where welding starts for this welding path. The embodiment of the present invention does not limit this.
[0108] Step 302, determine a first welding path corresponding to the welding path with the welding start point as the starting welding point and a second welding path with the welding end point as the starting welding point.
[0109] After determining multiple welding paths, multiple permutation and combination paths composed of multiple welding paths may be determined based on the welding sequence of the welding start point and the welding end point in the welding path.
[0110] Specifically, for any welding path, a first welding path may be obtained with the welding start point of this welding path as the starting welding point and the welding end point as the ending welding point; in addition, a second welding path may also be obtained with the welding end point of this welding path as the starting welding point and the welding start point as the ending welding point.
[0111] For each welding path, the first welding path and the second welding path can be obtained separately.
[0112] Step 303: Generate multiple permutation and combination paths according to the first welding path and the second welding path corresponding to each welding path.
[0113] After determining the first welding path and the second welding path corresponding to each welding path, multiple permutation and combination paths can be generated based on the first welding path and the second welding path corresponding to each welding path.
[0114] Step 304: Generate an adjacency matrix for the permutation and combination paths, and establish a dynamic programming matrix according to the adjacency matrix.
[0115] In some feasible embodiments, after determining various permutation and combination paths, an adjacency matrix can be generated for each permutation and combination path respectively. Among them, the adjacency matrix can be a two-dimensional square matrix, which is used to represent the connection relationship between the welding start point and the welding end point among all welding paths. The rows and columns of the matrix represent the welding start point and the welding end point in the welding path.
[0116] After obtaining the adjacency matrix, a dynamic programming matrix can be established based on the adjacency matrix.
[0117] Step 305: Determine the first shortest path according to the dynamic programming matrix.
[0118] After obtaining the dynamic programming matrix corresponding to each permutation and combination path, the dynamic programming matrix can be solved to determine the shortest welding path corresponding to each permutation and combination path.
[0119] Then, the first shortest path can be determined from all the shortest welding paths, that is, the shortest welding path among all the shortest welding paths.
[0120] Step 306: Determine the initial poses of multiple welding points on the first shortest path, and determine the target welding path for the welding robot according to the initial poses of each welding point and the adjustable range of each movable joint.
[0121] After determining the first shortest path, a preset weld seam recognition program can generate the initial poses of multiple welding points on the first shortest path, and form an initial pose sequence H0 = {h0, h 01 , h 02 ,..., h 0n} with these initial poses of multiple welding points.
[0122] After determining the initial poses of multiple welding points on the first shortest path, the target welding path for the welding robot can be determined based on the initial poses of the welding points and the adjustable ranges of the movable joints; wherein, the adjustable ranges of the movable joints can be preset in advance.
[0123] In the embodiments of the present invention, multiple welding paths are determined; the first welding path starting from the welding start point and the second welding path starting from the welding end point corresponding to the welding path are determined; according to the first welding path and the second welding path corresponding to each welding path, multiple permutation and combination paths are generated; for the permutation and combination paths, an adjacency matrix is generated, and a dynamic programming matrix is established according to the adjacency matrix; according to the dynamic programming matrix, the first shortest path is determined; the initial poses of multiple welding points on the first shortest path are determined, and the target welding path for the welding robot is determined based on the initial poses of the welding points and the adjustable ranges of the movable joints. The embodiments of the present invention propose a welding path sorting algorithm based on TSP and dynamic programming, find the global optimal solution, reduce the manual teaching steps, and improve the operation efficiency of the robot. In addition, the embodiments of the present invention also propose automatic optimization of the welding posture. Based on the initial pose of the welding robot corresponding to the welding point and the adjustable ranges of the movable joints of the welding robot, the welding posture of the welding robot at each welding point is automatically adjusted, improving the welding efficiency and making the welding process stable.
[0124] Refer to Figure 4 , which shows the flowchart of the steps of another method for determining the welding path of the welding robot according to the embodiments of the present invention, and may include the following steps:
[0125] Step 401, determine multiple welding paths.
[0126] In some feasible embodiments, multiple welding paths can be determined first; each welding path can include a welding start point and a welding end point. In practical applications, the welding start point can be used as the point where the welding of the welding path starts or the point where the welding of the welding path ends; correspondingly, the welding end point can be used as the point where the welding of the welding path ends or the point where the welding of the welding path starts, and the embodiments of the present invention do not limit this.
[0127] Step 402, determine the first welding path starting from the welding start point and the second welding path starting from the welding end point corresponding to the welding path.
[0128] After determining multiple welding paths, multiple permutation and combination paths composed of multiple welding paths can be determined based on the welding order of the welding start point and the welding end point in the welding path.
[0129] Specifically, for any welding path, the starting point of the welding path can be used as the starting welding point and the ending point of the welding path can be used as the ending welding point to obtain the first welding path. Additionally, the ending point of the welding path can be used as the starting welding point and the starting point of the welding path can be used as the ending point to obtain the second welding path.
[0130] For each welding path, the first welding path and the second welding path can be obtained respectively.
[0131] Step 403: Generate multiple permutation and combination paths according to the first welding path and the second welding path corresponding to each welding path.
[0132] After determining the first welding path and the second welding path corresponding to each welding path, multiple permutation and combination paths can be generated based on the first welding path and the second welding path corresponding to each welding path.
[0133] Step 404: Generate an adjacency matrix for the permutation and combination paths, and establish a dynamic programming matrix based on the adjacency matrix.
[0134] In some feasible embodiments, after determining various permutation and combination paths, an adjacency matrix can be generated for each permutation and combination path respectively. Among them, the adjacency matrix can be a two-dimensional square matrix used to represent the connection relationship between the starting point and the ending point of all welding paths. The rows and columns of the matrix represent the starting point and the ending point of the welding paths.
[0135] After obtaining the adjacency matrix, a dynamic programming matrix can be established based on the adjacency matrix.
[0136] Step 405: Determine the second shortest path corresponding to each dynamic programming matrix according to the dynamic programming matrix corresponding to each permutation and combination path.
[0137] After obtaining the dynamic programming matrix corresponding to each permutation and combination path, the dynamic programming matrix can be solved to determine the second shortest path corresponding to each permutation and combination path.
[0138] Step 406: Determine the first shortest path from multiple second shortest paths.
[0139] Then, the first shortest path can be determined from all the second shortest paths, that is, the shortest welding path among all the second shortest paths.
[0140] Step 407: Determine the initial poses of multiple welding points on the first shortest path, and determine the target welding path for the welding robot according to the initial poses of each welding point and the adjustable range of each movable joint.
[0141] After determining the first shortest path, an initial pose of multiple welding points on the first shortest path can be generated by a preset weld recognition program, and the initial poses of these multiple welding points are combined into an initial pose sequence H0 = {h0, h 01 , h 02 ,..., h 0n}.
[0142] After determining the initial poses of multiple welding points on the first shortest path, a target welding path for the welding robot can be determined based on the initial poses of the welding points and the adjustable ranges of the movable joints; wherein, the adjustable ranges of the movable joints can be preset.
[0143] In the embodiments of the present invention, multiple welding paths are determined; a first welding path starting from the welding start point and a second welding path starting from the welding end point corresponding to the welding path are determined; various permutation and combination paths are generated according to the first welding path and the second welding path corresponding to each welding path; for the permutation and combination paths, an adjacency matrix is generated, and a dynamic programming matrix is established according to the adjacency matrix; according to the dynamic programming matrices corresponding to the permutation and combination paths, the second shortest path corresponding to each dynamic programming matrix is determined; from multiple second shortest paths, the first shortest path is determined; the initial poses of multiple welding points on the first shortest path are determined, and a target welding path for the welding robot is determined according to the initial poses of the welding points and the adjustable ranges of the movable joints. The embodiments of the present invention propose a welding path sorting algorithm based on TSP and dynamic programming, find the global optimal solution, reduce the manual teaching steps, and improve the robot operation efficiency. In addition, the embodiments of the present invention also propose automatic welding posture optimization, and automatically adjust the welding postures of the welding robot at each welding point based on the initial poses of the welding robot corresponding to the welding points and the adjustable ranges of the movable joints of the welding robot, improve the welding efficiency and make the welding process stable.
[0144] Referring to Figure 5 , a flowchart of steps of another method for determining a welding path of a welding robot according to an embodiment of the present invention is shown, which may include the following steps:
[0145] Step 501, determine multiple welding paths.
[0146] In some feasible embodiments, multiple welding paths can be determined first; each welding path may include a welding start point and a welding end point. In practical applications, the welding start point can be used as the point where the welding of the welding path starts or the point where the welding of the welding path ends; correspondingly, the welding end point can be used as the point where the welding of the welding path ends or the point where the welding of the welding path starts, and the embodiments of the present invention do not limit this.
[0147] Step 502: Determine the first welding path with the welding start point as the starting welding point and the second welding path with the welding end point as the starting welding point corresponding to the welding path.
[0148] After determining multiple welding paths, various permutation and combination paths composed of multiple welding paths can be determined based on the welding order of the welding start point and the welding end point in the welding paths.
[0149] Specifically, for any welding path, the first welding path can be obtained with the welding start point of this welding path as the starting welding point and the welding end point as the ending welding point; in addition, the second welding path can be obtained with the welding end point of this welding path as the starting welding point and the welding start point as the ending welding point.
[0150] For each welding path, the first welding path and the second welding path can be obtained respectively.
[0151] Step 503: Generate various permutation and combination paths according to the first welding path and the second welding path corresponding to each welding path.
[0152] After determining the first welding path and the second welding path corresponding to each welding path, various permutation and combination paths can be combined and generated based on the first welding path and the second welding path corresponding to each welding path.
[0153] Step 504: Generate an adjacency matrix for the permutation and combination paths, and establish a dynamic programming matrix according to the adjacency matrix.
[0154] In some feasible embodiments, after determining various permutation and combination paths, an adjacency matrix can be generated for each permutation and combination path respectively. Among them, the adjacency matrix can be a two-dimensional square matrix used to represent the connection relationship between the welding start point and the welding end point in all welding paths. The rows and columns of the matrix represent the welding start point and the welding end point in the welding paths.
[0155] After obtaining the adjacency matrix, a dynamic programming matrix can be established based on the adjacency matrix.
[0156] Step 505: Determine the second shortest path corresponding to each dynamic programming matrix according to the dynamic programming matrix corresponding to each permutation and combination path.
[0157] After obtaining the dynamic programming matrix corresponding to each permutation and combination path, the dynamic programming matrix can be solved to determine the second shortest path corresponding to each permutation and combination path.
[0158] Step 506: Determine the first shortest path from multiple second shortest paths.
[0159] Then, the first shortest path can be determined from all the second shortest paths, that is, among all the second shortest paths, the shortest welding path.
[0160] Step 507: Determine the initial poses of multiple welding points on the first shortest path.
[0161] After determining the first shortest path, the initial poses of multiple welding points on the first shortest path can be generated by a preset weld seam recognition program, and the initial poses of these multiple welding points are formed into an initial pose sequence H0 = {h0, h 01 , h 02 ,..., h 0n}.
[0162] Step 508: Adjust the initial poses of the welding points to obtain the first weld seam poses of the welding points.
[0163] After determining the initial poses of multiple welding points on the first shortest path, the initial poses of each welding point can be adjusted for the first time to obtain the first weld seam poses of the welding points.
[0164] In an embodiment of the present invention, the first weld seam pose includes a first X - direction pose, a first Y - direction pose, and a first Z - direction pose; wherein, the first X - direction pose is the direction pointing to the weld seam corresponding to the welding point; the first Z - direction pose is the normal direction pointing to the normal of the weld seam corresponding to the welding point. Step 508 can be implemented through the following sub - steps:
[0165] Sub - step 11: Determine the initial pose of the initial welding point, and the initial pose includes an initial X - direction pose, an initial Y - direction pose, and an initial Z - direction pose.
[0166] In some feasible embodiments, the initial pose of the initial welding point can be determined first, that is, h0. h0 is the pose of the welding torch at the starting point, which can include an initial X - direction pose, an initial Y - direction pose, and an initial Z - direction pose.
[0167] Sub - step 12: Determine the first X - direction pose of the second welding point according to the initial X - direction pose; and, determine the first Z - direction pose of the second welding point according to the initial Z - direction pose; and determine the first Y - direction pose of the second welding point according to the first X - direction pose and the first Z - direction pose.
[0168] Then, the first X - direction pose of the second welding point can be determined according to the initial X - direction pose; and, the first Z - direction pose of the second welding point can be determined according to the initial Z - direction pose to reduce the pose adjustment of the welding torch.
[0169] After determining the first X - direction pose and the first Z - direction pose, the first Y - direction pose of the second welding point can be determined according to the first X - direction pose and the first Z - direction pose. That is, the first Y - direction pose = the first X - direction pose × the first Z - direction pose.
[0170] Sub-step 13: Determine the first X-axis pose of the Nth welding point based on the first X-axis pose of the Mth welding point; and, determine the first Z-axis pose of the Nth welding point based on the first Z-axis pose of the Mth welding point; and, determine the first Y-axis pose of the Nth welding point based on the first X-axis pose and the first Z-axis pose of the Nth welding point; where N = M + 1, M > 2, and M and N are positive integers.
[0171] For the Nth welding point, the first X-axis pose of the Nth welding point can be determined according to the first X-axis pose of the previous welding point (i.e., the Mth welding point).
[0172] In addition, the first Z-axis pose of the Nth welding point can also be determined according to the first Z-axis pose of the Mth welding point.
[0173] After determining the first X-axis pose and the first Z-axis pose of the Nth welding point, the first Y-axis pose of the Nth welding point can be calculated according to the first X-axis pose and the first Z-axis pose of the Nth welding point.
[0174] Step 509: Adjust the first weld pose according to the adjustable range of each movable joint to obtain the target welding path.
[0175] Then, the first weld pose can be adjusted a second time according to the adjustable range of each movable joint, so as to obtain the target welding path.
[0176] In an embodiment of the present invention, step 509 can be implemented through the following sub-steps:
[0177] Sub-step 21: Determine the rotation matrix according to the adjustable range of the movable joint and the preset adjustment step size.
[0178] In some feasible embodiments, a second adjustment can also be performed in combination with the adjustable range of the movable joint. Specifically, the rotation matrix can be determined according to the adjustable range of the movable joint and the preset adjustment step size.
[0179] Sub-step 22: Determine the second weld pose according to the rotation matrix and the first weld pose.
[0180] Then, the second weld pose can be determined according to the rotation matrix and the first weld pose.
[0181] Sub-step 23: Determine the target welding path according to the second weld pose.
[0182] After determining the second weld poses of each welding point, the target welding path for the welding robot can be obtained; the target welding path can include the second weld poses of each weld point.
[0183] Step 510: Control the welding robot according to the target welding path.
[0184] After determining the target welding path, the various movable joints of the welding robot can be controlled based on this target welding path to complete the welding task.
[0185] Exemplarily, as Figure 6a shown, the welding path determination method of the welding robot can be divided into two parts: welding path sorting and welding posture optimization:
[0186] Welding path sorting: First, input multiple welding paths, the welding start points and welding end points of each welding path; then, based on sorting, TSP, and dynamic programming, obtain the first shortest path. Specifically:
[0187] Based on the welding path sorting algorithm of TSP and dynamic programming, abstract the sorting problem as TSP, and consider the welding sequence of each weld seam on the basis of TSP.
[0188] Taking 3 weld seams as an example, its modeling is as Figure 6b shown, and use the dynamic programming algorithm to solve it. As Figure 6b shown, it includes welding path 1, welding path 2, and welding path 3; each welding path includes a welding start point and a welding end point. The welding task refers to the task of starting from the start / end point, completing welding path 1, welding path 2, and welding path 3, and finally returning to the start / end point.
[0189] The welding path sorting problem aims to find a sorting method where the robot starts from the start point, reaches each welding path, and only passes through once, and finally returns to the end point. TSP is a classic combinatorial optimization problem, and its goal is to find the shortest path that starts from a certain city, passes through each city exactly once, and finally returns to the starting city given a set of cities and the distances between the cities. TSP is similar to the welding path sorting problem, but there are differences. The welding sequence of each welding path can be different, and the welding start and end points are different. The following is the solution process for welding path sorting:
[0190] ① Traverse the arrival and departure states of each welding path
[0191] Suppose there are N welding paths, then the total number of last-in-first-out orders of all welding paths is M = 2 N types of permutations and combinations, which are represented by the binary code s. If there are three welding paths, then s = 0Babc. If a is 1, it means that welding path 3 needs to be reversed. If it is 0, it is the same as the original input path.
[0192] ② Establish the adjacency matrix g
[0193] In ①, after determining whether the welding path is in an inverted state, an adjacency matrix g is established. The size of the matrix is N*N, and g[i][j] represents the shortest distance from point i to j, where g[i][j] ≠ g[j][i]; the adjacency matrix is shown as follows:
[0194]
[0195] where G ij = g[i][j].
[0196] ③ Establish a dynamic programming matrix, that is, the dp matrix
[0197] The size of the dp matrix is N*M, and dp[i][j] represents the minimum sum of moving distances from the starting point i of the path to finish the set j. The set j is represented using state compression. For example, if j = 6, in binary it is 0B110, that is, the 2nd and 3rd welding paths have not been passed yet, and the 1st welding path has been passed. The dp matrix is initialized as follows:
[0198] dp[i][0] = g[i][0] (2)
[0199] ④ Solve the dp matrix
[0200] The solution of dp[i][j] is divided into two cases: if j = 0, it means that all welding paths have been traversed, then at this time dp[i][j] = g[i][0];
[0201] If j ≠ 0, it means that there are still welding paths not finished. The problem is transformed into solving sub-problems. Traverse all sub-paths of j that do not contain k, and find the smallest dp[k][j^(1<<(k - 1))]+g[i][k].
[0202] In summary, the state transition equation of the dynamic programming of this problem is shown as follows:
[0203]
[0204] ⑤ Find the first shortest path
[0205] The minimum path value can be known by querying the dp matrix, which is dp[0][M - 1]. According to the dynamic programming equation, continuously search for the path value downward, as shown in the following formula:
[0206] dp[0][M - 1] = min{dp[k][(M - 1)^(1<<(k - 1))]+g[0][k] (4)
[0207] Continuously search for k downward until all path points are traversed.
[0208] ⑥ Generate the first shortest path
[0209] After determining M permutations and combinations in ①, perform ②-⑤ to traverse and generate the shortest path for each permutation and combination, and take a minimum path value to generate the shortest first shortest path, including the sorting between welding paths and the sequential welding order of the welding starting point and the welding terminal.
[0210] Through the steps of welding path sorting, a welding path with the shortest welding movement distance can be automatically found, which also lays a sorting foundation for welding posture optimization.
[0211] Welding posture optimization: After obtaining the first shortest path, based on the initial pose, the adjustable range of each movable joint of the welding robot, and optimization, the target welding path can be obtained.
[0212] The welding posture optimization optimizes the initial pose sequence H0 generated according to the first shortest path generated by welding path sorting. First, perform rough optimization to reduce the pose difference between adjacent welds and generate the weld pose sequence H1;
[0213] Then, according to the difference in the robot joint coordinates, traverse the axis rotation angles to generate a stable weld pose sequence H2.
[0214] (1) Definition of initial pose
[0215] As Figure 6c shown, there are n welding points on the welding path; the initial pose sequence H0 = {h0, h 01 , h 02 ,...., h 0n} is generated by the weld recognition program. The Z-axis direction of the pose of h 0i is the weld normal vector, the X-axis direction is the direction of the current weld, and the Y-axis is determined by the right-hand rule Y = Z × X, where i = 1,..., n. In addition, the pose of the welding torch at the starting point is h0, and h0 is a fixed pose and cannot be changed.
[0216] (2) Rough optimization of welding posture (obtaining the first weld pose)
[0217] For different welds, due to the large difference in weld directions, the welding postures are also very different. Even at the connection between welds, the position and Z-axis orientation differences are small, but the X and Y-axis orientation differences are large. The principle of rough optimization of welding posture is to keep the Z-axis orientation of the original pose unchanged, and the X and Y-axis orientations are close to the X and Y-axis orientations of the previous welding point.
[0218] Specifically, the X-axis vector x 0i of the i-th pose can be projected onto the XOY plane of the i + 1-th pose to obtain x 1i+1 , as shown below:
[0219]
[0220] where x1′ i+1 .z = 0 is to set its z - component to 0. Since the Z - axis vector of the weld seam remains unchanged, i.e., z 1i+1 = z 0i+1 , x` 1i+1 is to update the X - axis and Y - axis vectors of the (i + 1)-th pose. x 1i+1 is the X - axis vector of the updated (i + 1)-th pose, h 0i+1 is the (i + 1)-th pose matrix, is the inverse matrix of the (i + 1)-th pose matrix. Then, according to the right - hand rule, the Y - axis component y 1i+1 can be determined as follows:
[0221] y 1i+1 = z 1i+1 ×x 1i+1 (6)
[0222] Then the pose h of the (i + 1)-th welding point 1i+1 is as follows:
[0223]
[0224] where t i is the three - dimensional coordinate of the welding point and remains unchanged.
[0225] Traverse once from i = 2,..., n to obtain a new pose sequence H1={h0, h 11 , h 12 ,...., h 1n}(H1 consists of multiple first - weld - seam poses), as Figure 6d shown, h 1j and h 1k have similar postures, even if they are not on the same weld seam.
[0226] (3) Fine - tuning and optimization of welding postures (obtaining the second - weld - seam pose)
[0227] The pose sequence H1 does not consider the actual operation of the robot, including the joint rotation distance and reachability. Therefore, a fine - tuning and optimization step for welding postures is required, and its process is as Figure 6e shown.
[0228] For the input pose sequence H1, start pose optimization from i = 1,..., n. For h 1i , perform optimization on the three coordinate axes in sequence, set the angle adjustment range for each axis: (-LX, LX), (-LY, LY), (-LZ, LZ) and the adjustment step sizes Sx, Sy, Sz. From the adjustment range and adjustment step sizes, the current adjustment angles θ x , θ y , θ zAs shown below:
[0229]
[0230] Where Tx, Ty, and Tz are the number of traversals of the X, Y, and Z axes, respectively. Then the rotation matrix is as shown below:
[0231]
[0232] Then the adjusted pose h 2i and the pose h 1i before adjustment have the following transformation relationship:
[0233] h 2i = h 1i ·Rx i ·Ry i ·Rz i (10)
[0234] Where Rx i , Ry i , Rz i is the rotation matrix with the smallest joint rotation distance obtained after multiple traversals of the i-th pose.
[0235] Definition of joint rotation distance. For the previous pose h a , determine whether its inverse solution can be obtained. If not, continue traversing. If so, the inverse kinematics of the robot gives the joint coordinates as (θ a1 , θ a2 ,..., θ a6 ). For the pose h b , the joint coordinates obtained by its inverse kinematics of the robot are (θ b1 , θ b2 ,..., θ b6 ). The joint rotation distance d uses the Manhattan distance and is as follows:
[0236]
[0237] By continuously traversing θ x , θ y , θ z , find the pose sequence H2 = {h0, h 21 , h 22 ,...., h 2n} (H2 consists of multiple second weld poses) with the smallest joint rotation distance d_min. As Figure 6f shown, the change in the robot joint angles and the pose difference between all welding points and the starting point are small, and the welding process is more stable.
[0238] In an embodiment of the present invention, multiple welding paths are determined; a first welding path starting from the welding start point and a second welding path starting from the welding end point corresponding to the welding path are determined; various permutation and combination paths are generated according to the first welding path and the second welding path corresponding to each welding path; for the permutation and combination paths, an adjacency matrix is generated, and a dynamic programming matrix is established according to the adjacency matrix; according to the dynamic programming matrix corresponding to each permutation and combination path, the second shortest path corresponding to each dynamic programming matrix is determined; from multiple second shortest paths, the first shortest path is determined; the initial poses of multiple welding points on the first shortest path are determined; the initial poses of the welding points are adjusted to obtain the first weld pose of the welding points; according to the adjustable range of each movable joint, the first weld pose is adjusted to obtain the target welding path; the welding robot is controlled according to the target welding path. An embodiment of the present invention proposes a welding path sorting algorithm based on TSP and dynamic programming, which finds the global optimal solution, reduces the manual teaching steps, and improves the operation efficiency of the robot. In addition, an embodiment of the present invention also proposes automatic optimization of the welding posture. Based on the initial pose of the welding robot corresponding to the welding point and the adjustable range of each movable joint of the welding robot, the welding posture of the welding robot at each welding point is automatically adjusted, improving the welding efficiency and making the welding process stable.
[0239] It should be noted that, for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of the present invention are not limited by the described action sequences, because according to the embodiments of the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential for the embodiments of the present invention.
[0240] Referring to Figure 7 , a schematic structural diagram of a welding path determination device for a welding robot according to an embodiment of the present invention is shown. The welding robot includes multiple movable joints and may include the following modules:
[0241] A permutation module 701, configured to determine multiple welding paths and determine various permutation and combination paths composed of the multiple welding paths;
[0242] A first determination module 702, configured to determine the first shortest path from the various permutation and combination paths;
[0243] A second determination module 703, configured to determine the initial poses of multiple welding points on the first shortest path, and determine the target welding path for the welding robot according to the initial poses of the welding points and the adjustable range of each movable joint.
[0244] In an alternative embodiment of the present invention, a welding path includes a welding start point and a welding end point; an arrangement module 701 is configured to determine a first welding path corresponding to the welding path with the welding start point as the starting welding point, and a second welding path with the welding end point as the starting welding point; and generate various permutation and combination paths according to the first welding path and the second welding path corresponding to each welding path.
[0245] In an alternative embodiment of the present invention, a first determination module 702 is configured to generate an adjacency matrix for the permutation and combination paths, and establish a dynamic programming matrix according to the adjacency matrix; and determine a first shortest path according to the dynamic programming matrix.
[0246] In an alternative embodiment of the present invention, the first determination module 702 is configured to determine a second shortest path corresponding to each dynamic programming matrix according to the dynamic programming matrices corresponding to the permutation and combination paths; and determine the first shortest path from multiple second shortest paths.
[0247] In an alternative embodiment of the present invention, a second determination module 703 is configured to adjust the initial pose of the welding point to obtain a first weld pose of the welding point; and adjust the first weld pose according to the adjustable range of each movable joint to obtain a target welding path.
[0248] In an alternative embodiment of the present invention, the first weld pose includes a first X-direction pose, a first Y-direction pose, and a first Z-direction pose;
[0249] The second determination module 703 is configured to determine the initial pose of the initial welding point, where the initial pose includes an initial X-direction pose, an initial Y-direction pose, and an initial Z-direction pose; determine the first X-direction pose of the second welding point according to the initial X-direction pose; and determine the first Z-direction pose of the second welding point according to the initial Z-direction pose; and determine the first Y-direction pose of the second welding point according to the first X-direction pose and the first Z-direction pose; determine the first X-direction pose of the Nth welding point according to the first X-direction pose of the Mth welding point; and determine the first Z-direction pose of the Nth welding point according to the first Z-direction pose of the Mth welding point; and determine the first Y-direction pose of the Nth welding point according to the first X-direction pose and the first Z-direction pose of the Nth welding point; where N = M + 1, M > 2, and M and N are positive integers.
[0250] In an alternative embodiment of the present invention, the first X-direction pose is the direction pointing to the weld corresponding to the welding point; the first Z-direction pose is the normal direction pointing to the normal of the weld corresponding to the welding point.
[0251] In an alternative embodiment of the present invention, the second determination module 703 is configured to determine a rotation matrix according to the adjustable range of the movable joint and a preset adjustment step size; determine a second weld pose according to the rotation matrix and the first weld pose; and determine a target welding path according to the second weld pose.
[0252] In an alternative embodiment of the present invention, the apparatus further includes:
[0253] a control module, configured to control the welding robot according to the target welding path.
[0254] In an embodiment of the present invention, multiple welding paths are determined, and multiple permutation and combination paths formed by the multiple welding paths are determined; a first shortest path is determined from the multiple permutation and combination paths; initial poses of multiple welding points on the first shortest path are determined, and a target welding path for the welding robot is determined according to the initial poses of the welding points and the adjustable ranges of the movable joints. The embodiment of the present invention proposes a welding path sorting algorithm based on TSP and dynamic programming to find a global optimal solution, reduce the manual teaching steps, and improve the operation efficiency of the robot. In addition, the embodiment of the present invention also proposes automatic optimization of the welding posture. Based on the initial pose of the welding robot corresponding to the welding point and the adjustable ranges of the movable joints of the welding robot, the welding posture of the welding robot at each welding point is automatically adjusted to improve the welding efficiency and make the welding process stable.
[0255] The embodiment of the present invention further provides a welding robot, including a processor, a memory, and a computer program stored on the memory and capable of running on the processor. When the computer program is executed by the processor, the welding robot welding path determination method as described above is implemented.
[0256] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by the processor, the welding robot welding path determination method as described above is implemented.
[0257] For the apparatus embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For the relevant parts, refer to the partial description of the method embodiment.
[0258] Each embodiment in this specification is described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other.
[0259] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, an apparatus, or a computer program product. Therefore, the embodiments of the present invention can take the form of an all-hardware embodiment, an all-software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.
[0260] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing terminal devices generate a device for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0261] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal devices to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device that implements the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0262] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal devices, such that a series of operation steps are executed on the computer or other programmable terminal devices to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable terminal devices provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0263] Although the preferred embodiments of the embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they know the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present invention.
[0264] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or terminal device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising the element.
[0265] The above has introduced in detail a method for determining the welding path of a welding robot, a device for determining the welding path of a welding robot, a welding robot and a computer-readable storage medium. In this text, specific examples are used to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A method for determining a welding path of a welding robot, characterized in that: The welding robot comprises a plurality of movable joints, and the method comprises: Determine multiple welding paths, and determine multiple permutation and combination paths composed of the multiple welding paths; Determine the first shortest path from multiple permutation and combination paths; The initial positions and postures of the plurality of welding points on the first shortest path are determined, and a target welding path for the welding robot is determined according to the initial positions and postures of the welding points and the adjustable ranges of the movable joints.
2. The method according to claim 1, characterized in that A welding path includes a welding start point and a welding end point; the determination of multiple permutation and combination paths consisting of multiple welding paths includes: Determine a first welding path corresponding to the welding path, which has the welding starting point as a starting welding point, and a second welding path which has the welding ending point as a starting welding point; A plurality of permutation and combination paths are generated according to the first welding path and the second welding path corresponding to each welding path.
3. The method according to claim 1, characterized in that The step of determining the first shortest path from the plurality of permutation and combination paths includes: Generate an adjacency matrix for the permutation and combination path, and establish a dynamic programming matrix based on the adjacency matrix; The first shortest path is determined according to the dynamic programming matrix.
4. The method according to claim 3, characterized in that The determining the first shortest path according to the dynamic programming matrix includes: Determine the second shortest path corresponding to each dynamic programming matrix according to the dynamic programming matrix corresponding to each permutation and combination path; The first shortest path is determined from a plurality of second shortest paths.
5. The method according to claim 1, characterized in that: Determining a target welding path for the welding robot according to the initial positions of each welding point and the adjustable range of each movable joint includes: Adjusting the initial posture of the welding point to obtain a first weld posture of the welding point; According to the adjustable range of each movable joint, the first weld posture is adjusted to obtain the target welding path.
6. The method according to claim 5, characterized in that The first weld posture includes a first X-direction posture, a first Y-direction posture and a first Z-direction posture; The step of adjusting the initial posture of the welding point to obtain a first weld posture of the welding point includes: Determine an initial position and posture of an initial welding point, wherein the initial position and posture include an initial X-direction position and an initial Y-direction position and an initial Z-direction position; Determine a first X-direction posture of a second welding point according to the initial X-direction posture; and, determine a first Z-direction posture of the second welding point according to the initial Z-direction posture; and, determine a first Y-direction posture of the second welding point according to the first X-direction posture and the first Z-direction posture; According to the first X-direction posture of the M-th welding point, the first X-direction posture of the N-th welding point is determined; and, according to the first Z-direction posture of the M-th welding point, the first Z-direction posture of the N-th welding point is determined; and, according to the first X-direction posture of the N-th welding point and the first Z-direction posture of the N-th welding point, the first Y-direction posture of the N-th welding point is determined; wherein N=M+1, M>2, and M and N are positive integers.
7. The method according to claim 6, characterized in that The first X-axis position is pointing in the direction of the weld corresponding to the welding point; The first Z-direction posture is a normal direction pointing to the welding point corresponding to the weld normal direction.
8. The method according to claim 5, characterized in that The step of adjusting the first weld posture according to the adjustable range of each movable joint to obtain the target welding path includes: Determining a rotation matrix according to an adjustable range of the movable joint and a preset adjustment step size; Determining a second weld pose according to the rotation matrix and the first weld pose; The target welding path is determined according to the second weld posture.
9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: The welding robot is controlled according to the target welding path.
10. A welding path determination device for a welding robot, characterized in that: The welding robot comprises a plurality of movable joints, and the device comprises: An arrangement module, used to determine multiple welding paths and determine multiple arrangement and combination paths composed of the multiple welding paths; A first determination module, used to determine a first shortest path from a plurality of permutation and combination paths; The second determination module is used to determine the initial positions and postures of multiple welding points on the first shortest path, and determine the target welding path for the welding robot according to the initial positions and postures of each welding point and the adjustable range of each movable joint.
11. A welding robot, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the method for determining a welding path of a welding robot as claimed in any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for determining a welding path of a welding robot as claimed in any one of claims 1 to 9 is implemented.