Mechanical arm path planning method and device based on improved random tree
By using improved random tree algorithm and repulsive field generation technology in robotic arm path planning, the problem of slow robotic arm path planning is solved, and more efficient path planning is achieved.
Patent Information
- Application Number
- CN202411734107.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-02-11
AI Technical Summary
The current path planning speed of robotic arms is slow, mainly because the fast-scaling random tree algorithm relies too much on the randomness of sampling points, resulting in inefficient planning.
By obtaining real scene images, a three-dimensional obstacle model is constructed and grilled processing is used to generate a repulsive field. The path trajectory is planned based on the improved random tree algorithm, and the joint space path points of the robotic arm are formed by inverse movement to improve the efficiency of path planning.
By generating the repulsive force field of the obstacle, using the repulsive force field to affect the randomness of the random tree, it can more effectively bypass the obstacles and improve the speed and efficiency of the robotic arm path planning.
Smart Images

Figure CN119407784A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method and device for robot arm path planning based on an improved random tree. Background Art
[0002] The current path planning of robotic arms generally uses a rapidly expanding random tree algorithm, but this planning algorithm relies too much on the randomness of sampling points and has a slow planning speed. Summary of the invention
[0003] The problem that this application solves is that the current robot arm planning speed is slow.
[0004] To solve the above problems, the first aspect of the present application provides a robot path planning method based on an improved random tree, comprising:
[0005] Acquire real scene images and construct three-dimensional obstacle models;
[0006] Perform grid processing on the three-dimensional obstacle model to generate a repulsive field;
[0007] Path trajectory in three-dimensional obstacle model based on improved random tree planning;
[0008] The joint space path points corresponding to the robotic arm are generated through inverse kinematics to control the robotic arm.
[0009] The second aspect of the present application provides a robot arm path planning device based on an improved random tree, which includes:
[0010] An image acquisition module, which is used to acquire real scene images and construct a three-dimensional obstacle model;
[0011] A repulsion generation module, which is used to perform grid processing on the three-dimensional obstacle model to generate a repulsion field;
[0012] A path planning module, which is used to plan the path trajectory in the three-dimensional obstacle model based on an improved random tree;
[0013] The robot arm control module is used to generate joint space path points corresponding to the robot arm through inverse kinematics to control the robot arm.
[0014] A third aspect of the present application provides an electronic device, comprising: a memory and a processor;
[0015] The memory is used to store programs;
[0016] The processor, coupled to the memory, is configured to execute the program to:
[0017] Acquire real scene images and construct three-dimensional obstacle models;
[0018] Perform grid processing on the three-dimensional obstacle model to generate a repulsive field;
[0019] Path trajectory in three-dimensional obstacle model based on improved random tree planning;
[0020] The joint space path points corresponding to the robotic arm are generated through inverse kinematics to control the robotic arm.
[0021] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement the above-mentioned robot arm path planning method based on the improved random tree.
[0022] In the present application, a repulsive field of an obstacle is generated and the repulsive field is used to influence the randomness of the random tree, so that obstacles can be bypassed during the random tree planning process, thereby improving the planning efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is a flow chart of a robot arm path planning method based on an improved random tree according to an embodiment of the present application;
[0024] Figure 2 is a structural block diagram of a robot arm path planning device based on an improved random tree according to an embodiment of the present application;
[0025] Figure 3 is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application are described in detail below in conjunction with the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0027] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.
[0028] The present application embodiment provides a robot arm path planning method based on an improved random tree, and the specific scheme of the method is as follows: Figure 1 As shown, the method can be performed by a robot path planning device based on an improved random tree, and the robot path planning device based on an improved random tree can be integrated into electronic devices such as computers, servers, computers, server clusters, and data centers. Figure 1As shown, it is a flow chart of a robot path planning method based on an improved random tree according to an embodiment of the present application; wherein the robot path planning method based on the improved random tree includes:
[0029] S101, acquiring a real scene image and constructing a three-dimensional obstacle model;
[0030] In this application, a depth camera (such as Kinect, RealSense) or a stereo vision camera is used to acquire an environmental image.
[0031] In this application, three-dimensional information in the scene is extracted through stereo vision or monocular vision + deep learning algorithm to construct a three-dimensional point cloud model. Commonly used algorithms include structured light, optical flow, SLAM (Simultaneous Localization and Mapping) technology, or image-based depth estimation. Use a point cloud processing library (such as PCL, Point Cloud Library) or Open3D to convert the image into three-dimensional point cloud data, and use a surface reconstruction algorithm (such as Poisson Surface Reconstruction) to obtain a three-dimensional model of the object. Image segmentation technology can be combined to separate obstacles from the background to form a clear obstacle model.
[0032] In this application, stereo vision or depth cameras are used to capture three-dimensional information of a scene.
[0033] In this application, point cloud processing and surface reconstruction are used to generate three-dimensional obstacle models in real scenes.
[0034] S102, performing grid processing on the three-dimensional obstacle model to generate a repulsive field;
[0035] S103, planning a path trajectory in a three-dimensional obstacle model based on an improved random tree;
[0036] S104, generating joint space path points corresponding to the robotic arm through inverse kinematics to control the robotic arm.
[0037] In the present application, a repulsive field of an obstacle is generated and the repulsive field is used to influence the randomness of the random tree, so that obstacles can be bypassed during the random tree planning process, thereby improving the planning efficiency.
[0038] In one embodiment, the step S102 of performing grid processing on the three-dimensional obstacle model to generate a repulsive field includes:
[0039] Mesh the three-dimensional obstacle model and convert it into a regular voxel grid;
[0040] Calculate the repulsive field value of each grid on the voxel grid;
[0041] According to the repulsive field value of the voxel grid, the gradient vector corresponding to each voxel grid is calculated.
[0042] In the present application, gridding the three-dimensional obstacle model and converting it into a regular voxel grid includes: dividing the three-dimensional space into a regular cubic grid, where each voxel is a cube (the resolution of the grid is determined by the side length of the voxel: the higher the resolution, the smaller the voxel); traversing the center point of each voxel to check whether the point is located inside the obstacle (which can be described by a point cloud, a triangular mesh or a boundary); if the point is inside the obstacle, marking the voxel as an obstacle voxel, otherwise it is a free voxel.
[0043] In this application, the repulsion field is generated by assigning a repulsion value to each voxel. The closer the obstacle is, the stronger the repulsion is. The repulsion field of the obstacle and the surrounding free space is stored and updated through a grid or voxel model.
[0044] In this application, a grid obstacle model is used to generate the effect of obstacles on the path using a repulsive field model.
[0045] In the present application, in the generated repulsive field, the position and shape of the obstacle determine the magnitude of the repulsive force in each area.
[0046] In the present application, the gradient vector is the repulsive field gradient at each point in the voxel grid, which represents the rate of change of the repulsive field in each direction and is used to indicate the direction in space to avoid obstacles.
[0047] In one embodiment, the calculation formula of the repulsive field value is:
[0048]
[0049] Among them, f r is the repulsive field value, ρ(x,r,z) is the distance to the obstacle space closest to the point (x,y,z), d0 is the distance threshold, and μ is the repulsive gain.
[0050] In one implementation, the calculation formula for the gradient vector is:
[0051]
[0052] in, is the gradient vector, t x ,t y ,t z is the gradient in the x, y, and z directions, f r is the repulsive field value.
[0053] In one embodiment, the path trajectory in the three-dimensional obstacle model based on improved random tree planning includes:
[0054] Obtain the initial position and preparation position of the end tool of the robot arm, and set them as the starting point and end point respectively;
[0055] Generate two random trees based on the starting point and the end point;
[0056] Randomly generate a sampling point;
[0057] According to the sampling point, the current random tree is grown until the sampling point is reached or an obstacle is collided;
[0058] Perform direct connection detection between the top of the current random tree and all nodes of another random tree;
[0059] If the direct connection detection does not pass through any obstacle, the path trajectory is obtained;
[0060] If all direct connection detections pass through obstacles, a new sampling point is generated and another random tree is grown.
[0061] In this application, the bidirectional random tree algorithm is an improved version of the RRT (Rapidly-exploring Random Tree) algorithm for path planning in high-dimensional space. It accelerates the path search process by expanding the tree from both the starting point and the end point, which is more efficient than the unidirectional RRT algorithm. Bidirectional RRT is particularly suitable for environments with complex calculations and many obstacles, and can find a feasible path faster.
[0062] The specific process of the bidirectional random tree algorithm:
[0063] initialization:
[0064] Create two trees: one from the starting point, and one from the ending point.
[0065] Each time you expand the trees, the goal is to expand from either tree to the other until the two trees intersect.
[0066] Expand the tree:
[0067] Generate a point in space by random sampling and choose a tree to expand.
[0068] Expand a new node from the current tree's node until that node is close to the randomly sampled point.
[0069] Collision detection is performed during the expansion process to ensure that the generated nodes do not collide with obstacles in the environment.
[0070] Continue to expand the current tree until the two trees meet (that is, there is a path connecting the two trees).
[0071] Join two trees:
[0072] Once two trees are close (within a given connection threshold), we try to connect them, either by a straight line or by other means. Once the connection is successful, a complete path is generated.
[0073] In the present application, the bidirectional expansion tree can speed up the search process more than the unidirectional expansion tree. By expanding from the starting point and the end point at the same time, the search range is increased, and the connection path between the two trees can be found more quickly.
[0074] In this application, the expansion distance and number of steps of the tree are reduced through bidirectional expansion, thereby greatly reducing the amount of calculation, which is particularly evident in high-dimensional space.
[0075] In this application, the path planning in a dynamic environment is suitable and can cope with the changes of obstacles and environment. Especially in the space with more complex obstacles, the bidirectional RRT algorithm can better perform path planning.
[0076] In this application, a direct connection check is performed between the top of the current random tree and all nodes of another random tree; specifically, when traversing to the nearest node in the node list of another tree, the Euclidean distance between the two nodes is not considered, but it is directly determined whether the edge between the two nodes passes through the obstacle space. If it does not pass through the obstacle space, the planning is directly successful.
[0077] In this application, when traversing to the nearest node in the node list of another tree, the Euclidean distance between the two nodes is not considered. Instead, it is directly determined whether the edge between the two nodes passes through the obstacle space. If it does not pass through the obstacle space, the planning is directly successful; thereby avoiding the two trees from oscillating in a small range.
[0078] In this application, direct collision detection is introduced, and the Euclidean distance in the judgment condition is no longer restricted, so that it converges quickly.
[0079] In this application, the sampling points are randomly generated, which will cause the search space of the entire algorithm to be too large, and the sampling points may be generated inside obstacles, resulting in failure in sampling point selection and subsequent expansion failure.
[0080] In one implementation, the direct connection detection starts from the end of the current other search tree and ends at the root node, and traverses each node to see if the edge connecting the end node of the current search tree passes through the obstacle space. If not, the planning is considered complete, thereby greatly saving calculation time.
[0081] In one implementation, the sampling point is obtained by superimposing a gradient vector on a randomly generated random point vector.
[0082] Among them, the three-dimensional coordinates of the random point constitute a vector, and the gradient vector of the random point is another vector; after the random point is randomly generated, the three-dimensional coordinate vector of the random point is superimposed with the gradient vector, and the new vector obtained is the coordinate of the actual random point.
[0083] In this way, if the sampling point is near or inside an obstacle, since the gradient vector is larger (the repulsive force is larger) when it is closer to the obstacle, after the gradient vector is superimposed, the new coordinate point is far away from the corresponding obstacle.
[0084] In this way, by superimposing gradient vectors, new nodes can quickly bypass the obstacle space, avoiding sampling point selection failure and subsequent expansion failure caused by sampling points generated inside obstacles.
[0085] In addition, by superimposing gradient vectors, the search space of the algorithm is restricted, greatly reducing the search space.
[0086] In this application, the repulsive field and gradient function of a known map are constructed, and the gradients are randomly sampled and superimposed, so that planning can effectively use environmental information for guidance.
[0087] In this application, direct collision detection is added to avoid oscillation near the intersection of two search trees, so that it can converge quickly in an environment with fewer obstacles.
[0088] In the present application, a new node is extended from a node of the current tree by a step size.
[0089] In one embodiment, the step size is an adaptive step size, which is the initial step size when far away from an obstacle, and the step size is the product of the initial step size and the reduction coefficient when (the node of the current tree) is within a preset distance from an obstacle. The reduction coefficient is a random value of 0.1-0.6.
[0090] In this application, by setting an adaptive step size, when encountering narrow areas or areas with concentrated obstacles, that is, when using the original expansion step size for expansion, a collision with the obstacle will occur. By using an adaptive step size, the adjustment of the step size each time is more flexible, thereby improving the algorithm's ability to adapt to different complex obstacle environments.
[0091] In one embodiment, generating the joint space path points corresponding to the robotic arm by inverse kinematics includes:
[0092] Get discrete points in the path trajectory;
[0093] Construct inverse kinematics formulas;
[0094] The Cartesian coordinates of the discrete points are converted into joint angles of the robotic arm through an inverse kinematics formula, and the joint angles are the joint space path points corresponding to the robotic arm.
[0095] In this application, the steps of generating the joint space path points corresponding to the robot arm through inverse kinematics are as follows:
[0096] After completing the path planning, the spatial path of the end effector of the robot arm (i.e., the Cartesian spatial path) is obtained.
[0097] The inverse kinematics (IK) algorithm is used to convert the Cartesian coordinates of the end effector into the joint angles of the robot. For complex robots, the inverse kinematics problem may have multiple solutions, which need to consider joint constraints and optimization objectives (such as minimizing energy, avoiding extreme positions, etc.).
[0098] If there are multiple solutions, the optimal solution is selected, and a path smoothing algorithm or gradient optimization method can be used to ensure smooth and efficient joint trajectories.
[0099] In this application, the inverse kinematics solution is to map the end path into the joint space.
[0100] In this application, joint constraints: ensure that joint angles are within a feasible range and avoid collisions.
[0101] In this application, the joint space path points obtained by inverse kinematics are used as input and converted into motion instructions for the robot arm.
[0102] In this application, a joint space control algorithm (such as PID control, MPC, etc.) is used to control the robot arm to move precisely along the generated path.
[0103] If the robot encounters new obstacles or environmental changes during execution, closed-loop feedback control can be used to adjust the joint path in real time to ensure task completion.
[0104] During the control process, force control or visual feedback (such as force sensors, cameras, etc.) can also be used to ensure that the robot arm performs tasks accurately and avoids collisions.
[0105] In this application, joint space path tracking control.
[0106] In this application, closed-loop feedback is used to ensure path tracking accuracy and real-time adjustments.
[0107] In one embodiment, S101, acquiring a real scene image and constructing a three-dimensional obstacle model includes:
[0108] The method of obtaining and parsing a real surgical scene video stream to obtain target location and obstacle information includes:
[0109] Acquire a surgical scene video stream and segment it into continuously set depth image frames;
[0110] Inputting the depth image frame into the obstacle recognition model to obtain an obstacle recognition result; the obstacle recognition result includes a static obstacle target position;
[0111] Based on the obstacle identification results, a three-dimensional obstacle model is constructed.
[0112] In this application, the specific structure and training process of the obstacle recognition model will not be repeated or limited.
[0113] An embodiment of the present application provides a robot path planning device based on an improved random tree, which is used to execute the robot path planning method based on an improved random tree described in the above content of the present application. The robot path planning device based on the improved random tree is described in detail below.
[0114] like Figure 2 As shown, the robot arm path planning device based on the improved random tree includes:
[0115] An image acquisition module 101 is used to acquire a real scene image and construct a three-dimensional obstacle model;
[0116] A repulsive force generating module 102, which is used to perform grid processing on the three-dimensional obstacle model to generate a repulsive force field;
[0117] A path planning module 103, which is used to plan a path trajectory in a three-dimensional obstacle model based on an improved random tree;
[0118] The robot arm control module 104 is used to generate joint space path points corresponding to the robot arm through inverse kinematics to control the robot arm.
[0119] In one embodiment, the repulsive force generating module 102 is further configured to:
[0120] The three-dimensional obstacle model is gridded and converted into a regular voxel grid; the repulsive field value of each grid on the voxel grid is calculated; and the gradient vector corresponding to each voxel grid is calculated according to the repulsive field value of the voxel grid.
[0121] In one embodiment, the calculation formula of the repulsive field value is:
[0122]
[0123] Among them, f r is the repulsive field value, ρ(x,r,z) is the distance to the obstacle space closest to the point (x,y,z), d0 is the distance threshold, and μ is the repulsive gain.
[0124] In one implementation, the calculation formula for the gradient vector is:
[0125]
[0126] in, is the gradient vector, t x ,t y ,t z is the gradient in the x, y, and z directions, f r is the repulsive field value.
[0127] In one implementation, the path planning module 103 is further configured to:
[0128] The initial position and preparation position of the end tool of the robot arm are obtained, and are set as the starting point and the end point respectively; two random trees are generated according to the starting point and the end point; a sampling point is randomly generated; according to the sampling point, the current random tree is grown until it reaches the sampling point or collides with an obstacle; a direct connection detection is performed on the top of the current random tree and all nodes of another random tree; if the direct connection detection does not pass through an obstacle, the path trajectory is obtained; if the direct connection detection passes through an obstacle, a sampling point is regenerated and another random tree is grown.
[0129] In one implementation, the sampling point is obtained by superimposing a gradient vector on a randomly generated random point vector.
[0130] In one embodiment, the robot control module 104 is further configured to:
[0131] Obtain discrete points in the path trajectory; construct an inverse kinematics formula; and transform the Cartesian coordinates of the discrete points into joint angles of the robotic arm through the inverse kinematics formula, wherein the joint angles are the joint space path points corresponding to the robotic arm.
[0132] The robotic arm path planning device based on an improved random tree provided in the above-mentioned embodiment of the present application has a corresponding relationship with the robotic arm path planning method based on an improved random tree provided in the embodiment of the present application. Therefore, the specific content in the device has a corresponding relationship with the robotic arm path planning method based on an improved random tree. The specific content can refer to the records in the robotic arm path planning method based on an improved random tree, and will not be repeated in this application.
[0133] The robotic arm path planning device based on improved random trees provided in the above-mentioned embodiments of the present application and the robotic arm path planning method based on improved random trees provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.
[0134] The above describes the internal functions and structure of the robot path planning device based on the improved random tree. Figure 3 As shown, in practice, the robot arm path planning device based on the improved random tree can be implemented as an electronic device, including: a memory 301 and a processor 303.
[0135] The memory 301 may be configured to store programs.
[0136] In addition, the memory 301 may also be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc.
[0137] The memory 301 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0138] The processor 303 is coupled to the memory 301 and is configured to execute a program in the memory 301 to:
[0139] Acquire real scene images and construct three-dimensional obstacle models;
[0140] Perform grid processing on the three-dimensional obstacle model to generate a repulsive field;
[0141] Path trajectory in three-dimensional obstacle model based on improved random tree planning;
[0142] The joint space path points corresponding to the robotic arm are generated through inverse kinematics to control the robotic arm.
[0143] In one implementation, the processor 303 is further configured to:
[0144] The three-dimensional obstacle model is gridded and converted into a regular voxel grid; the repulsive field value of each grid on the voxel grid is calculated; and the gradient vector corresponding to each voxel grid is calculated according to the repulsive field value of the voxel grid.
[0145] In one embodiment, the calculation formula of the repulsive field value is:
[0146]
[0147] Among them, f r is the repulsive field value, ρ(x,y,z) is the distance to the obstacle space closest to the point (x,y,z), d0 is the distance threshold, and μ is the repulsive gain.
[0148] In one implementation, the calculation formula for the gradient vector is:
[0149]
[0150] in, is the gradient vector, t x ,t y ,t z is the gradient in the x, y, and z directions, f r is the repulsive field value.
[0151] In one implementation, the processor 303 is further configured to:
[0152] The initial position and preparation position of the end tool of the robot arm are obtained, and are set as the starting point and the end point respectively; two random trees are generated according to the starting point and the end point; a sampling point is randomly generated; according to the sampling point, the current random tree is grown until it reaches the sampling point or collides with an obstacle; a direct connection detection is performed on the top of the current random tree and all nodes of another random tree; if the direct connection detection does not pass through an obstacle, the path trajectory is obtained; if the direct connection detection passes through an obstacle, a sampling point is regenerated and another random tree is grown.
[0153] In one implementation, the sampling point is obtained by superimposing a gradient vector on a randomly generated random point vector.
[0154] In one implementation, the processor 303 is further configured to:
[0155] Obtain discrete points in the path trajectory; construct an inverse kinematics formula; and transform the Cartesian coordinates of the discrete points into joint angles of the robotic arm through the inverse kinematics formula, wherein the joint angles are the joint space path points corresponding to the robotic arm.
[0156] In the present application, the processor is also specifically used to execute all the processes and steps of the above-mentioned robotic arm path planning method based on the improved random tree. The specific content can be referred to the records in the robotic arm path planning method based on the improved random tree, and will not be repeated in this application.
[0157] In this application, Figure 3 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 3 Components shown.
[0158] The electronic device provided in this embodiment is based on the same inventive concept as the robotic arm path planning method based on improved random trees provided in the embodiment of the present application, and has the same beneficial effects as the method adopted, run or implemented by the application program stored therein.
[0159] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0160] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0161] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0162] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0163] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0164] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash memory (Flash RAM). The memory is an example of a computer-readable medium.
[0165] The present application also provides a computer-readable storage medium corresponding to the robot arm path planning method based on an improved random tree provided in the aforementioned embodiment, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it will execute the robot arm path planning method based on an improved random tree provided in any of the aforementioned embodiments.
[0166] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0167] The computer-readable storage medium provided in the above-mentioned embodiments of the present application and the robotic arm path planning method based on improved random trees provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.
[0168] It should be noted that in the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known structures and technologies are not shown in detail so as not to obscure the understanding of this description.
[0169] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0170] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A robot arm path planning method based on improved random tree, characterized in that: include: Acquire real scene images and construct three-dimensional obstacle models; Perform grid processing on the three-dimensional obstacle model to generate a repulsive field; Path trajectory in three-dimensional obstacle model based on improved random tree planning; The joint space path points corresponding to the robotic arm are generated through inverse kinematics to control the robotic arm.
2. The robot arm path planning method based on improved random tree according to claim 1, characterized in that: The grid processing of the three-dimensional obstacle model to generate a repulsive field includes: Mesh the three-dimensional obstacle model and convert it into a regular voxel grid; Calculate the repulsive field value of each grid on the voxel grid; According to the repulsive field value of the voxel grid, the gradient vector corresponding to each voxel grid is calculated.
3. The robot arm path planning method based on improved random tree according to claim 2, characterized in that: The calculation formula of the repulsive field value is: Among them, f r is the repulsive field value, ρ(x,y,z) is the distance to the obstacle space closest to the point (x,y,z), d0 is the distance threshold, and μ is the repulsive gain.
4. The robot arm path planning method based on improved random tree according to claim 2, characterized in that: The calculation formula of the gradient vector is: in, is the gradient vector, t x ,t y ,t z is the gradient in the x, y, and z directions, f r is the repulsive field value.
5. The robot arm path planning method based on improved random tree according to any one of claims 2 to 4, characterized in that: The path trajectory in the three-dimensional obstacle model based on improved random tree planning includes: Obtain the initial position and preparation position of the end tool of the robot arm, and set them as the starting point and end point respectively; Generate two random trees based on the starting point and the end point; Randomly generate a sampling point; According to the sampling point, the current random tree is grown until the sampling point is reached or an obstacle is collided; Perform direct connection detection between the top of the current random tree and all nodes of another random tree; If the direct connection detection does not pass through any obstacle, the path trajectory is obtained; If all direct connection detections pass through obstacles, a new sampling point is generated and another random tree is grown.
6. The robot arm path planning method based on improved random tree according to claim 5, characterized in that: The sampling points are obtained by superimposing a gradient vector on a randomly generated random point vector.
7. The robot arm path planning method based on improved random tree according to any one of claims 1 to 4, characterized in that: The method of generating the joint space path points corresponding to the robot arm by inverse kinematics includes: Get discrete points in the path trajectory; Construct inverse kinematics formulas; The Cartesian coordinates of the discrete points are converted into joint angles of the robotic arm through an inverse kinematics formula, and the joint angles are the joint space path points corresponding to the robotic arm.
8. A robot arm path planning device based on an improved random tree, characterized in that: include: An image acquisition module, which is used to acquire real scene images and construct a three-dimensional obstacle model; A repulsion generation module, which is used to perform grid processing on the three-dimensional obstacle model to generate a repulsion field; A path planning module, which is used to plan the path trajectory in the three-dimensional obstacle model based on an improved random tree; The robot arm control module is used to generate joint space path points corresponding to the robot arm through inverse kinematics to control the robot arm.
9. An electronic device, characterized in that: include: Memory and processor; The memory is used to store programs; The processor, coupled to the memory, is configured to execute the program to: Acquire real scene images and construct three-dimensional obstacle models; Perform grid processing on the three-dimensional obstacle model to generate a repulsive field; Path trajectory in three-dimensional obstacle model based on improved random tree planning; The joint space path points corresponding to the robotic arm are generated through inverse kinematics to control the robotic arm.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the robot path planning method based on improved random tree as described in any one of claims 1 to 7.
Citation Information
Cited By
Mechanical arm obstacle avoidance method and device based on structured light
CN120244955A
Path planning method and system for personnel evacuation and obstacle avoidance
CN121860173A