A new path planning method using turn penalty factor and twin road network improvement

By introducing the turning penalty factor and twin road network information into the A* algorithm, the problems of slow generation speed and uncontrollable number of turns in indoor path planning are solved, efficient and dynamic path planning is achieved, and the efficiency of navigation services is improved.

CN116817913BActive Publication Date: 2024-09-10CHINESE ACAD OF SURVEYING & MAPPING
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310623399.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2024-09-10
Estimated Expiration
2043-05-30

AI Technical Summary

Technical Problem

In complex indoor environments, existing path planning algorithms have slow generation speed and uncontrolled number of turns, making it difficult to deal with dynamic obstacles.

Method used

The heuristic function of the A* algorithm is improved by introducing a turning penalty factor, and the neighborhood search function is improved by combining twin road network information to control the number of path turns and adapt to environmental changes.

Benefits of technology

It significantly reduces the turning points in the path, improves path generation efficiency and adaptability, realizes dynamic path planning in complex indoor environments, and reduces the control burden of intelligent robots and autonomous driving equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116817913B
    Figure CN116817913B
Patent Text Reader

Abstract

The present invention provides a new path planning method using a turning penalty factor and a twin road network, thereby solving the problems existing in the prior art such as slow path generation speed, uncontrolled number of turns, and difficulty in path planning in complex indoor environments. The present invention improves the heuristic function by adding a turning penalty factor, thereby significantly controlling the number of turns of the planned path. The search function is improved by superimposing the twin road network information, and the impact of obstacles on path generation is effectively solved from the perspective of path planning on the map platform. Compared with traditional methods, the present invention improves the algorithm operation efficiency, reduces the number of turns, can update the path according to changes in the twin road network information, and realizes dynamic path planning in complex indoor environments. The path planning service can be released through the map platform. It helps to reduce the control burden of intelligent robots and autonomous driving equipment, thereby improving the service efficiency of navigation path planning in complex indoor environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of indoor path planning, and in particular to a new path planning method using a turning penalty factor and twin road network improvement. Background Art

[0002] With the continuous expansion of human production and daily consumption activities, the application scenarios of path planning and navigation have expanded from outdoor path determination environments to complex and changing indoor environments. In the face of open and dynamically changing indoor environments, how map platforms can provide effective, feasible, and easy-to-use planning paths, improve path search efficiency, and reduce the number of path turns has become a research hotspot for indoor path planning.

[0003] Indoor activities account for about 70% to 80% of human activities every day. As an important service to support indoor activities, indoor path planning services have attracted more and more attention. Indoor path planning is the main content of indoor navigation services. Faced with increasingly complex indoor environments, how to use indoor maps to improve path planning algorithms and support map service platforms to plan global paths has become one of the research hotspots of indoor location services. Path planning refers to the process of finding the optimal path or shortest path from the starting point to the target point in a map or spatial environment.

[0004] Map modeling and path search algorithm are two important issues in path planning. Map modeling refers to converting the actual scene in the three-dimensional world into a data format that can be recognized by computers. Commonly used methods include visual graph method, grid method, topology method, etc. Path search algorithm refers to finding the optimal path or shortest path from the starting point to the target point within the search range based on the map model. Common path planning algorithms include Dijkstra algorithm, A* algorithm, artificial potential field method, RRT (rapidly-exploring random trees) algorithm, particle swarm algorithm, genetic algorithm, etc.

[0005] Among the path planning algorithms, the Dijkstra algorithm is a shortest path algorithm based on a greedy strategy, which gradually expands the search space to find the shortest path from the starting point to the target point. The A* algorithm is a heuristic search algorithm that superimposes a heuristic function on the basis of the Dijkstra algorithm to improve the algorithm's operating efficiency. The RRT algorithm first generates a tree covering the entire search space by random sampling, and then searches for the shortest path on the tree. Both the particle swarm algorithm and the genetic algorithm are optimization algorithms that can find the optimal solution to the problem in the search space. By using the jump point algorithm to improve the A* algorithm, the computational efficiency of the A* algorithm can be improved. However, the improved path has more turning points, and the relevant control burden will increase significantly when the vehicle uses a planned path with more turning points. There is also a global dynamic path planning algorithm proposed by integrating the dynamic window method and the improved A* algorithm. However, the computational complexity of this algorithm increases exponentially with the spatial dimension, and it is difficult to apply to real-time path planning in large space scenarios. Summary of the invention

[0006] The purpose of the present invention is to provide a new path planning method using a turning penalty factor and a twin road network to solve the aforementioned problems existing in the prior art, such as slow path generation speed in complex indoor environments, uncontrolled number of turns, and difficulty in path planning in complex indoor environments.

[0007] Compared with other path planning algorithms, the A* algorithm has the advantages of high efficiency and optimality. However, the A* algorithm can still further improve the heuristic function and search function, so as to fully take into account the impact of obstacles and control the number of turns in the planned path. The present invention proposes an improved path planning method based on the above factors. By increasing the turning penalty factor to improve the heuristic function, the number of turns in the planned path is significantly controlled. The search function is improved by superimposing the twin road network information, and the impact of obstacles on path generation is effectively solved from the level of map platform path planning.

[0008] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0009] A new path planning method using a turning penalty factor and a twin road network improvement includes the following steps:

[0010] S1, convert the coordinates of the starting point and the target point in the reference coordinate system into the coordinates in the local coordinate system; calculate the grid codes of the starting point and the target point according to the coordinates of the starting point and the target point in the local coordinate system and the grid side length; take a single grid as a node to obtain the starting node and the target node; if the current node is the parent node, the nodes adjacent to and reachable from the current node are the child nodes; during the path search process, each node should store the grid code of the parent node, the grid code of the current node, the actual cost from the starting node to the current node, and the estimated cost from the current node to the target node, so that the path node sequence can be obtained by iteratively tracing back to the parent node according to the current node; the parent node of the starting node is empty;

[0011] S2, create a search node set openList, an extended node set closeList, and an adjacent node set adjacentList; the openList is used to store the nodes that enter the search range; the closeList is used to store the node with the minimum cost function value that is selected from the openList at each step; the adjacentList is used to store the child nodes that are adjacent to and reachable from the current node;

[0012] S3, setting the openList, the closeList, and the adjacentList to be empty; adding the starting node to the openList;

[0013] S4, using the cost function FP(n), calculating the cost function values ​​of all nodes in the openList; selecting the node lowestF with the smallest cost value;

[0014] S5, moving the lowestF node from the openList to the closeList as an extended node; deleting the lowestF node from the openList; and setting the adjacentList to be empty;

[0015] S6, if the lowestF node is the target node, then using the lowestF node and the closeList, iteratively backtracking the parent node to generate a path, and ending the search; if the lowestF node is not the target node, proceed to the next step;

[0016] S7, taking the lowestF node as the parent node, searching for adjacent child nodes; searching the road network semantic information table of the corresponding grid according to the grid code of the child node; reading the traffic status of the child node from the corresponding road network semantic information table according to the user identity;

[0017] S8, according to the traffic status of all child nodes, process the child nodes according to the neighborhood search function, store the adjacent reachable child nodes into the adjacentList; and record the relationship between the child nodes and the parent node;

[0018] S9, calculating G(n) and HP(n) of each node in the adjacentList;

[0019] S10, determining whether each node in the adjacentList already exists in the openList; if not, adding the node to the openList; if already exists and the current G(n) of the node is smaller, replacing the existing node in the openList with the node;

[0020] S11, determine whether the openList set is empty; if the openList is empty, it means that the path does not exist and the search ends; otherwise, return to step S4.

[0021] Preferably, the path planning result is a node sequence.

[0022] Preferably, when performing dynamic road network planning, the grid code of the user can be calculated based on the user's real-time location coordinates to obtain the user's current node; if an obstacle is set in the road network, the coordinates of the obstacle can be used to obtain the grid code at the obstacle position, and the road network status in the corresponding grid semantic information table is modified according to the obstacle grid code; the remaining node sequence from the user's current node to the target node is intercepted from the path planning result; it is determined whether the obstacle grid code is included in the remaining node sequence, and if not, the original planned path continues to be used; otherwise, the path is replanned from the user's current node.

[0023] Preferably, the cost function FP(n) in step S4 is an improved cost function FP(n), and a turning penalty factor is introduced in the process of obtaining the improved cost function FP(n).

[0024] Preferably, the method for obtaining the improved cost function FP(n) is specifically as follows:

[0025] First, determine whether a turn occurs from the current node to the next node:

[0026]

[0027] In the formula, (x current ,y current ), (x previous ,y previous ), (x next ,y next) are the plane coordinates of the current node and its parent node and child node respectively, and the child node refers to the node extended from the current node; (dx1, dy1) and (dx2, dy2) represent the vectors from the parent node to the current node and from the current node to its child node respectively, and s1 and s2 represent the moduli of these two vectors respectively; cos A is the function value for judging whether the current node has a turn, and its physical meaning is the cosine value of the angle between the two vectors, and the value range is cos A∈[-1,1]; if |cos A -1|≤10 -8 , indicating that the cosine value of the angle between the two vectors is very close to 0, and the angle between the two vectors is approximately 0, indicating that no turn occurs at the node. Otherwise, it indicates that the angle between the two vectors is greater than zero, that is, a turn occurs at the node;

[0028] After determining whether the current node turns, construct the turning penalty factor p:

[0029]

[0030] In the formula, G(next) represents the actual cost from the starting node to the next node, and H0 represents the initial cost from the next node to the target node, which can be calculated by the Euclidean distance between the two nodes:

[0031]

[0032] In the formula, (x next ,y next ), (x goal ,y goal ) represent the plane coordinates of the child node next and the target node goal respectively; the penalty factor is applied to the estimated cost H(next) of its child node next to obtain the improved heuristic function:

[0033] HP(next)=H0×p (6)

[0034] If the next node is recorded as n, the improved heuristic function is used to update the cost function to obtain the improved cost function:

[0035] FP(n)=G(n)+HP(n) (7).

[0036] Preferably, the turning penalty factor of the node next is calculated from two distances; the first distance is the actual distance from the current node to the starting node, and the second distance is the Euclidean distance from the current node to the target node; if no turning occurs between the current node and the next node, the penalty factor value is 1, and the heuristic function remains unchanged; if a turning occurs between the current node and the next node, the penalty factor value range is p∈(1,2], and the heuristic function value will increase exponentially; a larger heuristic function value can guide the algorithm to search for path nodes in the direction with fewer turns.

[0037] Preferably, the closer the current node is to the starting node, the larger the turning penalty factor is; in the initial stage of path planning, the improved heuristic function will prompt the path search to advance toward the target point in a straight line as much as possible, thereby effectively reducing the number of turns; fewer turns will significantly compress the path nodes, and fewer path nodes further reduce the amount of path search calculations; smaller calculations can save more time on path search and improve path search efficiency.

[0038] Preferably, if the current node is closer to the target point, the penalty factor value gradually regresses to 1, and the penalty effect gradually weakens; in the final stage of path planning, the current node should be closed towards the target point as much as possible; the primary goal of the final stage of path planning is to close the route to the target point, and the turn number penalty factor in this stage should be appropriately subject to the route closure goal; at this time, the amplification effect of the turn penalty factor is appropriately weakened to promote the route search to close towards the target point as soon as possible.

[0039] Preferably, the neighborhood search function described in step S8 is an improved neighborhood search function, and the processing flow of the improved neighborhood search function is: 1) adding obstacle judgment of nodes in four directions of up, down, left and right on the basis of the original neighborhood search function; 2) if the current node is an obstacle upward, regardless of whether the upper left and upper right nodes of the current node are reachable, it will no longer be included in the set of adjacent reachable nodes; 3) handling obstacles in other directions in a manner similar to 2); to avoid path search passing through the middle of obstacles.

[0040] Preferably, the specific process of converting the coordinates in the reference coordinate system into the coordinates in the local coordinate system and constructing the twin road network is:

[0041] First, a local coordinate system is established. The origin of the local coordinate system is the southwest corner of the ground grid. The x-axis is to the north along the grid line, and the y-axis is to the east. The unit length is m in the international unit system. The formula for mutual conversion between the local coordinate system and the reference coordinate system is:

[0042]

[0043]

[0044] Where l is the local coordinate system, r is the reference coordinate system, (X l ,Y l ) is the local coordinate system coordinate of a point, (X r ,Y r ) is the reference coordinate system coordinate corresponding to the point, is the coordinate of the origin of the local coordinate system in the reference coordinate system, is the rotation angle of the two coordinate systems.

[0045] The beneficial effects of the present invention are:

[0046] The present invention discloses a new path planning method using a turning penalty factor and an improved twin road network. First, the turning penalty factor is designed to improve the heuristic function of the A* algorithm, overcoming the problems of low efficiency of path planning and uncontrollable number of path turns of the traditional A* algorithm, effectively reducing the turning points in the path and improving the efficiency of path generation. Secondly, the twin road network is designed to improve the neighborhood search function of the A* algorithm. The improved new method superimposes real-time twin road network information, further enhancing the adaptability of path planning and making up for the deficiency of the traditional A* algorithm that it is difficult to perform dynamic path planning. The new method can update the path in time according to changes in environmental information, thereby improving the availability of the path generation results.

[0047] Compared with the traditional A* algorithm, the new path planning method proposed in this invention improves the algorithm operation efficiency, reduces the number of turns, can update the path according to the changes in the twin road network information, and realizes dynamic path planning in complex indoor environments. The improved A* algorithm can publish path planning services through the map platform. The new method generates fewer paths with fewer turns, which helps to reduce the control burden of intelligent robots and autonomous driving equipment, thereby improving the service efficiency of navigation path planning in complex indoor environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 This is a schematic diagram of the neighborhood search of A* algorithm 4;

[0049] Figure 2 This is a schematic diagram of the A* algorithm 8 neighborhood search;

[0050] Figure 3 It is the semantic information table of the road network grid;

[0051] Figure 4 It is a flow chart of the path planning method of the present invention. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation methods described herein are only used to explain the present invention and are not used to limit the present invention.

[0053] 1.1 Traditional A* Algorithm

[0054] The A* algorithm is a heuristic algorithm that uses heuristic information to estimate the cost of each node to the target node and determines the search order based on these estimated costs. It is an efficient path planning algorithm. The A* algorithm uses two functions to estimate the cost of each node: one is the actual cost from the starting node to the current node (usually distance or time), and the other is the estimated cost from the current node to the target node (usually estimated distance or time). Its cost function is defined as:

[0055] F(n)=G(n)+H(n) (1)

[0056] Where n represents the current node, F(n) represents the evaluation function from the starting node to the target node via the current node n, G(n) represents the actual cost from the starting node to the current node n, and H(n) represents the estimated cost from the current node n to the target node.

[0057] The computational efficiency of the A* algorithm depends on the heuristic function H(n). If H(n) is inaccurate, the search results may not be optimized enough or the search time may be too long. The A* algorithm usually uses Manhattan distance or Euclidean distance as the heuristic function. Since the present invention uses eight neighborhoods to search for paths, the heuristic function uses Euclidean distance, which is closer to the actual distance and the path planning result is better. Therefore, the present invention uses Euclidean distance as the heuristic function, and its formula is:

[0058]

[0059] In the formula, (x n ,y n ), (x g ,y g ) are the plane coordinates of the current node and the target node respectively.

[0060] 1.2 Improved A* Algorithm

[0061] 1.2.1 Improved A* algorithm heuristic function

[0062] The traditional A* algorithm will have many turning points in the path planning process, which does not meet the needs of personnel and vehicle path planning in practical applications. The present invention optimizes the phenomenon that the traditional A* algorithm has many turns. By pre-judging whether to turn and designing a turning penalty function, the algorithm is guided to search for roads in a straight and smooth direction. The specific method is:

[0063] First, determine whether a turn occurs from the current node to the next node:

[0064]

[0065] In the formula, (x current ,y current ), (x previous ,y previous ), (x next ,y next ) are the plane coordinates of the current node and its parent node and child node respectively. Child node refers to the node that is adjacent to the current node. (dx1,dy1) and (dx2,dy2) represent the vectors from the parent node to the current node and from the current node to its child node respectively, and s1 and s2 represent the modulus of these two vectors respectively. cosA is the function value to determine whether the current node has a turn. Its physical meaning is the cosine value of the angle between the two vectors, and its value range is cos A∈[-1,1]. If |cos A-1|≤10 -8 , indicating that the cosine value of the angle between the two vectors is very close to 0, and the angle between the two vectors is approximately 0, indicating that no turn occurs at the node. Otherwise, it indicates that the angle between the two vectors is greater than zero, that is, a turn occurs at the node.

[0066] After determining whether the current node turns, construct the turning penalty factor p:

[0067]

[0068] In the formula, G(next) represents the actual cost from the starting node to the next node, and H0 represents the initial cost from the next node to the target node, which can be calculated by the Euclidean distance between the two nodes:

[0069]

[0070] In the formula, (x next ,y next ), (x goal ,y goal ) represent the plane coordinates of the child node next and the target node goal respectively. Apply the penalty factor to the estimated cost H(next) of its child node next to obtain the improved heuristic function:

[0071] HP(next)=H0×p (6)

[0072] If the next node is recorded as n, the improved heuristic function is used to update the cost function to obtain the improved cost function:

[0073] FP(n)=G(n)+HP(n) (7)

[0074] The mechanism of the turning penalty factor can be further analyzed. Formula (4) shows that the turning penalty factor of the node next is calculated from two distances. The first distance is the actual distance from the current node to the starting node, and the second distance is the Euclidean distance from the current node to the target node. If there is no turn between the current node and the next node, the penalty factor value is 1, and the heuristic function remains unchanged. If a turn occurs between the current node and the next node, the penalty factor value range is p∈(1,2], and the heuristic function value will increase exponentially. A larger heuristic function value can guide the algorithm to search for path nodes in the direction with fewer turns.

[0075] The closer the current node is to the starting node, the larger the turning penalty factor. Therefore, at the beginning of path planning, the improved heuristic function will prompt the path search to advance toward the target point in a straight line as much as possible, thereby effectively reducing the number of turns. Fewer turns will significantly compress the path nodes, and fewer path nodes further reduce the amount of path search calculations. Smaller calculations can save more time on path search and improve path search efficiency.

[0076] If the current node is closer to the target point, the penalty factor value gradually regresses to 1, and the penalty effect gradually weakens. In the final stage of path planning, the current node should be closed towards the target point as much as possible. Since the primary goal of the final stage of path planning is to close the route to the target point, the turning penalty factor should be appropriately subject to the route closure goal in this stage. At this time, it is necessary to appropriately weaken the amplification effect of the turning penalty factor to promote the route search to close as quickly as possible towards the target point. Formula (4) has the performance of reducing the penalty effect in the final stage of route planning, thereby avoiding the problem of excessively reducing the number of turns in the final stage of the route, causing the algorithm to miss the target point along the straight line search and turn back again. Finally, the improved heuristic function with an additional turning penalty factor not only meets the different goals of each stage of path search by adaptively adjusting the penalty factor, but also ensures the global optimization effect of the algorithm in path planning.

[0077] 1.2.2 Improved A* algorithm neighborhood search function

[0078] like Figure 1 , 2 As shown in the figure, the traditional A* algorithm is generally divided into 4-neighborhood search and 8-neighborhood search. The 4-neighborhood search algorithm has many turning points and does not meet the needs of path planning in actual situations. When the 8-neighborhood search algorithm searches for the optimal path in a complex indoor environment, it may pass through obstacles adjacent to the vertex, making the search path impractical.

[0079] The processing flow of the existing neighborhood search function is as follows: (1) Search for reachable nodes from the current node in eight directions: up, down, left, right, upper left, upper right, lower left, and lower right. (2) If the node is reachable, store the node in the set of adjacent reachable nodes.

[0080] The nodes directly above and to the right of the current node are corner connected nodes. If there are obstacles above and to the right of the current node, the existing neighborhood search function may select the upper right node as the adjacent reachable node. At this time, the planned path may pass through two corner connected obstacles. In view of the above phenomenon, the neighborhood search function is improved to obtain an optimized neighborhood search function processing flow: (1) On the basis of the original neighborhood search function, obstacle judgment of nodes in the four directions of up, down, left, and right is added. (2) If there is an obstacle upwards at the current node, regardless of whether the upper left and upper right nodes of the current node are reachable, it will no longer be included in the set of adjacent reachable nodes. (3) The handling of obstacles in other directions is similar to (2). After the improvement of the neighborhood search function of the A* algorithm, it can effectively overcome the problem of path search passing through the middle of obstacles.

[0081] By optimizing the neighborhood search function of the A* algorithm, the present invention not only ensures the applicability of the planned path in actual scenarios, but also improves the accuracy of path planning. Drawing on the advantages of digital twin technology, the impact of obstacles on the indoor road network can be characterized by the node traffic status. A twin road network is established to dynamically update and feedback the traffic status of each indoor area in real time, and support the optimized neighborhood search function to search for path nodes, thereby realizing dynamic path planning that takes into account the impact of obstacles on the indoor map platform. By constructing a twin road network model and running the improved A* algorithm on the indoor map platform, the availability and effectiveness of the planned path will be further enhanced, forming a path planning method that superimposes twin road network information as shown in the following section.

[0082] 2. A new path planning method that improves the A* algorithm and superimposes twin road network information

[0083] The A* algorithm currently only uses static road network information for path planning. For complex indoor environments, the status of each segment of the road network is not fixed, and the expression of the road network is also diverse and flexible. Therefore, the improved A* algorithm will combine the characteristics of indoor path planning and superimpose twin road network information to meet the needs of path planning in complex indoor environments. To this end, the present invention designs a twin road network model, uses the improved A* algorithm to superimpose the twin road network information, and forms a new path planning method. In an indoor road network environment, according to the real-time status of each segment of the road network, the improved A* algorithm is driven to realize dynamic path planning, thereby improving the adaptability of the A* path planning algorithm to complex and changing environments.

[0084] 2.1 Twin Road Network Construction

[0085] A digital twin map is a digital map that combines physical entities in the real world with mathematical models in the virtual world. It reflects the real-time status and characteristics of various physical systems in the real world into the virtual world, and provides users with visual and interactive application interfaces to support various decision-making and application scenarios. Digital twin maps rely on technologies such as the Internet of Things, cloud computing, and big data to upload real-time data of physical systems collected by various sensors and monitoring equipment to the cloud for processing and analysis. Then, the processed data is integrated with the digital twin model to build a virtual model that reflects the physical world in real time.

[0086] The twin road network is an important part of the twin map. The positioning and navigation services of personnel and vehicles all require the use of the twin road network. First, a local coordinate system is established. The origin of the local coordinate system is the southwest corner of the ground grid. The x-axis is to the north along the grid line, and the y-axis is to the east. The unit length is m in the international unit system. The formula for converting between the local coordinate system and the reference coordinate system is:

[0087]

[0088]

[0089] Where l is the local coordinate system, r is the reference coordinate system, (X l ,Y l ) is the local coordinate system coordinate of a point, (X r ,Y r ) is the reference coordinate system coordinate corresponding to the point, is the coordinate of the origin of the local coordinate system in the reference coordinate system, is the rotation angle of the two coordinate systems.

[0090] Then, in the local coordinate system, based on the preset grid side length s, the ground is divided into multiple grids to obtain the ground road network grid, and a corresponding semantic information table is established for each road network grid, as shown in the attached figure. Figure 3 As shown in Figure 2, a twin road network model is established based on the road network grid and its semantic information table.

[0091] 2.2 Twin road network information superposition

[0092] As attached Figure 4 As shown in the figure, using the improved A* algorithm and superimposing the twin road network information, the basic process of realizing path planning in complex indoor environments is as follows:

[0093] (1) Use equation (9) to convert the coordinates of the starting point and the target point in the reference coordinate system into the coordinates in the local coordinate system. Calculate the grid codes of the starting point and the target point based on the coordinates of the starting point and the target point in the local coordinate system and the grid edge length. Take a single grid as a node to obtain the starting node and the target node. If the current node is the parent node, the nodes adjacent to and reachable from the current node are the child nodes. During the path search process, each node should store the grid code of the parent node, the grid code of the current node, the actual cost from the starting node to the current node, the estimated cost from the current node to the target node, etc., so that the path node sequence can be obtained by iteratively backtracking the parent node based on the current node. The parent node of the starting node is empty.

[0094] (2) Create a search node set openList, an extended node set closeList, and an adjacent node set adjacentList. The search node set is used to store the nodes that enter the search range. The extended node set is used to store the node with the minimum cost function value obtained from the search node set at each step. The adjacent node set is used to store the child nodes that are adjacent to and reachable from the current node.

[0095] (3) Set openList, closeList, and adjacentList to empty. Add the starting node to openList.

[0096] (4) Using the improved cost function FP(n), calculate the cost function values ​​of all nodes in openList and select the node lowestF with the smallest cost value.

[0097] (5) Move the lowestF node from openList to closeList as an extension node. Delete the lowestF node from openList. Set adjacentList to empty.

[0098] (6) If the lowestF node is the target node, use the lowestF node and closeList to iteratively trace back to the parent node to generate a path and end the search. If the lowestF node is not the target node, proceed to the next step.

[0099] (7) Take the lowestF node as the parent node and search for the adjacent child nodes. According to the child node grid code, retrieve the road network semantic information table of the corresponding grid. According to the user identity, read the traffic status of the child node from the corresponding road network semantic information table.

[0100] (8) According to the traffic status of all child nodes, process the child nodes according to the improved neighborhood search function, store the adjacent reachable child nodes in adjacentList, and record the relationship between the child node and the parent node.

[0101] (9) Calculate G(n) and HP(n) for each node in adjacentList.

[0102] (10) Determine whether each node in adjacentList already exists in openList. If not, add the node to openList; if it already exists and the current G(n) of the node is smaller, use the node to replace the existing node in openList.

[0103] (11) Determine whether the openList set is empty. If openList is empty, it means that the path does not exist and the search ends; otherwise, return to (4).

[0104] The path planning result is a node sequence. When applying the new method for dynamic road network planning, the grid code of the user can be calculated according to the user's real-time location coordinates to obtain the user's current node. If an obstacle is set in the road network, the coordinates of the obstacle can be used to obtain the grid code at the obstacle location, and the road network status in the corresponding grid semantic information table can be modified according to the obstacle grid code. The remaining node sequence from the user's current node to the target node is intercepted from the path planning result. Determine whether the obstacle grid code is included in the remaining node sequence. If not, continue to use the original planned path; otherwise, replan the path from the user's current node.

[0105] By adopting the above technical solution disclosed in the present invention, the following beneficial effects are obtained:

[0106] With the continuous expansion of human production and daily consumption activities, path planning and its navigation application scenarios have expanded from outdoor path determination environments to complex and changing indoor environments. Faced with open and dynamically changing indoor environments, how can map platforms provide effective, feasible, simple and easy-to-use planning paths, improve path search efficiency, and reduce the number of path turns? This has become a hot area for indoor path planning. The present invention proposes an improved path planning method for the problems of slow path generation speed, uncontrolled number of turns, and difficulty in path planning to cope with dynamic obstacles in traditional A* algorithms in complex indoor environments. First, the turning penalty factor is designed to improve the heuristic function of the A* algorithm, overcome the problems of low path planning efficiency and uncontrollable number of path turns in the traditional A* algorithm, effectively reduce the turning points in the path, and improve the path generation efficiency. Secondly, the twin road network is designed to improve the neighborhood search function of the A* algorithm. The improved new method superimposes real-time twin road network information, further enhances the adaptability of path planning, and makes up for the deficiency that the traditional A* algorithm is difficult to perform dynamic path planning. The new method can update the path in time according to the changes in environmental information, and improves the availability of the path generation results.

[0107] Compared with the traditional A* algorithm, the new path planning method proposed in this paper improves the algorithm's operating efficiency, reduces the number of turns, can update the path according to the changes in the twin road network information, and realizes dynamic path planning in complex indoor environments. The improved A* algorithm can publish path planning services through the map platform. The new method generates fewer paths with fewer turns, which helps reduce the control burden of intelligent robots and autonomous driving equipment, thereby improving the service efficiency of navigation path planning in complex indoor environments.

[0108] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be considered as the scope of protection of the present invention.

Claims

1. A new path planning method using turn penalty factor and twin road network improvement, It is characterized in that The following steps are involved: S1, converting the coordinates of the starting point and the target point in the reference coordinate system into the coordinates in the local coordinate system; calculating the grid codes of the starting point and the target point according to the coordinates of the starting point and the target point in the local coordinate system and the grid side length; Take a single grid as a node to get the starting node and the target node; If the current node is a parent node, the nodes that are adjacent to and reachable from the current node are child nodes; During the path search process, each node should store the grid code of the parent node, the grid code of the current node, the actual cost from the starting node to the current node, and the estimated cost from the current node to the target node, so that the path node sequence can be obtained by iteratively tracing back the parent node according to the current node; the parent node of the starting node is empty; S2, create a search node set openList, an extended node set closeList, and an adjacent node set adjacentList; the openList is used to store the nodes that enter the search range; the closeList is used to store the node with the minimum cost function value that is selected from the openList at each step; the adjacentList is used to store the child nodes that are adjacent to and reachable from the current node; S3, setting the openList, the closeList, and the adjacentList to empty; Add the starting node to the openList; S4, using the cost function FP(n), calculating the cost function values ​​of all nodes in the openList; selecting the node lowestF with the smallest cost value; The cost function FP(n) described in step S4 is an improved cost function FP(n), and a turning penalty factor is introduced in the process of obtaining the improved cost function FP(n); The method for obtaining the improved cost function FP(n) is specifically as follows: First, determine whether a turn occurs from the current node to the next node: In the formula, (x curren t,y current ), (x previous ,y previous ), (x next ,y next ) are the plane coordinates of the current node and its parent node and child node, respectively. The child node refers to the node expanded from the current node; (dx 1 ,dy 1 ) and (dx 2 ,dy 2 ) represent the vectors from the parent node to the current node and from the current node to its child nodes, s 1 and 2 Respectively represent the magnitudes of these two vectors; cosA is the function value used to determine whether the current node has turned. Its physical meaning is the cosine value of the angle between two vectors, and its value range is cosA∈[-1,1]; If |cosA-1|≤10 -8 , indicating that the cosine value of the angle between the two vectors is very close to 0, and the angle between the two vectors is approximately 0, indicating that no turn occurs at the node. Otherwise, it indicates that the angle between the two vectors is greater than zero, that is, a turn occurs at the node; After determining whether the current node turns, construct the turning penalty factor p: In the formula, G(next) represents the actual cost from the starting node to the next node, and H 0 It represents the initial cost from the next node to the target node, which can be calculated by the Euclidean distance between the two nodes: In the formula, (x next ,y next ), (x goal ,y goal ) represent the plane coordinates of the child node next and the target node goal respectively; the penalty factor is applied to the estimated cost H(next) of its child node next to obtain the improved heuristic function: HP(next)=H 0 ×p (4) If the next node is recorded as n, the improved heuristic function is used to update the cost function to obtain the improved cost function: FP(n)=G(n)+HP(n) (5) S5, moving the lowestF node from the openList to the closeList as an extended node; deleting the lowestF node from the openList; and setting the adjacentList to be empty; S6, if the lowestF node is the target node, then using the lowestF node and the closeList, iteratively backtracking the parent node to generate a path, and ending the search; if the lowestF node is not the target node, proceed to the next step; S7, taking the lowestF node as the parent node, searching for adjacent child nodes; searching the road network semantic information table of the corresponding grid according to the grid code of the child node; reading the traffic status of the child node from the corresponding road network semantic information table according to the user identity; S8, according to the traffic status of all child nodes, process the child nodes according to the neighborhood search function, store the adjacent reachable child nodes into the adjacentList; and record the relationship between the child nodes and the parent node; S9, calculating G(n) and HP(n) of each node in the adjacentList; S10, determining whether each node in the adjacentList already exists in the openList; If it does not exist, add the node to the openList; If it already exists, and the current G(n) of the node is smaller, then the node is used to replace the existing node in the openList; S11, determine whether the openList set is empty; if the openList is empty, it means that the path does not exist, and the search ends; Otherwise, return to step S4.

2. The new path planning method using a turning penalty factor and a twin road network improvement according to claim 1, It is characterized in that The path planning result is a node sequence.

3. The new path planning method using a turning penalty factor and a twin road network improvement according to claim 1, It is characterized in that When performing dynamic road network planning, the grid code of the user can be calculated based on the user's real-time location coordinates to obtain the user's current node; if an obstacle is set in the road network, the coordinates of the obstacle can be used to obtain the grid code at the obstacle location, and the road network status in the corresponding grid semantic information table can be modified according to the obstacle grid code; The remaining node sequence from the user's current node to the target node is intercepted from the path planning result; whether the remaining node sequence contains the obstacle grid code is determined, if not, the original planned path is continued to be used; otherwise, the path is replanned from the user's current node.

4. The new path planning method using a turning penalty factor and a twin road network improvement according to claim 1, It is characterized in that The turning penalty factor of the node next is calculated from two distances; the first distance is the actual distance from the current node to the starting node, and the second distance is the Euclidean distance from the current node to the target node; if there is no turning between the current node and the next node, the penalty factor value is 1, and the heuristic function remains unchanged; If a turn occurs between the current node and the next node, the penalty factor value range is p∈(1,2], and the heuristic function value will increase exponentially; a larger heuristic function value can guide the algorithm to search for path nodes in the direction with fewer turns.

5. The new path planning method using a turning penalty factor and a twin road network improvement according to claim 1, It is characterized in that The closer the current node is to the starting node, the larger the turning penalty factor is. In the initial stage of path planning, the improved heuristic function will prompt the path search to advance toward the target point in a straight line as much as possible, thereby effectively reducing the number of turns. Fewer turns will significantly compress the path nodes, and fewer path nodes further reduce the amount of path search calculations. Smaller calculations can save more time on path search and improve path search efficiency.

6. The new path planning method using a turning penalty factor and a twin road network improvement according to claim 1, It is characterized in that If the current node is closer to the target point, the penalty factor value gradually regresses to 1, and the penalty effect gradually weakens; in the final stage of path planning, the current node should be closed towards the target point as much as possible; the primary goal of the final stage of path planning is to close the route to the target point, and the penalty factor for the number of turns in this stage should be appropriately subject to the route closure goal; at this time, the amplification effect of the turning penalty factor is appropriately weakened to prompt the route search to close towards the target point as soon as possible.

7. The new path planning method using a turning penalty factor and a twin road network improvement according to claim 1, It is characterized in that The neighborhood search function described in step S8 is an improved neighborhood search function, and the processing flow of the improved neighborhood search function is: 1) adding obstacle judgment of nodes in four directions of up, down, left and right on the basis of the original neighborhood search function; 2) if the current node is an obstacle upward, regardless of whether the upper left and upper right nodes of the current node are reachable, it will no longer be included in the set of adjacent reachable nodes; 3) handling obstacles in other directions in the same way as 2); to avoid path search passing through the middle of obstacles.

8. The new path planning method using a turning penalty factor and a twin road network improvement according to claim 1, It is characterized in that The specific process of converting the coordinates in the reference coordinate system into the coordinates in the local coordinate system and constructing the twin road network is as follows: First, a local coordinate system is established. The origin of the local coordinate system is the southwest corner of the ground grid. The x-axis is to the north along the grid line, and the y-axis is to the east. The unit length is m in the international unit system. The formula for mutual conversion between the local coordinate system and the reference coordinate system is: Where l is the local coordinate system, r is the reference coordinate system, (X l ,Y l ) is the local coordinate system coordinate of a point, (X r ,Y r ) is the reference coordinate system coordinate corresponding to the point, is the coordinate of the origin of the local coordinate system in the reference coordinate system, is the rotation angle of the two coordinate systems.