A path planning optimization method, device and medium

By dividing the path planning into grids, determining obstacle density and turning costs, and optimizing the path planning, the problems of non-smooth paths and low efficiency in the prior art are solved, and efficient smooth path generation is achieved.

CN122192309APending Publication Date: 2026-06-12JIANGXI UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGXI UNIV OF SCI & TECH
Filing Date
2026-03-13
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

The existing A* algorithm struggles to simultaneously improve path smoothness and search efficiency in path planning, especially in unstructured environments with complex terrain and obstacle distribution, where it suffers from unsmooth paths and low search efficiency.

Method used

By dividing the work area into grids, determining the accessibility and neighborhood obstacle density of each grid, calculating the cost of nodes, and considering turning costs, path planning is optimized to reduce unnecessary turns and improve path smoothness and efficiency.

🎯Benefits of technology

It enables efficient planning of smooth paths in complex environments, reduces unnecessary turns, and improves the efficiency of path planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122192309A_ABST
    Figure CN122192309A_ABST
Patent Text Reader

Abstract

The application relates to the field of path planning, and discloses a path planning optimization method, equipment and medium, the method comprising the following steps: dividing the work area into a plurality of grids, determining the passability of each grid; determining the neighborhood obstacle density of each grid according to the passability of each grid; determining the generation value of the node corresponding to each grid according to the starting point, the end point and the neighborhood obstacle density of each grid; determining the path with the minimum sum of the generation values of the nodes from the starting point to the end point according to the turning generation cost from the current node to the next node and the generation values of the nodes, and taking the path as the planning path of the work area. The application can efficiently plan a smooth path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of path planning, and more particularly to a path planning optimization method, device, and medium. Background Technology

[0002] Path planning is a key technology widely used in robots, autonomous vehicles, and navigation systems, and one typical algorithm is the A* algorithm. The A* algorithm typically searches for the optimal path on a grid map, moving from one grid to another in several directions. Existing A* algorithms struggle to simultaneously consider both the efficiency and quality of path planning, especially in unstructured environments with complex terrain and obstacle distribution. They suffer from drawbacks such as non-smooth paths and low search efficiency, making it difficult for existing A* algorithms to efficiently plan smooth and optimal paths. Summary of the Invention

[0003] This invention aims to solve at least one of the technical problems existing in the prior art. To this end, this invention proposes a path planning optimization method that can efficiently plan smooth paths.

[0004] The present invention also proposes systems, devices, and media having the above-described path planning optimization method.

[0005] A path planning optimization method according to a first aspect of the present invention is applied to a work area where a path needs to be planned. The planned path includes a start point and an end point, and includes: The work area is divided into several grids, and the accessibility of each grid is determined. Based on the accessibility of each grid, determine the neighborhood obstacle density of each grid. Based on the starting point, the ending point, and the neighborhood obstacle density of each grid, determine the cost value of the node corresponding to each grid. Based on the turning cost from the current node to the next node and the cost of each node, determine the path with the minimum sum of the costs of each node from the starting point to the ending point, and use this path as the planning path for the work area.

[0006] A path planning optimization method according to an embodiment of the present invention has at least the following beneficial effects: Before planning, the present invention determines the accessibility of a grid, the density of neighboring obstacles, and the openness of each node in the grid, minimizing unnecessary turns caused by proximity to obstacles; furthermore, by analyzing the obstacles and movements of each grid in the planning area, the cost value of each node corresponding to each grid is determined; during path planning, when determining the next destination node at the current node, in addition to considering the cost value, the turning cost from the current node to the next node is also considered, thereby considering the turning cost of the entire path formed, minimizing unnecessary turns, and improving planning efficiency. The present invention can efficiently plan smooth paths.

[0007] According to some embodiments of the present invention, determining the neighborhood obstacle density of each grid cell based on the accessibility of each grid cell includes: For each grid cell, determine the number of its impassable neighboring grid cells; based on the number of impassable neighboring grid cells, use a kernel density estimation method to determine the neighborhood obstacle density of each grid cell; wherein, the neighboring grid cells of each grid cell are determined according to the preset neighborhood radius in the kernel density estimation method.

[0008] According to some embodiments of the present invention, determining the cost value of each node based on the movement cost of each node in each grid and the neighborhood obstacle density of each node includes: The weights corresponding to the neighborhood obstacle density are obtained by using a monotonic sigmoid mapping function based on the neighborhood obstacle density of each node. The sum of the product of the neighborhood obstacle density and its corresponding weight and the movement cost is used as the cost of the node; wherein, the number of grid lines traversed from the starting point to the node is used as the movement cost of the node.

[0009] According to some embodiments of the present invention, determining the path with the minimum sum of the costs of all nodes from the starting point to the ending point, based on the turning cost from the current node to the next node and the cost of each node, includes: For the current node, determine the first direction vector between the current node and the previous node; take the direction vectors of each neighbor node and the current node as the second direction vector; if the first direction vector and the second direction vector are not collinear, update the cost value of the neighbor node according to the angle between the first direction vector and the second direction vector, so as to obtain the path with the minimum sum of cost values ​​of each node.

[0010] According to some embodiments of the present invention, the grid is an equilateral N-gon; The step of updating the cost value of the neighbor node based on the angle between the first direction vector and the second direction vector includes: The angle between the line containing the first direction vector and the line containing the second direction vector is divided by the single-step angle as the turning cost; where the single-step angle is 360 / N; The product of the turning cost and the preset turning penalty coefficient is added to the cost of the neighboring node.

[0011] According to some embodiments of the present invention, determining the path with the minimum sum of the costs of all nodes from the starting point to the ending point, based on the turning cost from the current node to the next node and the cost of each node, further includes: After determining whether the first direction vector and the second direction vector are collinear, it is determined whether the open set contains a neighbor node corresponding to the second direction vector. If not, the neighbor node, its cost value, and its corresponding previous node are added to the open set. If yes, it is determined whether the cost value of the neighbor node is less than the cost value from the current node to the neighbor node corresponding to the neighbor node. If not, the previous node corresponding to the neighbor node is replaced with the current node.

[0012] According to some embodiments of the present invention, determining the path with the minimum sum of the costs of all nodes from the starting point to the ending point, based on the turning cost from the current node to the next node and the cost of each node, further includes: After determining whether the first direction vector is collinear with all the second direction vectors corresponding to the current node, the current node is added to the closed set; when the current node is the destination, the previous node corresponding to the current node is taken out of the closed set, and the previous node is used as the current node. The previous node corresponding to the current node is then taken out of the closed set again to obtain the planned path.

[0013] According to some embodiments of the present invention, if the closed set is not empty, the direction vectors of the neighboring nodes not located in the closed set and the current node are used as the second direction vectors.

[0014] An electronic device according to a second aspect of the present invention includes: Memory, used to store programs; A processor for executing a program stored in the memory, wherein when the processor executes the program stored in the memory, the processor is configured to perform the method as described in any one of the first aspects.

[0015] According to a third aspect of the present invention, a storage medium stores computer-executable instructions for performing the method as described in any one of the first aspects.

[0016] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the description, claims, and drawings. Attached Figure Description

[0017] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the technical solutions of the present invention, and do not constitute a limitation on the technical solutions of the present invention.

[0018] Figure 1This is a flowchart of a path planning optimization method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a grid in a path planning optimization method provided in another embodiment of the present invention; Figure 3 This is a schematic diagram of the planned area in a path planning optimization method provided in another embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0020] It should be understood that in the description of the embodiments of the present invention, "multiple" (or "amounts") means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. If "first," "second," etc., are used in the description, they are only for the purpose of distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.

[0021] like Figure 1 As shown, this embodiment of the invention provides a path planning optimization method, applied to a work area where a path needs to be planned. The planned path includes a start point and an end point, and includes: Step S100: Divide the work area into several grids and determine the accessibility of each grid. Step S200: Determine the neighborhood obstacle density of each grid cell based on the accessibility of each grid cell. Step S300: Determine the cost value of the node corresponding to each grid cell based on the starting point, ending point, and the neighborhood obstacle density of each grid cell. Step S400: Based on the turning cost from the current node to the next node and the cost of each node, determine the path with the minimum sum of the costs of each node from the starting point to the ending point, and use this path as the planning path for the work area.

[0022] The grid has several nodes, and the planned path is actually the path along the nodes.

[0023] This invention determines the accessibility and neighborhood obstacle density of a grid before planning, and the openness of each node within the grid to minimize unnecessary turns caused by proximity to obstacles. Furthermore, by analyzing obstacles and movement within each grid in the planning area, the cost value of each node corresponding to that grid is determined. During path planning, when determining the next destination node at the current node, in addition to considering the cost value, the turning cost from the current node to the next node is also considered, thus taking into account the turning cost of the entire path and minimizing unnecessary turns to improve planning efficiency. This invention can efficiently plan smooth paths.

[0024] It should be noted that a node is the center of each grid cell, and the planned path is formed by connecting several selected nodes.

[0025] In one embodiment, in step S200, determining the neighborhood obstacle density of each grid cell based on the accessibility of each grid cell includes: For each grid cell, determine the number of its impassable neighboring grid cells; based on the number of impassable neighboring grid cells, use a kernel density estimation method to determine the neighborhood obstacle density of each grid cell; wherein, the neighboring grid cells of each grid cell are determined according to the preset neighborhood radius in the kernel density estimation method.

[0026] It is easy to understand that the grids are closely connected, and the node is the geometric center of the grid, with one grid corresponding to one node; some grids are divided for obstacles or special terrain in the work area, so these grids are impassable and the nodes of these grids are also impassable; the kernel density estimation method (KDE) is used to calculate the probability density function.

[0027] Specifically, the method of determining the neighborhood barrier density of each grid cell using kernel density estimation includes: For any passable grid, based on the preset neighborhood radius, determine the impassable grids within the neighborhood radius of the grid; determine the probability density of the grid based on the step distance from each impassable grid within the neighborhood radius to the grid; normalize the probability density of the grid to obtain the neighborhood obstacle density, until the neighborhood obstacle density of all passable grids is determined. It should be noted that the step distance from grid A to grid B refers to the number of grids that the node corresponding to grid A passes through to the node corresponding to grid B, rather than the Euclidean distance between the nodes of grids A and B.

[0028] In one embodiment, in step S300, determining the cost of each node based on the movement cost of each node in each grid and the neighborhood obstacle density of each node includes: The weights corresponding to the neighborhood obstacle density are obtained by using a monotonic sigmoid mapping function based on the neighborhood obstacle density of each node. The value of a node is the sum of the product of the neighborhood obstacle density and its corresponding weight and the movement cost; where the number of grid lines traversed from the starting point to the node is the movement cost of the node.

[0029] Specifically, the cost value of this node is actually the basic cost value, which provides the basic expression for the subsequent turning cost. The expression for the cost value is: f(n)=g(n)+w(h(n))·h(n), where g(n) is the movement cost of node n, h(n) is the neighborhood obstacle density, and w(h(n)) is the weight corresponding to the neighborhood obstacle density. It should be noted that the monotonic sigmoid mapping function is the sigmoid function. Through the monotonic sigmoid mapping function, the higher the neighborhood obstacle density, the higher the weight; that is, when the obstacle density is high, the weight is high and the cost is high. To avoid ineffective expansion in areas with dense obstacles, we try to choose areas with low obstacle density. When the obstacle density is low, we pay more attention to the movement cost.

[0030] By using this adaptive heuristic function, i.e. the cost of nodes, the heuristic guidance is increased in simple environments to reduce node traversal, while the heuristic effect is automatically reduced in complex environments to ensure path optimality, thereby achieving the goal of reducing the number of node expansions and improving search efficiency.

[0031] In one embodiment, in step S400, determining the path with the minimum sum of the costs of all nodes from the starting point to the ending point, based on the turning cost from the current node to the next node and the cost of each node, includes: For the current node, determine the first direction vector between the current node and the previous node; take the direction vectors of each neighbor node and the current node as the second direction vector; if the first direction vector and the second direction vector are not collinear, update the cost value of the neighbor nodes according to the angle between the first direction vector and the second direction vector, so as to obtain the path with the minimum sum of cost values ​​of each node.

[0032] In one embodiment, the grid is an equilateral N-sided polygon, and the current node has N-1 possible turns. There are N-1 candidate neighbor nodes (i.e., the current node's neighbor nodes), and the included angle between adjacent neighbor nodes is 360 / N degrees. When determining the next node, if the previous node and the current node's destination are not collinear with the current node and its neighbor nodes' destinations, a turn will occur, and the cost of that neighbor node will be increased by the turn cost. It is easy to understand that if one of the current node's neighbor nodes is the previous path node, it is meaningless if the next path node is the same as the previous path node.

[0033] In one embodiment, the grid is an equilateral N-sided polygon; Update the cost value of neighboring nodes based on the angle between the first direction vector and the second direction vector, including: The turning cost is the result of dividing the angle between the line containing the first direction vector and the line containing the second direction vector by the single-step angle; where the single-step angle is 360 / N. The product of the turning cost and the preset turning penalty coefficient is added to the cost of the neighboring nodes.

[0034] In one embodiment, the grid is an equilateral hexagon; the current node n to neighboring nodes m The direction vector is d2 The angle θ between the two direction vectors is calculated using cubic coordinates. If θ > 0, a turn occurs. A corresponding penalty cost P(θ) = λ(θ / 60°) is added based on the size of the turn angle, where λ is the turn penalty coefficient and θ / 60° represents the number of 60° turns.

[0035] Edge cost is defined as the cost of moving from the current node n rows to its neighboring node m in a single step. It consists of two parts: a basic movement cost and a turning penalty. The basic movement cost is 1 unit step size from the current node n rows to the neighboring node m. The turning penalty is in the form P(Δθ) = λ*φ(Δθ), where λ is the turning penalty coefficient used to control the influence of turning on the cost per step, and φ(Δθ) is a dimensionless angle mapping function reflecting the turning angle. Thus, it can be written as edge cost = 1 + λ*φ(Δθ). To maintain consistency with the original value representation of nodes, let Δg = S(n,m) + P(Δθ). When no additional terrain differences are assumed, S(n,m) = 1. For example, if the hexagonal mesh turns from the parent node (the previous path node) to the next adjacent direction (θ=60°), then P=λ*1; if it turns to a different direction (θ=120°), then P=λ*2. To balance path smoothing and search overhead, the experiment found that a penalty coefficient β'=0.5 yielded good results: when β' is in the range of 0.5~1, the number of path inflection points and total turning angles are significantly reduced, while the number of traversed nodes only increases slightly, without introducing significant additional overhead. The calculated value is Δg=S(n,m)+P(θ). Without considering additional terrain differences, the basic movement cost is denoted as 1. Therefore, the edge cost from the current node n to the adjacent node m is denoted as 1+λ*φ(Δθ).

[0036] It is easy to understand that the edge cost is the cost from one node to another, which is actually the difference between the cost values ​​of the two nodes. It is an intermediate value in the path planning of this embodiment. The cost value of a node is calculated from the starting point to avoid repeatedly going back to the starting point, which would lead to low planning efficiency.

[0037] In one embodiment, in step S400, determining the path with the minimum sum of the costs of all nodes from the starting point to the ending point, based on the turning cost from the current node to the next node and the cost of each node, further includes: After determining whether the first direction vector and the second direction vector are collinear, determine whether the open set contains a neighbor node corresponding to the second direction vector. If not, add the neighbor node, its value, and its corresponding previous node to the open set. If so, determine whether the value of the neighbor node is less than the value of the current node to the neighbor node corresponding to the neighbor node. If not, replace the previous node corresponding to the neighbor node with the current node.

[0038] For example, given node B, which has a neighbor B1, and B's previous node A, and B1 already stored in an open set, with A1 being the previous node of B1; we need to find the cost of moving from B to B1, but B1 already has a previous node A1. Therefore, we need to compare the cost of moving from B to B1 with the cost of moving from A1 to B1. If the cost is smaller, we replace the previous node of B1 with the one with the smaller cost. If the neighbor node is not stored in an open set, it means that the node has not yet been traversed, and it can be stored directly.

[0039] It's easy to understand that the open set is actually a data structure initialized before path planning to store data during the planning process. It stores the nodes that have been traversed, starting with the starting point. After determining whether the first and second direction vectors are collinear, the neighboring nodes and their information are stored in the open set. That is, regardless of whether the first and second direction vectors are collinear, the neighboring nodes and their information are stored in the open set. If the value of a neighboring node is updated, the updated value is stored.

[0040] In one embodiment, in step S400, determining the path with the minimum sum of the costs of all nodes from the starting point to the ending point, based on the turning cost from the current node to the next node and the cost of each node, further includes: After determining whether the first direction vector is collinear with all the second direction vectors corresponding to the current node, the current node is added to the closed set. When the current node is the destination, the previous node corresponding to the current node is removed from the closed set, and the previous node is used as the current node. The previous node corresponding to the current node is then removed from the closed set again to obtain the planned path.

[0041] It is easy to understand that there are 360 / N second direction vectors for the current node, where N is a positive integer and the grid is an equilateral N-sided polygon; the closed set is similar to the open set and is used to store the optimal point of the planned path.

[0042] In one embodiment, if the closed set is not empty, the direction vectors of the neighboring nodes not located in the closed set and the current node are used as the second direction vector.

[0043] A node is added to the closed set only after it has been removed from the open list (as the current expanding node) and all its neighboring nodes have been processed.

[0044] like Figure 2 , 3 As shown, in one embodiment, the grid is an equilateral hexagon; Figure 2 The black grid in the image represents the grid corresponding to the current node, and the arrow indicates the direction of movement for that node, pointing towards its neighboring nodes. Figure 3 In the diagram, red grids represent the starting point, green grids represent the ending point, white grids represent passable grids, and gray grids represent impassable grids.

[0045] It's important to note that in classic square meshes, allowing only four directions (up, down, left, and right) for movement results in limited freedom of direction selection in path planning, often leading to jagged, broken paths. Allowing diagonal movement (eight directions) improves path smoothness, but diagonal paths may cause the path to get too close to obstacle corners, increasing collision risk. Furthermore, the four-way and eight-way movements in a square mesh have different step costs, requiring separate handling for diagonal and straight-line cases, increasing computational complexity. In contrast, a regular hexagonal mesh has six equidistant directions, with a consistent cost for each step, eliminating the need to distinguish between straight and diagonal movements, thus simplifying computation. Hexagonal meshes also cover the plane more evenly, resulting in smoother paths that stay away from obstacle edges, improving path safety and algorithm efficiency.

[0046] This invention also provides an electronic device, which includes, but is not limited to: Memory, used to store programs; The processor is used to execute programs stored in memory. When the processor executes a program stored in memory, it is used to perform one of the path planning optimization methods described above.

[0047] The processor and memory can be connected via a bus or other means.

[0048] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs, such as the method described in the embodiments of the present invention. The processor implements the above method by running the non-transitory software program and instructions stored in the memory.

[0049] The memory may include a program storage area and a data storage area, wherein the program storage area may store the operating system and application programs required for at least one function; the data storage area may store data for executing the methods described above. Furthermore, the memory may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the processor, which can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0050] The non-transitory software program and instructions required to implement the above terminal selection method are stored in memory and are executed by one or more processors.

[0051] This invention also provides a storage medium storing computer-executable instructions for performing the above-described methods.

[0052] In one embodiment, the storage medium stores computer-executable instructions that are executed by one or more control processors.

[0053] The embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0054] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0055] This document describes embodiments of the invention, including preferred embodiments known to the inventors for carrying out the invention. Variations of these embodiments will become apparent to those skilled in the art upon reading the foregoing description. The inventors encourage those skilled in the art to adopt such variations as appropriate, and the inventors intend to practice embodiments of the invention in ways other than those specifically described herein. Therefore, the scope of the invention includes all modifications and equivalents of the subject matter set forth in the appended claims, as permitted by applicable law. Furthermore, the scope of the invention covers any combination of the foregoing elements in all possible variations thereof, unless otherwise indicated herein or otherwise clearly contradicted by the context.

Claims

1. A path planning optimization method, applied to a work area where a path needs to be planned, wherein the planned path includes a start point and an end point, characterized in that, include: The work area is divided into several grids, and the accessibility of each grid is determined. Based on the accessibility of each grid, determine the neighborhood obstacle density of each grid. Based on the starting point, the ending point, and the neighborhood obstacle density of each grid, determine the cost value of the node corresponding to each grid. Based on the turning cost from the current node to the next node and the cost of each node, determine the path with the minimum sum of the costs of each node from the starting point to the ending point, and use this path as the planning path for the work area.

2. The path planning optimization method according to claim 1, characterized in that, The process of determining the neighborhood obstacle density of each grid cell based on its accessibility includes: For each grid cell, determine the number of its impassable neighboring grid cells; based on the number of impassable neighboring grid cells, use a kernel density estimation method to determine the neighborhood obstacle density of each grid cell; wherein, the neighboring grid cells of each grid cell are determined according to the preset neighborhood radius in the kernel density estimation method.

3. The path planning optimization method according to claim 1, characterized in that, The process of determining the cost of each node based on the movement cost of each node in each grid and the neighborhood obstacle density of each node includes: The weights corresponding to the neighborhood obstacle density are obtained by using a monotonic sigmoid mapping function based on the neighborhood obstacle density of each node. The sum of the product of the neighborhood obstacle density and its corresponding weight and the movement cost is used as the cost of the node; wherein, the number of grid lines traversed from the starting point to the node is used as the movement cost of the node.

4. The path planning optimization method according to claim 1, characterized in that, The step of determining the path that minimizes the sum of the costs of all nodes from the starting point to the ending point, based on the turning cost from the current node to the next node and the cost of each node, includes: For the current node, determine the first direction vector between the current node and the previous node; take the direction vectors of each neighbor node and the current node as the second direction vector; if the first direction vector and the second direction vector are not collinear, update the cost value of the neighbor node according to the angle between the first direction vector and the second direction vector, so as to obtain the path with the minimum sum of cost values ​​of each node.

5. The path planning optimization method according to claim 4, characterized in that, The grid is an equilateral N-sided polygon; The step of updating the cost value of the neighbor node based on the angle between the first direction vector and the second direction vector includes: The angle between the line containing the first direction vector and the line containing the second direction vector is divided by the single-step angle as the turning cost; where the single-step angle is 360 / N; The product of the turning cost and the preset turning penalty coefficient is added to the cost of the neighboring node.

6. The path planning optimization method according to claim 4, characterized in that, The step of determining the path that minimizes the sum of the costs of all nodes from the starting point to the ending point, based on the turning cost from the current node to the next node and the cost of each node, further includes: After determining whether the first direction vector and the second direction vector are collinear, it is determined whether the open set contains a neighbor node corresponding to the second direction vector. If not, the neighbor node, its cost value, and its corresponding previous node are added to the open set. If yes, it is determined whether the cost value of the neighbor node is less than the cost value from the current node to the neighbor node corresponding to the neighbor node. If not, the previous node corresponding to the neighbor node is replaced with the current node.

7. The path planning optimization method according to claim 6, characterized in that, The step of determining the path that minimizes the sum of the costs of all nodes from the starting point to the ending point, based on the turning cost from the current node to the next node and the cost of each node, further includes: After determining whether the first direction vector is collinear with all the second direction vectors corresponding to the current node, the current node is added to the closed set; when the current node is the destination, the previous node corresponding to the current node is taken out of the closed set, and the previous node is used as the current node. The previous node corresponding to the current node is then taken out of the closed set again to obtain the planned path.

8. The path planning optimization method according to claim 7, characterized in that, If the closed set is not empty, then the direction vectors of the neighboring nodes that are not in the closed set and the current node are used as the second direction vector.

9. An electronic device, characterized in that, include: Memory, used to store programs; A processor for executing a program stored in the memory, wherein when the processor executes the program stored in the memory, the processor is configured to perform the method as described in any one of claims 1 to 8.

10. A storage medium, characterized in that, The device stores computer-executable instructions for performing the method as described in any one of claims 1 to 8.