Mechanical arm path planning method and system
By dynamically adjusting the neighborhood radius in robotic arm path planning and optimizing the path structure, the intelligence, efficiency and safety problems of robotic arm path planning in complex industrial environments are solved, and flexible and efficient path planning is realized, reducing calculation overhead and Collision risk.
Patent Information
- Application Number
- CN202411425558.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-13
- Publication Date
- 2024-12-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing robotic arm path planning technology is difficult to achieve intelligent, efficient and safe path planning in a complex and changeable industrial environment. Especially when flexible production demand increases, it is impossible to effectively cope with the kinematic and dynamic constraints of robotic arm. and obstacle avoidance requirements.
A robotic arm path planning method is adopted to dynamically adjust the neighborhood radius based on obstacle distribution and node density by initializing the tree structure, optimize the generation and path planning of new nodes, ensure the optimality and security of the path, and pass the path length and smoothness assessment determines the most suitable target path.
It improves the flexibility and efficiency of robotic arm path planning, reduces calculation overhead, significantly reduces the complexity of collision detection, and selects the most suitable path according to the characteristics of the path, improving the intelligence and safety of the robotic arm.
Smart Images

Figure CN119141540A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robotic arms, and in particular to a robotic arm path planning method and system. Background Art
[0002] In modern industrial automation, robotic arms, as important execution tools, are widely used in manufacturing, assembly, welding, handling and other fields. In order to achieve efficient and precise operations, robotic arm path planning technology has become a key research direction. The core task of path planning is to find the optimal path from the initial position to the target position under the premise of satisfying the kinematic constraints and dynamic constraints of the robotic arm. This process needs to consider multiple factors such as the obstacle avoidance requirements of the robotic arm in the workspace, the timeliness of the task, and energy consumption. At the same time, with the advancement of Industry 4.0 and intelligent manufacturing, the demand for flexible production has increased, and the path planning technology of the robotic arm must be more flexible and intelligent to cope with complex and changing working environments. Therefore, how to achieve intelligent, efficient and safe path planning of the robotic arm has become an important topic in the field of industrial robots. Summary of the invention
[0003] In order to solve the above problems, the present invention provides a robot arm path planning method, the method comprising the following steps: Obtain the starting position and target position of the robot arm, initialize a tree, the root node is the starting position, and the node set of the tree is initially the starting position; randomly generate a sampling point in the workspace of the robot arm, find the node closest to the sampling point, and extend the nearest node along the direction of the sampling point by a preset distance to obtain a new node; Determine the neighborhood radius of the new node based on the obstacle distribution and node density within the default neighborhood radius, find the parent node that minimizes the cost for the new node to reach the starting position within the neighborhood radius, and add the new node to the node set; and for the nodes within the neighborhood radius, after taking the new node as the parent node, if the cost is reduced, modify the parent node of the node to the new node; When the iteration termination condition is met, multiple reachable paths are output, the multiple reachable paths are optimized, and the target path is determined from the optimized paths.
[0004] Preferably, the neighborhood radius of the new node is determined based on the obstacle distribution and node density within the default neighborhood radius, specifically: Calculate the proportion of obstacles within the default neighborhood radius and calculate the node density within the range; A neighborhood radius of the new node is determined based on the proportion and the node density.
[0005] Preferably, the optimizing of the multiple reachable paths is specifically as follows: For each reachable path, find the node farthest from the current node and whose connection with the current node does not collide with an obstacle, delete the nodes between the current node and the node continuous with the current node from the node set of the reachable path, update the node set, and repeat the above operation starting from the next node of the current node in the updated node set until the last node in the node set; Find the line segments formed by all two adjacent nodes in each reachable path, determine the area where the distance between the line segment and the obstacle is less than a threshold, determine a point whose distance to the obstacle is equal to the threshold along the direction perpendicular to the line segment, and insert the determined point between the two end nodes of the line segment in the node set; update the node set after inserting the determined point, and repeat the above operation until there is no area where the distance to the obstacle is less than the threshold for all line segments.
[0006] Preferably, determining the target path from the optimized path is specifically: Calculate the straight-line distance between the starting position and the target position, obtain the length of the optimized route, and use the ratio of the route length to the straight-line distance as the detour degree of the optimized route; Calculate the average value of the angles between all adjacent line segments in the optimized path, and use the ratio of the average value to 2 as the smoothness of the optimized route; A target path is determined from the optimized paths based on the degree of detour and the degree of smoothness.
[0007] Preferably, determining the target path from the optimized path based on the detour degree and the smoothness is specifically as follows: The ratio of the smoothness to the detour degree is calculated, the optimized paths are sorted in descending order according to the ratio, and the first sorted path is used as the target path.
[0008] In a second aspect, the present invention provides a robot arm path planning system, the system comprising the following modules: A new node generation module is used to obtain the starting position and target position of the robot arm, initialize a tree, the root node is the starting position, and the node set of the tree is initially the starting position; randomly generate a sampling point in the workspace of the robot arm, find the node closest to the sampling point, and extend the nearest node along the direction of the sampling point by a preset distance to obtain a new node; An optimization module is used to determine the neighborhood radius of the new node based on the obstacle distribution and node density within the default neighborhood radius, find the parent node that minimizes the cost for the new node to reach the starting position within the neighborhood radius, and add the new node to the node set; and for the nodes within the neighborhood radius, after taking the new node as the parent node, if the cost is reduced, the parent node of the node is modified to the new node; The optimal path determination module is used to output multiple reachable paths when the iteration termination condition is met, optimize the multiple reachable paths, and determine the target path from the optimized paths.
[0009] Preferably, the neighborhood radius of the new node is determined based on the obstacle distribution and node density within the default neighborhood radius, specifically: Calculate the proportion of obstacles within the default neighborhood radius and calculate the node density within the range; A neighborhood radius of the new node is determined based on the proportion and the node density.
[0010] Preferably, the optimizing of the multiple reachable paths is specifically as follows: For each reachable path, find the node farthest from the current node and whose connection with the current node does not collide with an obstacle, delete the nodes between the current node and the node continuous with the current node from the node set of the reachable path, update the node set, and repeat the above operation starting from the next node of the current node in the updated node set until the last node in the node set; Find the line segments formed by all two adjacent nodes in each reachable path, determine the area where the distance between the line segment and the obstacle is less than a threshold, determine a point whose distance to the obstacle is equal to the threshold along the direction perpendicular to the line segment, and insert the determined point between the two end nodes of the line segment in the node set; update the node set after inserting the determined point, and repeat the above operation until there is no area where the distance to the obstacle is less than the threshold for all line segments.
[0011] Preferably, determining the target path from the optimized path is specifically: Calculate the straight-line distance between the starting position and the target position, obtain the length of the optimized route, and use the ratio of the route length to the straight-line distance as the detour degree of the optimized route; Calculate the average value of the angles between all adjacent line segments in the optimized path, and use the ratio of the average value to 2 as the smoothness of the optimized route; A target path is determined from the optimized paths based on the degree of detour and the degree of smoothness.
[0012] Preferably, determining the target path from the optimized path based on the detour degree and the smoothness is specifically as follows: The ratio of the smoothness to the detour degree is calculated, the optimized paths are sorted in descending order according to the ratio, and the first sorted path is used as the target path.
[0013] In addition, the present invention also provides a computer device, which includes at least a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method described in the first aspect is implemented.
[0014] In addition, the present invention provides a computer-readable storage medium, on which a computer program is stored, characterized in that when the computer program is executed by a processor, it implements the method described in the first aspect.
[0015] The present invention improves the neighborhood radius of new nodes in path planning. In areas where nodes are sparsely distributed, the neighborhood radius can be increased to increase the number of nodes participating in node optimization. For areas where nodes are densely distributed, the neighborhood radius can be reduced to reduce system overhead. Similarly, for areas with dense obstacles, reducing the neighborhood radius can significantly reduce the computational overhead of collision detection. In addition, the present invention further screens the obtained path and finds the path that best suits the robot arm based on the length and smoothness of the path. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a flow chart of Embodiment 1; Figure 2 Optimize the schematic diagram for the path; Figure 3 Schematic diagram for avoiding collision; Figure 4 This is a structural diagram of the second embodiment. DETAILED DESCRIPTION
[0017] In this article, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0018] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] Embodiment 1, the present invention provides a robot arm path planning method, the method comprising the following steps: Figure 1 As shown: Step 1: obtain the starting position and target position of the robot arm, initialize a tree, the root node is the starting position, and the node set of the tree is initially the starting position; randomly generate a sampling point in the workspace of the robot arm, find the node closest to the sampling point, and extend the nearest node along the direction of the sampling point by a preset distance to obtain a new node; In the path planning of the robot arm, it is necessary to obtain the starting position and target position of the robot arm, wherein the starting position is the current position of the robot arm, and the target position is the position to be reached by the robot arm. There may be multiple obstacles between the starting position and the target position, and the shape of the obstacles is not fixed, which requires avoiding these obstacles. In one embodiment, a tree is initialized, the root node of the tree is the starting position at the initial moment, and the node set stores the nodes. At the initial moment, there is only one node in the node set, which is the starting position. In another embodiment, an edge set is also initialized, and the edge set stores the edges connected by the nodes. After initialization, a sampling point is randomly generated in the working space of the robot arm, wherein the working space refers to the space formed by the range that the robot arm can reach. After the sampling point is generated, the node closest to the sampling point is found. After initialization, the node closest to the first sampling point is the starting position. As nodes are added to the node set, subsequent sampling points will calculate distances with multiple nodes and find the node closest to the sampling point.
[0020] After finding the nearest node, the nearest node and the sampling point are connected, and a new node is determined along the connection line and in the direction of the sampling point according to a predetermined step length, so that a new node is obtained.
[0021] Step 2: Determine the neighborhood radius of the new node based on the obstacle distribution and node density within the default neighborhood radius, find the parent node that minimizes the cost for the new node to reach the starting position within the neighborhood radius, and add the new node to the node set; and for the nodes within the neighborhood radius, after taking the new node as the parent node, if the cost is reduced, modify the parent node of the node to the new node; After generating a new node, it is necessary to determine the node to which the new node is connected. The process is to determine several nodes within a radius centered on the new node, and respectively calculate the cost from the new node to the starting position when it is connected to each of the several nodes. In a preferred embodiment, the distance is used as the cost, that is, the path distance from the new node to the starting position when it is connected to each of the several nodes is calculated, and the node with the smallest cost is selected as the parent node of the new node. However, each new node is located at a different position, and the obstacles and node distribution around the new node are also different. In actual work, if the radius range is set too large, there will be too many nodes within the radius, which will increase the calculation overhead, and the large radius will cause the new node to be connected to a node that is too far away, resulting in an increase in the path; and if the radius range is set too small, it may fall into a local optimum. In addition, there may be a situation where there is no node within the radius range, which does not achieve the purpose of optimization. In the present invention, the radius range is determined based on the obstacle distribution and node density within the default neighborhood radius. If there are many obstacles around the new node, the neighborhood radius is appropriately reduced. If there are many nodes around the new node, the neighborhood radius will also be reduced in order to suppress the calculation overhead.
[0022] In one embodiment, the neighborhood radius of the new node is determined based on the obstacle distribution and node density within the default neighborhood radius, specifically: Calculate the proportion of obstacles within the default neighborhood radius and calculate the node density within the range; A neighborhood radius of the new node is determined based on the proportion and the node density.
[0023] Among them, the default neighborhood radius is a fixed radius, or the default neighborhood radius decreases continuously as the number of nodes in the node set increases. The robot moves in three-dimensional space, and the proportion of obstacles in the range of the default domain radius is calculated by taking the new node as the center of the sphere and the default neighborhood radius as the radius of the sphere to calculate the volume of the range, and then calculating the proportion of the volume of the obstacle in the range. The node density in the range is calculated by dividing the number of nodes in the range by the volume of the range. In a specific embodiment, the neighborhood radius of the new node is determined based on the proportion and the node density, specifically: 1 minus the weighted result of the proportion, plus the weighted exp (-density / 10) to obtain the weight of the default neighborhood radius, and the neighborhood radius of the new node is obtained by weighting the default domain radius using the weight. Assuming that the weight of the proportion and the weight corresponding to the density are both 0.5, the proportion is 0.1, and the density is 0, then the weight is 1.45, that is, the default radius is expanded to 1.45 times the original; if the density is 10, the weight is 1.13. Wherein exp() represents an exponential function with e as the base, and the result of subtracting the weighted proportion from 1 is obtained by first performing a weighted calculation on the proportion and then subtracting the result of the weighted calculation from 1.
[0024] After the new node obtains the neighborhood radius, it will find the optimal parent node within the range of the neighborhood radius. The specific process is that the new node will try to use all the nodes within the neighborhood radius as parent nodes, and then calculate the cost of using all the nodes within the radius as parent nodes, and use the node with the smallest cost as the parent node. In the present invention, the range of the neighborhood radius is a range with the new node as the center of the sphere and the neighborhood radius as the sphere radius. After determining the parent node, the nodes within the radius will be further optimized. Specifically, all nodes within the neighborhood range that are not new nodes and parent nodes of non-new nodes will try to use the new node as a parent node, and then calculate the cost. If the cost is reduced, the new node will be used as a parent node.
[0025] Step three: when the iteration termination condition is met, multiple reachable paths are output, the multiple reachable paths are optimized, and the target path is determined from the optimized paths.
[0026] When the iteration termination condition is met, multiple reachable paths will be output, where the termination condition includes but is not limited to generating a preset number of reachable paths. Since the robot arm is generally composed of multiple joints, it needs to be as smooth as possible during the movement of the robot arm. The shortest path is not necessarily the most suitable for the robot arm, which requires selecting a path that is most suitable for the robot arm from multiple reachable paths. In one embodiment, multiple reachable paths are first optimized, and the optimization method includes but is not limited to path simplification and / or path smoothing.
[0027] In yet another embodiment, the optimizing of the multiple reachable paths is specifically: For each reachable path, find the node farthest from the current node and whose connection with the current node does not collide with an obstacle, delete the nodes between the current node and the node continuous with the current node from the node set of the reachable path, update the node set, and repeat the above operation starting from the next node of the current node in the updated node set until the last node in the node set; Each reachable path is composed of multiple nodes. For example, the nodes of a reachable path are [n1, n2, n3, n4, n5]. Starting from the first node of the reachable path, take the first node as the current node, find a target node, the line segment formed by the target node and the current node does not collide with the obstacle, and the target node is farthest from the current node, then delete the nodes between the current node and the target node from the node set of the reachable path. For example, if the current node is n1, the line segment formed by n1 and n2 does not collide with the obstacle, the line segment formed by n1 and n3 collides with the obstacle, the line segment formed by n1 and n4 does not collide with the obstacle, and the line segment formed by n1 and n5 collides with the obstacle, then n4 satisfies the farthest distance from n1, and the line segment formed by the two does not collide, then n2 and n3 are deleted from the node set of the reachable segment, such as Figure 2 As shown. The node set of the reachable path becomes [n1, n4, n5]. Next, in the updated node set, the next node of n1 is n4, and the above process is repeated with n4 as the current node.
[0028] Since the robotic arm has a certain volume, there are some points on some paths that are too close to obstacles, which may cause the robotic arm to collide with the obstacle. The present invention further finds the line segments formed by all two adjacent nodes in each reachable path, determines the area where the distance between the line segment and the obstacle is less than a threshold, determines a point along the direction perpendicular to the line segment whose distance to the obstacle is equal to the threshold, and inserts the determined point between the two endpoint nodes of the line segment in the node set; after inserting the determined point, updates the node set, and repeats the above operation until there is no area where the distance to the obstacle is less than the threshold for all line segments.
[0029] For every two adjacent points on the path, determine the distance between the line segment formed by the two adjacent points and the obstacle. If the distance is less than the threshold, find the point on the selected segment that is closest to the obstacle, then draw a perpendicular line to the line segment at the nearest point, and find a point on the perpendicular line whose distance to the obstacle is equal to the threshold, such as Figure 3 The point found on the vertical line is inserted between the adjacent points in the node set, so that the node set is updated, and the above operation is repeated for the updated node set until there is no situation where the distance from the obstacle is less than the threshold on the line segment formed by all adjacent nodes.
[0030] After the path is optimized, a target path is determined from the optimized path as the path for the robot to move. In one embodiment, the path with the shortest path length is selected as the target path.
[0031] The shortest path is not necessarily the fastest or most stable path. In another embodiment, the target path is determined from the optimized path as follows: Calculate the straight-line distance between the starting position and the target position, obtain the length of the optimized route, and use the ratio of the route length to the straight-line distance as the detour degree of the optimized route; Calculate the average value of the angles between all adjacent line segments in the optimized path, and use the ratio of the average value to 2 as the smoothness of the optimized route; A target path is determined from the optimized paths based on the degree of detour and the degree of smoothness.
[0032] In this embodiment, not only the path length but also the smoothness of the robot movement is considered. Specifically, the ratio of each optimized path to the straight-line distance from the starting position to the target position is calculated, and the ratio is used as the detour degree. The larger the ratio, the greater the detour degree. Then the average value of the angles between all adjacent line segments is calculated, and the ratio of the average value to 2 is used as the smoothness. The larger the ratio, the smoother.
[0033] In a specific embodiment, determining the target path from the optimized path based on the detour degree and the smoothness is specifically as follows: The ratio of the smoothness to the detour degree is calculated, the optimized paths are sorted in descending order according to the ratio, and the first sorted path is used as the target path.
[0034] In another embodiment, determining the target path from the optimized path based on the detour degree and the smoothness is specifically: Calculate 1 minus the smoothness value, weight the value, and weight the detour degree, add the two weighted values to obtain a path score, sort the paths in ascending order of the path scores, and take the first path after sorting as the target path.
[0035] Embodiment 2, the present invention provides a robot arm path planning system, such as Figure 4 As shown, the system includes the following modules: A new node generation module is used to obtain the starting position and target position of the robot arm, initialize a tree, the root node is the starting position, and the node set of the tree is initially the starting position; randomly generate a sampling point in the workspace of the robot arm, find the node closest to the sampling point, and extend the nearest node along the direction of the sampling point by a preset distance to obtain a new node; An optimization module is used to determine the neighborhood radius of the new node based on the obstacle distribution and node density within the default neighborhood radius, find the parent node that minimizes the cost for the new node to reach the starting position within the neighborhood radius, and add the new node to the node set; and for the nodes within the neighborhood radius, after taking the new node as the parent node, if the cost is reduced, the parent node of the node is modified to the new node; The optimal path determination module is used to output multiple reachable paths when the iteration termination condition is met, optimize the multiple reachable paths, and determine the target path from the optimized paths.
[0036] Preferably, the neighborhood radius of the new node is determined based on the obstacle distribution and node density within the default neighborhood radius, specifically: Calculate the proportion of obstacles within the default neighborhood radius and calculate the node density within the range; A neighborhood radius of the new node is determined based on the proportion and the node density.
[0037] Preferably, the optimizing of the multiple reachable paths is specifically as follows: For each reachable path, find the node farthest from the current node and whose connection with the current node does not collide with an obstacle, delete the nodes between the current node and the node continuous with the current node from the node set of the reachable path, update the node set, and repeat the above operation starting from the next node of the current node in the updated node set until the last node in the node set; Find the line segments formed by all two adjacent nodes in each reachable path, determine the area where the distance between the line segment and the obstacle is less than a threshold, determine a point whose distance to the obstacle is equal to the threshold along the direction perpendicular to the line segment, and insert the determined point between the two end nodes of the line segment in the node set; update the node set after inserting the determined point, and repeat the above operation until there is no area where the distance to the obstacle is less than the threshold for all line segments.
[0038] Preferably, determining the target path from the optimized path is specifically: Calculate the straight-line distance between the starting position and the target position, obtain the length of the optimized route, and use the ratio of the route length to the straight-line distance as the detour degree of the optimized route; Calculate the average value of the angles between all adjacent line segments in the optimized path, and use the ratio of the average value to 2 as the smoothness of the optimized route; A target path is determined from the optimized paths based on the degree of detour and the degree of smoothness.
[0039] Preferably, determining the target path from the optimized path based on the detour degree and the smoothness is specifically as follows: The ratio of the smoothness to the detour degree is calculated, the optimized paths are sorted in descending order according to the ratio, and the first sorted path is used as the target path.
[0040] Embodiment 3, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described in embodiment 1 is implemented.
[0041] Embodiment 4: The present invention further provides a computer device, which includes at least a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method described in Embodiment 1 is implemented.
[0042] Through the description of the above implementation methods, technicians in this field can clearly understand that each implementation method can be implemented by adding a necessary general hardware platform, and of course can also be implemented by combining hardware and software. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a computer product, and the present invention can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0043] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it, and other embodiments may also be used. Although the present invention has been described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or replace some of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A robot arm path planning method, It is characterized in that The method comprises the following steps: Obtain the starting position and target position of the robot arm, initialize a tree, the root node is the starting position, and the node set of the tree is initially the starting position; randomly generate a sampling point in the workspace of the robot arm, find the node closest to the sampling point, and extend the nearest node along the direction of the sampling point by a preset distance to obtain a new node; Determine the neighborhood radius of the new node based on the obstacle distribution and node density within the default neighborhood radius, find the parent node that minimizes the cost for the new node to reach the starting position within the neighborhood radius, and add the new node to the node set; and for the nodes within the neighborhood radius, after taking the new node as the parent node, if the cost is reduced, modify the parent node of the node to the new node; When the iteration termination condition is met, multiple reachable paths are output, the multiple reachable paths are optimized, and the target path is determined from the optimized paths.
2. The method according to claim 1, It is characterized in that The neighborhood radius of the new node is determined based on the obstacle distribution and node density within the default neighborhood radius, specifically: Calculate the proportion of obstacles within the default neighborhood radius and calculate the node density within the range; A neighborhood radius of the new node is determined based on the proportion and the node density.
3. The method according to claim 1, It is characterized in that The optimization of multiple reachable paths is specifically as follows: For each reachable path, find the node farthest from the current node and whose connection with the current node does not collide with an obstacle, delete the nodes between the current node and the node continuous with the current node from the node set of the reachable path, update the node set, and repeat the above operation starting from the next node of the current node in the updated node set until the last node in the node set; Find the line segments formed by all two adjacent nodes in each reachable path, determine the area where the distance between the line segment and the obstacle is less than a threshold, determine a point whose distance to the obstacle is equal to the threshold along the direction perpendicular to the line segment, and insert the determined point between the two end nodes of the line segment in the node set; update the node set after inserting the determined point, and repeat the above operation until there is no area where the distance to the obstacle is less than the threshold for all line segments.
4. The method according to claim 1, It is characterized in that The step of determining the target path from the optimized path is as follows: Calculate the straight-line distance between the starting position and the target position, obtain the length of the optimized route, and use the ratio of the route length to the straight-line distance as the detour degree of the optimized route; Calculate the average value of the angles between all adjacent line segments in the optimized path, and use the ratio of the average value to 2 as the smoothness of the optimized route; A target path is determined from the optimized paths based on the degree of detour and the degree of smoothness.
5. The method according to claim 4, It is characterized in that The step of determining the target path from the optimized path based on the detour degree and the smoothness is specifically as follows: The ratio of the smoothness to the detour degree is calculated, the optimized paths are sorted in descending order according to the ratio, and the first sorted path is used as the target path.
6. A robotic arm path planning system, It is characterized in that The system includes the following modules: A new node generation module is used to obtain the starting position and target position of the robot arm, initialize a tree, the root node is the starting position, and the node set of the tree is initially the starting position; randomly generate a sampling point in the workspace of the robot arm, find the node closest to the sampling point, and extend the nearest node along the direction of the sampling point by a preset distance to obtain a new node; An optimization module is used to determine the neighborhood radius of the new node based on the obstacle distribution and node density within the default neighborhood radius, find the parent node that minimizes the cost for the new node to reach the starting position within the neighborhood radius, and add the new node to the node set; and for the nodes within the neighborhood radius, after taking the new node as the parent node, if the cost is reduced, the parent node of the node is modified to the new node; The optimal path determination module is used to output multiple reachable paths when the iteration termination condition is met, optimize the multiple reachable paths, and determine the target path from the optimized paths.
7. The system of claim 6, It is characterized in that The neighborhood radius of the new node is determined based on the obstacle distribution and node density within the default neighborhood radius, specifically: Calculate the proportion of obstacles within the default neighborhood radius and calculate the node density within the range; A neighborhood radius of the new node is determined based on the proportion and the node density.
8. The system according to claim 6, It is characterized in that The optimization of multiple reachable paths is specifically as follows: For each reachable path, find the node farthest from the current node and whose connection with the current node does not collide with an obstacle, delete the nodes between the current node and the node continuous with the current node from the node set of the reachable path, update the node set, and repeat the above operation starting from the next node of the current node in the updated node set until the last node in the node set; Find the line segments formed by all two adjacent nodes in each reachable path, determine the area where the distance between the line segment and the obstacle is less than a threshold, determine a point whose distance to the obstacle is equal to the threshold along the direction perpendicular to the line segment, and insert the determined point between the two end nodes of the line segment in the node set; update the node set after inserting the determined point, and repeat the above operation until there is no area where the distance to the obstacle is less than the threshold for all line segments.
9. A computer device, comprising at least a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method according to any one of claims 1 to 5 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 5.
Citation Information
Cited By
Path planning method and device and storage medium
CN121163544A
Mechanical arm path planning method, device and equipment and storage medium
CN121893290A
Unmanned aerial vehicle battery replacement control method, system and equipment based on PLC
CN122627067A
