Welding robot path planning method and device, electronic equipment and storage medium
By generating and optimizing the welding robot path, the problems of path redundancy and abrupt turning in the prior art are solved, and a smoother and more efficient welding path planning is achieved.
Patent Information
- Application Number
- CN202510653302.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-05-21
AI Technical Summary
The prior art has node redundancy and abrupt route turning in the welding robot path planning, which is difficult to meet the requirements of the welding process and affects production efficiency.
By obtaining the starting point, end point and obstacle position of the welding robot, multiple initial paths are generated, the path with the shortest path length is filtered for smooth optimization, a weighted graph structure is generated, and an ant colony algorithm is used to search for the optimal path in this structure.
The redundant nodes in the path are reduced, the curvature of the path is reduced, the smoothness of the path is improved, the requirements of the welding process are met, and the production efficiency is improved.
Smart Images

Figure CN120170754A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of navigation and path planning, and particularly to a welding robot path planning method, device, electronic device and storage medium. Background Art
[0002] The prefabrication production of large bridge steel components is the core link of bridge construction, and its welding efficiency and quality directly affect the overall construction progress and structural safety. At present, the automated welding of steel components mainly relies on manual teaching programming. Although the operation is simple, its adaptability is poor. When facing different specifications of components, it is necessary to repeatedly program and debug, and the single deployment takes up to several hours. In order to further improve production efficiency, it is very important to perform path planning on the welding robot to achieve automated welding.
[0003] During the automated welding process, the welding transition path refers to the trajectory that the welding robot passes through when it completes one end of the weld and moves to the starting position of the next weld. The planning of the welding transition path needs to avoid obstacles in three dimensions while ensuring a smooth path and reducing the non-productive travel time to ensure production efficiency. In the related art, mainly through path planning algorithms, such as the A* algorithm and the Rapidly-exploring Random Trees (RRT) algorithm, etc., the inventor found that although these algorithms can achieve three-dimensional obstacle avoidance, there are redundant nodes and abrupt route turns in the generated paths, which are difficult to meet the welding process requirements. Summary of the Invention
[0004] Embodiments of the present application provide a welding robot path planning method, device, electronic device and storage medium to perform obstacle avoidance planning on the welding transition path of the welding robot, reduce redundant nodes, improve the smoothness of the path, meet the welding process requirements, and improve production efficiency.
[0005] In a first aspect, embodiments of the present application provide a welding robot path planning method, including: Obtain the starting point and the ending point of the welding robot during the welding transition process, and the positions of obstacles in the welding environment; Generate multiple initial paths according to the starting point, the ending point and the positions of the obstacles, and obtain the path length of each initial path; Perform smoothing optimization on the initial path with the shortest path length to obtain a smooth path; Generate a weighted graph structure based on the smooth path; Search for the optimal path between the starting point and the ending point in the weighted graph structure; Determine the welding transition path of the welding robot during the welding transition process based on the optimal path.
[0006] In a possible implementation, the obstacle includes a static obstacle and a dynamic obstacle; Generating a plurality of initial paths according to the starting point, the ending point, and the position of the obstacle, and obtaining the path length of each initial path, includes: Predicting the movement trajectory of the dynamic obstacle according to the position of the dynamic obstacle; Generating a plurality of initial paths from the starting point to the ending point based on a preset path planning algorithm, the position of the static obstacle, and the movement trajectory of the dynamic obstacle, and obtaining the path length of each initial path; Wherein, when generating a new node each time, determining the position prediction range of the dynamic obstacle corresponding to the new node according to the movement trajectory of the dynamic obstacle, and detecting whether there is a risk of collision between the path extending the new node and the dynamic obstacle according to the position prediction range; if so, removing the new node.
[0007] In a possible implementation, the initial path includes a plurality of nodes; Smoothing and optimizing the initial path with the shortest path length to obtain a smooth path, includes: Performing interpolation fitting according to the nodes of the initial path with the shortest path length to obtain a fitting curve; Performing resampling between the nodes of the fitting curve to obtain a plurality of new nodes; Detecting whether there is a curve segment on the fitting curve that does not satisfy a preset curvature constraint; If there is a curve segment on the fitting curve that does not satisfy the curvature constraint, adjusting the nodes within the curve segment; regenerating a fitting curve based on all the adjusted nodes, and re-executing the step of "detecting whether there is a curve segment on the fitting curve that does not satisfy a preset curvature constraint" and subsequent steps until the fitting curve satisfies the curvature constraint; Taking the fitting curve that satisfies the curvature constraint as the smooth path.
[0008] In a possible implementation, the smooth path includes a plurality of nodes; Generating a weighted graph structure based on the smooth path, includes: Determining the node distance between any two nodes on the smooth path; For any two nodes with a node distance less than a preset node threshold, establishing an edge connection between the two nodes; Determining the weight value of each edge according to the node distance between the two nodes of each edge and the curvature of the local path where it is located; Generating a weighted graph structure based on each node, each edge, and the weight value of each edge of the smooth path.
[0009] In a possible implementation, searching for an optimal path between the starting point and the ending point in the weighted graph structure includes: Searching for an optimal path between the starting point and the ending point in the weighted graph structure based on a preset ant colony algorithm; In each iteration of the ant colony algorithm, evaluating the path taken by each ant according to a preset path evaluation function; wherein, the path evaluation function is determined according to the path length and path curvature of the path taken by the ant.
[0010] In a possible implementation, the preset ant colony algorithm includes a heuristic function and a pheromone update formula; The heuristic function is determined according to the weights of each edge in the weighted graph structure; The pheromone update formula is determined according to the pheromone of each edge in the previous iteration, the path length and path curvature of the path taken by each ant.
[0011] In a possible implementation, determining the welding transition path of the welding robot during the welding transition process based on the optimal path includes: Determining the path length, path curvature of the optimal path, and the distance from the obstacle; If the path length of the optimal path is greater than the path length of the smooth path, or the path curvature of the optimal path is greater than the path curvature of the smooth path, or the distance between the optimal path and the obstacle is less than a preset safety distance threshold, then re-acquire the positions of the obstacles in the welding environment, and execute the steps of "generating multiple initial paths for the welding transition process according to the starting point, the ending point, and the positions of the obstacles, and obtaining the path length of each initial path" and subsequent steps until the obtained optimal path is qualified; Taking the qualified optimal path as the welding transition path of the welding robot during the welding transition process.
[0012] In a second aspect, an embodiment of the present application provides a welding robot path planning device, including: An acquisition module, configured to acquire the starting point and the ending point of the welding robot during the welding transition process, and the positions of the obstacles in the welding environment; A path generation module, configured to generate multiple initial paths according to the starting point, the ending point, and the positions of the obstacles, and obtain the path length of each initial path; A smoothing module, configured to perform smoothing optimization on the initial path with the shortest path length to obtain a smooth path; A graph structure module, configured to generate a weighted graph structure based on the smooth path; An optimization module, configured to search for an optimal path between the starting point and the ending point in the weighted graph structure; A determination module, configured to determine a welding transition path of the welding robot during a welding transition process based on the optimal path.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the method in the first aspect or any possible implementation manner of the first aspect above is implemented.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the method in the first aspect or any possible implementation manner of the first aspect above is implemented.
[0015] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, the method in the first aspect or any possible implementation manner of the first aspect above is implemented.
[0016] The beneficial effects of the embodiments of the present application compared with the prior art are as follows: In the embodiments of the present application, multiple feasible initial paths are generated based on the starting point and the ending point of the welding robot during the welding transition process and the positions of obstacles in the welding environment, and the path lengths of each initial path are obtained; the initial path with the shortest path length is selected from them for smoothing optimization to obtain a smooth path, which can reduce redundant nodes in the generated path based on the initial path with the shortest path length and ensure the smoothness of the obtained path and reduce the curvature of the path; a weighted graph structure is generated through the smooth path, which can provide a basis for further optimizing the path between the starting point and the ending point; by searching for the optimal path between the starting point and the ending point in the weighted graph structure, it is possible to search in the weighted graph structure to further reduce redundant nodes in the path and reduce the curvature of the path, so that the finally obtained path can better meet the welding process requirements and improve production efficiency. Description of the Drawings
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0018] Figure 1It is a flowchart of the implementation of the welding robot path planning method provided by an embodiment of the present application; Figure 2 It is a schematic diagram of the initial path provided by an embodiment of the present application; Figure 3 It is a comparison schematic diagram of the initial path, the smoothed path and the optimal path provided by an embodiment of the present application; Figure 4 It is a schematic diagram of the weighted graph structure provided by an embodiment of the present application; Figure 5 It is a schematic diagram of the optimal path provided by an embodiment of the present application; Figure 6 It is a flowchart of the implementation of the welding robot path planning method provided by another embodiment of the present application; Figure 7 It is a schematic diagram of the structure of the welding robot path planning device provided by an embodiment of the present application; Figure 8 It is a schematic diagram of the electronic device provided by an embodiment of the present application. Detailed implementation manners
[0019] In the following description, specific details such as specific system structures and technologies are proposed for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits and methods are omitted to avoid unnecessary details from interfering with the description of the present application.
[0020] The inventors of the present application found that in the field of steel structure welding, welding robots often face complex three-dimensional obstacle avoidance path planning problems. Although the RRT algorithm can achieve three-dimensional obstacle avoidance, the generated path has problems such as redundant nodes and abrupt turning, and cannot meet the requirements of the welding process for continuous and smooth movement. The ant colony algorithm has a high computational complexity. Especially when dealing with obstacles such as dense support beams and bolt connectors of large steel components, it is difficult to meet the real-time planning requirements of dense welds of steel components, and it is easy to cause risks of path collision or uneven movement. Therefore, it is necessary to consider a technology for welding robot path planning.
[0021] With the idea of improving the smoothness of the planned path of the welding robot and improving production efficiency. In the embodiments of the present application, multiple feasible initial paths are generated, and the initial path with the shortest path length is selected for smoothing optimization to ensure a shorter path length and reduce abrupt turning of the path; then a weighted graph structure is generated according to the smoothed path, which is converted into a structure that can achieve optimization, and the weighted graph structure is used for path optimization, which can remove redundant nodes in the path, reduce the curvature of the path, thereby reducing the path length, improving the smoothness of the path, and achieving an improvement in production efficiency.
[0022] To make the objectives, technical solutions and advantages of this application clearer, the following will be described through specific embodiments in conjunction with the accompanying drawings.
[0023] Before path planning for a welding robot, a three-dimensional grid map of the welding environment can be constructed, and the obstacle models and welding task constraints of steel structure welding workpieces can be defined. The obstacles include static obstacles and dynamic obstacles, such as welding tooling fixtures, pipe connectors, mobile devices, truss lifting equipment, and collaborative operation robots. Among them, the bounding box method can be used to enclose complex objects and simplify the obstacles into simple geometric bodies.
[0024] When establishing the three-dimensional grid map of the welding environment, the welding environment data can be collected through a laser vision sensor, a force sensor, etc., to establish dynamic and static obstacles in the welding environment, and to extract the weld information or weld features of the steel structure parts in the welding environment, so that the subsequent welding robot can perform path planning.
[0025] Figure 1 The implementation flowchart of the welding robot path planning method provided by an embodiment of this application is described in detail as follows: Step 101, obtain the starting point and ending point of the welding robot during the welding transition process, and the positions of the obstacles in the welding environment.
[0026] In this embodiment, the welding transition process refers to the process of the welding robot moving from the end point of the first welding operation to the starting point of the second welding operation. During this process, the path along which the welding robot moves is the welding transition path.
[0027] Among them, the end point of the first welding operation is the starting point of the welding transition process, and the starting point of the second welding operation is the ending point of the welding transition process. The above-mentioned ending point can be obtained by extracting the weld information or weld features in the welding environment.
[0028] Here, the positions of the static and dynamic obstacles in the welding environment can be obtained in real time. For dynamic obstacles, according to the position or motion data of the dynamic obstacles, the motion trajectory of the dynamic obstacles can be predicted in real time, and the appearance of new dynamic obstacles can be obtained in a timely manner.
[0029] Step 102, generate multiple initial paths according to the starting point, ending point and positions of the obstacles, and obtain the path lengths of each initial path.
[0030] In this embodiment, as Figure 2 shown, the path planning algorithm can be used to find multiple feasible paths from the starting point to the ending point that do not pass through the obstacles, which are the initial paths.
[0031] Among them, each feasible path can be obtained by using different path planning algorithms or the same path planning algorithm.
[0032] Since the length of the path that the welding robot moves along affects the production efficiency, the length of each initial path can be calculated for subsequent screening.
[0033] Step 103: Smooth and optimize the initial path with the shortest path length to obtain a smooth path.
[0034] In this embodiment, to ensure that the welding transition path of the welding robot is short and does not affect the production rhythm, the initial path with the shortest path length can be selected for smooth optimization and subsequent processing, that is, Figure 2 the pink path in
[0035] Considering that there are broken lines and abrupt turns in the initial path generated by the path planning algorithm, which will cause the movement of the welding robot to be unsmooth and increase energy consumption, etc., the selected initial path is smoothed and optimized so that the smooth path has better continuity and smoothness while maintaining a short distance, and is more suitable for the movement of the welding robot.
[0036] Optionally, if there are multiple initial paths with the same path length, the initial path with the shortest path length and the smallest curvature can be selected for smooth optimization.
[0037] Step 104: Generate a weighted graph structure based on the smooth path.
[0038] In this embodiment, considering that the path generated by the path planning algorithm may have redundant nodes, resulting in a still long path length, and there are still curve segments with large curvatures after smoothing, the smoothed path can be further optimized.
[0039] In order to be able to remove redundant nodes and optimize the node positions, a weighted graph structure corresponding to the smooth path can be established first, so as to perform optimization on the basis of the weighted graph structure subsequently, find a better path, and remove the redundant nodes in the path.
[0040] Step 105: Search for the optimal path between the starting point and the ending point in the weighted graph structure.
[0041] In this embodiment, an optimization algorithm can be used to search for the optimal path in the weighted graph structure, reduce the redundant nodes of the smooth path, and select a path with a smaller curvature.
[0042] As Figure 3 shown, the optimal path has a shorter path length and a smaller curvature compared to the smooth path and the initial path, that is, the path is smoother and more suitable for the movement needs of the welding robot.
[0043] Optionally, considering that there are still obstacles in the welding environment, it is possible to detect whether each edge will pass through an obstacle when generating the weighted graph structure and remove the edges that pass through the obstacles. It is also possible to judge whether the selected edge will pass through an obstacle when searching for the optimal path and not select the edges that pass through the obstacles.
[0044] Step 106: Based on the optimal path, determine the welding transition path of the welding robot during the welding transition process.
[0045] In this embodiment, the optimal path can be directly used as the welding transition path.
[0046] In addition, considering that the dynamic obstacle is moving and the welding transition process needs to meet the corresponding process requirements, it is also possible to detect the optimal path. When the welding process requirements are met, the optimal path is used as the welding transition path. When the welding process requirements are not met, path planning can be carried out again until the obtained optimal path meets the process requirements.
[0047] In the embodiment of the present application, multiple feasible initial paths are generated based on the starting point and the ending point of the welding robot during the welding transition process and the positions of the obstacles in the welding environment, and the path lengths of each initial path are obtained; the initial path with the shortest path length is selected from them for smoothing optimization to obtain a smooth path. The initial path with the shortest path length can be used as a reference to reduce the redundant nodes in the generated path and ensure the smoothness of the obtained path, reducing the curvature of the path; a weighted graph structure is generated through the smooth path, which can provide a basis for further optimizing the path between the starting point and the ending point; by searching for the optimal path between the starting point and the ending point in the weighted graph structure, it is possible to search in the weighted graph structure to further reduce the redundant nodes in the path and reduce the curvature of the path, so that the finally obtained path can better meet the welding process requirements and improve production efficiency.
[0048] In some embodiments, the obstacles include static obstacles and dynamic obstacles.
[0049] Refer to Figure 2 , in this embodiment, multiple initial paths are generated according to the positions of the starting point, the ending point and the obstacles, and the path lengths of each initial path are obtained. It is possible to predict the movement trajectory of the dynamic obstacle according to the position of the dynamic obstacle; based on a preset path planning algorithm, the positions of the static obstacles and the movement trajectory of the dynamic obstacle, multiple initial paths from the starting point to the ending point are generated, and the path lengths of each initial path are obtained.
[0050] Among them, when generating a new node each time, according to the movement trajectory of the dynamic obstacle, determine the position prediction range of the dynamic obstacle corresponding to the new node, and according to the position prediction range, detect whether there is a risk of collision between the path extending the new node and the dynamic obstacle; if so, remove the new node.
[0051] In this embodiment, since the position of the dynamic obstacle is changing, in order to reasonably consider the influence of the obstacle in path planning, the future movement trajectory of the dynamic obstacle can be predicted based on its current position. When predicting, the type of the dynamic obstacle and the process or steps it executes can also be considered.
[0052] After predicting the movement trajectory of the dynamic obstacle, through the correspondence between the time and position of the dynamic obstacle, it can be converted into a static obstacle for collision judgment.
[0053] Here, a path planning algorithm can be used to generate an initial path between the starting point and the ending point. During the process of generating the initial path, each time a new node is generated, it can be detected whether there is a risk of collision between the path extending the new node and the static and dynamic obstacles, and the nodes without collision risk are retained, while the nodes with collision risk are removed.
[0054] Among them, the number of nodes between each new node and the starting point is determined, which can clarify the time for the welding robot to move to the new node, so as to correspond to the time and position in the movement trajectory of the dynamic obstacle for judging the collision risk with the dynamic obstacle.
[0055] By determining in the movement trajectory of the dynamic obstacle the path of the welding robot moving along the path extending the new node and the time to the new node, the position prediction range of the dynamic obstacle can be obtained, that is, the position of the dynamic obstacle at this time or during this time period.
[0056] Since there may be a deviation in the time when the welding robot specifically executes the planned path, a larger time range can be corresponded, or the obtained position prediction range can be inflated to expand the range to ensure the accuracy of collision detection.
[0057] When performing collision detection, for a spherical obstacle, ray-sphere intersection detection can be used. When judging whether the path extending the new node collides with the spherical obstacle, it can be judged whether the path intersects with the spherical surface through mathematical calculations. If it intersects, it means that the path will collide with the spherical obstacle; if it does not intersect, it means that the path is safe and will not collide with the spherical obstacle.
[0058] For a cuboid obstacle, it is determined by segmented space occupancy. The space where the cuboid obstacle is located can be segmented, and it is judged whether the space passed by the path overlaps with the space segment occupied by the cuboid obstacle. If there is an overlap, it means that the path will collide with the cuboid obstacle; if there is no overlap, it means that the path is feasible and will not collide with the cuboid obstacle.
[0059] Optionally, the path planning algorithm can adopt algorithms such as the RRT algorithm and the RRT* algorithm.
[0060] When randomly sampling in the welding space and determining the growth direction of a new node, the node can be preferentially expanded in the direction of the next welding operation or in the direction of the termination point, reducing ineffective search and improving the path planning efficiency.
[0061] Among them, a random number can be generated. If the random number is less than the set probability threshold, the termination point (or a point randomly selected from the weld of the next welding operation) is set as the random point for random sampling to determine a new node. If the random number is not less than the set probability threshold, uniform random sampling is performed in the welding space to determine the random point to determine a new node.
[0062] In some embodiments, the initial path includes multiple nodes. The nodes here can include the nodes generated by the path planning algorithm on the initial path, as well as the starting point and the termination point.
[0063] In this embodiment, smoothing optimization is performed on the initial path with the shortest path length to obtain a smooth path, which may include: Step 1, according to the nodes of the initial path with the shortest path length, interpolation fitting is performed to obtain a fitting curve.
[0064] Here, interpolation fitting means that when fitting the curve, the obtained fitting curve passes through the nodes of the initial path with the shortest path length. Since there are many obstacles in the welding environment and the starting point and the termination point of the movement of the welding robot are fixed, curve fitting needs to be performed on the previously planned initial path to ensure avoiding obstacles and approximate fitting cannot be used.
[0065] Optionally, B-spline curves can be used for interpolation fitting, such as cubic B-spline curves.
[0066] Step 2, resampling is performed between the nodes of the fitting curve to obtain multiple new nodes.
[0067] In this embodiment, since the number of nodes of the initial path generated by the path planning algorithm is small and the distance between nodes is large, the fitting curve can be discretized, and resampling is performed between two adjacent nodes to obtain dense and uniform nodes for subsequent adjustment of the fitting curve.
[0068] For example, add 10 nodes or 15 nodes etc. between two adjacent nodes. The number of the added nodes is only for illustration and not for limitation, and can be selected according to the length of the path.
[0069] Step 3: Detect whether there is a curve segment on the fitting curve that does not satisfy the preset curvature constraint.
[0070] Step 4: If there is a curve segment on the fitting curve that does not satisfy the curvature constraint, adjust the nodes within this curve segment; regenerate the fitting curve based on all the adjusted nodes, and re - execute the step of "detecting whether there is a curve segment on the fitting curve that does not satisfy the preset curvature constraint" and subsequent steps until the fitting curve satisfies the curvature constraint.
[0071] Step 5: Use the fitting curve that satisfies the curvature constraint as the smooth path.
[0072] In this embodiment, the welding transition path needs to maintain a certain smoothness. Therefore, the curvature at each position on the fitting curve can be detected.
[0073] If there is a curve segment on the fitting curve that does not satisfy the curvature constraint, it indicates that the path corresponding to the fitting curve does not meet the requirements of the welding process. Then, the corresponding nodes can be adjusted. For example, translate the control points (reduce the curvature), insert / delete control points (change the local density), etc.
[0074] After adjustment, the curve fitting can be performed again to ensure that the obtained fitting curve passes through all the adjusted nodes. Since the nodes are dense and uniform at this time, the curve fitting here can adopt the same curve fitting method as in Step 1, or a different curve fitting method.
[0075] If each curve segment on the fitting curve satisfies the curvature constraint, it indicates that the current fitting curve meets the requirements of the welding process and no further smoothing adjustment is required.
[0076] In some embodiments, the smooth path includes multiple nodes. Here, the nodes can include the starting point, the ending point, and all the nodes between the starting point and the ending point on the smooth path.
[0077] Based on the smooth path, this embodiment generates a weighted graph structure. It can first determine the node distance between any two nodes on the smooth path; for any two nodes whose node distance is less than the preset node threshold, establish an edge connection between these two nodes. Then, determine the weight value of each edge according to the node distance between the two nodes of each edge and the curvature of the local path where it is located. Finally, generate a weighted graph structure based on each node, each edge, and the weight value of each edge on the smooth path.
[0078] See Figure 4Schematic diagram of the weighted graph structure shown, where the blue origin points are the nodes on the smooth path, and the gray lines are the connections between the nodes, that is, the edges in the weighted graph structure.
[0079] In this embodiment, the nodes of the smooth path can be used as the node set of the weighted graph structure of the smooth path, and the edge set can be established based on this node set.
[0080] Here, the preset node threshold can be selected according to the path length. For example, since the nodes on the smooth path are dense and uniform, that is, the node distance between all adjacent two nodes (simply referred to as the adjacent node distance) is the same, the preset node threshold can be 1.5 times the adjacent node distance, or 2 times the adjacent node distance, or 3 times the adjacent node distance. The specific multiple is only for illustration and is not a limitation, and can be selected according to the actual situation.
[0081] Among them, for the curvature of the local path where each edge is located, it can be calculated based on the two nodes of this edge and a node adjacent to this edge. A node adjacent to this edge can be selected in the direction from the starting point to the ending point or from the ending point to the starting point on the smooth path.
[0082] Taking a node adjacent to this edge as the next node of this edge as an example, the smooth curve includes nodes A, B, C, D, E, F, G, and H, etc. Among them, there is an edge ab connected between A and B, an edge ac connected between A and C, an edge bc connected between B and C, an edge bd connected between B and D, an edge be connected between B and E, an edge bf connected between B and F, an edge cd connected between C and D, ……, an edge fh connected between F and H, an edge gh connected between G and H, etc.
[0083] For the edge ab, its next node is C, then the path it is on is the path composed of nodes A, B, and C, that is, calculate the curvature of the local path formed by nodes A, B, and C to determine the weight value of the edge ab. For the edge ac, its next node is D, then the path it is on is the path composed of nodes A, C, and D, and determine the weight value of the edge ac by calculating the curvature of the local path formed by nodes A, C, and D. For the edge bc, its next node is D, then the path it is on is the path composed of nodes B, C, and D, and determine the weight value of the edge bc by calculating the curvature of the local path formed by nodes B, C, and D.
[0084] For an edge with one of its nodes being an end point, since there is no next node, one of the nodes adjacent to this edge can select the previous node. For example, node H is the last node. For edge fh, its previous node is E, then calculate the curvature of the local path formed by nodes E, F, and H to determine the weight of edge fh. For edge gh, its previous node is F, then calculate the curvature of the local path formed by nodes F, G, and H to determine the weight of edge gh.
[0085] Optionally, the weight of each edge can be calculated by weighting the node distance between the two nodes of each edge and the curvature of the local path where it is located.
[0086] The specific calculation formula can be: . In the formula, represents the weight of the edge formed by node and node , represents the node distance between node and node , represents the position coordinate of node , represents the position coordinate of node , represents the curvature of the local path where edge is located, and represent weight coefficients, which are used to balance the node distance and the requirement for smoothness.
[0087] Optionally, since there are dynamic obstacles in the welding environment, it is necessary to detect the positions of the dynamic obstacles in real time and predict the future trajectories. Therefore, when establishing the weighted graph structure, all edges that meet the distance condition (the node distance is less than the preset node threshold) can be retained, and when searching for the optimal path later, it is then determined whether the path will pass through the obstacles.
[0088] In some embodiments, searching for the optimal path between the starting point and the ending point in the weighted graph structure can be based on a preset ant colony algorithm. In the weighted graph structure, search for the optimal path between the starting point and the ending point; refer to Figure 5 the schematic diagram of the optimal path shown. The hollow circles in the figure are the nodes passed by the ants, and the solid circles on both sides are the starting point and the ending point. In each iteration of the ant colony algorithm, according to the preset path evaluation function, evaluate the path taken by each ant; among them, the path evaluation function is determined according to the path length and the path curvature of the path taken by the ant.
[0089] In this embodiment, since the welding transition path of the welding robot needs to consider the path length and path curvature, a path evaluation function can be determined according to the path length and path curvature of the path taken by the ants.
[0090] Optionally, the calculation formula of the path evaluation function can be: . In the formula, represents the path evaluation value of the path taken by the -th ant in the -th iteration, represents the path length of the path taken by the -th ant in the -th iteration, represents the path curvature of the path taken by the -th ant in the -th iteration, and represent weight coefficients.
[0091] Here, and can be the same or different. and can be the same or different. Exemplarily, can be taken as 0.7, can be taken as 0.3. The above is only an exemplary example and is not a limitation.
[0092] Optionally, in the ant colony algorithm, after each ant selects the next node to visit, it can be determined whether moving from the current node to the next node to visit will cross an obstacle. If it may cross an obstacle, then the next node to visit is reselected from the remaining nodes.
[0093] Among them, for dynamic obstacles, the position of the dynamic obstacle can be obtained in real time, the movement trajectory of the dynamic obstacle can be re-predicted, and the position prediction range of the dynamic obstacle can be updated to ensure the accuracy of the judgment on whether to cross the obstacle.
[0094] In addition, the following method can also be used to remove the paths that cross obstacles: In each iteration of the ant colony algorithm, after obtaining multiple optimized paths between the starting point and the ending point, it is determined whether each optimized path will cross an obstacle, the optimized paths that cross the obstacle are removed, and the optimized paths that do not cross the obstacle are retained.
[0095] Optionally, the preset ant colony algorithm includes a heuristic function and a pheromone update formula.
[0096] Among them, the heuristic function reflects the judgment of the local attractiveness of the path when the ant selects a path. The heuristic function can be determined according to the weights of each edge in the weighted graph structure, guiding the ant to preferentially select a better path.
[0097] The pheromone update formula can dynamically adjust the pheromone concentration on the path by combining pheromone evaporation and enhancement, which can not only retain the preference for high-quality paths but also prevent the algorithm from falling into local optima. The pheromone update formula can be determined according to the pheromone of each edge in the previous iteration, the path length and path curvature of the optimized path passed by each ant.
[0098] The pheromone update formula can be: . In the formula, represents the pheromone of the path between nodes in the -th iteration, represents the pheromone of the path between nodes in the -th iteration, represents the dynamic evaporation factor, represents the pheromone intensity, represents the -th ant's path length, represents the curvature penalty term of the -th ant's path, represents the weight coefficient.
[0099] The above dynamic evaporation factor can exponentially decay with the increase of the number of iterations. The specific expression can be: . In the formula, represents the dynamic evaporation factor in the -th iteration, represents the initial dynamic evaporation factor, represents the decay rate parameter.
[0100] In some embodiments, referring to the flowchart of the welding robot path planning method provided by another embodiment shown in Figure 6 , based on the optimal path, the welding transition path of the welding robot during the welding transition process can be: Determine the path length, path curvature of the optimal path, and the distance from the obstacle.
[0101] If the path length of the optimal path is greater than that of the smooth path, or the path curvature of the optimal path is greater than that of the smooth path, or the distance between the optimal path and the obstacle is less than the preset safety distance threshold, then re-acquire the positions of the obstacles in the welding environment, and execute the steps of "generating multiple initial paths for the welding transition process based on the starting point, the ending point, and the positions of the obstacles, and obtaining the path length of each initial path" and subsequent steps until the obtained optimal path is qualified.
[0102] Use the qualified optimal path as the welding transition path of the welding robot during the welding transition process.
[0103] In this embodiment, the obtained optimal path is evaluated by the path length, path curvature, and distance from the obstacle of the optimal path to determine whether the optimal path is feasible. If the optimal path is not feasible, re-planning is performed. If the optimal path is feasible, the welding robot can be controlled to move according to the obtained optimal path.
[0104] Among them, for the obstacle, the position of the obstacle can be re-acquired and the trajectory prediction can be re-performed to accurately determine the distance between the optimal path and the obstacle.
[0105] In some specific embodiments, to verify the feasibility of the welding robot path planning method proposed in this application, programming and visualization can be performed using simulation software. Taking the actual welding task data of a certain steel plant as the test set for simulation, the simulation parameters are shown in Table 1, the detailed path information is shown in Table 2, and the point coordinate data of the optimal path is shown in Table 3.
[0106] Table 1 Simulation parameter table
[0107] Table 2 Detailed path information table
[0108] Table 3 Point coordinate data table of the optimal path
[0109] From the above simulation results, it can be seen that although the RRT* algorithm can find an obstacle avoidance transition path and an initial path for a welding robot, the generated path usually consists of discrete line segments with jagged turns, which makes the movement of the welding robot unreachable and unable to execute the welding path. Therefore, it is necessary to ensure the continuous curvature of the trajectory to avoid affecting mechanical vibration or the welding process. By fitting the curve with B-spline, the nodes of the initial path are generated into a smooth curve, redundant nodes are eliminated, and the path continuity is ensured. The smoothed path can be discretized into densely and evenly distributed nodes. On this basis, a weighted graph structure is constructed, and the ant colony optimization algorithm is integrated. By guiding with pheromone to find the optimal path in the weighted graph structure, an optimal path can be generated. Compared with the smoothed path, the number of path points of the optimal path is reduced by 60%, the path length is shortened by 6.27%, the average curvature is reduced by 94.5%, and the maximum curvature is reduced from 1699.143 to 21.087. It not only eliminates the redundant nodes generated by the RRT* algorithm and reduces the path length, but also retains the smoothness of the path. Based on this, it can be seen that the welding robot path planning method proposed in this application is feasible in the automated welding system.
[0110] In the embodiment of the present application, by generating multiple feasible initial paths between the starting point and the ending point of the welding transition process, the construction from no path to a path can be realized. By smoothing and optimizing the initial path with the shortest path length, discretizing the obtained fitting curve, and establishing a corresponding weighted graph structure, the initial path with the shortest path length can be transformed into a structure that can be optimized. By presetting the ant colony algorithm to search for the optimal path between the starting point and the ending point in the weighted graph structure, the redundant nodes can be removed through the optimization algorithm, the smoothness of the curve can be improved, and thus the optimal path can be found. Through the cooperation of the above steps, path generation, smoothing, and optimization can be realized, and the welding transition path of the welding robot can be effectively planned.
[0111] Among them, the initial path generated by the path planning algorithm usually consists of discrete line segments with jagged turns. If it is directly optimized by the ant colony algorithm without smoothing, the path will be infeasible, and the welding robot cannot execute the path containing sharp turns. It is necessary to ensure the continuous curvature of the trajectory to avoid affecting mechanical vibration or the welding process. And it will also reduce the path optimization. The nodes generated by the path planning algorithm are distributed disorderly, there will be a large number of invalid nodes, generating invalid edges, resulting in a significant decrease in the convergence speed of the algorithm and unable to quickly obtain the optimal path. In addition, the nodes generated by the path planning algorithm can lead to sparse or locally over-dense node distributions, and the directly converted graph structure is difficult to cover the potential optimization area.
[0112] It should be understood that the sequence numbers of the steps in the above embodiments do not indicate the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0113] The following is an apparatus embodiment of the present application. For details not described in detail, reference may be made to the corresponding method embodiments above.
[0114] Figure 7 The structural schematic diagram of the welding robot path planning apparatus provided by the embodiment of the present application is shown. For the convenience of description, only the parts related to the embodiment of the present application are shown and are described in detail as follows: As Figure 7 shown, the welding robot path planning apparatus 70 includes: An acquisition module 71, configured to acquire the starting point and the ending point of the welding robot during the welding transition process, and the positions of obstacles in the welding environment; A path generation module 72, configured to generate multiple initial paths according to the starting point, the ending point, and the positions of the obstacles, and obtain the path lengths of each initial path; A smoothing module 73, configured to perform smoothing optimization on the initial path with the shortest path length to obtain a smoothed path; A graph structure module 74, configured to generate a weighted graph structure based on the smoothed path; An optimization module 75, configured to search for the optimal path between the starting point and the ending point in the weighted graph structure; A determination module 76, configured to determine the welding transition path of the welding robot during the welding transition process based on the optimal path.
[0115] In a possible implementation manner, the obstacles include static obstacles and dynamic obstacles; The path generation module 72 is specifically configured to: Predict the motion trajectory of the dynamic obstacle according to the position of the dynamic obstacle; Generate multiple initial paths from the starting point to the ending point based on a preset path planning algorithm, the positions of the static obstacles, and the motion trajectory of the dynamic obstacle, and obtain the path lengths of each initial path; Wherein, when generating a new node each time, according to the motion trajectory of the dynamic obstacle, determine the position prediction range of the dynamic obstacle corresponding to the new node, and according to the position prediction range, detect whether there is a risk of collision between the path extending the new node and the dynamic obstacle; if so, remove the new node.
[0116] In a possible implementation manner, the initial path includes multiple nodes; The smoothing module 73 is specifically configured to: Interpolate and fit based on the nodes of the initial path with the shortest path length to obtain a fitted curve; Resample between the nodes of the fitted curve to obtain multiple new nodes; Detect whether there is a curve segment on the fitted curve that does not meet the preset curvature constraint; If there is a curve segment on the fitted curve that does not meet the curvature constraint, adjust the nodes within that curve segment; regenerate the fitted curve based on all the adjusted nodes, and re - execute the step of "detecting whether there is a curve segment on the fitted curve that does not meet the preset curvature constraint" and subsequent steps until the fitted curve meets the curvature constraint; Take the fitted curve that meets the curvature constraint as the smooth path.
[0117] In a possible implementation, the smooth path includes multiple nodes; The graph structure module 74 is specifically used for: Determine the node distance between any two nodes on the smooth path; For any two nodes with a node distance less than the preset node threshold, establish an edge connection between the two nodes; Determine the weight of each edge respectively according to the node distance between the two nodes of each edge and the curvature of the local path where it is located; Generate a weighted graph structure based on each node, each edge, and the weight of each edge of the smooth path.
[0118] In a possible implementation, the optimization module 75 is specifically used for: Based on the preset ant colony algorithm, search for the optimal path between the starting point and the ending point in the weighted graph structure; In each iteration of the ant colony algorithm, evaluate the path taken by each ant according to the preset path evaluation function; among them, the path evaluation function is determined according to the path length and path curvature of the path taken by the ant.
[0119] In a possible implementation, the preset ant colony algorithm includes a heuristic function and a pheromone update formula; The heuristic function is determined according to the weight of each edge in the weighted graph structure; The pheromone update formula is determined according to the pheromone of each edge in the previous iteration, the path length and path curvature of the path taken by each ant.
[0120] In a possible implementation, the determination module 76 is specifically used for: Determine the path length, path curvature, and distance from obstacles of the optimal path; If the path length of the optimal path is greater than that of the smooth path, or the path curvature of the optimal path is greater than that of the smooth path, or the distance between the optimal path and the obstacle is less than the preset safety distance threshold, then re-obtain the positions of the obstacles in the welding environment, and execute the steps of "generating multiple initial paths for the welding transition process according to the starting point, the ending point, and the positions of the obstacles, and obtaining the path lengths of each initial path" and the subsequent steps until the obtained optimal path is qualified; Use the qualified optimal path as the welding transition path of the welding robot during the welding transition process.
[0121] Figure 8 It is a schematic diagram of the electronic device provided by the embodiment of the present application. As Figure 8 shown, the electronic device 80 of this embodiment includes: a processor 81 and a memory 82. The memory 82 stores a computer program 83. When the processor 81 executes the computer program 83, the steps in the above-mentioned various method embodiments are implemented. Or, when the processor 81 executes the computer program 83, the functions of each module / unit in the above-mentioned various device embodiments are implemented.
[0122] Exemplarily, the computer program 83 can be divided into one or more modules / units, and the one or more modules / units are stored in the memory 82 and executed by the processor 81 to complete the present application. The one or more modules / units can be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 83 in the electronic device 80.
[0123] The electronic device 80 may include, but is not limited to, a processor 81 and a memory 82. Those skilled in the art can understand that Figure 8 this is only an example of the electronic device 80, and does not constitute a limitation on the electronic device 80. It may include more or fewer components than shown in the figure, or combine some components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0124] The processor 81 may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0125] The memory 82 may be an internal storage unit of the electronic device 80, such as the hard disk or memory of the electronic device 80. The memory 82 may also be an external storage device of the electronic device 80, such as a plug-in hard disk equipped on the electronic device 80, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory 82 may also include both the internal storage unit and the external storage device of the electronic device 80. The memory 82 is used to store computer programs and other programs and data required by the electronic device. The memory 82 may also be used to temporarily store data that has been output or is to be output.
[0126] For the convenience and simplicity of description, only the above division of each functional module / unit is used as an example. In actual applications, the above functions may be allocated to different functional modules / units according to needs. The above modules / units may be implemented in the form of hardware, may also be implemented in the form of software, or may be implemented in the form of a combination of hardware and software.
[0127] The embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the methods in the above method embodiments are implemented.
[0128] The embodiment of the present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, the methods in the above method embodiments are implemented.
[0129] Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0130] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments. Without special instructions and logical conflicts, the terms and / or descriptions among different embodiments are consistent and can be cross-referenced. The technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships.
[0131] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included within the protection scope of the present application.
Claims
1. A welding robot path planning method, characterized in that: include: Obtain the starting and ending points of the welding robot during the welding transition process, as well as the locations of obstacles in the welding environment; Generate multiple initial paths according to the starting point, the end point and the position of the obstacle, and obtain the path length of each initial path; Perform smooth optimization on the initial path with the shortest path length to obtain a smooth path; Based on the smoothed path, generating a weighted graph structure; Searching for an optimal path between the starting point and the ending point in the weighted graph structure; Based on the optimal path, a welding transition path of the welding robot during a welding transition process is determined.
2. The welding robot path planning method according to claim 1, characterized in that: The obstacles include static obstacles and dynamic obstacles; The generating of multiple initial paths according to the positions of the starting point, the end point and the obstacle, and obtaining the path length of each initial path comprises: Predicting a motion trajectory of the dynamic obstacle according to the position of the dynamic obstacle; Based on a preset path planning algorithm, the position of the static obstacle and the motion trajectory of the dynamic obstacle, a plurality of initial paths from the starting point to the end point are generated, and the path length of each initial path is obtained; Among them, each time a new node is generated, the position prediction range of the dynamic obstacle corresponding to the new node is determined according to the motion trajectory of the dynamic obstacle, and based on the position prediction range, it is detected whether the path extending the new node has the risk of colliding with the dynamic obstacle; if so, the new node is removed.
3. The welding robot path planning method according to claim 1, characterized in that: The initial path includes a plurality of nodes; The step of performing smooth optimization on the initial path with the shortest path length to obtain a smooth path includes: Perform interpolation fitting according to the nodes of the initial path with the shortest path length to obtain a fitting curve; Resampling is performed between the nodes of the fitting curve to obtain a plurality of new nodes; Detecting whether there is a curve segment on the fitting curve that does not satisfy a preset curvature constraint; If there is a curve segment on the fitting curve that does not satisfy the curvature constraint, the nodes in the curve segment are adjusted; the fitting curve is regenerated based on all the adjusted nodes, and the step of "detecting whether there is a curve segment on the fitting curve that does not satisfy the preset curvature constraint" and subsequent steps are re-executed until the fitting curve satisfies the curvature constraint; The fitted curve that satisfies the curvature constraint is taken as the smooth path.
4. The welding robot path planning method according to any one of claims 1 to 3, characterized in that: The smooth path includes a plurality of nodes; The step of generating a weighted graph structure based on the smooth path includes: Determine a node distance between any two nodes on the smooth path; For any two nodes whose node distance is less than a preset node threshold, establishing an edge connection between the two nodes; The weight of each edge is determined according to the node distance between the two nodes of each edge and the curvature of the local path; A weighted graph structure is generated based on each node, each edge and the weight of each edge of the smooth path.
5. The welding robot path planning method according to any one of claims 1 to 3, characterized in that: The step of searching for an optimal path between the starting point and the ending point in the weighted graph structure comprises: Based on a preset ant colony algorithm, searching for an optimal path between the starting point and the end point in the weighted graph structure; In each iteration of the ant colony algorithm, the path taken by each ant is evaluated according to a preset path evaluation function; wherein the path evaluation function is determined according to the path length and path curvature of the path taken by the ant.
6. The welding robot path planning method according to claim 5, characterized in that: The preset ant colony algorithm includes a heuristic function and a pheromone update formula; The heuristic function is determined according to the weight of each edge in the weighted graph structure; The pheromone update formula is determined based on the pheromone of each edge in the previous iteration, the path length and path curvature of the path taken by each ant.
7. The welding robot path planning method according to any one of claims 1 to 3, characterized in that: Determining the welding transition path of the welding robot in the welding transition process based on the optimal path includes: Determining the path length, path curvature, and distance from the obstacle of the optimal path; If the path length of the optimal path is greater than the path length of the smooth path, or the path curvature of the optimal path is greater than the path curvature of the smooth path, or the distance between the optimal path and the obstacle is less than a preset safety distance threshold, the position of the obstacle in the welding environment is re-acquired, and the step of "generating multiple initial paths of the welding transition process according to the starting point, the end point and the position of the obstacle, and obtaining the path length of each initial path" and subsequent steps are performed until the obtained optimal path is qualified; The qualified optimal path is used as the welding transition path of the welding robot in the welding transition process.
8. A welding robot path planning device, characterized in that: include: An acquisition module is used to acquire the starting point and the ending point of the welding robot in the welding transition process, as well as the position of obstacles in the welding environment; A path generation module, used to generate multiple initial paths according to the starting point, the end point and the position of the obstacle, and obtain the path length of each initial path; A smoothing module is used to perform smoothing optimization on the initial path with the shortest path length to obtain a smooth path; A graph structure module, used for generating a weighted graph structure based on the smooth path; An optimization module, used for searching the optimal path between the starting point and the end point in the weighted graph structure; A determination module is used to determine a welding transition path of the welding robot during a welding transition process based on the optimal path.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the method according to 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, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Unmanned ship global path multi-objective planning method based on improved ant colony algorithm
CN111026126A
Mobile robot intelligent path planning method
CN112631294A
Integrated predictive dynamic control for autonomous vehicle powertrain
CN114834478A
Path planning method based on multi-objective optimization smoothing ant colony algorithm
CN115033004A
Track planning method and device, robot and computer readable storage medium
CN115488898A
Cited By
Complex environment-oriented disinfection robot dynamic path planning embedded system
CN120742863A
Visual module integrated assembly platform for rapid deployment of welding robot
CN120772734A