Welding robot path planning method, electronic device and storage medium

By using simulated welding environment and delayed collision detection methods in welding robot path planning, the problem of difficult to achieve fast, efficient collision-free path planning in the prior art is solved, and efficient welding path planning in changing environments is achieved.

CN114924565BActive Publication Date: 2025-04-15EAST CHINA UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210581995.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-26
Publication Date
2025-04-15
Estimated Expiration
2042-05-26

AI Technical Summary

Technical Problem

The existing welding robot path planning methods are difficult to achieve rapid and efficient collision-free path planning when facing changing task environments and high real-time requirements.

Method used

Through modeling, welding environment is obtained, welding requirements are obtained, the path segments to be planned and the planning sequence are determined, and the path planning is planned using delayed collision detection method. 具体步骤包括在仿真环境中确定路径段的起点和目标点,构建路线图,搜索代价最小的路径,进行局部路径的碰撞检测,并根据检测结果调整焊接机器人位姿以避免碰撞。

Benefits of technology

It realizes the fast and efficient search of the shortest collision-free welding path in an unfixed environment, improves the efficiency and automation of path search, and adapts to the changing task environment and high real-time requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114924565B_ABST
    Figure CN114924565B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of welding robots, and in particular to a welding robot path planning method, electronic equipment and storage medium, wherein the method comprises: modeling to obtain a simulated welding environment; obtaining welding requirements, determining all path segments to be planned and the planning sequence; completing the path planning of delayed collision detection for each path segment to be planned according to the planning sequence: after completing the planning of all path segments, generating a complete path of the welding robot from the starting point to the end point of welding. The present invention can quickly and efficiently realize automatic collision-free path planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of welding robots, and in particular to a welding robot path planning method, electronic equipment and storage medium. Background Art

[0002] Welding robot path planning is to find the transition path of the welding robot system during the welding process. The transition path takes into account the complete collision-free path of the welding robot starting from the starting point of welding, sequentially to each weld end point, and finally to the end point. Automated path design can improve the efficiency and intelligent production of welding tasks, ensure stable welding quality, and reduce labor costs.

[0003] At present, welding robot path planning is mostly completed by experienced senior engineers through manual teaching or offline programming. Manual teaching has a low degree of automation, unstable quality, and a long time to formulate a plan. Offline programming has a higher degree of automation, but poor flexibility and a long time. When the task environment is more changeable and the real-time requirements for welding tasks are higher, the existing technology is usually difficult to achieve fast and efficient collision-free path planning. Therefore, in order to improve production efficiency and meet production needs, it is necessary to provide a more efficient welding robot path planning solution. Summary of the invention

[0004] Based on the problem of poor real-time performance of welding robot path planning, the embodiments of the present invention provide a welding robot path planning method, electronic equipment and storage medium, which can realize automated collision-free path planning more quickly and efficiently.

[0005] In a first aspect, an embodiment of the present invention provides a welding robot path planning method, comprising:

[0006] Modeling to obtain a simulated welding environment; wherein the simulated welding environment includes models of a welding robot and various obstacles, the welding robot includes a robot body and a welding gun, and the obstacles include workpieces to be welded;

[0007] Obtain welding requirements, determine all path segments to be planned and the planning sequence;

[0008] In the planning order, perform the following steps for each path segment to be planned to complete the path planning for delayed collision detection:

[0009] A. in the simulated welding environment, determining the stage starting point and target point of the path segment, and constructing a route map by a sampling method;

[0010] B. Search the route map to obtain a path from the starting point of the stage to the target point that is passable and has the lowest cost as a pre-selected path;

[0011] C. discretizing the preselected path into a plurality of transition points, and sequentially performing collision detection on the local path between every two adjacent transition points;

[0012] If no collision event is detected in all local paths, the pre-selected path is retained to complete the planning of the path segment;

[0013] If a collision event between the welding gun and the workpiece is detected in any local path, the welding robot posture is adjusted based on the collision state between the welding gun and the workpiece in the collision event, and the collision detection of the local path is continued;

[0014] If a collision event other than a collision between the welding gun and the workpiece is detected in any local path, the transition points at both ends of the local path are set as prohibited passage points, and the process returns to step B to update the preselected path;

[0015] After completing the planning of all path segments, a complete path of the welding robot from the starting point to the end point of welding is generated.

[0016] Optionally, the modeling to obtain a simulated welding environment includes:

[0017] Obtain the digital model files of the welding robot and various obstacles;

[0018] Based on the digital model file of the welding robot, the point cloud method is used to model the welding robot to obtain a model;

[0019] Based on the numerical model files of each obstacle, the grid method is used to model the corresponding obstacle.

[0020] All the obtained models are unified into the coordinate system of the simulated welding environment.

[0021] Optionally, the modeling to obtain a simulated welding environment further includes:

[0022] After unifying all the obtained models into the coordinate system of the simulated welding environment, obtaining the position of each obstacle in the actual welding environment;

[0023] The position of the model in the simulated welding environment is corrected according to the acquired positions of the obstacles.

[0024] Optionally, in step A, constructing a roadmap by a sampling method includes:

[0025] Based on the space formed by the starting point of the stage and the target point and the model circumscribed space of the obstacle, determine whether to perform local planning, if yes, perform low discreteness sampling, otherwise perform uniform sampling with a fixed step length to obtain corresponding sampling points;

[0026] The obtained sampling points are connected to form the route map.

[0027] Optionally, the performing low discreteness sampling includes:

[0028] Based on the space formed by the starting point of the stage and the target point and the model circumscribed space of the obstacle, the minimum radius between any two sampling points is calculated;

[0029] Randomly sample and obtain sampling points and make a judgment to determine whether the distance between any two sampling points obtained relative to the existing sampling points is greater than the minimum radius. If so, retain the sampling point, otherwise delete the sampling point;

[0030] Repeat the steps of randomly sampling to obtain sampling points and making judgments until the existing sampling points reach a preset target number of sampling points.

[0031] Optionally, in step B, searching the roadmap to obtain a path from the starting point of the stage to the target point that is passable and has the lowest cost includes:

[0032] An artificial repulsion field is established in the simulated welding environment; the artificial repulsion field includes at least one group of repulsion grids, each group of repulsion grids has a model of an obstacle as the core, and the repulsion value gradually decreases from the inner layer to the outer layer;

[0033] Establish a cost function that introduces artificial repulsion field penalty; let the i-th sampling point x in the path i Cost function at (i) The expression is:

[0034]

[0035] Among them, dist(x,y) represents the straight-line distance between two points x and y, x and y represent two points, s j Represents the sampling point x j-1 To the sampling point x j The repulsive value of the repulsive grid that the path passes through, μ is the penalty parameter that controls the repulsive force scaling, i ≥ 2, x1 represents the starting point of the stage, x goal Indicates the target point;

[0036] According to the roadmap, starting from the starting point of the stage, the sampling points are expanded to the target point to generate a passable path; wherein the rule for expanding the sampling points is to select the sampling points with the smallest cost function from all the sampling points connected to the previous sampling point for expansion.

[0037] Optionally, in step C, performing collision detection on a local path formed by every two adjacent transition points includes:

[0038] Generate one or more detection points on the local path formed by two transition points;

[0039] Configuring the posture of the welding robot at the transition point and the detection point;

[0040] For each transition point and detection point, it is determined in turn whether the model of the welding robot and the model of the obstacle have no overlap. If so, it is determined that no collision event is detected, otherwise it is determined that a collision event occurs;

[0041] After determining that a collision event occurs, if the collision event is an overlap between the models of the welding gun and the workpiece in the model of the welding robot, it is determined that a collision event between the welding gun and the workpiece is detected; otherwise, it is determined that a collision event other than a collision between the welding gun and the workpiece is detected.

[0042] Optionally, adjusting the posture of the welding robot based on the state of collision between the welding gun and the workpiece in the collision event and continuing to perform collision detection on the local path includes:

[0043] Determine the adjustment direction based on the area where the welding gun and the workpiece models overlap in the welding robot model;

[0044] According to the adjustment direction and the preset adjustment step length, the posture of the welding robot where the collision event occurs is adjusted in a stepwise manner, and the number of steps does not exceed a preset threshold;

[0045] If there is no overlapping area after adjustment, new detection points are configured according to the adjusted welding robot posture, and collision detection is continued for the local path;

[0046] When the number of steps reaches the preset threshold and there are still overlapping areas, the transition points at both ends of the local path are set as prohibited points, and the process returns to step B to update the pre-selected path.

[0047] In a second aspect, an embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any embodiment of this specification is implemented.

[0048] In a third aspect, 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 in a computer, the computer is caused to execute the method described in any embodiment of this specification.

[0049] The embodiments of the present invention provide a welding robot path planning method, an electronic device and a storage medium. During the collision detection process, the present invention can quickly find the closest path that can resolve the collision by fine-tuning the welding robot's posture in the event of a collision between a welding gun and a workpiece, thereby improving the success rate of passing the collision detection and reducing the waste of computing resources, thereby improving the efficiency of path search and more efficiently realizing automated collision-free path planning. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 This is a flow chart of a welding robot path planning method provided by one embodiment of the present invention;

[0052] Figure 2(a) is a mathematical model of a certain workpiece;

[0053] FIG2( b ) is a model obtained after the workpiece shown in FIG2( a ) is modeled using the grid method;

[0054] Figure 3 is a schematic diagram of the repulsive grid and repulsive force value distribution of an artificial repulsive force field in one embodiment of the present invention;

[0055] Figure 4 is a schematic diagram of a non-collision event in one embodiment of the present invention;

[0056] Figure 5 It is a schematic diagram of the process of adjusting the welding gun in one embodiment of the present invention. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0058] As mentioned above, currently, the path planning of welding robots is mostly completed by experienced senior engineers through manual teaching or offline programming. When the task environment is more changeable and the real-time requirements for welding tasks are higher, especially for 6-DOF welding robots with external axes (such as slide rails), the degrees of freedom are higher and the welding tasks are more complex. The existing technology is usually difficult to achieve fast and efficient collision-free path planning. In view of this, the present invention proposes an automated welding robot path planning scheme. During the collision detection process, the welding robot posture is purposefully fine-tuned to improve the success rate of collision detection and the efficiency of path planning.

[0059] The specific implementation of the above concept is described below.

[0060] Please refer to Figure 1, an embodiment of the present invention provides a welding robot path planning method, the method comprising:

[0061] Step 100, modeling to obtain a simulated welding environment; wherein the simulated welding environment includes models of a welding robot and various obstacles, the welding robot includes a robot body and a welding gun, and the obstacles include a workpiece to be welded;

[0062] Step 102, obtaining welding requirements, determining all path segments to be planned and the planning sequence;

[0063] Step 104, in accordance with the planning sequence, execute the following steps for each path segment to be planned to complete the path planning for delayed collision detection:

[0064] A. in the simulated welding environment, determining the stage starting point and the target point of the path segment, and constructing a route map from the stage starting point to the target point by a sampling method;

[0065] B. Search the route map to obtain a path from the starting point of the stage to the target point that is passable and has the lowest cost as a pre-selected path;

[0066] C. discretizing the preselected path into a plurality of transition points, and sequentially performing collision detection on the local path between every two adjacent transition points;

[0067] If no collision event is detected in all local paths, the pre-selected path is retained to complete the planning of the path segment;

[0068] If a collision event between the welding gun and the workpiece is detected in any local path, the welding robot posture is adjusted based on the collision state between the welding gun and the workpiece in the collision event, and the collision detection of the local path is continued;

[0069] If a collision event other than a collision between the welding gun and the workpiece is detected in any local path, the transition points at both ends of the local path are set as prohibited passage points, and the process returns to step B, updates the preselected path, and then executes step C again;

[0070] Step 106, after completing the planning of all path segments, a complete path of the welding robot from the starting point to the end point of welding is generated.

[0071] In the embodiment of the present invention, in the case of a collision between the welding gun and the workpiece, the closest path that can resolve the collision is found by purposefully and minutely adjusting the position of the welding robot, which can improve the success rate of passing the collision detection, reduce the waste of computing resources, and thus improve the efficiency of path search, and more quickly realize automatic collision-free path planning. The present invention can efficiently find the shortest collision-free welding path for different types of workpieces in a non-fixed environment.

[0072] Described below Figure 1 How the various steps are performed.

[0073] With respect to step 100, the modeling to obtain the simulated welding environment further includes:

[0074] Obtain the digital model files of the welding robot and various obstacles;

[0075] Based on the digital model file of the welding robot, the point cloud method is used to model the welding robot to obtain a model;

[0076] Based on the numerical model files of each obstacle, the grid method is used to model the corresponding obstacle.

[0077] All the obtained models are unified into the coordinate system of the simulated welding environment.

[0078] In the above embodiment, the point cloud method can be used to obtain a point set for representing the physical area of ​​the welding robot, and the grid method can be used to obtain a point set representing the obstacle space formed by rasterizing the obstacle, as shown in Figure 2 (a) and Figure 2 (b). Both methods are prior arts. The use of the point cloud method and the grid method can take into account the accuracy and efficiency of collision detection and improve the efficiency of path planning. It should be noted that the grid method modeling will cause the obstacle space of the obstacle to expand outward compared to the obstacle entity. If there are multiple obstacle entities that are close to each other, after modeling, the obstacle space is adjacent or overlapped, and it can be considered as an obstacle. In the modeling process, the coordinate systems of all objects (welding robots and obstacles, if there are entities other than the workpiece to be welded, they are also considered as obstacles) are unified to establish a unique coordinate system for the welding environment. To facilitate collision detection calculations, the workspace in the simulated welding environment can be divided into multiple grid cubes. Then, the obstacle position is determined based on the grid cubes contained in the obstacle model at the initial position and a grid matrix is ​​established to obtain better calculation efficiency and accuracy. Rasterizing the workspace is conducive to solving the subsequent adjustment of the obstacle position and collision detection problems in the actual welding environment.

[0079] Furthermore, the modeling to obtain the simulated welding environment also includes:

[0080] After unifying all the obtained models into the coordinate system of the simulated welding environment, obtaining the position of each obstacle in the actual welding environment;

[0081] According to the acquired positions of the obstacles, the positions of the corresponding models in the simulated welding environment are corrected.

[0082] The above embodiment corrects the simulated welding environment based on the actual welding environment. Preferably, an infrared laser sensor can be used to scan the actual welding environment, obtain the position of each obstacle in the actual welding environment, obtain the rotation angle and offset of each obstacle (including the workpiece) relative to the initial position used for modeling, and realize real-time adjustment. Optionally, considering that the workbench of a general welding robot is placed parallel to the ground, the obstacle can be regarded as being placed horizontally. In the coordinate system of the simulated welding environment, the change of the obstacle relative to the initial position is usually a rotation around the z-axis and then a movement along the x-axis or y-axis. The corrected obstacle position P' can be expressed as:

[0083]

[0084] Where P = [p x ,p y ,p z ,1]' is the initial position of the obstacle, θ is the relative rotation angle of the obstacle, Rot(Z,θ) represents the transformation matrix, offset x 、offset y and offset z Respectively represent the offset of the obstacle on the three coordinate axes.

[0085] By adopting the above embodiment, a hybrid modeling method is adopted to establish a model for a non-fixed welding environment, and an infrared laser sensor is used to scan the actual scene, so as to obtain environmental information in real time and adjust the virtual model, taking into account both calculation speed and accuracy.

[0086] With respect to step 102, the step of obtaining welding requirements and determining all path segments to be planned and the planning sequence further includes:

[0087] Based on the welding requirements, determine the positions of the welding start point and end point, as well as the positions and sequence of each necessary point; wherein the positions of the necessary points are determined according to the positions of the end points of the weld, and the sequence is determined according to the welding sequence of the weld;

[0088] Based on the welding requirements, determining the posture of the welding robot at the starting point, the ending point and each of the necessary points;

[0089] In the complete path from the starting point to the end point, a path segment without a clear moving trajectory of the welding robot is used as a path segment to be planned;

[0090] The planning order is determined based on the order in which each path segment to be planned passes through the complete path.

[0091] The above embodiment determines the positions of all key points (including the starting point, the end point and the necessary points) of welding and the posture of the welding robot at the key points based on the welding requirements. The key point position is also the position where the end of the welding gun of the welding robot must reach. For key points with corresponding requirements, such as the starting point and the end point that require the welding robot to reach a certain preset posture, the welding robot posture (i.e., position and posture) of such key points is fixed, and for key points that do not require the posture of the welding robot, that is, only the end of the welding gun is required to reach the key point position but the welding robot is not required to reach a certain posture, the three-dimensional posture information of the welding robot at the key point position can be obtained in a random manner.

[0092] Furthermore, since the grid modeling method defines the grid cube that contains some obstacles as the obstacle space, it actually expands the obstacle space occupied by the modeling object, and the weld attached to the surface of the workpiece will also be classified as the obstacle space, making it impossible to find a feasible path. Therefore, when determining the position of the necessary point based on the end point position of the weld, the weld can be moved outward, out of the obstacle space, and moved to the weld adjustment position. For example, in the welding process of the ship group, the working situation of welding the vertical stiffener can make the weld float away from the workpiece in the vertical direction before planning. For weld l, after it moves outward, it can be considered that weld l' is obtained. In the actual welding process, the endpoint positions of weld l and weld l' are both necessary points, but in the early stage of path planning, the endpoint of weld l' can be used as a necessary point. When the complete path of the welding robot from the starting point to the end point of welding is generated in step 106, the path from weld l' to weld l is added (this part of the path can be considered not to require planning, and the path from weld l' to weld l can be completed by translation and other methods) to obtain the path required for actual welding. In this way, in the early stage of path planning, the actual weld endpoint is replaced by an approximate weld endpoint, that is, the welding robot is first moved to the weld adjustment position above the workpiece, and then planning is performed to avoid the robot increasing the risk of collision during the movement of the robot near the original weld, which can also improve the calculation efficiency.

[0093] With respect to step 104, in step A, constructing a route map from the starting point of the stage to the target point by a sampling method further includes:

[0094] Based on the space formed by the starting point of the stage and the target point and the model circumscribed space of the obstacle, determine whether to perform local planning, if yes, perform low discreteness sampling, otherwise perform uniform sampling with a fixed step length to obtain corresponding sampling points;

[0095] The obtained sampling points are connected to form the route map.

[0096] In the above embodiment, for the path segment close to the obstacle, since it is in the working space close to the obstacle, low discreteness sampling is adopted to make the sampling points dispersed, so that a wide space can be covered even with a small number of sampling points. For the working space far from the obstacle, uniform sampling points with a fixed step size can be used to fill it, thereby improving the calculation efficiency. The space formed by the stage starting point and the target point, that is, the cubic space formed by the stage starting point and the target point as vertices, and the model circumscribed space of the obstacle, that is, the circumscribed cubic space of the model of the obstacle, are different from the obstacle space. It should be noted that since the model circumscribed space of the obstacle further expands outward relative to the obstacle space, if there are multiple circumscribed cubes of obstacles that are adjacent or overlapped, these multiple circumscribed cubes can be merged into a whole or further expanded into a larger circumscribed cube, that is, they can be considered as a large model circumscribed space or separately as multiple model circumscribed spaces.

[0097] Furthermore, the determining whether to perform local planning includes:

[0098] Compare the degree of overlap between the space formed by the starting point of the stage and the target point and the model circumscribed space of the obstacle. If the space formed by the starting point of the stage and the target point overlaps with the model circumscribed space of one or more obstacles, determine that the path segment is to be locally planned.

[0099] In the above embodiment, whether the space space1 formed by the stage starting point and the target point overlaps with the model circumscribed space space2 of one or more obstacles is used as a condition for determining whether to perform local planning. If there is an overlapping space space3 between space1 and space2, it can be considered that the path segment is near the obstacle and local planning should be performed.

[0100] Furthermore, the low discreteness sampling comprises the following steps:

[0101] A1. Calculate the minimum radius R between any two sampling points based on the space formed by the starting point of the stage and the target point and the model circumscribed space of the obstacle;

[0102] A2. Randomly sample and obtain sampling points and make a judgment to determine whether the distance between any two sampling points is greater than the minimum radius R relative to the existing sampling points. If so, retain the sampling point as the existing sampling point, otherwise delete the sampling point;

[0103] A3. Repeat step A2 until the existing sampling points reach the preset target number of sampling points.

[0104] Optionally, the expression for the minimum radius R is:

[0105]

[0106]

[0107] χ space = x obs ∪χ init ∪χ goal

[0108] Where N represents the preset number of sampling points, λ represents the positive scaling factor, m=1, 2, 3 represent the three coordinate axes of the three-dimensional space, and χ init is the starting point of the stage, goal is the target point, χ obs is the point set of the grid cube representing the model circumscribed space of the obstacle, χ obs The corresponding space is the same as the space with χ init , χ goal The spaces constructed for the vertices overlap, χ space is the point set of the grid cube representing the low discreteness sampling space, χ space (m) represents the point set χ space The coordinates of the point in the m-axis direction.

[0109] The above embodiment of the present invention measures the minimum radius R between two small balls with two random sampling points as the center using the Lebesgue volume formula, retains sampling points whose distance is greater than the radius of the small ball, improves the distribution of sampling points, helps reduce blind searches, and improves path search efficiency.

[0110] In step B, searching the route map to obtain a path from the starting point of the stage to the target point that is passable and has the lowest cost further includes:

[0111] An artificial repulsion field is established in the simulated welding environment; the artificial repulsion field includes at least one group of repulsion grids, each group of repulsion grids has a model of an obstacle as the core, and the repulsion value gradually decreases from the inner layer to the outer layer;

[0112] Establish a cost function that introduces artificial repulsion field penalty; let the i-th sampling point x in the path i Cost function (i) The expression is:

[0113]

[0114] Among them, dist(x,y) represents the straight-line distance between two points x and y, x and y represent two points, s j Represents the sampling point x j-1 To the sampling point x jThe repulsive value of the repulsive grid that the path passes through, μ is the penalty parameter that controls the repulsive force scaling, i ≥ 2, x1 represents the starting point of the stage, x goal Indicates the target point;

[0115] According to the roadmap, starting from the starting point of the stage, the sampling points are expanded to the target point to generate a passable path; wherein the rule for expanding the sampling points is to select the sampling points with the smallest cost function from all the sampling points connected to the previous sampling point for expansion. That is, the i-th sampling point x in the extended path i When , search the route map for all the i-1th sampling points x in the path i-1 The sampling points that can be connected are compared with the cost functions of these sampling points, and the sampling point with the smallest cost function is selected as the i-th sampling point x i Add the path. The cost function can be used to judge the priority of the sampling points, helping the algorithm to sequentially select the optimal sampling points in the expandable nodes, and finally generate the path with the minimum cost. Optionally, searching the roadmap to obtain a feasible path can use algorithms in the prior art, such as the A* algorithm. Using the A* algorithm with an improved cost (or fitness value) calculation method, path search can be achieved that takes into account the effect of the artificial repulsive field.

[0116] The above embodiment uses the distance cost function with artificial repulsive field as the improved cost function, which reduces the possibility of collision and accelerates the calculation convergence, ensures the shortest feasible path length obtained by the end of the welding gun and the safe distance between the robot and the obstacle, and also reduces the time consumed by collision detection, thereby improving the calculation efficiency and quickly obtaining a feasible path. (i) is the improved cost function, g(x init ,x i ) represents the cost from the starting point of the stage to the i-th sampling point, including the distance cost and the repulsion penalty cost, h(x i ,x goal ) is the estimated cost from the i-th sample point to the target point, that is, dist(x i ,x goal ). If a path passes through the artificial repulsion field, the sum of the repulsion values ​​of all the repulsion grids it passes through is taken to penalize the path. This increases the cost function value and can control the algorithm to select a path with a smaller cost and keep it away from obstacles. For the convenience of calculation, the repulsion field is also divided by the grid method, and the repulsion values ​​of artificial repulsion fields at different distances from obstacles are also different. Figure 3 As shown in the figure, in the grid workspace, the grid without obstacles can be defined as a free grid with a repulsion value of 0, and the grid with obstacles is an obstacle grid. A group of repulsion grids covers a group of obstacle grids, and the repulsion value gradually decreases from the inside to the outside (such as Figure 3In the figure, the barrier grid repulsion value is 3, the adjacent outer grid repulsion value is 2, and the outer grid repulsion value is 1, decreasing layer by layer). The specific values ​​and distribution can be set according to actual needs. The repulsion grid is still a free grid, but has a repulsion value.

[0117] Alternatively, if Figure 4 As shown, in the step C, collision detection is performed on the local path formed by every two adjacent transition points, further comprising:

[0118] Generate one or more detection points on the local path formed by two transition points;

[0119] Configuring the posture of the welding robot at the transition point and the detection point;

[0120] For each transition point and detection point, it is determined in turn whether the model of the welding robot and the model of the obstacle have no overlap. If so, it is determined that no collision event is detected, otherwise it is determined that a collision event occurs;

[0121] After determining that a collision event has occurred, if the collision event is an overlap between the welding gun and the workpiece model in the welding robot model, then it is determined that a collision event between the welding gun and the workpiece has been detected; otherwise, it is determined that a collision event other than the collision between the welding gun and the workpiece has been detected. A collision event other than the collision between the welding gun and the workpiece may be a collision between the robot body and an obstacle, or a collision between the welding gun and other obstacles other than the workpiece. If a welding robot with an external axis is used, it may also be a collision between the robot body and the external axis. In these cases, new paths are obtained through search.

[0122] Preferably, to determine whether the model of the welding robot and the model of the obstacle have no overlap, after determining the position and posture of the welding robot, the model of the welding robot in the form of a point cloud can be rasterized, that is, the grid cube contained in the model of the welding robot in the rasterized workspace is determined, and by comparing whether the grids occupied by the welding robot model and the grids occupied by the obstacle model have no intersection, it can be quickly determined whether the model of the welding robot and the model of the obstacle have no overlap.

[0123] In the above embodiment, the posture of the welding robot at the transition point and the detection point is configured, and the three-dimensional posture information of the welding robot can be obtained by random sampling. The way to determine whether the model of the welding robot and the model of the obstacle are non-overlapping is to compare the grid vertex set of the welding robot at the point (i.e., the position of the transition point or the detection point) with the obstacle space grid vertex set of the obstacle, and check whether there is an intersection. If there is no intersection, it means that the current path has no collision at this point. If there is an intersection, it means that an overlapping area is generated between the robot and the obstacle, and it is considered that a collision event is detected. At this time, if it is determined that the welding gun collides with the workpiece, the posture adjustment strategy will be triggered, the path will be fine-tuned, and then the collision detection stage will be returned; otherwise, the transition points at both ends of the local path are set as prohibited passing points and the feasible path is re-planned. The new path should not pass through two or more prohibited passing points. The above embodiment can reduce the waste of computing resources, improve the success rate of collision detection and the efficiency of path search, and the welding gun posture adjustment strategy is only used when the collision detection between the welding gun and the workpiece fails, and the adjustment process is only used during the transition path search, which will not affect the fixed posture and welding quality during welding.

[0124] Optionally, adjusting the posture of the welding robot based on the state of the collision between the welding gun and the workpiece in the collision event and continuing to perform collision detection on the local path further includes:

[0125] Determine the adjustment direction based on the area where the welding gun and the workpiece models overlap in the welding robot model;

[0126] According to the adjustment direction and the preset adjustment step length, the posture of the welding robot where the collision event occurs is adjusted in a stepwise manner, and the number of steps does not exceed a preset threshold;

[0127] If there is no overlapping area after adjustment, new detection points are configured according to the adjusted welding robot posture, and collision detection is continued for the local path;

[0128] When the number of steps reaches the preset threshold and there are still overlapping areas, the transition points at both ends of the local path are set as prohibited points, and the process returns to step B to update the pre-selected path.

[0129] The key point of the welding gun posture adjustment strategy is to find the appropriate welding gun movement direction to adjust the position and posture of the robot. The above embodiment fine-tunes the posture of the welding robot in a step-by-step manner to eliminate collision events, which can reduce the time of collision detection and improve the success rate of collision detection.

[0130] Optionally, determining the adjustment direction based on an area where the models of the welding gun and the workpiece overlap in the model of the welding robot further comprises:

[0131] Determine the center point p of the welding gungun The overlap area P generated by the collision grid , calculate the directed force F that the welding gun needs to move, the expression is:

[0132]

[0133] Among them, K represents the total number of grid cubes contained in the overlapping area generated by the collision, and p grid,i represents the point of the i-th grid cube in the overlapping area generated by the collision, P grid Represents the point set of the grid cube contained in the overlapping area generated by the collision, p gun Indicates the center point of the welding gun;

[0134] Based on the directed resultant force F, the adjustment direction is determined, which is F / |F|, where |F| represents the modulus of F.

[0135] Furthermore, the posture of the welding robot where the collision event occurs is adjusted in a step-by-step manner according to the adjustment direction and the preset adjustment step length, and the number of steps does not exceed a preset threshold, which is expressed in the form of an expression:

[0136]

[0137] Where sl represents the preset adjustment step size, which can be selected to be consistent with the grid size of the workspace, p represents the position of the welding robot when the collision event is detected, and p new It represents the adjusted welding robot posture, t represents the number of adjustments, that is, the number of steps, and the preset threshold can be set as needed. For example, it is set to 20, that is, t≤20. When the number of adjustments exceeds the preset threshold and the appropriate welding robot posture is still not found, the path is searched again.

[0138] like Figure 5 As shown, after a collision between the welding gun and the workpiece occurs, the above embodiment gradually adjusts the welding robot posture according to the specific situation of the collision until a new collision-free point is found on the path and the collision detection is continued, or the path is searched again. The welding gun adjustment strategy adopted by the present invention increases the possibility of passing the collision detection, saves computing resources and computing time, is more efficient, and has strong scalability.

[0139] The present invention provides a complete welding robot path planning method, including welding environment modeling, path planning, collision detection and welding gun posture adjustment, taking into account both computational efficiency and path quality, having high efficiency and robustness, strong flexibility, and being suitable for robot operation scenarios such as mobile, arc welding, and spot welding. The present invention can adapt to real-time path planning of different workpieces at any position, realize automated and intelligent production, reduce labor costs, and effectively utilize environmental information to make subtle adjustments to the planned path, thereby improving path planning efficiency. The scheme of the present invention has strong search capabilities and high efficiency, and can plan a feasible shorter robot path in a shorter time, effectively solving the problem of online collision-free path planning of arc welding robots with external axes in non-fixed environments, while ensuring safety, improving welding efficiency and intelligent production processes.

[0140] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, a welding robot path planning method in any embodiment of the present invention is implemented.

[0141] 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 processor executes a welding robot path planning method in any embodiment of the present invention.

[0142] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code stored in the storage medium.

[0143] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0144] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0145] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0146] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0147] It should be noted that, in this article, 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 such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical factors in the process, method, article or device including the elements.

[0148] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.

[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A welding robot path planning method, characterized in that: include: Modeling to obtain a simulated welding environment; wherein the simulated welding environment includes models of a welding robot and various obstacles, the welding robot includes a robot body and a welding gun, and the obstacles include workpieces to be welded; Obtain welding requirements, determine all path segments to be planned and the planning sequence; In the planning order, perform the following steps for each path segment to be planned to complete the path planning for delayed collision detection: A. in the simulated welding environment, determining the stage starting point and target point of the path segment, and constructing a route map by a sampling method; B. Search the route map to obtain a path from the starting point of the stage to the target point that is passable and has the lowest cost as a pre-selected path; C. discretizing the preselected path into a plurality of transition points, and sequentially performing collision detection on the local path between every two adjacent transition points; If no collision event is detected in all local paths, the pre-selected path is retained to complete the planning of the path segment; If a collision event between the welding gun and the workpiece is detected in any local path, the welding robot posture is adjusted based on the collision state between the welding gun and the workpiece in the collision event, and the collision detection of the local path is continued; If a collision event other than a collision between the welding gun and the workpiece is detected in any local path, the transition points at both ends of the local path are set as prohibited passage points, and the process returns to step B to update the preselected path; After completing the planning of all path segments, a complete path of the welding robot from the starting point to the end point of welding is generated; The modeling obtains the simulated welding environment, including: obtaining digital model files of the welding robot and each obstacle; based on the digital model file of the welding robot, modeling is performed by a point cloud method to obtain a model of the welding robot; based on the digital model file of each obstacle, modeling is performed by a grid method to obtain a model of the corresponding obstacle; all the obtained models are unified into the coordinate system of the simulated welding environment; the position of each obstacle in the actual welding environment is obtained; and the position of the model in the simulated welding environment is corrected according to the obtained position of each obstacle; In the step A, a route map is constructed by a sampling method, including: judging whether to perform local planning based on the space formed by the starting point of the stage and the target point and the model circumscribed space of the obstacle, and if so, performing low discreteness sampling, otherwise performing uniform sampling with a fixed step length to obtain corresponding sampling points; connecting the obtained sampling points to form the route map; The low discreteness sampling comprises: calculating the minimum radius between any two sampling points based on the space formed by the stage starting point and the target point and the model circumscribed space of the obstacle; randomly sampling to obtain sampling points and making a judgment to determine whether the distance between any two sampling points obtained relative to the existing sampling points is greater than the minimum radius, if so, retaining the sampling point, otherwise deleting the sampling point; repeating the steps of randomly sampling to obtain sampling points and making a judgment until the existing sampling points reach a preset target number of sampling points; In the step B, the route map is searched to obtain a path from the starting point of the stage to the target point that is passable and has the lowest cost, including: establishing an artificial repulsive field in the simulated welding environment; the artificial repulsive field includes at least one group of repulsive grids, each group of repulsive grids has a model of an obstacle as the core, and the repulsive value gradually decreases from the inner layer to the outer layer; establishing a cost function that introduces the penalty of the artificial repulsive field; setting the first i Sampling points The cost function at The expression is: in, dist (x, y) represents the straight-line distance between two points x and y, where x and y represent two points. From the sampling point To the sampling point The repulsive force value of the repulsive grid that the path passes through, is the penalty parameter that controls the scaling of the repulsive force, i ≥2, x 1 indicates the starting point of the stage, x goal Indicates the target point; According to the roadmap, starting from the starting point of the stage, the sampling points are expanded to the target point to generate a passable path; wherein the rule for expanding the sampling points is to select the sampling points with the smallest cost function from all the sampling points connected to the previous sampling point for expansion; In the step C, collision detection is performed on the local path formed by every two adjacent transition points, including: generating one or more detection points on the local path formed by the two transition points; configuring the posture of the welding robot at the transition points and the detection points; for each transition point and the detection point, determining in turn whether the model of the welding robot and the model of the obstacle have no overlap, if so, determining that no collision event is detected, otherwise determining that a collision event occurs; after determining that a collision event occurs, if the collision event is an overlap between the models of the welding gun and the workpiece in the model of the welding robot, determining that a collision event between the welding gun and the workpiece is detected, otherwise determining that a collision event other than the collision between the welding gun and the workpiece is detected.

2. The welding robot path planning method according to claim 1, characterized in that: The method of adjusting the posture of the welding robot based on the collision state between the welding gun and the workpiece in the collision event and continuing to perform collision detection on the local path includes: Determine the adjustment direction based on the area where the welding gun and the workpiece models overlap in the welding robot model; According to the adjustment direction and the preset adjustment step length, the posture of the welding robot where the collision event occurs is adjusted in a stepwise manner, and the number of steps does not exceed a preset threshold; If there is no overlapping area after adjustment, new detection points are configured according to the adjusted welding robot posture, and collision detection is continued for the local path; When the number of steps reaches the preset threshold and there are still overlapping areas, the transition points at both ends of the local path are set as prohibited points, and the process returns to step B to update the pre-selected path.

3. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 2 is implemented.

4. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Robot path planning method and device based on improved artificial potential field method

    CN110221613A

  • Robot rolling path planning method and system, storage medium, equipment and application

    CN112859866A