Obstacle avoidance path planning method and device, computer equipment and robot
By generating trajectory points that avoid obstacles and searching for state points that do not collide with the workpiece, and combining A* and RRT*-Connect algorithms to optimize path planning, the problem of low efficiency in existing robot path planning algorithms is solved, and the accuracy and efficiency of robot path planning are improved.
Patent Information
- Application Number
- CN202511276275.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2025-11-07
AI Technical Summary
Existing robot path planning algorithms suffer from long computation time, unstable path quality, repetitive sampling, and low efficiency, making it difficult to meet the process requirements of automated welding, especially in flexible manufacturing with multiple varieties and small batches, where operational efficiency is low.
By generating trajectory points that avoid obstacles, determining the pose of the target trajectory points in the base coordinate system, constructing the planning interval, searching for state points that do not collide with the workpiece, generating a continuous path, and combining the A* algorithm and the RRT*-Connect algorithm to optimize the path planning.
It generates smooth path trajectories with short trajectory times, which can avoid obstacles and avoid collisions with workpieces, improving the accuracy and efficiency of robot path planning. It is suitable for obstacle avoidance planning tasks for weld seam paths of complex workpieces.
Smart Images

Figure CN120901968A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of robots, in particular to an obstacle avoidance path planning method and device, computer equipment and robot. BACKGROUND
[0002] With the development of industry and intelligent manufacturing, industrial robots have been widely used in the field of welding. Path planning technology, as a key supporting technology for robots to realize autonomous, efficient and accurate operation, is becoming increasingly important. However, the current robot path planning adopts manual teaching method, which is simple to operate, but low in efficiency and heavy in workload, and difficult to adapt to the flexible manufacturing demand of multi-variety and small batch. In order to further improve the welding efficiency, it is necessary to realize automatic path planning for welding robots.
[0003] In automatic welding, path planning is used to indicate the route that the robot moves from the starting point to the end point. In the process of movement, obstacles need to be avoided while ensuring smooth path, short movement time, short robot joint movement and no shaking. However, the current path planning algorithm has the disadvantages of long calculation time, unstable path quality, repeated sampling and low efficiency, which is difficult to meet the process requirements of automatic welding. SUMMARY
[0004] Therefore, it is necessary to provide an obstacle avoidance path planning method, device, computer equipment and robot, which can generate a smooth path trajectory with short trajectory time, avoid obstacles and not collide with workpieces.
[0005] In a first aspect, the present application provides an obstacle avoidance path planning method, comprising:
[0006] generating a trajectory point that avoids obstacles according to the starting point and the destination point of the robot;
[0007] determining the pose of each target trajectory point in the base coordinate system; the target trajectory points include the starting point, the destination point and the trajectory points that avoid obstacles;
[0008] determining the robot joint angle of each target trajectory point according to the pose;
[0009] constructing a planning interval according to the robot joint angle of adjacent target trajectory points;
[0010] for each planning interval, searching at least one state point that does not collide with the workpiece to generate a continuous path for the planning interval; the workpiece refers to an object in the working environment of the robot except the robot;
[0011] generating the target trajectory of the robot according to the continuous paths of multiple planning intervals.
[0012] In one of the embodiments, for each planning interval, at least one state point is searched, in which the robot does not collide with the workpiece, and a continuous path of the planning interval is generated, comprising:
[0013] A start search tree including a start point of the planning interval and a target search tree including an end point of the planning interval are constructed;
[0014] Based on the start search tree and the target search tree respectively, a state point in which the robot does not collide with the workpiece is searched, and the start search tree and the target search tree are updated according to the search result;
[0015] In a case where a distance between a latest state point searched by the start search tree and a latest state point searched by the target search tree is less than a preset threshold, a continuous path of the planning interval is generated according to the start search tree and the target search tree.
[0016] In one of the embodiments, searching the state point in which the robot does not collide with the workpiece comprises:
[0017] A random point is generated based on a current search tree; the current search tree is the start search tree or the target search tree;
[0018] A target point closest to the random point is determined from the current search tree;
[0019] A state point is generated in a preset step length from the target point to the random point;
[0020] In a case where it is detected that the robot does not collide with the workpiece from the target point to the state point, the state point is added to the current search tree.
[0021] In one of the embodiments, the method further comprises:
[0022] A plurality of tree nodes within a preset radius and centered on the state point in the current search tree are determined;
[0023] For each tree node, a path distance from the tree node to the root node via the state point is determined;
[0024] A tree node corresponding to a minimum path distance is taken as a parent node of the state point;
[0025] In a case where it is detected that a path distance from the root node via the target tree node and the state point is less than a path distance corresponding to the target tree node in the current search tree, a parent node of the target tree node is modified to be the state point.
[0026] In one of the embodiments, the random point is generated based on the current search tree, comprising:
[0027] Based on the current search tree, a random point is generated according to a target bias parameter; wherein, in the case that the random number is less than the target bias parameter, a preset point is taken as the random point; in the case that the random number is greater than or equal to the target bias parameter, the random point is randomly generated; the preset point is a starting point of the planning interval or an ending point of the planning interval.
[0028] In one of the embodiments, after determining the corresponding poses of each target trajectory point in the base coordinate system, the method further comprises:
[0029] By the inverse kinematics model, it is determined whether the robot can reach the pose of each target trajectory point;
[0030] In the case of unattainability, an external axis adjustment instruction is generated to control the movement of the external axis;
[0031] After the movement of the external axis, the determination is made again by the inverse kinematics model until the robot can reach the pose of each target trajectory point.
[0032] In one of the embodiments, the trajectory points avoiding obstacles are generated according to the starting point and the destination point of the robot, comprising:
[0033] An initial trajectory point is generated between the starting point and the destination point of the robot according to the starting point and the destination point of the robot by using a preset search algorithm;
[0034] Collision detection is performed according to the operation end model of the initial trajectory point and the obstacle model;
[0035] In the case of collision detection failure, the initial trajectory point is deleted, and the trajectory point is regenerated and the collision detection is performed again;
[0036] In the case of successful collision detection, the trajectory point avoiding obstacles is obtained.
[0037] In a second aspect, the application further provides an obstacle avoidance path planning device, comprising:
[0038] A trajectory point generation module is configured to generate trajectory points avoiding obstacles according to the starting point and the destination point of the robot;
[0039] A planning module is configured to determine the corresponding poses of each target trajectory point in the base coordinate system; the target trajectory points include the starting point, the destination point, and the trajectory points avoiding obstacles; the robot joint angles of each target trajectory point are determined according to the poses; and the planning interval is constructed according to the robot joint angles of adjacent target trajectory points.
[0040] The trajectory generation module is configured to search, for each planning interval, at least one state point that does not collide with the workpiece, to generate a continuous path of the planning interval; the workpiece refers to an object in a working environment of the robot, other than the robot; and the target trajectory of the robot is generated according to the continuous paths of the plurality of planning intervals.
[0041] In a third aspect, the present application also provides a computer device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method according to the first aspect when executing the computer program.
[0042] In a fourth aspect, the present application also provides a robot, comprising the computer device according to the third aspect.
[0043] The above obstacle avoidance path planning method, device, computer device and robot generate trajectory points that avoid obstacles according to the starting point and the destination point of the robot; determine the corresponding poses of each target trajectory point in the base coordinate system; the target trajectory points include the starting point, the destination point and the trajectory points that avoid obstacles; determine the robot joint angles of each target trajectory point according to the poses; construct a planning interval according to the robot joint angles of adjacent target trajectory points; search, for each planning interval, at least one state point that does not collide with the workpiece, to generate a continuous path of the planning interval; the workpiece refers to an object in a working environment of the robot, other than the robot; and the target trajectory of the robot is generated according to the continuous paths of the plurality of planning intervals. In this way, a smooth path trajectory that avoids obstacles and does not collide with the workpiece is generated in a short time based on the preliminary trajectory point planning and further state point searching, which helps to handle obstacle movement or path blockage and improves the accuracy and efficiency of robot path planning. The method is suitable for obstacle avoidance planning tasks of complex workpiece weld path in a robot welding scene, and takes into account the optimality, continuity and controllability of the trajectory. BRIEF DESCRIPTION OF DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor.
[0045] Figure 1 A flowchart of the obstacle avoidance path planning method in one embodiment;
[0046] Figure 2 A schematic diagram of a robot workstation in one embodiment;
[0047] Figure 3Fig. 1 is a schematic diagram of trajectory points for avoiding obstacles in one embodiment;
[0048] Figure 4 Fig. 2 is a schematic diagram of two-end state point searching in one embodiment;
[0049] Figure 5 Fig. 3 is a schematic diagram of a tree structure of state points in one embodiment;
[0050] Figure 6 Fig. 4 is a schematic diagram of a flow of a method for obstacle avoidance path planning in another embodiment;
[0051] Figure 7 Fig. 5 is a structural block diagram of an obstacle avoidance path planning device in one embodiment. DETAILED DESCRIPTION
[0052] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.
[0053] It should be noted that the terms "first", "second", and the like used in the present application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "include" and "have" and any variations thereof used in the present application are intended to cover non-exclusive inclusion. The term "multiple" used in the present application refers to two or more. The term "and / or" used in the present application refers to one of the options or any combination of multiple options.
[0054] In one exemplary embodiment, as shown in Fig. 1, a method for obstacle avoidance path planning is provided, comprising: Figure 1
[0055] Step 102, generating trajectory points for avoiding obstacles according to the starting point and the destination point of the robot.
[0056] In the method of the present embodiment, the computer device is a device in communication with the robot, which can control the robot by transmitting control signals. The computer device can be installed on the robot or set at a remote end of the robot and communicate with the actuator on the robot through a wireless network, which is not limited in the present embodiment. The robot in the present embodiment refers to an industrial robot, such as a welding robot in a welding scene, a handling robot, etc.
[0057] Optionally, before step 102, the method further comprises: performing space modeling in advance to create a space model as shown in Fig. 2. Figure 2 The simulation environment of the robot workstation shown, the robot workstation includes a robot model (for example Figure 2 The mechanical arm, the ground rail, and the gantry, etc. Workpieces. Establish a base coordinate system, and a tool coordinate system, etc. In the robot workstation; The real environment has a one-to-one correspondence with the simulation environment, and virtual-real synchronization is achieved.
[0058] Wherein, the starting point refers to the current position of the robot, and the destination point refers to the position that the robot needs to reach. In a specific implementation, the computer device searches for a trajectory point on the shortest path that avoids obstacles between the starting point and the destination point according to a preset path planning algorithm. In an optional implementation, referring to Figure 3 , an A* algorithm (A-Star, also known as A-star algorithm) is used to generate trajectory points between the starting point and the destination point according to a certain step size.
[0059] Step 104, determine the pose corresponding to each target trajectory point in the base coordinate system; The target trajectory point includes the starting point, the destination point, and the trajectory point that avoids obstacles.
[0060] Wherein, the target trajectory point is converted into the pose in the base coordinate system, and the pose includes position information and attitude information.
[0061] Step 106, determine the robot joint angle of each target trajectory point according to the pose.
[0062] Wherein, the robot joint angle of each target trajectory point is calculated through an inverse kinematics model.
[0063] Step 108, construct a planning interval according to the robot joint angle of adjacent target trajectory points.
[0064] Wherein, the robot joint angles of a series of target trajectory points are planned in order according to the point sequence, and each pair of adjacent points is taken as a planning interval, and the endpoint of the current planning interval is taken as the starting point of the next planning interval.
[0065] Step 110, for each planning interval, search for at least one state point that does not collide with the workpiece, and generate a continuous path for the planning interval; The workpiece refers to an object in the working environment of the robot, other than the robot.
[0066] Wherein, exemplarily, referring to Figure 2The workpiece refers to a ground rail and a gantry modeled in the robot workstation. The planning interval formed by adjacent trajectory points is further planned, at least one state point not colliding with the workpiece is searched, and a continuous path of the planning interval is generated according to the start point of the planning interval, the searched state point, and the end point of the planning interval. In the specific implementation, the state point not colliding with the workpiece is searched in the planning interval based on a preset algorithm. Alternatively, the RRT*-connect algorithm is used to search the tree in each planning region, and the RRT*-Connect algorithm is a path planning method combining the advantages of RRT-Connect (Bidirectional Rapidly-Exploring Random Tree) and RRT* (Optimal Rapidly-Exploring Random Tree).
[0067] In step 112, the target trajectory of the robot is generated according to the continuous path of the plurality of planning intervals.
[0068] In step 112, the target trajectory of the robot is generated according to the continuous path of the plurality of planning intervals.
[0069] In the above obstacle avoidance path planning method, the trajectory points avoiding obstacles are generated according to the start point and the destination point of the robot; the poses corresponding to each target trajectory point in the base coordinate system are determined; the target trajectory points include the start point, the destination point, and the trajectory points avoiding obstacles; the robot joint angles of each target trajectory point are determined according to the poses; the planning interval is constructed according to the robot joint angles of adjacent target trajectory points; at least one state point not colliding with the workpiece is searched for each planning interval, and a continuous path of the planning interval is generated; the workpiece refers to an object in the working environment of the robot, excluding the robot; and the target trajectory of the robot is generated according to the continuous path of the plurality of planning intervals. Through the above method, the smooth path trajectory with short trajectory time, avoiding obstacles, and not colliding with the workpiece is generated based on the preliminary trajectory point planning and further state point searching, which helps to handle obstacle movement or path blockage, and improves the accuracy and efficiency of robot path planning. The method is suitable for obstacle avoidance planning task of complex workpiece weld path in robot welding scene, and takes into account the optimality, continuity and controllability of the trajectory.
[0070] In one exemplary embodiment, step 110 includes: constructing a start search tree including a start point of a planning interval and a target search tree including an end point of the planning interval; searching state points not colliding with the workpiece based on the start search tree and the target search tree respectively, and updating the start search tree and the target search tree according to the search results; and in the case that the distance between the latest state point searched by the start search tree and the latest state point searched by the target search tree is less than a preset threshold, generating a continuous path of the planning interval according to the start search tree and the target search tree.
[0071] wherein a start joint angle at the start of the planning interval is set as a start state point (q star) and an end joint angle at the end of the planning interval is set as a goal state point (q goal). Referring to Figure 4 , the start search tree is searched in the direction of the end of the planning interval with the start state point (q star) as a root node. Correspondingly, the goal search tree is searched in the direction of the start of the planning interval with the goal state point (q goal) as a root node. Specifically, state points that do not collide with the workpiece are searched, and the start search tree and the goal search tree are updated. The cycle is repeated multiple times, and when the distance between the latest state points searched by the start search tree and the goal search tree is less than a preset threshold value (a value that can be set or adjusted according to actual needs), it is indicated that the start search tree and the goal search tree are connected to form a continuous path. Referring to Figure 5 , at least one path trajectory is formed by the tree search at both ends. In a specific implementation, the shortest path from the start state point (q star) to the goal state point (q goal) is determined as the continuous path of the planning interval according to the start search tree and the goal search tree.
[0072] In an exemplary embodiment, searching for state points that do not collide with the workpiece includes: generating a random point based on a current search tree; the current search tree is the start search tree or the goal search tree; determining a target point closest to the random point from the current search tree; generating a state point in the direction from the target point to the random point according to a preset step size; and adding the state point to the current search tree when it is detected that the robot does not collide with the workpiece from the target point to the state point.
[0073] wherein the start search tree is taken as an example for illustration: a random sampling point of the state space is customized to generate a random point (q rand); in the start search tree, a target point (q near) closest to the random point (q rand) is searched, and a new state point (q new) is generated in the direction from the target point (q near) to the random point (q rand) with a certain step size (i.e., a preset step size, which can be set or adjusted according to actual needs). Collision detection is performed on the movement process from the target point to the state point based on the robot model and the workpiece model, and the state point is added to the current search tree when the collision detection is successful (i.e., the robot does not collide with the workpiece from the target point to the state point). If the collision detection fails (i.e., the robot collides with the workpiece from the target point to the state point), the state point (q new) is discarded.
[0074] Correspondingly, the same search method is used to search based on the goal search tree. The cycle is repeated multiple times, and when the distance between the q new points searched by the start search tree and the goal search tree is less than a preset threshold value, it is indicated that the start search tree and the goal search tree are connected to form a continuous path.
[0075] Exemplarily, a forward kinematics model is adopted to move the robot to the joint angle corresponding to the state point (q_new) for collision detection calculation with the workpiece. If no collision occurs, the state point (q_new) is added to the search tree.
[0076] In an exemplary embodiment, the method further comprises: determining a plurality of tree nodes in the current search tree within a preset radius centered on the state point; determining, for each tree node, a path distance from the tree node to the root node via the state point; taking a tree node corresponding to a minimum path distance as a parent node of the state point; and modifying a parent node of a target tree node to the state point when it is detected that a path distance from the target tree node to the root node via the state point is smaller than a path distance corresponding to the target tree node in the current search tree.
[0077] In the range of a radius R around the state point, a tree node close to it in the current search tree is found. A path distance from the tree node to the root node via the state point is determined, and a tree node with a minimum path distance is selected as a parent node of the state point. A path distance from the target tree node to the root node via the state point is determined, and if this distance is smaller than a path distance originally connecting the target tree node to the root node in the current search tree, the parent node of the target tree node is modified to the state point. It should be noted that the adjacent tree nodes are analyzed to determine whether there is a path to the root node connected through the state point (q_new) that is shorter than the paths originally connecting the tree nodes to the root node. If a shorter path connected through the state point (q_new) is detected, the parent nodes of the tree nodes are changed to q_new, so that the current search tree gradually becomes better.
[0078] In an exemplary embodiment, generating a random point based on the current search tree comprises: generating a random point based on the current search tree according to a target bias parameter; wherein, in the case that a random number is smaller than the target bias parameter, a preset point is taken as the random point; in the case that the random number is greater than or equal to the target bias parameter, the random point is randomly generated; and the preset point is a start point of a planning interval or an end point of the planning interval.
[0079] In the generation of the random point (q_rand), in order to prevent the search from entering a dead end without direction, a target bias parameter is introduced, so that there is a certain probability that the start state point (q_star) and the target state point (q_goal) are assigned to q_rand in the generation of the random point (q_rand), ensuring the directionality and randomness of the RRT*-Connect algorithm.
[0080] Exemplarily, the random number refers to a number in the range of [0, 1], and the target bias parameter is a pre-set small probability value, for example, 0.05 or 0.1. The generated random number is compared with the pre-set probability. If the random number is less than the target bias parameter, a small probability event is executed, that is, the random point is directly set to the starting point or the ending point of the planning interval, which gives the algorithm a clear direction. If the random number is greater than or equal to the target bias parameter, a large probability event is executed, that is, a random point is generated completely randomly in the configuration space, which ensures the exploration ability of the algorithm.
[0081] In the embodiment, the target bias parameter is introduced in the planning process, the sampling efficiency of the algorithm in the target direction is improved, the planning time is shortened, and the path feasibility and quality are considered.
[0082] In an exemplary embodiment, after step 104, the method further comprises: determining whether the robot can reach the pose of each target trajectory point through an inverse kinematics model; in the case of determining that it is not reachable, generating an external axis adjustment instruction to control the movement of the external axis; after the movement of the external axis, re-determining through the inverse kinematics model until the robot can reach the pose of each target trajectory point.
[0083] In the embodiment, whether the robot can reach the pose of each target trajectory point is determined through the inverse kinematics model of the robot, and if it is not reachable, the external axis needs to be moved to make the robot reachable. In the specific implementation, the external axis is controlled to move through the generation of an external axis adjustment instruction, so that the robot can reach the pose of each target trajectory point.
[0084] In an exemplary embodiment, step 102 comprises: generating an initial trajectory point between the starting point and the destination point of the robot according to the preset search algorithm and the starting point and the destination point; performing collision detection according to the operation end model of the initial trajectory point and the obstacle model; in the case of collision detection failure, deleting the initial trajectory point and re-generating a trajectory point and performing collision detection; in the case of successful collision detection, obtaining a trajectory point that avoids the obstacle.
[0085] Wherein the start point and the destination point are taken as the actual point and the expected point respectively, and the trajectory points are generated between the two points according to a certain step length. The radius of the trajectory point is r, which can be understood as a model for describing the operating end of the robot, such as the gun end model of a welding gun. It is judged whether the operating end model intersects with the obstacle model. If it intersects, it indicates that the operating end of the robot collides with the obstacle, i.e. collision detection fails, at which time the trajectory point is deleted, and a new trajectory point is generated based on the previous trajectory point and collision detection is performed. If it does not intersect, it indicates that the operating end of the robot does not collide with the obstacle, i.e. collision detection succeeds, and the generated trajectory point is reserved as a trajectory point for avoiding the obstacle. The obstacle model can be determined by analyzing the visual data collected by the robot, and the obstacle model is converted to the base coordinate system. Referring to Figure 3 , the large ball represents the start point and the destination point, the rectangle represents the obstacle model, and the small ball is a series of trajectory points calculated by the A* algorithm. The trajectory point coordinates are the positions of the end of the industrial robot (i.e. the operating end).
[0086] In this embodiment, the global path guiding ability of the A* algorithm and the high degree of freedom local obstacle avoidance ability of the RRT*-Connect algorithm are combined, and the obstacle avoidance constraints of each joint space of the robot are fully considered, thereby improving the accuracy and efficiency of the robot path planning.
[0087] In an exemplary embodiment, as shown in Figure 6 , the obstacle avoidance path planning method comprises the following steps:
[0088] 1. Space modeling. A simulation environment of the robot workstation is created.
[0089] 2. The A* algorithm generates a series of trajectory points for the shortest path that avoids obstacles between the start point and the end point. The start point and the destination point are taken as the actual point and the expected point respectively, and the trajectory points are generated between the two points according to a certain step length. The radius of the trajectory point is r, which can be understood as a model for describing the operating end of the robot, such as the gun end model of a welding gun. It is judged whether the operating end model intersects with the obstacle model. If it intersects, it indicates that the operating end of the robot collides with the obstacle, i.e. collision detection fails, at which time the trajectory point is deleted, and a new trajectory point is generated based on the previous trajectory point and collision detection is performed. If it does not intersect, it indicates that the operating end of the robot does not collide with the obstacle, i.e. collision detection succeeds, and the generated trajectory point is reserved as a trajectory point for avoiding the obstacle.
[0090] 3. A series of trajectory points are generated into the pose of the base coordinate system.
[0091] 4, the pose of the trajectory point is calculated by the inverse kinematics of the robot, and the joint angle of the robot at the trajectory point is calculated. Whether the robot is reachable is determined by the inverse kinematics of the robot. If it is not reachable, the external axis needs to be moved to make the robot reachable; the joint angle of the robot at the trajectory point is calculated by the inverse kinematics.
[0092] 5, the joint angle of the robot is used as the starting joint angle and the target point joint angle of the RRT*-Connect algorithm, and the two ends are similar to search tree search, and a target bias parameter is introduced.
[0093] 6, calculate the shortest joint angle of the path, and display the pose of the robot in space according to the forward kinematics of the robot.
[0094] 7, detect whether the robot collides with the workpiece by a collision detection algorithm.
[0095] 8, if collision, discard the generated state point.
[0096] 9, generate a collision-free and shortest path trajectory.
[0097] Specifically, the RRT*-Connect algorithm is used to search the tree in each planning area, the starting joint angle is set to the starting state point (q_star), the ending joint angle is set to the target state point (q_goal), and the state space random sampling point (q_rand) is defined. The steps are as follows: first, set two search trees (starting search tree and target point search tree), the starting search tree contains the q_star point, and the target point search tree contains the q_goal point; the search principle is as follows: search in the starting point search tree, generate a q_rand point, find the nearest point (q_near) in the search tree from the q_rand point, and generate a new state point (q_new) from the q_near point in a certain step towards the direction of q_rand.
[0098] Adopting forward kinematics, the robot is moved to the joint angle corresponding to the q_new point, and collision detection calculation is performed with the workpiece. If no collision occurs, the q_new point is added to the search tree. After generating the new node q_new, in the range with a radius of R around it, the old nodes close to it in the search tree are found, and path analysis is performed on the adjacent tree nodes to determine whether there is a path connected to the root node through the state point (q_new) that is shorter than the path originally connecting the root node through these tree nodes. If a shorter path connected through the state point (q_new) is detected, the parent nodes of these tree nodes are changed to q_new, so that the current search tree gradually becomes better. If a collision occurs, the q_new point is discarded. The same search method is used to search based on the target search tree. The cycle is repeated multiple times in sequence, and when the distance between the q_new points searched by the start search tree and the target search tree is less than a preset threshold, it is indicated that the start search tree and the target search tree are connected to form a continuous path. When generating the random point (q_rand), in order to prevent the search from entering a dead end without direction, a target bias parameter is introduced, so that there is a certain probability that the start state point (q_star) and the target state point (q_goal) are assigned to q_rand during the generation of the random point (q_rand), ensuring the directionality and randomness of the RRT*-Connect algorithm.
[0099] Compared with the way of using a certain path planning algorithm alone, in the embodiment, the A* algorithm is used to provide a preliminary path as a guide, and the RRT*-Connect algorithm is further accelerated based on the target bias parameter, and has stronger target guidance. By avoiding known obstacles through the A* algorithm and avoiding sampling collision through the RRT*-Connect algorithm, double protection is formed, and the obstacle avoidance success rate is higher. By providing heuristic information through the A* algorithm, the RRT*-Connect algorithm forms a shorter and smoother path, and improves the path quality. Due to bidirectional expansion + target bias + A* trajectory guidance, the search tree is closer to the target, and the path generation efficiency is improved. By using the A* algorithm to replan the approximate path, the RRT*-Connect algorithm is fine-tuned locally, which is helpful for processing obstacle movement or path blockage, and is more suitable for dynamic environments or complex scenes. The A* algorithm is used to insert trajectory points between the start point and the end point to avoid obstacles, each trajectory point is searched simultaneously, the searched path is spliced, and the trajectory formed has the shortest search time, the smoothest path, and no collision.
[0100] It should be understood that although each step in the flowchart involved in the above-described embodiments is shown in sequence according to the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowchart involved in the above-described embodiments can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately or alternately executed with at least part of other steps or stages. It can be understood that the steps in different embodiments can be freely combined as needed, and various non-contradictory schemes formed by the combination are within the scope of protection of the present application.
[0101] Based on the same inventive concept, the embodiments of the present application also provide an obstacle-avoiding path planning device for implementing the above-mentioned obstacle-avoiding path planning method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, and therefore the specific limitations in one or more obstacle-avoiding path planning device embodiments provided below can refer to the limitations of the obstacle-avoiding path planning method described above, which will not be repeated here.
[0102] In one exemplary embodiment, as shown in Figure 7 An obstacle-avoiding path planning device is provided, comprising:
[0103] A trajectory point generation module 702 is configured to generate trajectory points that avoid obstacles according to a starting point and a destination point of the robot;
[0104] A planning module 704 is configured to determine a corresponding pose of each target trajectory point in the base coordinate system; the target trajectory points include the starting point, the destination point, and the trajectory points that avoid obstacles; determine the robot joint angle of each target trajectory point according to the pose; and construct a planning interval according to the robot joint angle of adjacent target trajectory points.
[0105] A trajectory generation module 706 is configured to search for at least one state point that does not collide with a workpiece for each planning interval, generate a continuous path for the planning interval, and generate a target trajectory for the robot according to the continuous paths of multiple planning intervals; the workpiece refers to an object in the working environment of the robot other than the robot.
[0106] In the above obstacle-avoiding path planning device, the trajectory is generated based on the preliminary trajectory point planning and further state point searching, which is smooth, can avoid obstacles, does not collide with the workpiece, and has a short trajectory time, which helps to handle obstacle movement or path blockage, and improves the accuracy and efficiency of robot path planning.
[0107] In an example embodiment, the trajectory generation module 706 is further configured to construct a start search tree including a start point of the planning interval and a target search tree including an end point of the planning interval; search state points in which the workpiece does not collide with the robot based on the start search tree and the target search tree respectively, and update the start search tree and the target search tree according to the search results; and generate a continuous path of the planning interval according to the start search tree and the target search tree, in a case where a distance between a latest state point searched by the start search tree and a latest state point searched by the target search tree is less than a preset threshold.
[0108] In an example embodiment, the trajectory generation module 706 is further configured to generate a random point based on a current search tree; the current search tree is the start search tree or the target search tree; determine a target point closest to the random point from the current search tree; generate a state point in a preset step size from the target point to the random point; and add the state point to the current search tree in a case where it is detected that the robot does not collide with the workpiece from the target point to the state point.
[0109] In an example embodiment, the trajectory generation module 706 is further configured to determine a plurality of tree nodes within a preset radius centered on the state point in the current search tree; determine a path distance from the state point and the tree node to the root node for each tree node; take a tree node corresponding to a minimum path distance as a parent node of the state point; and modify the parent node of the target tree node to the state point in a case where it is detected that a path distance from the target tree node and the state point to the root node is less than a path distance corresponding to the target tree node in the current search tree.
[0110] In an example embodiment, the trajectory generation module 706 is further configured to generate a random point according to a target bias parameter based on a current search tree; wherein a preset point is taken as the random point in a case where a random number is less than the target bias parameter; and the random point is randomly generated in a case where the random number is greater than or equal to the target bias parameter; the preset point is the start point of the planning interval or the end point of the planning interval.
[0111] In an example embodiment, the obstacle avoidance path planning device further comprises an adjustment module configured to determine whether the robot can reach the pose of each target trajectory point by an inverse kinematics model; generate an external axis adjustment instruction to control the movement of the external axis in a case where it is determined that the robot cannot reach the pose of each target trajectory point; and re-determine whether the robot can reach the pose of each target trajectory point by the inverse kinematics model after the movement of the external axis until the robot can reach the pose of each target trajectory point.
[0112] In an example embodiment, the trajectory point generation module 702 is further configured to generate an initial trajectory point between the start point and the goal point of the robot according to a preset search algorithm; perform collision detection according to the operation end model of the initial trajectory point and the obstacle model; in the case of collision detection failure, delete the initial trajectory point and re-generate a trajectory point and perform collision detection; and in the case of successful collision detection, obtain a trajectory point that avoids the obstacle.
[0113] The modules in the above obstacle avoidance path planning device can be implemented wholly or partially by software, hardware, or a combination thereof. The modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in the computer device in software form, so as to be called and executed by the processor to perform operations corresponding to the modules.
[0114] In an example embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program: generating a trajectory point that avoids an obstacle according to a start point and a goal point of a robot; determining a pose of each target trajectory point in a base coordinate system; the target trajectory points including the start point, the goal point, and the trajectory point that avoids the obstacle; determining a robot joint angle of each target trajectory point according to the pose; constructing a planning interval according to robot joint angles of adjacent target trajectory points; searching at least one state point that does not collide with a workpiece for each planning interval to generate a continuous path of the planning interval; the workpiece being an object in a working environment of the robot other than the robot; and generating a target trajectory of the robot according to the continuous paths of the planning intervals.
[0115] In an example embodiment, the processor further implements the following steps when executing the computer program: constructing a start search tree including a start point of the planning interval and a target search tree including a goal point of the planning interval; searching the state point that does not collide with the workpiece based on the start search tree and the target search tree respectively, and updating the start search tree and the target search tree according to the search results; and in the case that a distance between the latest state point searched by the start search tree and the latest state point searched by the target search tree is less than a preset threshold, generating the continuous path of the planning interval according to the start search tree and the target search tree.
[0116] In an example embodiment, the processor further implements the following steps when executing the computer program: generating a random point based on a current search tree; the current search tree being the start search tree or the target search tree; determining a target point closest to the random point from the current search tree; generating a state point in a direction from the target point to the random point according to a preset step size; and in the case that it is detected that the robot does not collide with the workpiece from the target point to the state point, adding the state point to the current search tree.
[0117] In one embodiment, the processor, when executing the computer program, further implements the following steps: determining a plurality of tree nodes in the current search tree within a preset radius centered on the state point; determining, for each tree node, a path distance from the state point to the root node via the state point and the tree node; taking the tree node corresponding to the minimum path distance as the parent node of the state point; and modifying the parent node of the target tree node to the state point when detecting that the path distance from the target tree node to the root node via the state point is less than the path distance corresponding to the target tree node in the current search tree.
[0118] In one embodiment, the processor, when executing the computer program, further implements the following steps: generating a random point based on the current search tree according to a target bias parameter; taking a preset point as the random point when the random number is less than the target bias parameter; and randomly generating the random point when the random number is greater than or equal to the target bias parameter; and the preset point is the start point of the planning interval or the end point of the planning interval.
[0119] In one embodiment, the processor, when executing the computer program, further implements the following steps: determining whether the robot can reach the pose of each target trajectory point by using an inverse kinematics model; generating an external axis adjustment instruction to control the movement of the external axis when it is determined that the robot cannot reach the pose of each target trajectory point; and re-determining whether the robot can reach the pose of each target trajectory point by using the inverse kinematics model after the movement of the external axis until the robot can reach the pose of each target trajectory point.
[0120] In one embodiment, the processor, when executing the computer program, further implements the following steps: generating an initial trajectory point between the start point and the destination point of the robot according to the start point and the destination point by using a preset search algorithm; performing collision detection according to the operation end model of the initial trajectory point and the obstacle model; deleting the initial trajectory point and re-generating a trajectory point and performing collision detection when the collision detection fails; and obtaining a trajectory point that avoids the obstacle when the collision detection succeeds.
[0121] In one exemplary embodiment, a robot is provided, which includes the computer device described in any one of the embodiments of the present application.
[0122] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.
[0123] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.
[0124] The technical features of the above embodiments can be combined in any manner. To make the description concise, all possible combinations of the technical features in the above embodiments are not described, but as long as the combinations of the technical features do not exist, they should be considered as the scope of the present application.
[0125] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.
Claims
1. An obstacle avoidance path planning method characterized by, The method comprises: generating a trajectory point avoiding obstacles according to a starting point and a destination point of a robot; determining a pose of each target trajectory point in a base coordinate system; the target trajectory points comprise the starting point, the destination point, and the trajectory point avoiding obstacles; determining a robot joint angle of each target trajectory point according to the pose; constructing a planning interval according to robot joint angles of adjacent target trajectory points; for each planning interval, searching at least one state point not colliding with a workpiece to generate a continuous path of the planning interval; the workpiece refers to an object in a working environment of the robot except the robot; generating a target trajectory of the robot according to continuous paths of multiple planning intervals.
2. The method of claim 1, wherein, The method for each planning interval, searching at least one state point not colliding with a workpiece to generate a continuous path of the planning interval, comprises: constructing a starting search tree including a starting point of the planning interval, and a target search tree including a terminal point of the planning interval; searching a state point not colliding with a workpiece based on the starting search tree and the target search tree respectively, and updating the starting search tree and the target search tree according to the search results; in a case that a distance between a latest state point searched by the starting search tree and a latest state point searched by the target search tree is less than a preset threshold, generating a continuous path of the planning interval according to the starting search tree and the target search tree.
3. The method of claim 2, wherein, The method for searching a state point not colliding with a workpiece, comprises: generating a random point based on a current search tree; the current search tree is the starting search tree or the target search tree; determining a target point closest to the random point from the current search tree; generating a state point in a preset step from a direction of the target point to the random point; in a case that it is detected that the robot does not collide with the workpiece from the target point to the state point, adding the state point to the current search tree.
4. The method of claim 3, wherein, The method further comprises: determining a plurality of tree nodes within a preset radius centered on the state point in the current search tree; for each tree node, determining a path distance from the tree node to a root node via the state point; taking a tree node corresponding to a minimum path distance as a parent node of the state point; in a case that it is detected that a path distance from a target tree node to the root node via the state point is less than a path distance corresponding to the target tree node in the current search tree, modifying a parent node of the target tree node to the state point.
5. The method of claim 3, wherein, The method for generating a random point based on a current search tree, comprises: generating a random point based on a current search tree according to a target bias parameter; in a case that a random number is less than the target bias parameter, taking a preset point as a random point; in a case that the random number is greater than or equal to the target bias parameter, randomly generating a random point; the preset point is a starting point of the planning interval or a terminal point of the planning interval.
6. The method according to any one of claims 1 to 5, characterized in that, After the pose of each target trajectory point in the base coordinate system is determined, the method further comprises: determining whether the robot can reach the pose of each target trajectory point through an inverse kinematics model; In the case of determining that the target trajectory point is unreachable, an external axis adjustment instruction is generated to control the external axis to move; After the external axis moves, the inverse kinematics model is used again to determine whether the robot can reach the pose of each target trajectory point.
7. The method according to any one of claims 1 to 5, characterized in that, The method comprises: An initial trajectory point is generated between the start point and the end point of the robot according to a preset search algorithm; Collision detection is performed according to the operation end model of the initial trajectory point and the obstacle model; In the case of collision detection failure, the initial trajectory point is deleted, and a new trajectory point is generated and collision detection is performed again; In the case of successful collision detection, the trajectory point that avoids the obstacle is obtained.
8. An obstacle avoidance path planning device characterized by comprising: The device comprises: a trajectory point generation module configured to generate a trajectory point that avoids an obstacle according to a start point and an end point of a robot; a planning module configured to determine a pose corresponding to each target trajectory point in a base coordinate system; the target trajectory points include the start point, the end point, and the trajectory point that avoids the obstacle; determine robot joint angles of each target trajectory point according to the pose; and construct a planning interval according to robot joint angles of adjacent target trajectory points; a trajectory generation module configured to search for at least one state point that does not collide with a workpiece for each planning interval to generate a continuous path of the planning interval; the workpiece refers to an object in a working environment of the robot other than the robot; and generate a target trajectory of the robot according to continuous paths of multiple planning intervals. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A robot, characterized in that The robot comprises the computer device of claim 9.
Citation Information
Patent Citations
Dynamic obstacle avoidance path planning method of seven-degree-of-freedom redundant mechanical arm based on fast random search tree
CN109571466A
Obstacle avoidance trajectory planning method for redundant mechanical arm based on improved rapidly-exploring random tree
CN113352319A