Mechanical arm path planning method and system based on improved RRT algorithm

By improving the intelligent hybrid sampling and repeated greedy strategy of the RRT algorithm, the problems of low efficiency and insufficient accuracy of the existing RRT algorithm in robotic arm path planning are solved, and efficient and accurate robotic arm paths are generated.

CN121625136APending Publication Date: 2026-03-10ZHEJIANG LINGQIAO INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-08
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing RRT algorithms are computationally inefficient, have low accuracy, and are costly in robotic arm path planning, making it difficult to obtain the optimal path.

Method used

An improved RRT algorithm is adopted, which constructs a search tree for the start and end points through intelligent hybrid sampling and repeated greedy strategy, performs dual-tree collaborative expansion, optimizes the search tree, generates the optimal path, and outputs the optimal path of the robotic arm through smoothing processing.

Benefits of technology

It improves the efficiency and accuracy of robotic arm path planning, enabling the generation of optimal paths in complex environments, reducing redundant nodes, and enhancing the efficiency and accuracy of path planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121625136A_ABST
    Figure CN121625136A_ABST
Patent Text Reader

Abstract

The invention provides a mechanical arm path planning method and system based on an improved RRT algorithm. The method comprises the steps that work space, starting point and terminal point information of a mechanical arm is obtained; two search trees are constructed and initialized; performing intelligent mixed sampling in the working space to obtain intelligent sampling points, and performing dual-tree cooperative expansion on two search trees to optimize the search trees; when the starting point search tree and the end point search tree meet the meeting condition, backtracking from the meeting node to generate a global path from the starting point to the end point; optimizing a global path through a repeated greedy strategy, and deleting redundant nodes; and the optimized global path is smoothed, and the optimal path of the mechanical arm is output. For the obstacle avoidance trajectory planning of the human-shaped double-arm robot in the space, the method of the invention can improve the efficiency and precision of path planning, and can realize global simplification through local optimal selection.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of robot obstacle avoidance path planning, in particular, to a mechanical arm path planning method and system based on an improved RRT algorithm. BACKGROUND

[0002] With the development of robot applications, mechanical arms, as the core component of robot technology, have been widely used. In the process of mechanical arm path planning, the Rapidly-exploring Random Tree (RRT) algorithm has become one of the mainstream algorithms for mechanical arm path generation because it can efficiently handle path search problems in high-dimensional joint space or Cartesian space. Collision detection is the core and key link of RRT algorithm path planning. Collision detection often uses the following methods: The open source library FCL uses the Gilbert-Johnson-Keerthi (GJK) algorithm based on hierarchical bounding volume tree (BVH) for collision detection, or uses the Signed Distance Field (SDF) method for collision detection, or uses the space division method based on octree voxel for collision detection. BVH-GJK calculation is efficient and can only be used for convex bodies. The accuracy of non-convex objects is often very low, and there are a large number of non-convex objects in the application scenarios of robots. The SDF method can calculate non-convex objects, but the calculation amount is very large. The space division cost of the octree voxel method is high and inefficient. With the increase of the degrees of freedom of the robot, the number of sampling points required is extremely large, and the number of sampling points often grows exponentially. The existing RRT path planning method has the problems of low calculation efficiency, low accuracy, high cost, etc., and it is difficult to obtain the optimal path of the mechanical arm. SUMMARY

[0003] In view of the defects in the prior art, the purpose of the present application is to provide a mechanical arm path planning method and system based on an improved RRT algorithm.

[0004] According to one aspect of the present application, a mechanical arm path planning method based on an improved RRT algorithm is provided, comprising: obtaining workspace, starting point and end point information of a mechanical arm; constructing and initializing two search trees according to the starting point and end point information, the two search trees being a starting point search tree and an end point search tree respectively; intelligently mixed sampling in the workspace to obtain intelligent sampling points, and using the intelligent sampling points to cooperatively expand the two search trees to optimize the search trees; the intelligent mixed sampling can obtain intelligent sampling points near obstacles based on convex hull fitting and inflation of the obstacles; When the optimized starting search tree and the optimized ending search tree meet the meeting condition, a global path from the starting point to the ending point is generated by backtracking from the meeting node; Optimize the global path by using a repetitive greedy strategy and remove redundant nodes; The optimized global path is smoothed to output the optimal path for the robotic arm.

[0005] Optionally, the step of performing intelligent hybrid sampling within the workspace to obtain intelligent sampling points, and using the intelligent sampling points to perform dual-tree collaborative expansion on the two search trees to optimize the search trees, includes: From the starting point and the end point Initially, for each search tree, intelligent hybrid sampling is used to obtain the corresponding intelligent sampling points for that search tree. The nodes of the two search trees gradually move closer to the middle until the two search trees meet the meeting condition; During the dual-tree collaborative expansion process, select the smart sampling point in the current search tree. The nearest node is considered a neighboring node. and neighboring nodes Generate corresponding new nodes based on this. ; For new nodes Perform node sparsity and path feasibility checks, and add new nodes that pass the checks. Add to the current search tree; Define a cost function, and determine the new node based on the cost function. The corresponding parent node.

[0006] Optionally, the intelligent hybrid sampling includes four sampling methods: uniform random sampling, target bias sampling, random beacon sampling, and dilatation beacon sampling. In the process of generating a single intelligent sampling point, one of the above four sampling methods is selected and executed according to a preset probability. The uniform random sampling is performed in an unobstructed space within the workspace to generate intelligent sampling points; The target bias sampling samples points within a preset range around the endpoint with a preset bias probability, and uses these points as intelligent sampling points. Both the random beacon sampling and the expansion beacon sampling are based on obstacles; nodes located in the optimized search tree and whose distance from obstacles is less than a preset distance threshold are used as beacon nodes; The random beacon sampling adds noise within a preset noise range around the beacon node and performs random sampling within the noise-covered area to generate intelligent sampling points; The sampling method for the expansion beacon is as follows: Within the workspace, convex hull fitting is performed on the obstacle to obtain the initial convex hull model of the obstacle; The initial convex hull model is expanded by a preset safety distance to generate an expanded convex hull model; At least one surface point is randomly sampled on the surface of the convex hull model as a smart sampling point.

[0007] Optionally, the neighboring node Generate corresponding new nodes based on this. ,include: The neighboring nodes and smart sampling points The line connecting the nodes is used as a baseline, and the line from the nearest node on the baseline is defined. Pointing to smart sampling points The direction is the generation direction; Along the generation direction, from the neighboring node Expand outward by preset step size To expand and generate corresponding new nodes. .

[0008] Optionally, the new node Perform node sparsity and path feasibility checks, and add new nodes that pass the checks. Add to the current search tree, including: Select the node furthest from the new node in the current search tree. The nearest node is used as its neighbor to determine the new node. Does the path cost between it and its neighboring nodes exceed the preset sparsity coefficient? If the new node If the path cost between a new node and its neighboring nodes is greater than the preset sparsity coefficient, then the new node... If the node sparsity check passes, proceed to the next step of path feasibility check; otherwise, remove the new node. Intelligent hybrid sampling is then performed on the current search tree to obtain new intelligent sampling points; Determine the new node and corresponding neighboring nodes Will the connection path between them collide with obstacles within the workspace? If the new node and corresponding neighboring nodes If there are no obstacles on the connecting path between them, then the new node... The path feasibility check passed, and the new node was moved to the next node. Add to the current search tree; otherwise, remove the new node. The current search tree is resampled using intelligent hybrid sampling to obtain new intelligent sampling points.

[0009] Optionally, the determination of new nodes and corresponding neighboring nodes Will the connection path between them collide with obstacles within the workspace, including: Acquire 3D point cloud data of obstacles; Based on the 3D point cloud data, an approximate convex hull decomposition operation is performed on the obstacle to obtain several convex hull components of the obstacle. Construct a bounding volume hierarchy tree corresponding to the obstacle. Each leaf node in the bounding volume hierarchy tree corresponds to a convex hull component of the obstacle. The leaf node stores the axis-aligned bounding box of the convex hull component. New node and corresponding neighboring nodes The connection path between them is taken as the path to be detected. All leaf nodes in the bounding volume hierarchy tree are traversed. The GJK algorithm is used to obtain the minimum distance d between the path to be detected and each axis-aligned bounding box. If all minimum distances d are greater than the preset collision distance threshold, it is determined that the path to be detected has not collided with an obstacle; otherwise, it is determined that the path to be detected has collided with an obstacle.

[0010] Optionally, the definition of the cost function is used to determine the new node. The corresponding parent nodes include: Define a new node according to the following expression. Cost function : in, Indicates the candidate parent node in the search tree The cumulative path length to the root node of the search tree; Indicates candidate parent node and new nodes The distance between them; Traverse all nodes in the search tree and select the cost function. Candidate parent node with the smallest value As a new node The parent node.

[0011] Optionally, the starting search tree and the ending search tree satisfy the following meeting condition: The distance between a new node added to the starting search tree and any node in the ending search tree is less than a preset connection threshold; or the distance between a new node added to the ending search tree and any node in the starting search tree is less than a preset connection threshold.

[0012] Optionally, optimizing the global path and deleting redundant nodes using a repetitive greedy strategy includes: The path node set S = [q1, q2, ..., q] is constructed using all nodes in the global path. n , ..., q N ], where the elements in the path node set S are arranged in order from the starting point to the ending point, q n This represents the nth path point in the global path, where n represents the path point q. n The ordinal number; N represents the total number of elements in the path node set; Take the path starting point q1 as the initial target path point; Redundant node removal: In the set of path nodes S, traverse each path node q sequentially starting from the endpoint. n Determine the target path point and each path point q n If the connecting path collides with an obstacle, the first non-collision path point q will be found. n As a path child node of the current target path point, delete all path points between the current target path point and the corresponding path child node as redundant nodes. Use the found path child nodes as new target path points, and repeat the redundant node deletion operation multiple times until the target path point is the path endpoint q. N End of time; Connect the remaining path points in sequence to obtain the optimized global path.

[0013] According to another aspect of this application, a robotic arm path planning system based on an improved RRT algorithm is provided, comprising: The data extraction module is used to obtain information about the robotic arm's workspace, start point, and end point. A tree structure construction module is used to construct and initialize two search trees based on the starting point and ending point information, wherein the two search trees are the starting point search tree and the ending point search tree, respectively. The search tree expansion module is used to perform intelligent hybrid sampling within the workspace to obtain intelligent sampling points. These intelligent sampling points are then used to perform dual-tree collaborative expansion on two search trees to optimize the search trees. The intelligent hybrid sampling can obtain intelligent sampling points near obstacles based on convex hull fitting and dilation of the obstacles. The global path generation module is used to generate a global path from the start point to the end point by backtracking from the meeting node when the optimized start point search tree and the optimized end point search tree meet the meeting condition. The redundant node deletion module is used to optimize the global path using a repetitive greedy strategy and delete redundant nodes. The smoothing module is used to smooth the optimized global path and output the optimal path for the robotic arm.

[0014] This application provides a robotic arm path planning method based on an improved RRT algorithm, used to find the optimal path connecting the start and end points in a given working environment. The improved RRT algorithm employs intelligent hybrid sampling and a repetitive greedy strategy. Intelligent hybrid sampling obtains intelligent sampling points near obstacles by performing convex hull fitting and dilation on the obstacles, effectively improving the spatial path exploration capability of the dual-arm robot. The repetitive greedy strategy optimizes the global path and removes replaceable redundant nodes, simplifying the planned path. For humanoid dual-arm robots planning obstacle avoidance trajectories in space, the planning method of this application can improve the efficiency and accuracy of path planning, achieving global simplification through local optimal selection.

[0015] Other technical effects resulting from the additional features will be further illustrated in the corresponding embodiments. Attached Figure Description

[0016] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a flowchart illustrating the robotic arm path planning method in one embodiment of this application. Figure 1 ; Figure 2 This is a flowchart illustrating the robotic arm path planning method in one embodiment of this application. Figure 2 ; Figure 3 This is a schematic diagram illustrating the principle of a node sparse sampling strategy in one embodiment of this application; Figure 4 This is a schematic diagram illustrating the principle of a multiple greedy strategy in one embodiment of this application; Figure 5 This is a schematic diagram of a robotic arm path planning system in one embodiment of this application. Detailed Implementation

[0017] The present application will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application, and these all fall within the protection scope of the present application. Parts not described in detail in the following embodiments can be implemented using existing technology.

[0018] It should be noted that all 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 information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with relevant regulations.

[0019] In the process of robotic arm path planning, the Rapid Exploratory Random Tree (RRT) algorithm has become one of the mainstream algorithms for robotic arm path generation. However, existing RRT path planning methods suffer from problems such as low computational efficiency, low accuracy, and high cost, making it difficult to obtain the optimal path for the robotic arm. Based on these problems, this application provides a robotic arm path planning method based on an improved RRT algorithm to solve the aforementioned issues.

[0020] Reference Figure 1 and Figure 2 As shown in the figure, this application provides a robotic arm path planning method based on an improved RRT algorithm, the method including the following steps: S1. Obtain the workspace, start point, and end point information of the robotic arm; S2. Based on the starting point and ending point information, construct and initialize two search trees, namely the starting point search tree and the ending point search tree; S3. Perform intelligent hybrid sampling within the workspace to obtain intelligent sampling points. Use the intelligent sampling points to perform dual-tree collaborative expansion on the two search trees to optimize the search trees. Intelligent hybrid sampling can obtain intelligent sampling points near obstacles based on convex hull fitting and dilation of obstacles. S4. When the optimized starting search tree and the optimized ending search tree meet the meeting condition, backtrack from the meeting node to generate a global path from the starting point to the ending point. S5. Optimize the global path using a repetitive greedy strategy and remove redundant nodes; S6. Smooth the optimized global path and output the optimal path for the robotic arm.

[0021] It should be noted that, starting from the beginning As the root node of the search tree, with the end point as the starting point. As the root node of the search tree, it determines the obstacle-free space based on the obstacles within the workspace. The smoothing process involves smoothing the optimized global path using cubic rational b-splines.

[0022] The embodiments described above in this application are used to find the optimal path connecting the start and end points in a given working environment. The improved RRT algorithm employs intelligent hybrid sampling and a repetitive greedy strategy. Intelligent hybrid sampling can obtain intelligent sampling points near obstacles based on convex hull fitting and dilation, effectively improving the spatial path exploration capability of the dual-arm robot. The repetitive greedy strategy optimizes the global path and removes replaceable redundant nodes, thus simplifying the planned path. For humanoid dual-arm robots planning obstacle avoidance trajectories in space, the planning method of the embodiments in this application can improve the efficiency and accuracy of path planning, and can achieve global simplification through local optimal selection.

[0023] In some specific embodiments of this application, in order to accelerate path exploration, an improved RRT algorithm based on intelligent hybrid sampling and dual-tree collaborative expansion strategy is adopted. Intelligent hybrid sampling is performed in the workspace to obtain intelligent sampling points. The intelligent sampling points are then used to perform dual-tree collaborative expansion on the two search trees to optimize the search trees. This may further include: S31, From the starting point and the end point Initially, for each search tree, intelligent hybrid sampling is used to obtain the corresponding intelligent sampling points for that search tree. The nodes of the two search trees gradually move closer to the middle until the two search trees meet the meeting condition; S32. During the dual-tree collaborative expansion process, select the distance from the smart sampling point in the current search tree. The nearest node is considered a neighboring node. and neighboring nodes Generate corresponding new nodes based on this. ; S33, For new nodes Perform node sparsity and path feasibility checks, and add new nodes that pass the checks. Add to the current search tree; S34. Define the cost function and determine the new node based on the cost function. The corresponding parent node.

[0024] The improved RRT algorithm described in the above embodiments of this application expands points and constructs a tree structure in the working environment through intelligent hybrid sampling, and searches for feasible paths by continuously expanding the nodes of the tree structure. Starting from, The endpoint (i.e., the target point) is set to the expansion step size. Two search trees are generated at the starting point and the ending point, respectively: the starting point search tree and the ending point search tree. and endpoint search tree The starting and ending search trees are expanded alternately in a two-tree collaborative manner to avoid blind exploration in one direction. Only one search tree is expanded in each iteration, and a connection to the other search tree is immediately attempted. This two-tree collaborative expansion reduces redundant computation, ensures that the two search trees explore the space evenly, prevents one search tree from overgrowing, reduces collision detection and invalid sampling, and accelerates path exploration efficiency. Using a two-tree connection strategy enhances the tree exploration capability.

[0025] In some specific embodiments of this application, intelligent hybrid sampling includes four sampling methods: uniform random sampling, target bias sampling, random beacon sampling, and expansion beacon sampling. In the process of generating a single intelligent sampling point, one of the above four sampling methods is selected and executed according to a preset probability. Uniform random sampling involves random sampling within an unobstructed space in the work area to generate intelligent sampling points; Target bias sampling samples points within a preset range around the endpoint with a preset bias probability and uses them as intelligent sampling points; Both random beacon sampling and inflator beacon sampling are based on obstacles; nodes located in the optimized search tree and whose distance from obstacles is less than a preset distance threshold are used as beacon nodes; Random beacon sampling adds noise within a preset noise range around the beacon node and performs random sampling within the noise-covered area to generate intelligent sampling points; The sampling method for the expansion beacon is as follows: S311. Within the workspace, perform convex hull fitting on the obstacle to obtain the initial convex hull model of the obstacle; S312. Dilate the initial convex hull model with a preset safety distance to generate an expanded convex hull model; S313. Randomly sample at least one surface point on the surface of the convex hull model as a smart sampling point.

[0026] For example, in the early stage of sampling, when the sampling point does not encounter obstacles (i.e., no beacon nodes appear), the probability of uniform random sampling and target bias sampling is 50% each, while the probability of random beacon sampling and inflated beacon sampling is 0. Using uniform random sampling and target bias sampling in the early stage of sampling can find effective nodes more quickly. In the middle and late stages of sampling, effective nodes are often around obstacles. When an updated node is around an obstacle, it is marked as a beacon node. After a beacon node appears, the probabilities of uniform random sampling, target bias sampling, random beacon sampling, and inflated beacon sampling are 60%, 20%, 10%, and 10%, respectively. Random beacon sampling and inflated beacon sampling constitute beacon sampling. To overcome obstacles as quickly as possible, noise is added near the beacon node for random beacon sampling. Inflated beacon sampling involves inflating the obstacle and then randomly sampling points on its surface.

[0027] Before intelligent hybrid sampling, a depth camera can be used to read spatial point cloud information, which can then be used to sample each intelligent sampling point. Target bias sampling directly samples points near the endpoint, causing the starting search tree to grow towards the endpoint search tree. During the dilatation beacon sampling process, convex hull fitting calculation is first performed on the obstacle contour point cloud data to generate an initial convex hull model of the obstacle; then, based on a preset safety distance, each contour vertex and boundary surface of the initial convex hull model is offset equidistantly along its outer normal vector direction (the offset amount is not less than the preset safety distance), and the offset convex hull model is used as the dilatation convex hull model. Finally, the dilatation convex hull model is sampled.

[0028] In the embodiments described above, the sampling strategy is dynamically adjusted based on the growth status of the search tree. When the search tree cannot expand for an extended period, it can be determined that a narrow passage may have been encountered. Key beacon nodes are added for beacon sampling. For obstacles that are certain to collide with in the path, their convex hulls are expanded, and surface points are randomly selected and added to the tree's sampling nodes. Intelligent hybrid sampling provides better sampling performance, while uniform random sampling ensures comprehensive coverage of the entire search space, avoiding the possibility of getting trapped in local optima. Introducing beacon sampling allows for a more focused search for potential optimal solutions, accelerating the path search process. Beacon sampling provides clues about the positions of obstacle vertices (or the perimeter of circular obstacles), enabling optimization of paths at these turns.

[0029] In some specific embodiments of this application, in order to improve node expansion efficiency, neighboring nodes are used. Generate corresponding new nodes based on this. It may further include: S321, Move adjacent nodes and smart sampling points The line connecting the nodes is used as the baseline, and the line on the baseline is defined from the nearest node. Pointing to smart sampling points The direction is the generation direction; S322. Along the generation direction, from the nearest node Expand outward by preset step size To expand and generate corresponding new nodes. .

[0030] In the embodiments described above, new nodes are expanded based on neighboring nodes, a fixed preset step size, and a generation direction. By determining the direction for expanding the search tree nodes, more efficient and higher-quality paths are generated while reducing blind exploration and increasing the success rate of expansion.

[0031] In some specific embodiments of this application, in order to reduce the exploration of repeated regions, the improved RRT algorithm adopts a node sparse sampling strategy for new nodes. Perform node sparsity and path feasibility checks, and add new nodes that pass the checks. Adding to the current search tree can further include: S331. Select the node in the current search tree that is closest to the new node. The nearest node is used as its neighbor to determine the new node. Does the path cost between it and its neighboring nodes exceed the preset sparsity coefficient? If the new node If the path cost between a new node and its neighboring nodes is greater than the preset sparsity coefficient, then the new node... If the node sparsity check passes, proceed to the next step of path feasibility check; otherwise, remove the new node. Intelligent hybrid sampling is then performed on the current search tree to obtain new intelligent sampling points; S332, Determine new nodes and corresponding neighboring nodes Will the connection path between them collide with obstacles within the workspace? If the new node and corresponding neighboring nodes If there are no obstacles on the connecting path between them, then the new node... The path feasibility check passed, and the new node was moved to the next node. Add to the current search tree; otherwise, remove the new node. The current search tree is resampled using intelligent hybrid sampling to obtain new intelligent sampling points.

[0032] The embodiments described above employ a sparse node sampling strategy for node sparsity verification. This strategy can eliminate new nodes generated within a certain distance from existing search tree nodes. The principle of the sparse node sampling strategy is as follows: Figure 3 As shown, Figure 3This is a growing RRT search tree from the starting point to the ending point. The origin is a path node in the search tree, the lines represent the parent-child relationship between two nodes, and the sequence number indicates the order in which the nodes were generated. When searching for a new node in the RRT search tree, the nearest point in the search tree is found for each smart sampling point. During the iteration process, the node closest to a certain smart sampling point in the current search tree is node 7. A new node 12 is generated using the line connecting the smart sampling point and node 7 as the baseline. The node with the closest Euclidean distance to the new node 12 in the current search tree is node 11. After calculating the path cost between node 11 and the new node 12, if the path cost is less than or equal to the sparsity coefficient, then node 12 is determined to belong to the repeatedly explored region in space, and the new node 12 is not added to the tree. The expression for the path cost is as follows: in, This represents the cumulative path length from the neighboring nodes of the new node to the root node of the search tree; This represents the distance between the new node's neighboring nodes and the new node itself. Since two overlapping or too close nodes will not produce better exploration results or a better path, the node sparse sampling strategy can ensure that there are no overlapping nodes or repeated region explorations during the sampling process of the improved RRT algorithm, reduce unnecessary collision detection steps and traversal of neighboring steps, improve algorithm efficiency, and effectively reduce the number of sampling points, especially when the search space is large, thus reducing search time and computational cost.

[0033] In some specific embodiments of this application, a new node is determined. and corresponding neighboring nodes Whether the connection path between them will collide with obstacles within the workspace can be further included: S3321. Obtain the 3D point cloud data of the obstacle; S3322. Based on the three-dimensional point cloud data, perform an approximate convex hull decomposition operation on the obstacle to obtain several convex hull components of the obstacle. S3323. Construct a bounding volume hierarchy tree corresponding to the obstacle. Each leaf node in the bounding volume hierarchy tree corresponds to a convex hull component of the obstacle. The leaf node stores the axis-aligned bounding box of the convex hull component. S3324, New node and corresponding neighboring nodes The connection path between them is taken as the path to be detected. All leaf nodes in the bounding volume hierarchy tree are traversed. The GJK algorithm is used to obtain the minimum distance d between the path to be detected and each axis-aligned bounding box. If all minimum distances d are greater than the preset collision distance threshold, it is determined that the path to be detected has not collided with an obstacle; otherwise, it is determined that the path to be detected has collided with an obstacle.

[0034] The embodiments described above in this application propose a collision detection method based on approximate convex hull decomposition to address whether collisions with obstacles occur on the connection path. First, a point cloud in the workspace is obtained using a depth camera. Then, a fitting method (such as the random sampling consensus algorithm) is used to segment the ground or tabletop. Next, a clustering method is used to segment different objects (i.e., obstacles) on the ground or tabletop. Approximate convex hull decomposition is performed on all objects, and then the distance is calculated using the BVH-based GJK method to obtain a high-precision collision detection. This collision detection method has high computational efficiency.

[0035] In some specific embodiments of this application, in order to optimize path cost and improve the exploration efficiency of the tree structure, a cost function is defined, and the new node is determined based on the cost function. The corresponding parent nodes include: Define a new node according to the following expression. Cost function : in, Indicates the candidate parent node in the search tree The cumulative path length to the root node of the search tree; Indicates candidate parent node and new nodes The distance between them; Traverse all nodes in the search tree and select the cost function. Candidate parent node with the smallest value As a new node The parent node.

[0036] In the above embodiments of this application, the new node The initial parent node is the node from which the new node grows. When adding a new node, its initial parent node may not provide the shortest path from the root node. After adding a new node, a process of re-selecting and reconnecting its parent nodes is performed. This involves re-selecting parent nodes (by traversing all nodes within a certain range around the new node, rather than just the single nearest node), calculating the cost function from each candidate parent node to the new node, and selecting the node with the lowest cost as the new parent node. This cost function from the re-selected parent nodes is then used to evaluate the new node. and each candidate parent node The cost between different nodes is used to determine whether the parent node needs to be updated, and the candidate parent node with the lowest cost is chosen as the final parent node for the new node. Reselecting the parent node allows for more flexible connections between nodes in the search tree. This dynamic adjustment enables the search to reconstruct more efficient connected paths in complex environments, reducing global path inefficiencies caused by early incorrect parent node selections, and making it easier to generate better overall paths during subsequent expansions.

[0037] Specifically, in the above embodiments of this application, the steps for optimizing the search tree through dual-tree collaborative expansion are as follows: Step 1: Intelligent Hybrid Sampling Generates Intelligent Sampling Points ; Step 2: Locate the smart sampling point in the starting search tree. The nearest node ; Step 3, Nodes Towards intelligent sampling points Preset step size for line direction expansion A new node was obtained later. ; Step 4, if the new node and nodes If a point collides with an obstacle, it is considered an invalid expansion point; otherwise, it is considered a valid point and added to the starting point search tree. In the set; iterate the above steps until a new node is generated. Enter the starting point search tree set. The ending point search tree is randomly explored using intelligent hybrid sampling based on preset probabilities; Step 5, if the destination Enter the starting point search tree set, and find a valid path by backtracking through the parent node of the tree structure; In this embodiment, the improved RRT algorithm adds a reselection and reconnection of parent nodes after step four: the cost function of reselecting the parent node is used to evaluate the new node. and each candidate parent node in the corresponding search tree The cost between them is used to determine whether the parent node needs to be updated.

[0038] In some specific embodiments of this application, the starting search tree and the ending search tree satisfy the following meeting condition: The distance between a new node added in the starting search tree and any node in the ending search tree is less than a preset connection threshold; or the distance between a new node added in the ending search tree and any node in the starting search tree is less than a preset connection threshold.

[0039] The above embodiments of this application allow the search tree to connect in the middle region of non-root nodes, avoiding the generation of a large number of redundant nodes in pursuit of connecting root nodes, reducing node storage and the computational amount of nearest neighbor node search, and the dual-tree expansion can be terminated immediately after the connection is triggered, avoiding unnecessary subsequent sampling, collision detection and other operations, and reducing CPU and memory resource consumption.

[0040] In some specific embodiments of this application, reference is made to Figure 4 As shown, optimizing the global path through a repetitive greedy strategy and removing redundant nodes can further include: S51. Construct a path node set S=[q1, q2, ..., q] using all nodes in the global path. n , ...,q N ], where the elements in the path node set S are arranged in order from the starting point to the ending point, q n This represents the nth path point in the global path, where n represents the path point q. n The ordinal number; N represents the total number of elements in the path node set; S52. Take the path starting point q1 as the initial target path point; S53. Redundant Node Deletion: In the path node set S, traverse each path node q sequentially starting from the endpoint. n Determine the target path point and each path point q n If the connecting path collides with an obstacle, the first non-collision path point q will be found. n As a path child node of the current target path point, delete all path points between the current target path point and the corresponding path child node as redundant nodes. S54. Take the found path child nodes as new target path points, and repeat the redundant node deletion operation multiple times until the target path point is the path endpoint q. N End of time; S55. Connect the remaining path points in sequence to obtain the optimized global path.

[0041] In the embodiments described above, the paths obtained by the RRT algorithm inevitably contain redundant nodes, and the planned paths have a large number of redundant nodes. These redundant nodes increase the path length and the complexity of the robotic arm's execution path. Removing redundant nodes to ensure the planned path is essential. Most improved RRT algorithms use a greedy strategy only once, yet still produce redundant nodes. In this embodiment, the greedy strategy is repeated until no redundant nodes are left to delete, at which point the deletion stops, the final result is retained, and the optimal path is obtained.

[0042] Based on the same inventive concept, another embodiment of this application provides a robotic arm path planning system based on an improved RRT algorithm, referring to... Figure 5 As shown, the robotic arm path planning system 100 includes: Data extraction module 110 is used to acquire the workspace, start point and end point information of the robotic arm; The tree structure construction module 120 is used to construct and initialize two search trees based on the start and end information. The two search trees are the start search tree and the end search tree, respectively. The search tree expansion module 130 is used to perform intelligent hybrid sampling in the workspace to obtain intelligent sampling points. The intelligent sampling points are used to perform dual-tree collaborative expansion on two search trees to optimize the search tree. Intelligent hybrid sampling can obtain intelligent sampling points near obstacles based on convex hull fitting and dilation of obstacles. The global path generation module 140 is used to generate a global path from the start point to the end point by backtracking from the meeting node when the optimized start point search tree and the optimized end point search tree meet the meeting condition. The redundant node deletion module 150 is used to optimize the global path through a repeated greedy strategy and delete redundant nodes. The smoothing module 160 is used to smooth the optimized global path and output the optimal path for the robotic arm.

[0043] It should be noted that the modules in the robotic arm path planning system based on the improved RRT algorithm provided in the above embodiments of this application correspond to the steps of the robotic arm path planning method based on the improved RRT algorithm in any of the above embodiments. Those skilled in the art can refer to the step features of the robotic arm path planning method based on the improved RRT algorithm to implement the corresponding modules in the robotic arm path planning system based on the improved RRT algorithm, which will not be repeated here.

[0044] In another embodiment of this application, an electronic device is also provided, including a memory and a processor; the memory is used to store program instructions; the processor is used to call the program instructions stored in the memory and execute the steps of the above-described robotic arm path planning method based on the improved RRT algorithm according to the obtained program instructions.

[0045] Optionally, the memory is used to store programs; the memory may include volatile memory, such as random-access memory (RAM), such as static random-access memory (SRAM), double data rate synchronous dynamic random-access memory (DDR SDRAM), etc.; the memory may also include non-volatile memory, such as flash memory. The memory is used to store computer programs (such as application programs and functional modules that implement the above methods), computer instructions, etc., and the aforementioned computer programs and computer instructions can be partitioned and stored in one or more memories. Furthermore, the aforementioned computer programs, computer instructions, data, etc., can be accessed by the processor.

[0046] The aforementioned computer programs, computer instructions, etc., can be stored in partitions within one or more memory locations. Furthermore, the aforementioned computer programs, computer instructions, data, etc., can be accessed by a processor.

[0047] A processor is used to execute a computer program stored in memory to implement the various steps of the methods involved in the above embodiments. For details, please refer to the relevant descriptions in the preceding method embodiments.

[0048] The processor and memory can be separate structures or integrated structures. When the processor and memory are separate structures, they can be coupled together via a bus.

[0049] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0050] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0051] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0052] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0053] The preferred features in the above embodiments can be used individually in any embodiment, or in any combination thereof, provided they do not conflict with each other. Furthermore, parts not described in detail in the embodiments can be implemented using existing technologies.

[0054] The foregoing has described some specific embodiments of this application. It should be understood that this application is not limited to the specific embodiments described above, and those skilled in the art can make various modifications or variations within the scope of the claims, which do not affect the substantive content of this application. The above-described preferred features can be used in any combination without conflict.

Claims

1. A robot arm path planning method based on an improved RRT algorithm, characterized in that, The method comprises the following steps: obtaining workspace, start point and end point information of a robot arm; constructing and initializing two search trees according to the start point and end point information, wherein the two search trees are a start point search tree and an end point search tree respectively; performing intelligent mixed sampling in the workspace to obtain intelligent sampling points, and performing double-tree collaborative expansion on the two search trees by using the intelligent sampling points to optimize the search trees; the intelligent mixed sampling can obtain intelligent sampling points near obstacles based on convex hull fitting and inflation of the obstacles; when the optimized start point search tree and the optimized end point search tree meet the meeting condition, generating a global path from the start point to the end point by backtracking from a meeting node; optimizing the global path by repeating a greedy strategy and deleting redundant nodes; performing smoothing processing on the optimized global path, and outputting an optimal path of the robot arm.

2. The method of claim 1, wherein, The intelligent mixed sampling in the workspace to obtain intelligent sampling points, and the double-tree collaborative expansion on the two search trees by using the intelligent sampling points to optimize the search trees, comprise the following steps: From the start point and the end point, for each search tree, the intelligent hybrid sampling is adopted to obtain the intelligent sampling point corresponding to the search tree The nodes of the two search trees gradually approach the middle until the two search trees meet the meeting condition; in the process of double-tree collaborative expansion, selecting a node closest to the intelligent sampling point in the current search tree as a nearby node, and generating a corresponding new node based on the nearby node; performing node sparseness and path feasibility verification on the new node, and adding the new node passing the verification to the current search tree; defining a cost function, and determining a parent node corresponding to the new node based on the cost function.

3. The method of claim 2, wherein, The intelligent mixed sampling comprises four sampling methods, i.e., uniform random sampling, target bias sampling, random beacon sampling and inflation beacon sampling; in the process of generating a single intelligent sampling point, one of the four sampling methods is selected according to a preset probability to be executed; the uniform random sampling performs random sampling in an obstacle-free space of the workspace to generate an intelligent sampling point; the target bias sampling samples a point within a preset range around the end point as an intelligent sampling point with a preset bias probability; the random beacon sampling and the inflation beacon sampling are both based on the obstacles; a node located in the optimized search tree and having a distance less than a preset distance threshold from the obstacles is taken as a beacon node; the random beacon sampling adds noise within a preset noise range around the beacon node, and performs random sampling in a noise-covered area to generate an intelligent sampling point; the inflation beacon sampling is performed in the following manner: in the workspace, a convex hull fitting is performed on the obstacles to obtain an initial convex hull model of the obstacles; a preset safety distance is set to perform inflation processing on the initial convex hull model to generate an inflation convex hull model; at least one surface point on the surface of the inflation convex hull model is randomly sampled as an intelligent sampling point.

4. The method of claim 2, wherein, The generation of the corresponding new node based on the nearby node comprises the following steps: the line connecting the nearby node and the intelligent sampling point is taken as a reference line, and a direction from the nearby node to the intelligent sampling point on the reference line is defined as a generation direction; a preset step length is set to expand outward from the nearby node along the generation direction to generate the corresponding new node.

5. The method of claim 2, wherein, The node sparseness and path feasibility verification on the new node, and the addition of the new node passing the verification to the current search tree, comprise the following steps: selecting a node closest to the new node in the current search tree as a neighboring node of the new node, and determining whether a path cost between the new node and the neighboring node is greater than a preset sparsity coefficient: if the path cost between the new node and the neighboring node is greater than the preset sparsity coefficient, the node sparsity check of the new node is passed, and a next step of path feasibility check is performed; otherwise, the new node is removed, and intelligent hybrid sampling is performed again on the current search tree to obtain a new intelligent sampling point; determining whether a connection path between the new node and a corresponding neighboring node collides with an obstacle in a work space: if the connection path between the new node and the corresponding neighboring node does not collide with the obstacle, the path feasibility check of the new node is passed, and the new node is added to the current search tree; otherwise, the new node is removed, and intelligent hybrid sampling is performed again on the current search tree to obtain a new intelligent sampling point.

6. The method of claim 5, wherein, The determination of whether the connection path between the new node and the corresponding neighboring node collides with the obstacle in the work space comprises: obtaining three-dimensional point cloud data of the obstacle; performing an approximate convex hull decomposition operation on the obstacle based on the three-dimensional point cloud data to obtain a plurality of convex hull components of the obstacle; constructing an obstacle corresponding bounding volume hierarchical tree, each leaf node in the bounding volume hierarchical tree corresponding to a convex hull component of the obstacle, and the leaf node internally storing an axis-aligned bounding box of the convex hull component; taking the connection path between the new node and the corresponding neighboring node as a to-be-detected path, traversing all leaf nodes in the bounding volume hierarchical tree, and using the GJK algorithm to obtain minimum distances between the to-be-detected path and each axis-aligned bounding box, if all the minimum distances are greater than a preset collision distance threshold, it is determined that the to-be-detected path does not collide with the obstacle; otherwise, it is determined that the to-be-detected path collides with the obstacle.

7. The method of claim 2, wherein, The definition of the cost function and the determination of the parent node corresponding to the new node based on the cost function comprise: The cost function of a new node is defined according to the following expression : wherein, represents a candidate parent node in the search tree cumulative path length to the root node of the search tree; represents a candidate parent node and the new node distance between; traversing all nodes in the search tree, selecting a candidate parent node with the lowest cost function value the candidate parent node with the lowest cost function value as a parent node of the new node .

8. The method of claim 1, wherein, The meeting condition of the start point search tree and the end point search tree is that: the distance between the new node added in the start point search tree and any node in the end point search tree is less than a preset connection threshold, or the distance between the new node added in the end point search tree and any node in the start point search tree is less than the preset connection threshold.

9. The method of claim 1, wherein, The optimization of the global path by repeating the greedy strategy and the deletion of redundant nodes comprise: The path node set S = [q1, q2, ..., q] is constructed using all nodes in the global path. n , ..., q N ], where the elements in the path node set S are arranged in order from the starting point to the ending point, q n This represents the nth path point in the global path, where n represents the path point q. n The ordinal number; N represents the total number of elements in the path node set; taking the path start point q1 as an initial target path point; Redundant node deletion: in the path node set S, from the end point, each path point q is traversed in turn n , judge whether the connection path between the target path point and each path point q n collides with the obstacle, take the first non-collision path point q n found as the path child node of the current target path point, delete all path points between the current target path point and the corresponding path child node as redundant nodes; Take the found path sub-node as a new target path point, repeat the redundant node deletion operation multiple times until the target path point is the path end point q N time end; connecting the remaining path points in turn to obtain an optimized global path.

10. A robot path planning system based on improved RRT algorithm, characterized in that, It comprises: a data extraction module configured to obtain workspace, start point and end point information of a robot arm; a tree structure construction module configured to construct and initialize two search trees according to the start point and end point information, the two search trees being a start point search tree and an end point search tree; a search tree expansion module configured to perform intelligent hybrid sampling in the workspace to obtain intelligent sampling points, and to perform double-tree collaborative expansion on the two search trees using the intelligent sampling points to optimize the search trees; the intelligent hybrid sampling can obtain intelligent sampling points near an obstacle based on convex hull fitting and inflation of the obstacle; The global path generation module is configured to generate a global path from the start point to the end point by backtracking from the meeting node when the optimized start point search tree and the optimized end point search tree satisfy the meeting condition. The redundant node deletion module is configured to optimize the global path by a repeated greedy strategy and delete redundant nodes. The smoothing processing module is configured to perform smoothing processing on the optimized global path and output an optimal path of the robot arm.