A path planning method and system for a material loading and unloading robotic arm
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-07
- Publication Date
- 2026-08-14
AI Technical Summary
[0005]因此,本发明提供了一种物料装卸机械臂的路径规划方法及系统解决目前针对特定的、特殊的使用场景,机械臂算法无法快速高效的找出一条安全且最优的运动路径的问题,以及目前人工势场法中常见的陷入局部最小值的问题
[0057]与现有技术相比,本发明的有益效果:基于人工势场法改进RRT的机械臂路径规划方法,能有效的进行路径规划,在较短的时间内找到一条最优路径。针对RRT算法生长方向具有无向性的问题,通过在选取随机点的时候加入节点到目标点的引力影响,使得取点的方向始终趋向于目标点,大大减少了无用的探索方向,并通过在碰撞检测中加入斥力影响,使得节点与障碍物之间始终保持了一个相对安全的距离,又由于RRT算法的随机取点,也不会出现人工势场法中常见的陷入局部最小值的问题,在规划时间、路径长短和安全程度方面都有了很大的提升。
Smart Images

Figure CN118181279B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robot motion planning technology, and in particular to a path planning method and system for a material loading and unloading robotic arm. Background Technology
[0002] Robotic arms are key components in industrial production and are widely used in manufacturing fields such as material handling, spraying, welding, and grinding. With the rapid development of industrial automation and intelligence, the requirements for safety, stability, and efficiency when handling valuable items in factories are becoming increasingly stringent. Due to the confined space, fragile items, and large transfer volumes in some production workshops, material handling robots are required to operate quickly and safely when loading and unloading, transferring, and storing materials. Therefore, it is necessary to research efficient, safe, and intelligent operation technologies for material handling robots, and the first problem to be solved is the safe and efficient path planning of material handling robotic arms.
[0003] In the field of motion planning for robotic arms, commonly used methods include free space methods, artificial potential field methods, fast expanding random tree algorithms, visualization methods, grid decoupling methods, and topology methods. Among existing algorithms, the RRT (rapidly exploring random tree) algorithm proposed by LaValle in 1998 is noteworthy, but the path quality of the RRT algorithm is generally not high, often deviating from the optimal path. Later, in 2000, Kuffner and LaValle proposed the RRT-Connect algorithm, introducing a dual-tree model. In 2010, Karaman and Frazzoli proposed the RRT* algorithm, which uses the idea of asymptotic optimization, improving path quality by reselecting parent nodes. Given sufficient planning time, a near-optimal path can be obtained, thus requiring a significant amount of time to plan a high-quality path. Finally, the informedRRT* algorithm proposed by Gammell and Srinivasa in 2014 reduces the sampling range to an elliptical surface after path planning. Again, the longer the planning time and the smaller the sampling range, the higher the path quality. The Bi-RRT* algorithm proposed in 2017 employs a dual-tree expansion approach while introducing a heuristic, cross-searching of the starting and target points, which slightly improves the algorithm's search efficiency. While these methods can effectively solve path planning problems, they cannot find an optimal path in a short time for specific scenarios. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a path planning method and system for a material loading and unloading robotic arm to solve the problem that current robotic arm algorithms cannot quickly and efficiently find a safe and optimal motion path for specific and special application scenarios, as well as the problem of getting trapped in local minima commonly found in the current artificial potential field method.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a path planning method for a material loading and unloading robotic arm, comprising: initializing and acquiring information on the robotic arm's workspace and obstacles in the workspace, and defining an initial point, a target point, and a robotic arm step length;
[0008] The RRT algorithm is optimized by an artificial potential field, and a gravity function is established. The gravity function converts the distance component into a gravity component proportionally and returns a new node object representation.
[0009] The initial point of the robotic arm is set as the root node of the random tree in the optimized RRT algorithm. Then, a random sampling point is generated, and a sampling point is generated by calculating gravity through the gravity function.
[0010] Traverse the random tree, search for the random tree node closest to the sampling point, expand the random tree node towards the sampling point to generate new branch nodes, and connect the random tree node and the sampling point to perform collision detection;
[0011] If the collision detection passes, a first threshold is set, and it is determined whether the distance between the new branch node and the target point is less than the first threshold. If it is less, a connection is made and the path is added, and the path is output.
[0012] As a preferred embodiment of the path planning method for the material loading and unloading robotic arm described in this invention, the gravity function converts the distance component into a gravity component proportionally and returns a new node object representation. Specifically, the distance from node n to target point q... goal The gravitational force is expressed as:
[0013] d x =g x -n x
[0014] d y =g y -n y
[0015] d z =g z -n z
[0016]
[0017]
[0018]
[0019]
[0020] Node is (α) x ,α y ,α z )
[0021] Where, d x ,d y ,d z Let node n and target point q be goal The distance components in the x, y, and z directions, g x g y g z For target point q goal The distance components in the x, y, and z directions, n x n y n z Let d be the distance components of node n in the x, y, and z directions, and d be the distance from node n to the target point q. goal The distance, k a α is the gravitational coefficient. x ,α y ,α z The distance component is proportionally converted into the gravitational component, and Node represents gravity.
[0022] In a preferred embodiment of the path planning method for the material loading and unloading robotic arm described in this invention, a random sampling point is then generated, and a sampling point is generated by calculating gravity using a gravity function, wherein the coordinates of the random sampling point are represented as: q rand ′(x rand ,y rand ,z rand The coordinates of the sampling point are represented as: q rand (x rand +α x ,y rand +α y ,z rand +α z ).
[0023] As a preferred embodiment of the path planning method for the material loading and unloading robotic arm described in this invention, the collision detection includes:
[0024] A cube envelope is applied to the obstacle;
[0025] New branch and leaf node q is determined by ray casting. newWhether it is inside the cube, specifically:
[0026] Define a ray, starting from the point to be judged, with arbitrary direction, and the ray parameters are expressed as follows:
[0027] P = P0 + tD
[0028] Where P0 is the starting point of the ray, D is the direction vector, P is the intersection point of the ray and the plane, and t is a set unknown;
[0029] Each plane is represented as:
[0030] N·(PQ)=0
[0031] Where N is the normal vector of the plane, and Q is a point on the plane;
[0032] Combining the equations of rays and planes, we obtain:
[0033]
[0034] Determine the value of t. If the value of t is greater than or equal to 0, it means that the intersection point is in the positive direction of the ray. At the same time, calculate the number of t. If the number of t is odd, the point is inside the cube. If the number of t is even, the point is outside the cube.
[0035] If the point is inside the cube, it is considered a collision, and a new random sampling point q is selected. rand If the point is outside the cube, then a second judgment is made.
[0036] In a preferred embodiment of the path planning method for the material loading and unloading robotic arm described in this invention, collision detection further includes a second judgment, wherein the second judgment is to calculate a new branch node q. new Let i be the distance to each vertex of the cube. x i y i z Let n be the distance components between a node and a vertex of the cube in the x, y, and z directions, and v be the distance between the node and the vertex of the cube. x v y v z Let i be the distance components of vertex v in the x, y, and z directions, and let i be the distance in the z direction.
[0037] i x =n x -v x
[0038] i y =n y -v y
[0039] i z =n z-v z
[0040]
[0041] Let the first threshold be 'a', which is the distance from each vertex of the cube to the center point of the cube. If d < a, then a collision is determined, and a new random sampling point q is selected. rand If d > a, then it is directly determined that there is no collision, and a third judgment is performed.
[0042] As a preferred embodiment of the path planning method for the material loading and unloading robotic arm described in this invention, the collision detection further includes a third judgment, wherein the third judgment is to calculate the path from each vertex to the new branch node q. new The magnitude of the generated repulsive force is determined, and a repulsive force threshold is set. The repulsive force calculation is expressed as:
[0043]
[0044] Where repulsion represents the magnitude of the repulsive force, k r The repulsion coefficient is represented by d, and the distance from the node to each vertex of the cube is represented by d. The greater the distance, the smaller the repulsion, and the smaller the distance, the greater the repulsion.
[0045] The magnitude of the repulsive force is compared with the repulsive force threshold. When the repulsive force is greater than the repulsive force threshold, it indicates that the distance to the vertex is too close, and a collision is determined. A new random sampling point q is then selected. rand When the repulsive force is less than the repulsive force threshold, it is determined that there is no collision, and a connection judgment is performed.
[0046] As a preferred embodiment of the path planning method for the material loading and unloading robotic arm described in this invention, the collision detection further includes connection judgment, wherein the connection judgment involves identifying new branch nodes q. new Connect the node to its parent node, and check for collisions by determining whether the connection intersects with any face of the cube obstacle. If a collision occurs, reselect a random sampling point q. rand If no collision occurs, add the node to the random tree.
[0047] Secondly, the present invention provides a path planning system for a material loading and unloading robotic arm, comprising:
[0048] The acquisition module is used to initialize and acquire information about the robotic arm's workspace and obstacles within it, and to define the initial point, target point, and robotic arm step length.
[0049] The optimization algorithm module is used to optimize the RRT algorithm through an artificial potential field, establish a gravity function, which converts the distance component into a gravity component proportionally and returns a new node object representation;
[0050] The sampling point generation module is used to set the initial point of the robotic arm as the root node of the random tree in the optimized RRT algorithm, then generate a random sampling point, and generate a sampling point by calculating gravity through the gravity function;
[0051] The collision detection module is used to traverse the random tree, search for the random tree node that is closest to the sampling point, expand the random tree node towards the sampling point to generate new branch nodes, and connect the random tree node and the sampling point to perform collision detection.
[0052] The path output module is used to set a first threshold if the collision detection passes, determine whether the distance between the new branch node and the target point is less than the first threshold, and if it is less, connect and add it to the path, and output the path.
[0053] Thirdly, the present invention provides a computing device, comprising:
[0054] Memory and processor;
[0055] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the path planning method of the material loading and unloading robotic arm.
[0056] Fourthly, the present invention provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the path planning method for the material loading and unloading robotic arm.
[0057] Compared with existing technologies, the beneficial effects of this invention are as follows: The improved RRT (Robotic Tracking Theory) path planning method for robotic arms based on the artificial potential field method can effectively plan paths and find an optimal path in a shorter time. Addressing the issue of the undirected growth direction of the RRT algorithm, the gravitational influence from the node to the target point is added when selecting random points, ensuring that the direction of point selection always tends towards the target point, greatly reducing useless exploration directions. Furthermore, by adding a repulsive influence in collision detection, a relatively safe distance is maintained between nodes and obstacles. Due to the random point selection in the RRT algorithm, the problem of getting trapped in local minima, common in the artificial potential field method, is also avoided. This results in significant improvements in planning time, path length, and safety. Attached Figure Description
[0058] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0059] Figure 1 This is a schematic diagram of the overall process of the path planning method for a material loading and unloading robotic arm according to an embodiment of the present invention;
[0060] Figure 2 This is a schematic diagram of the path planning method for a material loading and unloading robotic arm according to an embodiment of the present invention;
[0061] Figure 3 This is a schematic diagram of the random node selection using the improved RRT algorithm based on an artificial potential field in the path planning method of the material loading and unloading robotic arm according to an embodiment of the present invention.
[0062] Figure 4 This is a simulation diagram of the traditional RRT algorithm in the path planning method of the material loading and unloading robotic arm according to an embodiment of the present invention;
[0063] Figure 5 This is a simulation diagram of the improved RRT algorithm in the path planning method of the material loading and unloading robotic arm according to an embodiment of the present invention;
[0064] Figure 6 This is a simulation diagram of the collision detection algorithm before the improvement of the path planning method of the material loading and unloading robotic arm according to an embodiment of the present invention;
[0065] Figure 7 This is a simulation diagram of the improved collision detection algorithm in the path planning method of the material loading and unloading robotic arm according to an embodiment of the present invention. Detailed Implementation
[0066] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0067] Example 1
[0068] Reference Figures 1-3 As an embodiment of the present invention, a path planning method for a material loading and unloading robotic arm is provided, including:
[0069] S100: Initialize and acquire information about the robotic arm's workspace and obstacles within it, and define the initial point q. init Target point q goal and the robotic arm step length S;
[0070] S200: The RRT algorithm is optimized through an artificial potential field. A gravity function is established, which converts the distance component into a gravity component proportionally and returns a new node object representation.
[0071] Furthermore, the gravitational function is specifically defined as the force from node n to target point q. goal The gravitational force is expressed as:
[0072] d x =g x -n x
[0073] d y =g y -n y
[0074] d z =g z -n z
[0075]
[0076]
[0077]
[0078]
[0079] Node is (α) x ,α y ,α z )
[0080] Where, d x ,d y ,d z Let node n and target point q be goal The distance components in the x, y, and z directions, g x g y g z For target point q goal The distance components in the x, y, and z directions, n x n y n z Let d be the distance components of node n in the x, y, and z directions, and d be the distance from node n to the target point q. goal The distance, k a α is the gravitational coefficient. x ,α y ,α z The distance component is proportionally converted into the gravitational component, and Node represents gravity.
[0081] S300: Set the initial point q of the robotic arm initSet as the root node T of the random tree in the optimized RRT algorithm init Then, a random sampling point q is generated. rand ', and generate a sampling point q by calculating gravity through the gravity function. rand ,like Figure 3 As shown;
[0082] Furthermore, the coordinates of the random sampling points are represented as: q rand ′(x rand ,y rand ,z rand The coordinates of the sampling point are represented as: q rand (x rand +α x ,y rand +α y ,z rand +α z ).
[0083] S400: Traverse the random tree and search for points in the random tree that are q away from the sampling point. rand The nearest random tree node q nearest , by random tree node q nearest To sampling point q rand Directional expansion generates new leaf nodes q new And connect the random tree node q nearest With sampling point q rand Perform collision detection;
[0084] Furthermore, collision detection includes:
[0085] Cube envelope of obstacles;
[0086] New branch and leaf node q is determined by ray casting. new Whether it is inside the cube, specifically:
[0087] Define a ray, starting from the point to be judged, with arbitrary direction, and the ray parameters are expressed as follows:
[0088] P = P0 + tD
[0089] Where P0 is the starting point of the ray, D is the direction vector, P is the intersection point of the ray and the plane, and t is a set unknown;
[0090] Each plane is represented as:
[0091] N·(PQ)=0
[0092] Where N is the normal vector of the plane, and Q is a point on the plane;
[0093] Combining the equations of rays and planes, we obtain:
[0094]
[0095] Determine the value of t. If the value of t is greater than or equal to 0, it means that the intersection point is in the positive direction of the ray. At the same time, calculate the number of t. If the number of t is odd, the point is inside the cube. If the number of t is even, the point is outside the cube.
[0096] If the point is inside the cube, it is considered a collision, and a new random sampling point q is selected. rand If the point is outside the cube, then a second judgment is made.
[0097] Furthermore, collision detection also includes a second judgment, which involves calculating the new branch node q. new Let i be the distance to each vertex of the cube. x i y i z Let n be the distance components between a node and a vertex of the cube in the x, y, and z directions, and v be the distance between the node and the vertex of the cube. x v y v z Let i be the distance components of vertex v in the x, y, and z directions, and let i be the distance in the z direction.
[0098] i x =n x -v x
[0099] i y =n y -v y
[0100] i z =n z -v z
[0101]
[0102] Let the first threshold be 'a', which is the distance from each vertex of the cube to the center point of the cube. If d < a, then a collision is determined, and a new random sampling point q is selected. rand If d > a, then it is directly determined that there is no collision, and a third judgment is performed.
[0103] Furthermore, collision detection also includes a third judgment, which involves calculating the distance from each vertex to the new branch node q. new The magnitude of the generated repulsive force is determined, and a repulsive force threshold is set. The repulsive force calculation is expressed as:
[0104]
[0105] Where repulsion represents the magnitude of the repulsive force, kr The repulsion coefficient is represented by d, and the distance from the node to each vertex of the cube is represented by d. The greater the distance, the smaller the repulsion, and the smaller the distance, the greater the repulsion.
[0106] The magnitude of the repulsive force is compared with a repulsive force threshold. If the repulsive force is greater than the threshold, it indicates that the point is too close to the vertex and is judged as a collision. A new random sampling point q is then selected. rand When the repulsive force is less than the repulsive force threshold, it is determined that there is no collision, and a connection judgment is performed.
[0107] Preferably, the repulsion threshold can be the magnitude of the repulsion generated at half the length of the longest edge of the obstacle between the vertex and the obstacle.
[0108] Furthermore, collision detection also includes connection determination, which involves identifying new branch nodes q. new Connect the node to its parent node, and check for collisions by determining whether the connection intersects with any face of the cube obstacle. If a collision occurs, reselect a random sampling point q. rand If no collision occurs, add the node to the random tree.
[0109] S500: If the collision detection passes, set a first threshold and determine the new branch node q. new With target point q goal If the distance is less than the first threshold, then connect the paths and add them to the path, and output the path.
[0110] It should be noted that the traditional RRT algorithm can search for effective paths in high-dimensional space. It uses the starting point as the root node of a tree and randomly samples a point in the search space as the target point. Then, starting from the root node, it continuously expands the tree to approach the target point. In each iteration, it selects the tree node closest to the target point and randomly samples a new point around it. It connects the newly sampled point to the nearest node in the tree and checks if the connecting line intersects with any obstacles. If they do not intersect, the new node is added to the tree. This process is repeated until a path from the starting point to the target point is found, or the maximum number of iterations is reached. If a path is found, it backtracks from the target point to the starting point to obtain an effective path. The advantage of the RRT algorithm is its ability to quickly explore the search space, making it suitable for high-dimensional spaces and complex environments. Its disadvantages are that the generated path may deviate from the optimal path and it takes a long time.
[0111] Traditional artificial potential field algorithms plan paths by simulating the forces acting on an object in a potential field. First, the starting and target points of the path planning are determined, treating obstacles in the environment as repulsive forces and the target point as an attractive force. A potential energy value is assigned to each obstacle and target point, with higher potential energy values for obstacles and lower potential energy values for target points. Next, for the robot's current position, the net force acting on it is calculated. The net force consists of both repulsive and attractive forces; the repulsive force moves the robot away from obstacles, while the attractive force moves the robot towards the target point. Then, the robot's position is updated based on the direction and magnitude of the net force. Finally, the above steps are repeated until the robot reaches the target point or reaches the maximum number of iterations. After reaching the target point, the algorithm backtracks to the starting point, resulting in a path. The advantages of the traditional artificial potential field method are its simplicity and ease of implementation, and its applicability to simple environments and low-dimensional spaces. Its disadvantages are that it is prone to getting trapped in local minima, potentially leading to oscillations and failure to reach the target point.
[0112] Therefore, to address the issue of the undirected growth direction of traditional random tree algorithms, an artificial potential field is added during random point selection to provide gravitational influence. This ensures that selected points always tend towards the target point, significantly reducing unnecessary sampling points. Furthermore, since the gravitational influence is added on top of random point selection, the problem of getting trapped in local minima is avoided. Considering safety, nodes should not be too close to obstacles. A repulsive field is added during collision detection to maintain a safe distance between nodes and obstacles, greatly improving safety.
[0113] It should also be noted that the collision detection method involved in this invention uses ray casting to determine whether the selected node is in an obstacle. If the node is in an obstacle, a collision is determined; otherwise, proceed to the next step. A threshold is set to determine if the distance from the node to the obstacle vertex is greater than this threshold. If it is greater, a no-collision is determined; otherwise, proceed to the next step. The next step requires setting a repulsion threshold. Preferably, this threshold value is the magnitude of the repulsion force generated at half the length of the longest edge of the obstacle from the vertex. The magnitude of the repulsion force generated from the node to the vertex is calculated and compared with the threshold. If the repulsion force is greater than the threshold, a collision is determined; otherwise, proceed to the next step. Finally, a collision is determined by detecting whether the path and the obstacle face intersect. This determination method consists of three steps. Introducing the magnitude of the repulsion force during collision detection, the two methods complement each other, ensuring both efficiency and maintaining a safe distance between the node and the obstacle.
[0114] The above is an illustrative scheme of a path planning method for a material loading and unloading robotic arm according to this embodiment. It should be noted that the technical solution of the path planning system for the material loading and unloading robotic arm and the technical solution of the path planning method for the material loading and unloading robotic arm described above belong to the same concept. For details not described in detail in the technical solution of the path planning system for the material loading and unloading robotic arm in this embodiment, please refer to the description of the technical solution of the path planning method for the material loading and unloading robotic arm described above.
[0115] The path planning system for the material loading and unloading robotic arm in this embodiment includes:
[0116] The acquisition module is used to initialize and acquire information about the robotic arm's workspace and obstacles within it, and to define the initial point, target point, and robotic arm step length.
[0117] The optimization algorithm module is used to optimize the RRT algorithm through an artificial potential field. It establishes a gravity function, which converts the distance component into a gravity component proportionally and returns a new node object representation.
[0118] The sampling point generation module is used to set the initial point of the robotic arm as the root node of the random tree in the optimized RRT algorithm, then generate a random sampling point, and generate a sampling point by calculating gravity through the gravity function;
[0119] The collision detection module is used to traverse the random tree, search for the random tree node that is closest to the sampling point, expand the random tree node towards the sampling point to generate new branch nodes, and connect the random tree node and the sampling point to perform collision detection.
[0120] The path output module is used to set a first threshold if the collision detection passes, determine whether the distance between the new branch node and the target point is less than the first threshold, and if it is less, connect them and add them to the path, and output the path.
[0121] This embodiment also provides a computing device applicable to path planning for material loading and unloading robotic arms, including:
[0122] The system includes a memory and a processor. The memory stores computer-executable instructions, and the processor executes these instructions to implement the path planning method for the material loading and unloading robotic arm as proposed in the above embodiments.
[0123] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the path planning method for material loading and unloading robotic arms as proposed in the above embodiments.
[0124] The storage medium proposed in this embodiment and the path planning method for material loading and unloading robotic arms proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0125] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0126] Example 2
[0127] Reference Figures 4-7 Based on the previous embodiment, this embodiment provides a verification example of a path planning method for a material loading and unloading robotic arm.
[0128] To verify the effectiveness and feasibility of the trajectory planning algorithm based on the improved RRT algorithm, comparison and simulation experiments were conducted on the improved algorithm and the traditional RRT algorithm in Python. All experiments were performed on a computer equipped with a 12th Gen Intel(R) Core(TM) i7-12700H processor with 16GB of memory.
[0129] The experimental map is 10m×10m×10m in size. The obstacles are two cubes of random size and random position. The initial position is (0, 0, 0) and the target position is (10, 10, 10).
[0130] First, a simulation comparison of the traditional RRT algorithm and the improved RRT algorithm is performed, such as... Figure 4 and Figure 5 As shown, Figure 4 The simulation diagram is of the traditional RRT algorithm (before improvement). Figure 5The simulation diagram of the improved RRT algorithm (after improvement) shows that the overall path length before improvement is too long, and there are more sharp turns in the path compared to the improved algorithm. This results in less than ideal performance both during robot operation and during path smoothing. The improved path, however, is very close to the optimal path and performs significantly better than the traditional RRT algorithm.
[0131] Then, a comparison is made between the improved collision detection algorithm and the collision detection algorithm built into the traditional RRT algorithm, such as... Figure 6 and Figure 7 As shown, Figure 6 The image shows a simulation of the collision detection algorithm (before improvement). Figure 7 The simulation diagram for the improved collision detection algorithm (after improvement) shows that in the original simulation, the path was very close to the obstacle. In actual simulation experiments, the path even passed right through the obstacle, which is extremely unsafe for the robotic arm. In the improved collision detection algorithm simulation, the path is significantly farther from the obstacle, and the robot begins to change direction to avoid it when there is a certain distance between the path and the obstacle, resulting in a much higher safety factor.
[0132] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A path planning method for a material loading and unloading robotic arm, characterized in that, include: Initialize and acquire information about the robotic arm's workspace and obstacles within it, and define the initial point, target point, and robotic arm step length; The RRT algorithm is optimized using an artificial potential field. A gravity function is established, which converts the distance component into a gravity component proportionally and returns a new node object representation. Specifically, the node... To the target point The gravitational force is expressed as: in, For nodes With the target point The distance components in the x, y, and z directions. , , For target point The distance components in the x, y, and z directions. , , For nodes The distance components in the x, y, and z directions. For nodes To the target point distance, The gravitational coefficient, This is the gravitational component converted proportionally from the distance component. For gravity; The initial point of the robotic arm is set as the root node of the random tree in the optimized RRT algorithm. Then, a random sampling point is generated, and a sampling point is generated by calculating gravity through the gravity function. Traverse the random tree, search for the random tree node closest to the sampling point, expand the random tree node towards the sampling point to generate new branch nodes, and connect the random tree node and the sampling point to perform collision detection; The collision detection includes: A cube envelope is applied to the obstacle; New branch and leaf nodes are identified using the ray method. Whether it is inside the cube, specifically: Define a ray, starting from the point to be judged, with arbitrary direction, and the ray parameters are expressed as follows: in, As the starting point of the ray, It is a direction vector. Let be the intersection of the ray and the plane. For the set unknowns; Each plane is represented as: in, Let be the normal vector of the plane. Let it be a point on the plane; Combining the equations of rays and planes, we obtain: judge Value, if A value greater than or equal to 0 indicates that the intersection point is in the positive direction of the ray. Simultaneously, the calculation... The number of, if When the number of points is odd, the points are inside the cube. When the number of points is even, the points are outside the cube; If the point is inside the cube, it is considered a collision, and a new random sampling point is selected. If the point is outside the cube, then a second judgment is made; If the collision detection passes, a first threshold is set, and it is determined whether the distance between the new branch node and the target point is less than the first threshold. If it is less, a connection is made and the path is added, and the path is output.
2. The path planning method for the material loading and unloading robotic arm as described in claim 1, characterized in that, Next, a random sampling point is generated, and a sampling point is generated by calculating gravity using the gravity function. The coordinates of the random sampling point are represented as follows: The coordinates of the sampling points are represented as follows: .
3. The path planning method for the material loading and unloading robotic arm as described in claim 2, characterized in that, Collision detection also includes a second determination, which involves calculating new branch and leaf nodes. Distance to each vertex of the cube ,set up Let x be the distance components between the node and the vertex of the cube in the x, y, and z directions. For nodes, As the vertex, , , As vertices The distance components in the x, y, and z directions, the distance Represented as: Let the first threshold be 'a', which is the distance from each vertex of the cube to the center point of the cube. If the value is less than a, a collision is determined, and a new random sampling point is selected. ;like If the value is greater than a, it is directly determined that there is no collision, and a third judgment is performed.
4. The path planning method for the material loading and unloading robotic arm as described in claim 3, characterized in that, Collision detection also includes a third determination, which involves calculating the path from each vertex to a new branch node. The magnitude of the generated repulsive force is determined, and a repulsive force threshold is set. The repulsive force calculation is expressed as: in, Indicates the magnitude of the repulsive force. Indicates the repulsion coefficient. This represents the distance from the node to each vertex of the cube. The greater the distance, the smaller the repulsive force; the smaller the distance, the greater the repulsive force. The magnitude of the repulsive force is compared with the repulsive force threshold. If the repulsive force is greater than the repulsive force threshold, it indicates that the distance to the vertex is too close, and a collision is determined. A new random sampling point is then selected. When the repulsive force is less than the repulsive force threshold, it is determined that there is no collision, and a connection judgment is made.
5. The path planning method for a material loading and unloading robotic arm as described in claim 1 or 4, characterized in that, The collision detection also includes connection determination, which involves identifying new branch nodes. Connect the node to its parent node, and check for collisions by determining whether the connection intersects with any face of the cube obstacle. If a collision occurs, reselect a random sampling point. If no collision occurs, the node is added to the random tree.
6. A path planning system for a material loading and unloading robotic arm, employing the method described in any one of claims 1-5, characterized in that, include: The acquisition module is used to initialize and acquire information about the robotic arm's workspace and obstacles within it, and to define the initial point, target point, and robotic arm step length. The optimization algorithm module is used to optimize the RRT algorithm through an artificial potential field, establish a gravity function, which converts the distance component into a gravity component proportionally and returns a new node object representation; The sampling point generation module is used to set the initial point of the robotic arm as the root node of the random tree in the optimized RRT algorithm, then generate a random sampling point, and generate a sampling point by calculating gravity through the gravity function; The collision detection module is used to traverse the random tree, search for the random tree node that is closest to the sampling point, expand the random tree node towards the sampling point to generate new branch nodes, and connect the random tree node and the sampling point to perform collision detection. The path output module is used to set a first threshold if the collision detection passes, determine whether the distance between the new branch node and the target point is less than the first threshold, and if it is less, connect and add it to the path, and output the path.
7. An electronic device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the path planning method of the material loading and unloading robotic arm according to any one of claims 1 to 5.
8. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the path planning method for the material loading and unloading robotic arm according to any one of claims 1 to 5.
Citation Information
Patent Citations
RRT mechanical arm trajectory planning method based on non-obstacle space probability potential field sampling
CN116117822A