Obstacle avoidance path planning method and device, computer equipment and robot
Patent Information
- Application Number
- CN202511276275.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2045-09-08
AI Technical Summary
然而目前的路径规划算法,存在计算时间长、路径质量不稳定、重复采样、效率低等缺点,难以满足自动焊接的工艺要求
[0043] The aforementioned obstacle avoidance path planning method, device, computer equipment, and robot generate obstacle-avoiding trajectory points based on the robot's starting and destination points; determine the pose of each target trajectory point in the base coordinate system; the target trajectory points include the starting point, destination point, and obstacle-avoiding trajectory points; determine the robot joint angles of each target trajectory point based on the poses; construct planning intervals based on the robot joint angles of adjacent target trajectory points; for each planning interval, search for at least one state point that does not collide with the workpiece, generating a continuous path for the planning interval; the workpiece refers to objects other than the robot in the robot's working environment; and generate the robot's target trajectory based on the continuous paths of multiple planning intervals. Through this method, based on preliminary trajectory point planning and further state point search, a smooth path trajectory with short trajectory time, obstacle avoidance, and no collision with the workpiece is generated, which helps handle obstacle movement or path congestion, improving the accuracy and efficiency of robot path planning. This method is applicable to obstacle avoidance planning tasks for complex workpiece weld seam paths in robot welding scenarios, balancing trajectory optimization, continuity, and controllability.
Smart Images

Figure CN120901968B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics technology, and in particular to an obstacle avoidance path planning method, apparatus, computer equipment, and robot. Background Technology
[0002] With the development of industry and intelligent manufacturing, industrial robots have been widely used in the welding field. Path planning technology, as a key supporting technology for robots to achieve autonomous, efficient, and precise operations, is becoming increasingly important. However, current robot path planning uses a manual teaching method, which is simple to operate but inefficient, labor-intensive, and difficult to adapt to the flexible manufacturing needs of multi-variety, small-batch production. To further improve welding efficiency, it is necessary to achieve automated path planning for welding robots.
[0003] In automated welding, path planning is used to guide a robot's movement from a starting point to an end point. During this movement, obstacles must be avoided while ensuring a smooth path, short movement time, and minimal vibration of the robot's joints. However, current path planning algorithms suffer from drawbacks such as long computation time, unstable path quality, repetitive sampling, and low efficiency, making it difficult to meet the process requirements of automated welding. Summary of the Invention
[0004] Therefore, it is necessary to provide an obstacle avoidance path planning method, device, computer equipment, and robot to address the above-mentioned technical problems, which can generate smooth path trajectories with short trajectory times, obstacle avoidance, and no collision with workpieces.
[0005] Firstly, this application provides an obstacle avoidance path planning method, including:
[0006] Generate trajectory points to avoid obstacles based on the robot's starting point and destination point;
[0007] Determine 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] Based on the pose, determine the robot joint angles for each target trajectory point;
[0009] The planning interval is constructed based on the robot joint angles of adjacent target trajectory points;
[0010] 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 other than the robot in the robot's working environment.
[0011] The robot's target trajectory is generated based on the continuous paths of multiple planning intervals.
[0012] In one embodiment, for each planning interval, at least one state point that does not collide with the workpiece is searched to generate a continuous path for the planning interval, including:
[0013] Construct a starting search tree that includes the starting point of the planning interval, and a target search tree that includes the ending point of the planning interval;
[0014] Based on the initial search tree and the target search tree respectively, search for state points that do not collide with the workpiece, and update the initial search tree and the target search tree according to the search results;
[0015] If the distance between the latest state point found by the starting search tree and the latest state point found by the target search tree is less than a preset threshold, a continuous path for the planned interval is generated based on the starting search tree and the target search tree.
[0016] In one embodiment, searching for state points that do not collide with the workpiece includes:
[0017] Random points are generated based on the current search tree; the current search tree can be either the starting search tree or the target search tree.
[0018] From the current search tree, determine the target point that is closest to the random point;
[0019] State points are generated in the direction from the target point to a random point according to a preset step size;
[0020] If it is detected that the robot and the workpiece do not collide when traveling from the target point to the state point, the state point is added to the current search tree.
[0021] In one embodiment, the method further includes:
[0022] Identify multiple tree nodes within a preset radius centered on the state point in the current search tree;
[0023] For each tree node, determine the path distance from the state point and the tree node to the root node;
[0024] Use the tree node corresponding to the minimum path distance as the parent node of the state point;
[0025] If the path distance from the target tree node and the state point to the root node is detected to be less than the path distance corresponding to the target tree node in the current search tree, then the parent node of the target tree node is changed to the state point.
[0026] In one embodiment, generating random points based on the current search tree includes:
[0027] Based on the current search tree, random points are generated according to the target bias parameter. If the random number is less than the target bias parameter, a preset point is used as the random point. If the random number is greater than or equal to the target bias parameter, random points are generated randomly. The preset point is the start point or end point of the planning interval.
[0028] In one embodiment, after determining the pose of each target trajectory point in the base coordinate system, the method further includes:
[0029] The inverse kinematics model is used to determine whether the robot can achieve the pose of each target trajectory point.
[0030] If the target axis is deemed unreachable, an external axis adjustment command is generated to control the movement of the external axis.
[0031] After the external axis is moved, the inverse kinematics model is used to re-evaluate the position until the robot can reach the pose of each target trajectory point.
[0032] In one embodiment, generating trajectory points to avoid obstacles based on the robot's starting point and destination point includes:
[0033] Using a preset search algorithm, initial trajectory points are generated between the robot's starting point and destination point;
[0034] Collision detection is performed based on the operational model of the initial trajectory point and the obstacle model;
[0035] If collision detection fails, delete the initial trajectory points, regenerate the trajectory points, and perform collision detection again.
[0036] If the collision detection is successful, the trajectory points that avoid the obstacle are obtained.
[0037] Secondly, this application also provides an obstacle avoidance path planning device, comprising:
[0038] The trajectory point generation module is used to generate trajectory points to avoid obstacles based on the robot's starting point and destination point;
[0039] The planning module is used to determine 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; based on the pose, the robot joint angles of each target trajectory point are determined; and the planning interval is constructed based on the robot joint angles of adjacent target trajectory points.
[0040] The trajectory generation module is used to search for at least one state point that does not collide with the workpiece for each planning interval and generate a continuous path for the planning interval; the workpiece refers to an object other than the robot in the robot's working environment; the target trajectory of the robot is generated based on the continuous paths of multiple planning intervals.
[0041] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in the first aspect above.
[0042] Fourthly, this application also provides a robot, which includes the computer equipment described in the third aspect above.
[0043] The aforementioned obstacle avoidance path planning method, device, computer equipment, and robot generate obstacle-avoiding trajectory points based on the robot's starting and destination points; determine the pose of each target trajectory point in the base coordinate system; the target trajectory points include the starting point, destination point, and obstacle-avoiding trajectory points; determine the robot joint angles of each target trajectory point based on the poses; construct planning intervals based on the robot joint angles of adjacent target trajectory points; for each planning interval, search for at least one state point that does not collide with the workpiece, generating a continuous path for the planning interval; the workpiece refers to objects other than the robot in the robot's working environment; and generate the robot's target trajectory based on the continuous paths of multiple planning intervals. Through this method, based on preliminary trajectory point planning and further state point search, a smooth path trajectory with short trajectory time, obstacle avoidance, and no collision with the workpiece is generated, which helps handle obstacle movement or path congestion, improving the accuracy and efficiency of robot path planning. This method is applicable to obstacle avoidance planning tasks for complex workpiece weld seam paths in robot welding scenarios, balancing trajectory optimization, continuity, and controllability. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is a flowchart illustrating an obstacle avoidance path planning method in one embodiment;
[0046] Figure 2 This is a schematic diagram of a robot workstation in one embodiment;
[0047] Figure 3This is a schematic diagram of the trajectory points for avoiding obstacles in one embodiment;
[0048] Figure 4 This is a schematic diagram of the search for state points at both ends in one embodiment;
[0049] Figure 5 This is a schematic diagram of the tree structure of state points in one embodiment;
[0050] Figure 6 This is a flowchart illustrating the obstacle avoidance path planning method in another embodiment;
[0051] Figure 7 This is a structural block diagram of an obstacle avoidance path planning device in one embodiment. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0053] It should be noted that the terms "first," "second," etc., used in this 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 "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0054] In one exemplary embodiment, such as Figure 1 As shown, an obstacle avoidance path planning method is provided, including:
[0055] Step 102: Generate trajectory points to avoid obstacles based on the robot's starting point and destination point.
[0056] In this embodiment, the method is applied to a computer device, which is a device that is communicatively connected to the robot and can control the robot by transmitting control signals. This computer device can be installed on the robot or located at a remote end of the robot, and communicates with the actuators on the robot via a wireless network; this embodiment does not impose any limitations on this. The robot in this embodiment refers to an industrial robot, such as a welding robot or a handling robot in a welding scenario.
[0057] Optionally, before step 102, the method further includes: performing spatial modeling in advance, creating, for example... Figure 2The simulation environment of the robot workstation shown includes a robot model (e.g., Figure 2 The robot shows a robotic arm, a ground rail, and a gantry, among other workpieces. A base coordinate system and a tool coordinate system are established within the robot workstation; the real environment and the simulation environment have a one-to-one correspondence, achieving virtual-real synchronization.
[0058] Here, the starting point refers to the robot's current location, and the destination point refers to the location the robot needs to reach. In the specific implementation, the computer device searches for trajectory points on the shortest path avoiding obstacles between the starting point and the destination point according to a preset path planning algorithm. In one optional implementation, refer to... Figure 3 The A* algorithm (A-Star, also known as the A-Star algorithm) is used to generate trajectory points between the starting point and the destination point with a certain step size.
[0059] Step 104: Determine 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.
[0060] This involves converting each target trajectory point into a pose in the base coordinate system, where the pose includes position information and attitude information.
[0061] Step 106: Determine the robot joint angles for each target trajectory point based on the pose.
[0062] The robot joint angles at each target trajectory point are calculated using an inverse kinematics model.
[0063] Step 108: Construct the planning interval based on the robot joint angles of adjacent target trajectory points.
[0064] In this process, the robot joint angles of a series of target trajectory points are planned sequentially according to the point order. Each pair of adjacent points is considered as a planning interval, and the end point of the current planning interval is used 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 other than the robot in the robot's working environment.
[0066] For example, refer to Figure 2The workpiece refers to the ground track and gantry, etc., modeled in the robot workstation. The planning interval formed by adjacent trajectory points is further planned, searching for at least one state point that does not collide with the workpiece. Based on the starting point of the planning interval, the searched state point, and the ending point of the planning interval, a continuous path is generated for the planning interval. In specific implementation, a preset algorithm is used to search for state points that do not collide with the workpiece within the planning interval. Optionally, the RRT*-connect algorithm is used to perform a tree search in each planning region. The RRT*-Connect algorithm is a path planning method that combines the advantages of both RRT-Connect (bidirectional fast expanding random tree) and RRT* (optimal fast expanding random tree).
[0067] Step 112: Generate the robot's target trajectory based on the continuous paths of multiple planning intervals.
[0068] The robot's target trajectory is obtained by splicing together the continuous paths of multiple planning intervals.
[0069] In the aforementioned obstacle avoidance path planning method, trajectory points that avoid obstacles are generated based on the robot's starting point and destination point; the pose of each target trajectory point in the base coordinate system is determined; the target trajectory points include the starting point, destination point, and the trajectory points that avoid obstacles; the robot joint angles of each target trajectory point are determined based on the poses; planning intervals are constructed based on the robot joint angles of adjacent target trajectory points; for each planning interval, at least one state point that does not collide with the workpiece is searched to generate a continuous path for the planning interval; the workpiece refers to objects other than the robot in the robot's working environment; and the robot's target trajectory is generated based on the continuous paths of multiple planning intervals. Through this method, based on preliminary trajectory point planning and further state point search, a smooth path trajectory with short trajectory time, capable of avoiding obstacles and colliding with the workpiece is generated, which helps handle obstacle movement or path congestion, improving the accuracy and efficiency of robot path planning. This method is applicable to obstacle avoidance planning tasks for complex workpiece weld seam paths in robot welding scenarios, balancing trajectory optimization, continuity, and controllability.
[0070] In an exemplary embodiment, step 110 includes: constructing a starting search tree including the starting point of the planned interval and a target search tree including the ending point of the planned interval; searching for state points that do not collide with the 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; and generating a continuous path for the planned interval based on the starting search tree and the target search tree if the distance between the latest state point found by the starting search tree and the latest state point found by the target search tree is less than a preset threshold.
[0071] Specifically, the starting joint angle at the beginning of the planning interval is set as the starting state point (q_star), and the ending joint angle at the end of the planning interval is set as the target state point (q_goal). (Refer to...) Figure 4 The initial search tree, rooted at the starting state point (q_star), searches towards the end of the planned interval. Correspondingly, the target search tree, rooted at the target state point (q_goal), searches towards the beginning of the planned interval. Specifically, it searches for state points that do not collide with the workpiece, updating both the initial and target search trees. This process is repeated multiple times. When the distance between the latest state points found by the initial and target search trees is less than a preset threshold (a value that can be set or adjusted according to actual needs), the initial and target search trees are connected, forming a continuous path. (Refer to...) Figure 5 At least one path trajectory is formed at both ends through tree search. In the specific implementation, the shortest path from the starting state point (q_star) to the target state point (q_goal) is determined based on the starting search tree and the target search tree, and is used as the continuous path of the planning interval.
[0072] In an exemplary embodiment, searching for a state point that does not collide with the workpiece includes: generating a random point based on the current search tree; the current search tree is either a starting search tree or a target search tree; determining a target point from the current search tree that is closest to the random point; 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 if it is detected that the robot and the workpiece do not collide from the target point to the state point.
[0073] Taking the current search tree as the starting search tree as an example: A random point (q_rand) is generated by randomly sampling points in the custom state space. In the starting search tree, the target point (q_near) closest to the random point (q_rand) is searched. A new state point (q_new) is generated from the target point (q_near) towards 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). Based on the robot model and the workpiece model, collision detection is performed on the motion process from the target point to the state point. If the collision detection is successful (i.e., the robot and the workpiece do not collide from the target point to the state point), the state point is added to the current search tree. If the collision detection fails (i.e., the robot and the workpiece collide from the target point to the state point), the state point (q_new) is discarded.
[0074] Accordingly, the same search method is used to search based on the target search tree. This process is repeated multiple times. When the distance between the q_new points found by the starting search tree and the target search tree is less than a preset threshold, it indicates that the starting search tree and the target search tree are connected, forming a continuous path.
[0075] For example, using a forward kinematics model, the robot is moved to the joint angle corresponding to the state point (q_new) to perform collision detection calculations 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 includes: determining multiple tree nodes within a preset radius centered on the state point in the current search tree; for each tree node, determining the path distance from the state point and the tree node to the root node; taking the tree node corresponding to the minimum path distance as the parent node of the state point; and if it is detected that the path distance from the target tree node and the state point to the root node is less than the path distance corresponding to the target tree node in the current search tree, then modifying the parent node of the target tree node to the state point.
[0077] Within a radius R around the state point, identify the nearest tree node in the current search tree. Determine the path distance from the state point and the tree node to the root node, and select the tree node with the smallest path distance as the parent node of the state point. Determine the path distance from the target tree node and the state point to the root node. If this distance is less than the original path distance between the target tree node and the root node in the current search tree, change the parent node of the target tree node to the state point. It should be noted that path analysis is performed on these neighboring tree nodes to determine if there is a shorter path from the state point (q_new) to the root node than the original path from these tree nodes to the root node. If a shorter path is detected from the state point (q_new), change the parent node of these tree nodes to q_new, thus gradually improving the current search tree.
[0078] In an exemplary embodiment, generating random points based on the current search tree includes: generating random points based on the current search tree and according to a target bias parameter; wherein, if the random number is less than the target bias parameter, a preset point is used as the random point; if the random number is greater than or equal to the target bias parameter, a random point is randomly generated; the preset point is the starting point or ending point of the planning interval.
[0079] In generating random points (q_rand), a target bias parameter is introduced to prevent the search from going into a dead end without direction. This means that during the generation of random points (q_rand), there is a certain probability that the starting state point (q_star) and the target state point (q_goal) will be assigned to q_rand, thus ensuring the directionality and randomness of the RRT*-Connect algorithm.
[0080] For example, a random number is a number within the range [0,1], and the target bias parameter is a pre-set, small probability value, such as 0.05 or 0.1. The generated random number is compared with this pre-set probability. If the random number is less than the target bias parameter, a low-probability event is executed—the random point is directly set as the start or end point of the planning interval, giving the algorithm a clear direction. If the random number is greater than or equal to the target bias parameter, a high-probability event is executed—a random point is generated completely randomly within the configuration space, ensuring the algorithm's exploratory capability.
[0081] In this embodiment, a target bias parameter is introduced during the planning process to improve the sampling efficiency of the algorithm in the target direction, shorten the planning time, and at the same time take into account the feasibility and quality of the path.
[0082] In an exemplary embodiment, after step 104, the method further includes: determining whether the robot can reach the pose of each target trajectory point through an inverse kinematics model; if it is determined that it is unreachable, generating an external axis adjustment command to control the movement of the external axis; after the external axis moves, re-determining through the inverse kinematics model until the robot can reach the pose of each target trajectory point.
[0083] Specifically, the robot's inverse kinematics model is used to determine whether the robot can reach the poses of each target trajectory point. If it cannot, the external axis needs to be moved to make it reachable. In the specific implementation, external axis adjustment commands are generated to control the movement of the external axis, enabling the robot to reach the poses of each target trajectory point.
[0084] In an exemplary embodiment, step 102 includes: using a preset search algorithm to generate an initial trajectory point between the starting point and the destination point of the robot; performing collision detection based on the operating end model and obstacle model of the initial trajectory point; deleting the initial trajectory point and regenerating the trajectory point and performing collision detection if the collision detection fails; and obtaining a trajectory point that avoids obstacles if the collision detection is successful.
[0085] The process involves using the starting point and the destination point as the actual point and the desired point, respectively. Trajectory points are generated between these two points with a certain step size. The radius of each trajectory point is 'r', which can be understood as describing the robot's manipulator model, such as the tip of a welding torch. The process checks if the manipulator model intersects with the obstacle model. If they intersect, it indicates a collision between the robot's manipulator and the obstacle, meaning collision detection failed. In this case, the trajectory point is deleted, and a new trajectory point is generated based on the previous one, and collision detection is performed again. If they do not intersect, it indicates that the robot's manipulator does not collide with the obstacle, meaning collision detection succeeded. The generated trajectory point is retained as the obstacle-avoiding trajectory point. The obstacle model can be determined through analysis of the robot's visual data and then transformed into a base coordinate system. (Refer to...) Figure 3 The A* algorithm is used, where the large ball represents the starting 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 coordinates of these trajectory points are the positions of the end effector (i.e., the operating end) of the industrial robot.
[0086] In this embodiment, the global path guidance capability of the A* algorithm and the high degree of freedom local obstacle avoidance capability 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 robot path planning.
[0087] In one exemplary embodiment, such as Figure 6 As shown, the obstacle avoidance path planning method includes the following steps:
[0088] 1. Spatial Modeling. Create a simulation environment for the robot workstation.
[0089] 2. The A* algorithm generates a series of trajectory points that represent the shortest path to avoid obstacles between the starting and ending points. The starting and ending points are treated as the actual and desired points, respectively. Trajectory points are generated between these two points with a certain step size. The radius of each trajectory point is r, which can be understood as describing the robot's manipulator model, such as the tip of a welding torch. The algorithm checks if the manipulator model intersects with the obstacle model. If they intersect, it indicates a collision between the robot's manipulator and the obstacle, meaning the collision detection failed. In this case, the trajectory point is deleted, and a new trajectory point is generated based on the previous one, and collision detection is performed again. If they do not intersect, it indicates that the robot's manipulator does not collide with the obstacle, meaning the collision detection succeeded. The generated trajectory point is retained as the obstacle-avoiding trajectory point.
[0090] 3. Generate the pose of a series of trajectory points in the base coordinate system.
[0091] 4. Calculate the robot joint angles at the trajectory point using inverse kinematics. Determine if the robot is reachable using inverse kinematics; if not, move the external axis to make it reachable. Calculate the robot joint angles at the trajectory point using inverse kinematics.
[0092] 5. The robot joint angles are used as the starting joint angles and target joint angles of the RRT*-Connect algorithm. The two ends are similar to a search tree search, and a target bias parameter is introduced at the same time.
[0093] 6. Calculate the joint angle with the shortest path and display the robot's posture in space based on the forward kinematics of the robot.
[0094] 7. Detect whether the robot collides with the workpiece using a collision detection algorithm.
[0095] 8. If a collision occurs, the generated state point is discarded.
[0096] 9. Generate the target trajectory with the shortest path and no collisions.
[0097] Specifically, the RRT*-Connect algorithm is used to perform a tree search in each planning region. The starting joint angle is set as the starting state point (q_star), and the ending joint angle is set as the target state point (q_goal). A custom random sampling point (q_rand) is defined in the state space. The steps are as follows: First, two search trees are set up (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: A search is performed in the starting point search tree to generate a q_rand point. The point closest to the q_rand point (q_near) is found in the search tree. A new state point (q_new) is generated from the q_near point in the direction of q_rand with a certain step size.
[0098] Using forward kinematics, the robot is moved to the joint angle corresponding to the q_new point, and collision detection calculations are performed with the workpiece. If no collision occurs, the q_new point is added to the search tree. After generating a new node q_new, within a radius R around it, the nearest old nodes in the search tree are found. Path analysis is performed on these neighboring tree nodes to determine if there is a path to the root node connected through the state point (q_new) that is shorter than the original path to the root node. If a shorter path is detected from the state point (q_new), the parent node of these tree nodes is changed to q_new, making the current search tree gradually better. If a collision occurs, the q_new point is discarded. The same search method is used based on the target search tree. This process is repeated multiple times. When the distance between the q_new points found in the starting search tree and the target search tree is less than a preset threshold, it indicates that the starting search tree and the target search tree are connected, forming a continuous path. To prevent the search from going into a dead end without direction when generating random points (q_rand), a target bias parameter is introduced. This means that during the generation of random points (q_rand), there is a certain probability that the starting state point (q_star) and the target state point (q_goal) will be assigned to q_rand, thus ensuring the directionality and randomness of the RRT*-Connect algorithm.
[0099] Compared to using a single path planning algorithm, this embodiment utilizes the A* algorithm to provide an initial path as guidance, while RRT*-Connect further accelerates target search based on target bias parameters, resulting in stronger target guidance. The A* algorithm first avoids known obstacles, and RRT*-Connect then avoids sampled collisions, forming a double guarantee and achieving a higher obstacle avoidance success rate. The A* algorithm provides heuristic information, allowing RRT*-Connect to form shorter, smoother paths, improving path quality. Due to bidirectional expansion, target bias, and A* trajectory guidance, the search tree approaches the target faster, improving path generation efficiency. The A* algorithm can re-plan the approximate path, and RRT*-Connect performs local fine-tuning, helping to handle obstacle movement or path congestion, making it more adaptable to dynamic environments or complex scenarios. The A* algorithm inserts obstacle avoidance trajectory points between the starting and ending points, and searches are performed simultaneously between these trajectory points. The searched paths are then spliced together, resulting in the shortest trajectory time, smoothest path, and no collisions, minimizing search time.
[0100] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0101] Based on the same inventive concept, this application also provides an obstacle avoidance path planning device for implementing the obstacle avoidance path planning method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more obstacle avoidance path planning device embodiments provided below can be found in the limitations of the obstacle avoidance path planning method described above, and will not be repeated here.
[0102] In one exemplary embodiment, such as Figure 7 As shown, an obstacle avoidance path planning device is provided, comprising:
[0103] The trajectory point generation module 702 is used to generate trajectory points to avoid obstacles based on the robot's starting point and destination point;
[0104] The planning module 704 is used to determine 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; the robot joint angles of each target trajectory point are determined based on the poses; and the planning interval is constructed based on the robot joint angles of adjacent target trajectory points.
[0105] The trajectory generation module 706 is used to search for at least one state point that does not collide with the workpiece for each planning interval and generate a continuous path for the planning interval; the workpiece refers to an object other than the robot in the robot's working environment; and the robot's target trajectory is generated based on the continuous paths of multiple planning intervals.
[0106] The obstacle avoidance path planning device described above generates a smooth path trajectory that is short in time, avoids obstacles, and does not collide with the workpiece, based on preliminary trajectory point planning and further state point search. This helps to handle obstacle movement or path blockage and improves the accuracy and efficiency of robot path planning.
[0107] In an exemplary embodiment, the trajectory generation module 706 is further configured to construct a starting search tree including the starting point of the planned interval and a target search tree including the ending point of the planned interval; search for state points that do not collide with the workpiece based on the starting search tree and the target search tree respectively, and update the starting search tree and the target search tree according to the search results; and generate a continuous path for the planned interval based on the starting search tree and the target search tree if the distance between the latest state point found by the starting search tree and the latest state point found by the target search tree is less than a preset threshold.
[0108] In an exemplary embodiment, the trajectory generation module 706 is further configured to generate random points based on the current search tree; the current search tree is either a starting search tree or a target search tree; determine the target point closest to the random point from the current search tree; generate state points in the direction from the target point to the random point according to a preset step size; and add the state points to the current search tree if it is detected that the robot and the workpiece do not collide from the target point to the state point.
[0109] In an exemplary embodiment, the trajectory generation module 706 is further configured to determine multiple tree nodes within a preset radius centered on the state point in the current search tree; for each tree node, determine the path distance from the state point and the tree node to the root node; take the tree node corresponding to the minimum path distance as the parent node of the state point; if it is detected that the path distance from the target tree node and the state point to the root node is less than the path distance corresponding to the target tree node in the current search tree, then modify the parent node of the target tree node to the state point.
[0110] In an exemplary embodiment, the trajectory generation module 706 is further configured to generate random points based on the current search tree and according to the target bias parameter; wherein, if the random number is less than the target bias parameter, a preset point is used as a random point; if the random number is greater than or equal to the target bias parameter, a random point is randomly generated; the preset point is the starting point or ending point of the planned interval.
[0111] In an exemplary embodiment, the obstacle avoidance path planning device further includes an adjustment module, which is used to determine whether the robot can reach the pose of each target trajectory point through an inverse kinematics model; if it is determined that the robot cannot reach the target trajectory point, an external axis adjustment command is generated to control the movement of the external axis; after the external axis moves, the inverse kinematics model is re-evaluated until the robot can reach the pose of each target trajectory point.
[0112] In an exemplary embodiment, the trajectory point generation module 702 is further configured to use a preset search algorithm to generate an initial trajectory point between the starting point and the destination point of the robot; perform collision detection based on the operation end model and obstacle model of the initial trajectory point; delete the initial trajectory point and regenerate the trajectory point and perform collision detection if the collision detection fails; and obtain the trajectory point that avoids the obstacle if the collision detection is successful.
[0113] Each module in the aforementioned obstacle avoidance path planning device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0114] In one exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: generating trajectory points that avoid obstacles based on the robot's starting point and destination point; determining the pose of each target trajectory point in a base coordinate system; the target trajectory points include the starting point, the destination point, and the trajectory points that avoid obstacles; determining the robot joint angles of each target trajectory point based on the poses; constructing planning intervals based on the robot joint angles of adjacent target trajectory points; for each planning interval, searching for at least one state point that does not collide with a workpiece, and generating a continuous path for the planning interval; the workpiece refers to an object other than the robot in the robot's working environment; and generating the robot's target trajectory based on the continuous paths of multiple planning intervals.
[0115] In one embodiment, when the processor executes the computer program, it further performs the following steps: constructing a starting search tree including the starting point of the planned interval and a target search tree including the ending point of the planned interval; searching for state points that do not collide with the 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; and generating a continuous path for the planned interval based on the starting search tree and the target search tree if the distance between the latest state point found by the starting search tree and the latest state point found by the target search tree is less than a preset threshold.
[0116] In one embodiment, when the processor executes the computer program, it further performs the following steps: generating a random point based on the current search tree; the current search tree is either a starting search tree or a target search tree; determining the 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 if it is detected that the robot and the workpiece do not collide from the target point to the state point.
[0117] In one embodiment, when the processor executes the computer program, it further implements the following steps: determining multiple tree nodes in the current search tree, centered on the state point and within a preset radius; for each tree node, determining the path distance from the state point and the tree node to the root node; taking the tree node corresponding to the minimum path distance as the parent node of the state point; and if it is detected that the path distance from the target tree node and the state point to the root node is less than the path distance corresponding to the target tree node in the current search tree, then modifying the parent node of the target tree node to the state point.
[0118] In one embodiment, when the processor executes the computer program, it further implements the following steps: generating random points based on the current search tree and according to the target bias parameter; wherein, if the random number is less than the target bias parameter, a preset point is used as the random point; if the random number is greater than or equal to the target bias parameter, a random point is randomly generated; the preset point is the starting point or the ending point of the planning interval.
[0119] In one embodiment, when the processor executes the computer program, it further performs the following steps: using an inverse kinematics model to determine whether the robot can reach the pose of each target trajectory point; if it is determined that the robot cannot reach the target trajectory point, it generates an external axis adjustment command to control the movement of the external axis; after the external axis moves, it re-determines the target trajectory point using the inverse kinematics model until the robot can reach the pose of each target trajectory point.
[0120] In one embodiment, when the processor executes the computer program, it further performs the following steps: using a preset search algorithm, generating an initial trajectory point between the starting point and the destination point based on the robot's starting point and destination point; performing collision detection based on the operating end model and obstacle model of the initial trajectory point; if the collision detection fails, deleting the initial trajectory point, regenerating the trajectory point, and performing collision detection again; if the collision detection succeeds, obtaining a trajectory point that avoids the obstacle.
[0121] In one exemplary embodiment, a robot is provided, which includes the computer device described in any embodiment of this 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 used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0123] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0124] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0125] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. An obstacle avoidance path planning method, characterized in that, The method includes: Generate trajectory points to avoid obstacles based on the robot's starting point and destination point; Determine 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 for avoiding obstacles; Based on the pose, determine the robot joint angles for each of the target trajectory points; The planning interval is constructed based on the robot joint angles of adjacent target trajectory points; For each planning interval, at least one state point that does not collide with the workpiece is searched to generate a continuous path for the planning interval; the workpiece refers to an object other than the robot in the robot's working environment; Generate the robot's target trajectory based on the continuous paths of multiple planning intervals; Specifically, for each planning interval, searching for at least one state point that does not collide with the workpiece, and generating a continuous path for the planning interval, includes: Construct a starting search tree that includes the starting point of the planning interval, and a target search tree that includes the ending point of the planning interval; Based on the starting search tree and the target search tree respectively, search for state points that do not collide with the workpiece, and update the starting search tree and the target search tree according to the search results; If the distance between the latest state point found by the starting search tree and the latest state point found by the target search tree is less than a preset threshold, a continuous path for the planned interval is generated based on the starting search tree and the target search tree. The search for state points where no collision occurs with the workpiece includes: Random points are generated based on the current search tree; the current search tree is either the starting search tree or the target search tree. From the current search tree, determine the target point that is closest to the random point; State points are generated in the direction from the target point to the random point according to a preset step size; If it is detected that the robot and the workpiece do not collide from the target point to the state point, the state point is added to the current search tree; The method further includes: Determine multiple tree nodes within a preset radius centered on the current search tree; For each tree node, determine the path distance from the state point and the tree node to the root node; The tree node corresponding to the minimum path distance is used as the parent node of the state point; If the path distance from the target tree node, the state point to the root node is detected to be less than the path distance corresponding to the target tree node in the current search tree, the parent node of the target tree node is changed to the state point.
2. The method according to claim 1, characterized in that, The process of generating random points based on the current search tree includes: Based on the current search tree, random points are generated according to the target bias parameter; wherein, if the random number is less than the target bias parameter, a preset point is used as the random point; if the random number is greater than or equal to the target bias parameter, random points are randomly generated; the preset point is the starting point or the ending point of the planning interval.
3. The method according to claim 1 or 2, characterized in that, After determining the pose of each target trajectory point in the base coordinate system, the method further includes: The inverse kinematics model is used to determine whether the robot can achieve the pose of each target trajectory point. If the path is deemed unreachable, an external axis adjustment command is generated to control the movement of the external axis. After the external axis moves, the inverse kinematics model is used to re-evaluate the position until the robot can reach the pose of each target trajectory point.
4. The method according to claim 1 or 2, characterized in that, The process of generating trajectory points to avoid obstacles based on the robot's starting point and destination point includes: Using a preset search algorithm, initial trajectory points are generated between the robot's starting point and destination point; Collision detection is performed based on the operation terminal model and obstacle model of the initial trajectory point; If collision detection fails, delete the initial trajectory points, regenerate the trajectory points, and perform collision detection again. If the collision detection is successful, the trajectory points that avoid the obstacle are obtained.
5. An obstacle avoidance path planning device, characterized in that, The device includes: The trajectory point generation module is used to generate trajectory points to avoid obstacles based on the robot's starting point and destination point; The planning module is used to determine 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 for avoiding obstacles; the robot joint angles of each target trajectory point are determined according to the poses; and a planning interval is constructed based on the robot joint angles of adjacent target trajectory points. The trajectory generation module is used to search for at least one state point that does not collide with the workpiece for each planning interval, and generate a continuous path for the planning interval; the workpiece refers to an object other than the robot in the robot's working environment; and the robot's target trajectory is generated based on the continuous paths of multiple planning intervals. The trajectory generation module is further configured to construct a starting search tree including the starting point of the planned interval and a target search tree including the ending point of the planned interval; search for state points that do not collide with the workpiece based on the starting search tree and the target search tree respectively, and update the starting search tree and the target search tree according to the search results; if the distance between the latest state point found by the starting search tree and the latest state point found by the target search tree is less than a preset threshold, generate a continuous path for the planned interval based on the starting search tree and the target search tree. The trajectory generation module is further configured to generate random points based on the current search tree, wherein the current search tree is either the starting search tree or the target search tree; determine the target point closest to the random point from the current search tree; generate state points in the direction from the target point to the random point according to a preset step size; and add the state point to the current search tree if it is detected that the robot and the workpiece do not collide from the target point to the state point. The trajectory generation module is further configured to: determine multiple tree nodes within a preset radius centered on the state point in the current search tree; for each tree node, determine the path distance from the state point and the tree node to the root node; designate the tree node corresponding to the minimum path distance as the parent node of the state point; and if it is detected that the path distance from the target tree node and the state point to the root node is less than the path distance corresponding to the target tree node in the current search tree, modify the parent node of the target tree node to the state point.
6. The apparatus according to claim 5, characterized in that, The trajectory generation module is further configured to generate random points based on the current search tree and according to the target bias parameter; wherein, if the random number is less than the target bias parameter, a preset point is used as the random point; if the random number is greater than or equal to the target bias parameter, a random point is generated randomly; the preset point is the starting point or the ending point of the planning interval.
7. The apparatus according to claim 5 or 6, characterized in that, The obstacle avoidance path planning device also includes an adjustment module, which is used to determine whether the robot can reach the pose of each target trajectory point through an inverse kinematics model; if it is determined that it cannot reach the target trajectory point, an external axis adjustment command is generated to control the movement of the external axis; after the external axis moves, the inverse kinematics model is used to re-determine the target trajectory point until the robot can reach the pose of each target trajectory point.
8. The apparatus according to claim 5 or 6, characterized in that, The trajectory generation module is also used to generate initial trajectory points between the starting point and the destination point based on the robot's starting point and destination point using a preset search algorithm. Collision detection is performed based on the operation terminal model and obstacle model of the initial trajectory point; If collision detection fails, the initial trajectory point is deleted, and a new trajectory point is generated and collision detection is performed; if collision detection succeeds, a trajectory point that avoids obstacles is obtained.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
10. A robot, characterized in that, The robot includes the computer device as described in 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