Mechanical arm path planning method, device and equipment and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HEBEI UNIV OF ENG
- Filing Date
- 2026-03-23
- Publication Date
- 2026-07-21
AI Technical Summary
The RRT* algorithm does not consider the geometric smoothness of the path in the robotic arm path planning, resulting in frequent path turns, which affects the end-effector positioning accuracy and reduces the service life of the equipment.
The environment model is reconstructed using 3DGS technology, a turning angle threshold is set, and the decision on whether to accept new nodes is dynamically made. The smoothness of the path is optimized through a comprehensive cost function to avoid frequent turning and generate a smoother robotic arm motion trajectory.
It effectively suppresses impact and wear during robotic arm movement, extends equipment lifespan, and generates smoother and more fluid paths.
Smart Images

Figure CN121893290B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotic arm control technology, and in particular to a robotic arm path planning method, apparatus, device, and storage medium. Background Technology
[0002] In the field of high-end equipment manufacturing, especially in high-altitude maintenance operations on power transmission towers, robotic arms need to move autonomously within narrow, dense truss structures to precisely suspend safety ropes to target points. Rapidly-exploring Random Tree (RRT) and its variants are widely used for robotic arm path planning due to their good adaptability in high-dimensional spaces.
[0003] In existing technologies, the RRT* algorithm introduces a reconnection mechanism based on the RRT algorithm, exhibiting asymptotic optimality and enabling the path length to converge to the optimal solution as the number of iterations increases. However, the RRT* algorithm uses path length as the sole optimization objective, neglecting the geometric smoothness of the path. This results in frequent path turns, which directly impact the robotic arm, causing motion shocks and mechanical wear, affecting end-effector positioning accuracy, and reducing equipment lifespan. Summary of the Invention
[0004] This invention provides a method, apparatus, device, and storage medium for robotic arm path planning, in order to solve the problem that the RRT* algorithm's failure to consider path smoothness may lead to a reduction in the lifespan of the robotic arm.
[0005] In a first aspect, embodiments of the present invention provide a robotic arm path planning method, comprising:
[0006] Obtain point cloud modeling information of the robotic arm's operating environment as the sampling space;
[0007] The search tree is initialized with the preset starting point as the root node, and sampling is performed in the sampling space to obtain the current sampling point;
[0008] Based on the current sampling point, perform nearest neighbor search and node expansion to obtain two adjacent path segments and calculate the direction change angle between the two adjacent path segments;
[0009] If the direction change angle is greater than the preset turning angle threshold, the current sampling point is redefined; otherwise, the current sampling point is added to the search tree, and sampling continues to determine a new sampling point.
[0010] If the distance between the extended node corresponding to the current sampling point and the preset endpoint is less than the preset threshold, then backtracking based on the extended node will yield the path planning result of the robotic arm.
[0011] In one possible implementation, a nearest neighbor search and node expansion are performed based on the current sampling point to obtain two adjacent path segments and calculate the direction change angle between the two adjacent path segments, including:
[0012] Perform a nearest neighbor search based on the current sampling point to obtain the neighboring nodes corresponding to the current sampling point;
[0013] Extend the sampling point by a preset step size along the direction from the nearest node to the current sampling point to obtain the extended node corresponding to the current sampling point;
[0014] The line connecting the current sampling point to its neighboring nodes is taken as the first path segment, and the line connecting the current sampling point to the extended nodes is taken as the second path segment. The directional change angle between the first path segment and the second path segment is calculated.
[0015] In one possible implementation, before adding the current sample point to the search tree, the following steps are also included:
[0016] Based on the comprehensive cost function, the parent node is reselected and rewired for the extended nodes of the current sampling point.
[0017] In one possible implementation, the comprehensive cost function includes path length cost, motion time cost, and smoothness penalty term; wherein the smoothness penalty term is positively correlated with the directional change angle between two adjacent path segments.
[0018] In one possible implementation, the smoothness penalty term is calculated using the following formula:
[0019]
[0020] in, For smoothness penalty term, For the first The penalty value for each path point. , This represents the total number of path points in the search tree. This represents the angle of change in direction between two adjacent path segments.
[0021] In one possible implementation, before reselecting the parent node and rewiring the extended nodes of the current sampling point based on the comprehensive cost function, the following is also included:
[0022] Determine whether the path segment between the neighboring nodes and the extended nodes of the current sampling point collides with the preset obstacle area;
[0023] If a collision occurs, the current sampling point will be redefined.
[0024] In one possible implementation, sampling is performed in the sampling space to obtain the current sampling point, including:
[0025] In the sampling space, with a preset probability Directly use the preset endpoint as the current sampling point, with probability Perform uniform random sampling across the entire area to obtain the current sampling point.
[0026] Secondly, embodiments of the present invention provide a robotic arm path planning device, comprising:
[0027] The acquisition module is used to acquire point cloud modeling information of the robotic arm's operating environment as a sampling space;
[0028] The sampling module is used to initialize the search tree with a preset starting point as the root node, perform sampling in the sampling space, and obtain the current sampling point.
[0029] The extension module is used to perform nearest neighbor search and node expansion based on the current sampling point, obtain two adjacent path segments, and calculate the direction change angle between the two adjacent path segments;
[0030] The update module is used to redetermine the current sampling point when the direction change angle is greater than the preset turning angle threshold; otherwise, the current sampling point is added to the search tree and sampling continues to determine a new sampling point.
[0031] The backtracking module is used to backtrack based on the extended node when the distance between the extended node corresponding to the current sampling point and the preset endpoint is less than a preset threshold, so as to obtain the path planning result of the robotic arm.
[0032] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect or any possible implementation thereof.
[0033] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect or any possible implementation thereof.
[0034] Fifthly, embodiments of the present invention provide a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect or any possible implementation thereof.
[0035] This invention employs a 3DGS-reconstructed environment model to build a search tree, plans paths based on the actual physical environment, and dynamically determines whether to accept new nodes by setting a turning angle threshold. When the expansion direction undergoes a sharp turn relative to the historical path, the node is discarded and resampled. This allows for control over the smoothness of the path from the source, avoiding smoothing processing in the later stages of path generation. It ensures that each local connection of the path has good smoothness, resulting in a smoother final robotic arm motion trajectory, effectively suppressing motion impact and mechanical wear, and extending the service life of the robotic arm equipment. Attached Figure Description
[0036] Figure 1 This is a flowchart illustrating the implementation of the robotic arm path planning method provided in this embodiment of the invention.
[0037] Figure 2 This is a schematic diagram of the robotic arm path planning device provided in an embodiment of the present invention;
[0038] Figure 3 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0039] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0040] See Figure 1 The flowchart illustrating the implementation of the robotic arm path planning method provided in this embodiment of the invention is shown below:
[0041] Step 101: Obtain point cloud modeling information of the robotic arm's operating environment as the sampling space.
[0042] In this embodiment, the first step is to acquire the point cloud environmental information of the iron tower. This point cloud is reconstructed using 3DGS technology, which can accurately restore the geometric structure and surface details of the tower, providing a high-fidelity obstacle model for subsequent collision detection. Simultaneously, the precise coordinates of the target suspension point A are obtained through calibration; this point is the target position that the robotic arm's end effector needs to reach. , serving as a guiding point for path planning.
[0043] Next, set the parameters for route planning, specifically including: starting point. This is typically the initial configuration of the robotic arm, where all joint angles are zero; the maximum number of iterations. The step size can be selected between 5000 and 20000 depending on the complexity of the environment and the real-time requirements; The value is selected based on the robotic arm's motion accuracy and the density of obstacles; in this embodiment, it is set to 0.1 rad.
[0044] Step 102: Initialize the search tree with the preset starting point as the root node, and sample in the sampling space to obtain the current sampling point.
[0045] In this embodiment, the search tree Initialized to contain only the starting point The sampling space is defined as the joint space of the robotic arm, and its dimension is equal to the number of degrees of freedom of the robotic arm. For example, the sampling space of a six-DOF robotic arm is a six-dimensional space. In each iteration, the algorithm randomly samples in the joint space to generate the current sampling point. .
[0046] To strike a balance between exploring unknown areas and utilizing target information, a target bias sampling strategy can also be employed, which uses probability... Directly target point As With probability 1- Uniform random sampling is performed across all dimensions of the sampling space. This generates... It maintains randomness to cover the entire space while also exhibiting a bias to accelerate convergence towards the target. In this embodiment, Specifically, it can be set to 0.7.
[0047] Step 103: Based on the current sampling point, perform nearest neighbor search and node expansion to obtain two adjacent path segments and calculate the direction change angle between the two adjacent path segments.
[0048] In this embodiment, first in the search tree Find the distance from the current sampling point The nearest node Then, from point to The direction is based on the step size Expand to get new nodes ,Right now .
[0049] After expansion, in order to evaluate the smoothness of the local path, it is necessary to examine... The turning point. If Parent node exists Then the first path segment is defined as from arrive The vector, the second path segment is from arrive Given two vectors, calculate the angle between them. The included angle reflects the path's position within the path. The degree of transition at the point. If If the node is the root node (without a parent node), the turning angle cannot be calculated; this is the default setting. =0°. This embodiment lays the foundation for optimizing path smoothness by monitoring the turning angle in real time.
[0050] Step 104: If the direction change angle is greater than the preset turning angle threshold, then redetermine the current sampling point; otherwise, add the current sampling point to the search tree and continue sampling to determine a new sampling point.
[0051] In this embodiment, the preset turning angle threshold can be 60°, if the calculated direction change angle >60° indicates from arrive The extension represents a sharp turn from the previous path segment. Such a path can lead to sudden changes in joint speed, unstable movement, or even a reduction in the lifespan of the robotic arm, potentially exceeding its joint driving capabilities. Therefore, this new node needs to be determined. Invalid, discard immediately and return to step 102 to regenerate sampling points. Then proceed to the next iteration. If If the angle is ≤60°, then accept the new node, add it to the search tree, and add the edge ( , Add it to the edge set. Then, continue iterating and repeat steps 102 to 104 until the termination condition is met.
[0052] Turning point inhibition threshold The angle can be selected within the range of 45° to 75°. In this embodiment, the turning point suppression threshold is set to 60°. This value is determined based on comparative experiments with different thresholds. As shown in Table 1, the experiment compared five thresholds: 30°, 45°, 60°, 75°, and 90°. Each threshold was tested 30 times independently, and the planning time, path length, number of turning points, and success rate were statistically analyzed.
[0053] Table 1. Impact of different turning angle thresholds on algorithm performance
[0054]
[0055] Experimental results show that:
[0056] (1) When the threshold is below 60° (30°, 45°), the success rate of the algorithm drops significantly. At 30°, the success rate is only 40.0%, indicating that overly strict turning suppression constraints make it difficult for the algorithm to find a feasible path in narrow channels; at 45°, the success rate increases to 86.7%, but there is still a certain failure rate.
[0057] (2) When the threshold reaches 60°, the success rate of the algorithm reaches 100%, the path length is the shortest (1.799m), the number of turning points is 7.1, and the overall performance is the best.
[0058] (3) When the threshold is higher than 60° (75°, 90°), the success rate remains 100%, but the path length and the number of turning points both increase. The number of turning points increases to 8.0 at 75° and to 8.9 at 90°, and the improvement in path smoothness is not obvious.
[0059] Therefore, based on the kinematic constraints and engineering experience of the robotic arm, 60° is the optimal value for balancing smoothness and path reachability. It can effectively suppress frequent jagged turns while avoiding excessive constraints that could cause search stagnation. By suppressing the turning angle, extensions that would lead to path unsmoothness can be filtered out at the source, improving the motion smoothness of the final path and reducing the complexity of subsequent smoothing processes.
[0060] Step 105: If the distance between the extended node corresponding to the current sampling point and the preset endpoint is less than the preset threshold, then backtrack based on the extended node to obtain the path planning result of the robotic arm.
[0061] In this embodiment, each successful transfer of a new node After adding it to the search tree, calculate its distance from the target point. Distance in joint space , If the distance is less than a preset threshold ε, the algorithm is considered to have reached the target area. In this embodiment, the preset threshold ε is 0.1 rad. At this time, from... Start by traversing back along the parent node pointers of each node until you return to the root node. By recording the nodes passed through in sequence, a series of point sequences is obtained, which is the final trajectory from the starting point to the target.
[0062] The threshold ε needs to be set in a way that balances task accuracy and computational efficiency. If the value is too small, it will increase the number of iterations, while if it is too large, it may cause the end-point positioning error to exceed the limit.
[0063] This invention employs a 3DGS-reconstructed environment model to build a search tree, plans paths based on the actual physical environment, and dynamically determines whether to accept new nodes by setting a turning angle threshold. When the expansion direction undergoes a sharp turn relative to the historical path, the node is discarded and resampled. This allows for control over the smoothness of the path from the source, avoiding smoothing processing in the later stages of path generation. It ensures that each local connection of the path has good smoothness, resulting in a smoother final robotic arm motion trajectory, effectively suppressing motion impact and mechanical wear, and extending the service life of the robotic arm equipment.
[0064] In one possible implementation, a nearest neighbor search and node expansion are performed based on the current sampling point to obtain two adjacent path segments and calculate the direction change angle between the two adjacent path segments, including:
[0065] Perform a nearest neighbor search based on the current sampling point to obtain the neighboring nodes corresponding to the current sampling point;
[0066] Extend the sampling point by a preset step size along the direction from the nearest node to the current sampling point to obtain the extended node corresponding to the current sampling point;
[0067] The line connecting the current sampling point to its neighboring nodes is taken as the first path segment, and the line connecting the current sampling point to the extended nodes is taken as the second path segment. The directional change angle between the first path segment and the second path segment is calculated.
[0068] In this embodiment, the distance is first searched in the search tree. The nearest node Subsequently, with Starting from the direction vector v= - Expanding the step size λ yields a new node. To calculate the change angle of direction, it is necessary to obtain... parent node (If it exists). Define a vector a that points from the parent node to the current node. - The vector b pointing from the current node to the new node = - Angle of change of direction That is, the angle between vectors a and b, which can be calculated using the dot product formula:
[0069]
[0070] Since both a and b are located in the joint space, this angle objectively reflects the path in... The degree of abruptness of the turning point. If If the threshold is exceeded, the expansion is deemed invalid and discarded. Otherwise, leave it as is. When When it is the root node, no parent node is available, and it is accepted by default. .
[0071] This embodiment can quantify local smoothness through simple vector operations, providing a basis for dynamic decision-making, thereby effectively suppressing frequent turns in the path and improving the smoothness of the robotic arm's motion path and the fluidity of the robotic arm's movement.
[0072] In one possible implementation, before adding the current sample point to the search tree, the following steps are also included:
[0073] Based on the comprehensive cost function, the parent node is reselected and rewired for the extended nodes of the current sampling point.
[0074] In this embodiment, when a new node After passing the turning point test and being accepted, it is not directly based on... Instead of using the parent node, it performs optimization steps in the RRT* algorithm to reduce path cost.
[0075] First of all, in the context of Search for the existing set of nodes within a spherical neighborhood centered at r with radius r. The radius r can be set as the step size λ to balance computational efficiency and optimization effect. Then, for Each node in , calculation When the parent node is from the starting point to cumulative cost ( )+cost( , ), where cost( , The cost can be calculated using either path length or a comprehensive cost function. The node that minimizes the cumulative cost is selected as... The official parent node is determined, and the corresponding edge is added to the search tree to achieve parent node reselection.
[0076] Next, perform rewiring: For Each node except the new parent node , calculation When the parent node is from the starting point to cumulative cost ( )+cost( , If the cost is less than The current cumulative cost will be The parent node is changed The algorithm updates the costs of relevant nodes in the search tree. Through these two optimization steps, the path costs in the search tree gradually approach a local optimum, and then progressively converge to the global optimum with further iterations.
[0077] This embodiment can continuously optimize the structure of the search tree, making the final generated path better in the sense of the selected cost function, thus effectively improving the path quality.
[0078] In one possible implementation, the comprehensive cost function includes path length cost, motion time cost, and smoothness penalty term; wherein the smoothness penalty term is positively correlated with the directional change angle between two adjacent path segments.
[0079] In this embodiment, to evaluate the journey from the starting point to the node Determine the quality of the path and define the nodes. The overall cost function is:
[0080]
[0081] in, The geometric path length is usually obtained by summing the Euclidean distances of each segment, reflecting the total range of joint movement. To estimate movement time, it can be estimated based on joint speed limits. Assuming that each joint moves at a constant speed at its maximum, the maximum value of the time required for each segment is taken to measure movement efficiency. As a smoothness penalty term, and the turning angle Positive correlation is used to penalize sharp turns in the path. The weighting coefficients were calibrated through preliminary experiments. This is to highlight the importance of motion time while also taking into account length and smoothness.
[0082] It should be noted that the weighting coefficients It can be adjusted according to job requirements and preferences; when more emphasis is placed on path length, it can be increased. When a greater emphasis is placed on smoothness, it can be increased .
[0083] In one possible implementation, the smoothness penalty term is calculated using the following formula:
[0084]
[0085] in, For smoothness penalty term, For the first The penalty value for each path point. , This represents the total number of path points in the search tree. This represents the angle of change in direction between two adjacent path segments.
[0086] In this embodiment, the smoothness penalty term aims to quantify the cumulative effect of turning points along the entire path. It applies a continuous penalty to the angle of each turning point in the path, complementing the turning point suppression mechanism (60° hard threshold) during the node expansion phase. Turning point suppression directly discards nodes with sharp turning points exceeding 60°, while the smoothness penalty term further guides the algorithm to prioritize expansion directions with gentler directional changes from the accepted node set. The penalty value monotonically increases within the range, applying a heavier penalty to larger turning angles, thus reflecting the optimization objective of path smoothness in the overall cost function.
[0087] The formula is designed based on considerations of the smoothness of the robotic arm's movement. Excessive turning angles can lead to abrupt changes in joint speed, increasing motion impact and energy consumption. The cosine-form penalty term, with its continuously differentiable property, is easy to handle during optimization. This embodiment uses quantified penalties to automatically avoid large-angle turns during path optimization, thereby generating a smoother trajectory that is beneficial to the robotic arm's lifespan.
[0088] In one possible implementation, before reselecting the parent node and rewiring the extended nodes of the current sampling point based on the comprehensive cost function, the following is also included:
[0089] Determine whether the path segment between the neighboring nodes and the extended nodes of the current sampling point collides with the preset obstacle area;
[0090] If a collision occurs, the current sampling point will be redefined.
[0091] In this embodiment, when a new node is generated Afterwards, it is necessary to verify from arrive Whether the straight path interferes with environmental obstacles. Since the point cloud environment has been reconstructed using 3DGS, collision detection can be performed through discrete sampling, specifically by sampling line segments... → Uniform interpolation is used to find several intermediate points. For each intermediate point, the corresponding region in the point cloud is checked to see if there are any obstacle points. If any intermediate point collides with another point, the path is deemed infeasible and must be discarded. Then return to step 102 for resampling. Only if there are no collisions on the path can we proceed to the subsequent turning angle judgment and reconnection optimization.
[0092] Collision detection is a prerequisite for ensuring the physical feasibility of the path and must be performed as a priority; its accuracy directly affects the safety of the planning. By ensuring that all nodes and edges added to the search tree correspond to collision-free robot arm configurations and movements, the safety of the final path during actual execution can be guaranteed, avoiding collisions between the robot arm and the environment.
[0093] In one possible implementation, sampling is performed in the sampling space to obtain the current sampling point, including:
[0094] In the sampling space, with a preset probability Directly use the preset endpoint as the current sampling point, with probability Perform uniform random sampling across the entire area to obtain the current sampling point.
[0095] In this embodiment, when generating sampling points in each iteration, the probability is... Directly target point as sampling points With probability Uniform random sampling is performed across the entire region. This strategy guides the search tree to grow rapidly towards the target region, solving the problem of slow convergence speed.
[0096] As an alternative, target bias probability The value can be adjusted within the range of 0.5 to 0.8 depending on the specific environment. Too high a value may cause the search tree to focus excessively on the target direction and ignore the obstacle area, while too low a value will result in slow convergence.
[0097] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0098] The following are embodiments of the apparatus of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.
[0099] Figure 2 A schematic diagram of the robotic arm path planning device provided in an embodiment of the present invention is shown. For ease of explanation, only the parts related to the embodiment of the present invention are shown, and are described in detail below:
[0100] like Figure 2 As shown, the robotic arm path planning device 2 includes:
[0101] The acquisition module 21 is used to acquire point cloud modeling information of the robotic arm's operating environment as a sampling space;
[0102] The sampling module 22 is used to initialize the search tree with a preset starting point as the root node, perform sampling in the sampling space, and obtain the current sampling point;
[0103] Extension module 23 is used to perform nearest neighbor search and node expansion based on the current sampling point, obtain two adjacent path segments and calculate the direction change angle between the two adjacent path segments;
[0104] The update module 24 is used to redetermine the current sampling point when the direction change angle is greater than the preset turning angle threshold; otherwise, the current sampling point is added to the search tree and sampling continues to determine a new sampling point.
[0105] The backtracking module 25 is used to backtrack based on the extended node when the distance between the extended node corresponding to the current sampling point and the preset endpoint is less than a preset threshold, so as to obtain the path planning result of the robotic arm.
[0106] In one possible implementation, extension module 23 is specifically used for:
[0107] Perform a nearest neighbor search based on the current sampling point to obtain the neighboring nodes corresponding to the current sampling point;
[0108] Extend the sampling point by a preset step size along the direction from the nearest node to the current sampling point to obtain the extended node corresponding to the current sampling point;
[0109] The line connecting the current sampling point to its neighboring nodes is taken as the first path segment, and the line connecting the current sampling point to the extended nodes is taken as the second path segment. The directional change angle between the first path segment and the second path segment is calculated.
[0110] In one possible implementation, the update module 24 is also used for:
[0111] Before adding the current sampling point to the search tree, the parent node of the extended node of the current sampling point is reselected and rewired based on the comprehensive cost function.
[0112] In one possible implementation, the comprehensive cost function includes path length cost, motion time cost, and smoothness penalty term; wherein the smoothness penalty term is positively correlated with the directional change angle between two adjacent path segments.
[0113] In one possible implementation, the smoothness penalty term is calculated using the following formula:
[0114]
[0115] in, For smoothness penalty term, For the first The penalty value for each path point. , This represents the total number of path points in the search tree. This represents the angle of change in direction between two adjacent path segments.
[0116] In one possible implementation, the update module 24 is also used for:
[0117] Before reselecting the parent node and rewiring the extended node of the current sampling point based on the comprehensive cost function, it is determined whether the path segment between the neighboring node and the extended node of the current sampling point collides with the preset obstacle area.
[0118] If a collision occurs, the current sampling point will be redefined.
[0119] In one possible implementation, the sampling module 22 is specifically used for:
[0120] In the sampling space, with a preset probability Directly use the preset endpoint as the current sampling point, with probability Perform uniform random sampling across the entire area to obtain the current sampling point.
[0121] This invention employs a 3DGS-reconstructed environment model to build a search tree, plans paths based on the actual physical environment, and dynamically determines whether to accept new nodes by setting a turning angle threshold. When the expansion direction undergoes a sharp turn relative to the historical path, the node is discarded and resampled. This allows for control over the smoothness of the path from the source, avoiding smoothing processing in the later stages of path generation. It ensures that each local connection of the path has good smoothness, resulting in a smoother final robotic arm motion trajectory, effectively suppressing motion impact and mechanical wear, and extending the service life of the robotic arm equipment.
[0122] Figure 3 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Figure 3 As shown, the electronic device 3 of this embodiment includes a processor 30 and a memory 31. The memory 31 stores a computer program 32. When the processor 30 executes the computer program 32, it implements the steps in the various method embodiments described above. Alternatively, when the processor 30 executes the computer program 32, it implements the functions of each module / unit in the various device embodiments described above.
[0123] For example, computer program 32 may be divided into one or more modules / units, which are stored in memory 31 and executed by processor 30 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 32 in electronic device 3.
[0124] Electronic device 3 may include, but is not limited to, processor 30 and memory 31. Those skilled in the art will understand that... Figure 3 This is merely an example of electronic device 3 and does not constitute a limitation on electronic device 3. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 3 may also include input / output devices, network access devices, buses, etc.
[0125] The processor 30 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0126] The memory 31 can be an internal storage unit of the electronic device 3, such as a hard disk or memory of the electronic device 3. The memory 31 can also be an external storage device of the electronic device 3, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 3. Furthermore, the memory 31 can include both internal and external storage units of the electronic device 3. The memory 31 is used to store the computer program 32 and other programs and data required by the electronic device 3. The memory 31 can also be used to temporarily store data that has been output or will be output.
[0127] For the sake of simplicity and clarity, only the above-described functional modules / units are used as examples. In practical applications, the functions described above can be assigned to different functional modules / units as needed. These modules / units can be implemented in hardware, software, or a combination of both.
[0128] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the methods described in the above-described method embodiments.
[0129] This invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the methods described in the above-described method embodiments.
[0130] Computer programs include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. Computer-readable media can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0131] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not detailed or described in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Unless otherwise specified or in conflict with logic, the terminology and / or descriptions between different embodiments are consistent and can be referenced interchangeably. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.
[0132] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions 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, and should all be included within the protection scope of the present invention.
Claims
1. A path planning method for a robotic arm, characterized in that, include: Obtain point cloud modeling information of the robotic arm's operating environment as the sampling space; The search tree is initialized with a preset starting point as the root node, and sampling is performed in the sampling space to obtain the current sampling point; Based on the current sampling point, perform nearest neighbor search and node expansion to obtain two adjacent path segments and calculate the direction change angle between the two adjacent path segments; If the direction change angle is greater than the preset turning angle threshold, the current sampling point is re-determined; otherwise, the current sampling point is added to the search tree, and sampling continues to determine a new sampling point. If the distance between the extended node corresponding to the current sampling point and the preset endpoint is less than a preset threshold, then backtracking is performed based on the extended node to obtain the path planning result of the robotic arm. The step of performing nearest neighbor search and node expansion based on the current sampling point to obtain two adjacent path segments and calculating the direction change angle between the two adjacent path segments includes: Perform a nearest neighbor search based on the current sampling point to obtain the neighboring nodes corresponding to the current sampling point; Extend the sampling point by a preset step size along the direction from the nearest node to the current sampling point to obtain the extended node corresponding to the current sampling point; The line connecting the current sampling point and its neighboring nodes is taken as the first path segment, and the line connecting the current sampling point and the extended nodes is taken as the second path segment. The direction change angle between the first path segment and the second path segment is calculated. Before adding the current sampling point to the search tree, the method further includes: Based on the comprehensive cost function, the parent node is reselected and rewired for the extended nodes of the current sampling point; The comprehensive cost function includes path length cost, motion time cost, and smoothness penalty term; wherein, the smoothness penalty term is positively correlated with the directional change angle between two adjacent path segments; The formula for calculating the smoothness penalty term is as follows: in, For smoothness penalty term, For the first The penalty value for each path point. , This represents the total number of path points in the search tree. This represents the angle of change in direction between two adjacent path segments.
2. The robotic arm path planning method according to claim 1, characterized in that, Before performing parent node reselection and rewiring on the extended nodes of the current sampling point based on the comprehensive cost function, the following is also included: Determine whether the path segment between the neighboring nodes and the extended nodes of the current sampling point collides with the preset obstacle area; If a collision occurs, the current sampling point will be redefined.
3. The robotic arm path planning method according to claim 1, characterized in that, The step of sampling in the sampling space to obtain the current sampling point includes: In the sampling space, with a preset probability Directly use the preset endpoint as the current sampling point, with probability Perform uniform random sampling across the entire area to obtain the current sampling point.
4. A robotic arm path planning device, characterized in that, include: The acquisition module is used to acquire point cloud modeling information of the robotic arm's operating environment as a sampling space; The sampling module is used to initialize a search tree with a preset starting point as the root node, perform sampling in the sampling space, and obtain the current sampling point; The extension module is used to perform nearest neighbor search and node expansion based on the current sampling point, obtain two adjacent path segments, and calculate the direction change angle between the two adjacent path segments; The update module is used to redetermine the current sampling point when the direction change angle is greater than a preset turning angle threshold; otherwise, the current sampling point is added to the search tree and sampling continues to determine a new sampling point. The backtracking module is used to backtrack based on the extended node when the distance between the extended node corresponding to the current sampling point and the preset endpoint is less than a preset threshold, so as to obtain the path planning result of the robotic arm. The extension module is specifically used for: Perform a nearest neighbor search based on the current sampling point to obtain the neighboring nodes corresponding to the current sampling point; Extend the sampling point by a preset step size along the direction from the nearest node to the current sampling point to obtain the extended node corresponding to the current sampling point; The line connecting the current sampling point and its neighboring nodes is taken as the first path segment, and the line connecting the current sampling point and the extended nodes is taken as the second path segment. The direction change angle between the first path segment and the second path segment is calculated. The update module is also used for: Before adding the current sampling point to the search tree, the parent node of the extended node of the current sampling point is reselected and rewired based on the comprehensive cost function; The comprehensive cost function includes path length cost, motion time cost, and smoothness penalty term; wherein, the smoothness penalty term is positively correlated with the directional change angle between two adjacent path segments; The formula for calculating the smoothness penalty term is as follows: in, For smoothness penalty term, For the first The penalty value for each path point. , This represents the total number of path points in the search tree. This represents the angle of change in direction between two adjacent path segments.
5. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 3.