Path generation method and device, equipment, medium and program product
By constructing regional grids and iteratively optimizing path planning methods, combined with global turning costs, safe, smooth, and efficient paths are generated, solving the problems of low safety and efficiency in existing path planning technologies.
Patent Information
- Application Number
- CN202410939201.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2026-01-13
AI Technical Summary
Existing path planning methods have too many turning points and do not consider the specific size of movable objects and environmental conditions, resulting in poor driving safety, easy getting trapped in local optima, large computational load, and poor convergence.
A regional mesh is constructed based on the driving area of the movable object. The motion trajectory is simulated by performing iterations through multiple moving elements. The path is optimized by combining global turning cost and pheromone table to generate a smooth and safe target path.
It improves the safety and efficiency of path planning, avoids pheromone dispersion, reduces computational load, ensures the rapid finding of the globally optimal path, and enhances the reliability and smoothness of path planning.
Smart Images

Figure CN121325846A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer technology, the technical field of Internet of Vehicles, and the technical field of intelligent driving, and more particularly, to a path generation method, device, equipment, medium and program product. BACKGROUND
[0002] Intelligent driving technology is undergoing rapid development and evolution, among which, path planning has also become one of the most important and key technologies. The intelligent path planning method can also be applied to various industries to solve specific problems in various fields. For example, logistics transportation, agricultural operation, environmental protection, catering service, and daily travel, etc.
[0003] In the process of implementing the present disclosure concept, the inventors found that at least the following problems exist in the related art. The conventional path planning method provides a large number of path turning points, does not take into account the specific size of the movable object in unmanned driving and the environmental conditions when driving, and a large number of turning points are often not conducive to the safety of driving. In addition, the conventional path planning method is prone to local optimization and has poor convergence, resulting in a large amount of calculation. SUMMARY
[0004] Therefore, the present disclosure provides a path generation method, device, equipment, medium and program product.
[0005] One aspect of the present disclosure provides a path generation method, comprising:
[0006] According to an embodiment of the present disclosure, N region grids are constructed based on a driving area of a movable object, wherein the N region grids correspond to N nodes, the nodes are marked with position information, N is a positive integer, and the N nodes are connected to form a region grid graph;
[0007] A plurality of movement elements are constructed, so that the plurality of movement elements perform a plurality of iterations to simulate a movement trajectory of the movable object from a starting node to an end node, wherein the position information of the starting node corresponds to a starting position of the movable object, and the position information of the end node corresponds to an end position of the movable object;
[0008] In response to satisfying an iteration termination condition, a plurality of target nodes through which the movement element reaches the end node are output as a target path of the movable object;
[0009] Wherein, after completing any one of the plurality of iterations, the following operations are performed:
[0010] A current optimal path corresponding to the current iteration is determined;
[0011] A current global turning cost of the current optimal path is calculated;
[0012] Based on the historical global pheromone table generated in the previous iteration and the current global turning cost, an updated global pheromone table is generated for executing the next iteration, so that the moving element can use the updated global pheromone table to execute the next iteration. The global pheromone table includes the node pheromone values corresponding to N nodes.
[0013] According to embodiments of this disclosure, calculating the current global turning cost of the current optimal path includes:
[0014] Obtain the global turning angle and global number of turns for each turn the moving element makes while moving along the current optimal path.
[0015] Calculate the current global turning cost of the current optimal path based on the global turning angle and the number of global turns.
[0016] According to embodiments of this disclosure, generating an updated global pheromone table for performing the next iteration, based on the historical global pheromone table generated in the previous iteration and the current global turning cost, includes:
[0017] Read the historical node pheromone values of each of the current optimal nodes included in the current optimal path from the historical global pheromone table to generate the historical path pheromone of the current optimal path;
[0018] Based on the current global turning cost and historical path pheromones, generate updated path pheromones for the current optimal path;
[0019] The historical global pheromone table is updated based on the updated path pheromone, and an updated global pheromone table is generated.
[0020] According to embodiments of this disclosure, performing any one of a plurality of iterations includes the following operations:
[0021] In response to a mobile element reaching the current node, the next node is determined from M candidate nodes so that the mobile element moves to the next node, until each mobile element reaches the destination node, completing the current iteration. The candidate nodes are: the remaining nodes among the N nodes excluding the nodes already visited by the mobile element, where M is a positive integer and M is less than N.
[0022] According to embodiments of this disclosure, determining the next node from M candidate nodes includes:
[0023] Based on the minimum path cost and / or local turning cost of each of the M candidate nodes, heuristic information for each of the M candidate nodes is generated. The minimum path cost is used to characterize the minimum distance that the mobile element is to travel during the movement of the reference path, which includes at least the starting node, the candidate node, and the ending node. The local turning cost is used to characterize the degree of curvature of the turning that the mobile element is to make during the process of moving from the previous node to the current node and further to the candidate node.
[0024] Read the historical pheromone values of each of the M candidate nodes from the historical global pheromone table;
[0025] Based on heuristic information and pheromone values of historical nodes, determine the next node from M candidate nodes.
[0026] According to embodiments of this disclosure, the path generation method further includes:
[0027] Calculate the first path cost from the starting node to the candidate node;
[0028] Calculate the second path cost from the candidate node to the destination node;
[0029] The minimum path cost corresponding to the candidate node is calculated based on the first path cost and the second path cost.
[0030] According to embodiments of this disclosure, the path generation method further includes:
[0031] Get the number of local turns that a mobile element plans to make during its movement from the previous node to the current node and further to the candidate node.
[0032] Get the local turning angle of the mobile element as it moves from the previous node to the current node and further to the candidate node;
[0033] The local turning cost of the candidate node is calculated based on the number of local turns and the local turning angle.
[0034] According to embodiments of this disclosure, determining the current optimal path corresponding to the current iteration includes:
[0035] Read the nodes that each of the multiple moving elements passes through from its starting node to its ending node in the current iteration, and use them as multiple candidate paths;
[0036] Calculate the total path cost for each candidate path;
[0037] Based on the total path cost, the current optimal path is determined from multiple candidate paths.
[0038] According to embodiments of this disclosure, the path generation method further includes:
[0039] In response to a mobile element moving to a deadlocked node and falling into a deadlock state, instruct the mobile element to roll back to the previous node to escape the deadlock state;
[0040] Store the node information of deadlocked nodes in a tabu table.
[0041] According to embodiments of this disclosure, the path generation method further includes:
[0042] Before a moving element moves from the current node to the next node, the tabu list is used to determine whether the moving element will fall into a deadlock state at the next node.
[0043] According to embodiments of this disclosure, the path generation method further includes:
[0044] Obtain the collision cost, curvature cost, and smoothing cost of the target path;
[0045] Establish an objective function based on collision cost, curvature cost, and smoothing cost;
[0046] Based on the objective function, the position information of multiple target nodes is optimized to generate multiple smooth nodes, which serve as smooth paths for movable objects.
[0047] According to embodiments of this disclosure, the path generation method further includes:
[0048] Interpolation is performed on multiple smooth nodes to generate multiple continuous nodes, which serve as a continuous smooth path for the movable object.
[0049] Another aspect of this disclosure provides a path generation apparatus, comprising: a first construction module for constructing N region grids based on the travel area of a movable object, wherein the N region grids correspond to N nodes, the nodes are marked with location information, and N is a positive integer;
[0050] The second construction module is used to construct multiple mobile elements so that multiple iterations are performed through multiple mobile elements to simulate the motion trajectory of a movable object from the starting node to the ending node. The position information of the starting node corresponds to the starting position of the movable object, and the position information of the ending node corresponds to the ending position of the movable object.
[0051] The output module is used to output the multiple target nodes that the moving element passes through to reach the endpoint node in response to the fulfillment of the iteration termination condition, as the target path of the movable object.
[0052] After completing any one of the multiple iterations, the following operations are performed:
[0053] Determine the current optimal path corresponding to the current iteration;
[0054] Calculate the current global turning cost of the current optimal path;
[0055] Based on the historical global pheromone table generated in the previous iteration and the current global turning cost, an updated global pheromone table is generated for executing the next iteration, so that the moving element can use the updated global pheromone table to execute the next iteration. The global pheromone table includes the node pheromone values corresponding to N nodes.
[0056] Another aspect of this disclosure provides an electronic device, comprising:
[0057] One or more processors;
[0058] Memory, used to store one or more programs.
[0059] Specifically, when one or more programs are executed by one or more processors, the one or more processors implement the above method.
[0060] Another aspect of this disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed, are used to implement the methods described above.
[0061] Another aspect of this disclosure provides a computer program product including computer-executable instructions that, when executed, are used to implement the methods described above.
[0062] In the embodiments of this disclosure, only the pheromones of each node on the optimal path are updated after each iteration. This ensures that the pheromones on the optimal path gradually increase, increasing the attractiveness for other moving elements to find this optimal path. Compared to traditional path planning algorithms, updating only the pheromones on the optimal path maintains the concentration of pheromones and avoids the problem of pheromone dispersion at each node caused by updating the pheromones of all nodes. This is beneficial for finding the optimal path quickly, improving the convergence speed, and reducing the computational cost of updating the pheromones of each node, thus improving the efficiency of path planning. On the other hand, considering only whether it is the optimal path may lead to the path planning getting stuck in a local optimum, resulting in an unsmooth path. For example, when there are frequent turns or sharp turns on the path, it is not conducive to driving safety. To avoid the above problems, the embodiments of this disclosure incorporate a global turning cost. By considering the turning cost and the optimal path, multi-objective optimization is achieved. That is, multiple aspects of optimization of the optimal path and path smoothness can be achieved to obtain a globally optimal path that is safe to drive and easy to operate, thus improving the reliability of the path planning algorithm. Attached Figure Description
[0063] The above and other objects, features and advantages of this disclosure will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0064] Figure 1 This illustration schematically shows an exemplary system architecture to which the path optimization method and apparatus of the present disclosure can be applied;
[0065] Figure 2 A flowchart illustrating a path generation method according to an embodiment of the present disclosure is shown schematically.
[0066] Figure 3 A schematic diagram of a region grid according to an embodiment of the present disclosure is shown;
[0067] Figure 4 A schematic diagram of a candidate node according to an embodiment of the present disclosure is shown;
[0068] Figure 5 A flowchart illustrating a method for determining the next node according to an embodiment of the present disclosure is shown schematically.
[0069] Figure 6 A schematic diagram illustrating a deadlock state according to an embodiment of the present disclosure is shown.
[0070] Figure 7 A flowchart illustrating a method for escaping a deadlock state according to an embodiment of the present disclosure is shown schematically.
[0071] Figure 8 A flowchart illustrating a path generation method according to another embodiment of the present disclosure is shown schematically;
[0072] Figure 9 A block diagram schematically illustrates a path generation apparatus according to embodiments of the present disclosure; and
[0073] Figure 10 A block diagram of an electronic device suitable for implementing the path generation method described above, according to an embodiment of the present disclosure, is shown schematically. Detailed Implementation
[0074] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0075] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0076] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0077] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0078] In the embodiments disclosed herein, the collection, updating, analysis, processing, use, transmission, provision, disclosure, and storage of data (e.g., including but not limited to user personal information) comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures have been taken to prevent unauthorized access to user personal information data and to safeguard user personal information security and network security.
[0079] In the embodiments disclosed herein, user authorization or consent is obtained before acquiring or collecting user personal information.
[0080] Paths obtained using traditional path planning methods may contain a large number of bends and a large cumulative bending angle, which is detrimental to driving safety and maneuverability. On the other hand, traditional path planning methods often converge prematurely due to getting trapped in local optima, failing to find the globally optimal path, and their global search capabilities need improvement; or, they require a long search time, resulting in slow convergence speed and low path planning efficiency.
[0081] In view of this, embodiments of the present disclosure provide a path generation method, including:
[0082] N region grids are constructed based on the driving area of the movable object, where N region grids correspond to N nodes, and the nodes are marked with location information, and N is a positive integer;
[0083] Construct multiple movement elements to simulate the motion trajectory of a movable object from the starting node to the ending node by performing multiple iterations through multiple movement elements. The position information of the starting node corresponds to the starting position of the movable object, and the position information of the ending node corresponds to the ending position of the movable object.
[0084] In response to the fulfillment of the iteration termination condition, the multiple target nodes that the moving element passes through to reach the endpoint node are output as the target path of the movable object.
[0085] After completing any one of the multiple iterations, the following operations are performed:
[0086] Determine the current optimal path corresponding to the current iteration;
[0087] Calculate the current global turning cost of the current optimal path;
[0088] Based on the historical global pheromone table generated in the previous iteration and the current global turning cost, an updated global pheromone table is generated for executing the next iteration, so that the moving element can use the updated global pheromone table to execute the next iteration. The global pheromone table includes the node pheromone values corresponding to N nodes.
[0089] Figure 1 The illustration schematically depicts an exemplary system architecture to which the path optimization method and apparatus of this disclosure can be applied. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, in order to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments or scenarios.
[0090] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a movable object 101, a network 102, and a server 103. The network 102 serves as a medium for providing a communication link between the movable object 101 and the server 103. The network 102 may include various connection types, such as wired and / or wireless communication links, etc.
[0091] The movable object 101 interacts with the server 103 via the network 102 to receive or send messages, etc. The movable object 101 can be of various types, such as unmanned or manned movable objects, such as driverless vehicles, manned vehicles, unmanned robots, manned robots, etc.
[0092] In the scenario of this embodiment, when the movable object 101 is traveling in a certain driving area, it can interact with the server 103, for example, sending its current location information, destination, environmental information, etc. to the server and requesting the optimal driving route. The server 103 executes the path optimization method of this embodiment, such as first constructing a regional grid based on the driving area of the movable object, and constructing multiple mobile elements, further performing multiple iterations through the multiple mobile elements to simulate the movement trajectory of the movable object from the starting node to the ending node, and determining the target path of the movable object according to the iteration termination condition, and sending the final target path information to the movable object 101 so as to instruct the movable object 101 to move according to the path.
[0093] It should be noted that the path generation method provided in this embodiment can generally be executed by server 103. Correspondingly, the path generation device provided in this embodiment can generally be located in server 103. The path generation method provided in this embodiment can also be executed by a server or server cluster that is different from server 103 and capable of communicating with the movable object 101 and / or server 103. Correspondingly, the path generation device provided in this embodiment can also be located in a server or server cluster that is different from server 103 and capable of communicating with the movable object 101 and / or server 103. Alternatively, the path generation method provided in this embodiment can also be executed by an electronic device in the movable object 101, or by a terminal device different from the electronic device in the movable object 101. Correspondingly, the path generation device provided in this embodiment can also be located in an electronic device in the movable object 101, or in a terminal device different from the electronic device in the movable object 101.
[0094] It should be understood that Figure 1 The number of movable objects, networks, and servers shown is merely illustrative. Depending on implementation needs, there can be any number of terminal devices, networks, and servers.
[0095] Figure 2 A flowchart illustrating a path generation method according to an embodiment of the present disclosure is shown schematically.
[0096] like Figure 2 As shown, the method includes operations S210~S230.
[0097] In operation S210, N region grids are constructed based on the driving area of the movable object. The N region grids correspond to N nodes, and the nodes are marked with location information. N is a positive integer.
[0098] In the embodiments of this disclosure, the movable object is a movable object that is either unmanned or manned, such as an unmanned vehicle, a manned vehicle, an unmanned robot, a manned robot, etc.
[0099] Specifically, Figure 3 A schematic diagram of a region grid according to an embodiment of the present disclosure is shown. Figure 3 As shown, an I×J region grid can be constructed based on the intended driving area of the movable object, where I and J are both greater than 0. In the embodiments of this disclosure, I×J=N. Using this region grid to simulate the actual driving scenario of the movable object, obstacles can be represented by gray grids and / or the number 1, and movable / driving grids can be represented by white grids and / or the number 0.
[0100] Each grid cell in the region grid is defined as a node. The grid model is placed in a two-dimensional coordinate system, and each grid cell is labeled using a sequence number method to obtain the position information of the node corresponding to each grid cell, such as coordinate information (x, y). The start node and end node can be selected based on the position information of each grid cell.
[0101] For any grid with grid number R in the I×J region grid, the coordinate information of its grid R can be calculated according to the following formula (1).
[0102] Formula (1)
[0103] Where R is the grid number of any grid, N is the total number of grids, mod is the remainder operation used to calculate the remainder when two numbers are divided, and the ceil function rounds the calculated real number to the nearest integer that is not less than the real number.
[0104] In the embodiments of this disclosure, the mesh construction method is relatively simple and effective for creating and maintaining mesh models, and the mesh method has strong adaptability to obstacles and is easy for computers to store and process.
[0105] In operation S220, multiple mobile elements are constructed so that multiple iterations are performed through multiple mobile elements to simulate the motion trajectory of a movable object from the starting node to the ending node. The position information of the starting node corresponds to the starting position of the movable object, and the position information of the ending node corresponds to the ending position of the movable object.
[0106] In the embodiments of this disclosure, the method for generating a motion trajectory by simulating the movement of a movable object from the starting node to the ending node through iterative execution of mobile elements can be achieved by using a path planning algorithm to calculate feasible paths for each mobile element from the starting node to the ending node. The path planning algorithm is not limited to any particular type; it can be one of many different types, such as path planning algorithms based on A* algorithm, ant colony algorithm, greedy algorithm, heuristic path planning, best-first search algorithm, graph search-based motion planning methods, probabilistic landmark algorithms, and fast search random tree algorithms. It should be noted that the algorithms and other existing industry solutions mentioned in the embodiments of this disclosure should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.
[0107] In embodiments of this disclosure, such as Figure 3 As shown, in the region mesh, a movable object can travel from starting node 1 to ending node 18 via multiple paths (not all paths are shown in the figure). By constructing multiple mobile elements, each simulating travel on a permissible path, the possibilities of all possible trajectories for the movable object to travel from starting node 1 to ending node 18 can be simulated. For example... Figure 3 As shown: Mobile element 1 travels from starting node 1 to ending node 18 via the first path: 1-6-11-16-17-18; Mobile element 2 travels via the second path: 1-2-7-12-17-18; Mobile element 3 travels via the third path: 1-2-3-8-9-10-15-20-25-24-23-18. Since the starting node of the movable object is 1, all mobile elements should also start from node 1; since the ending node of the movable object is 18, the target node for each of the mobile elements should also be node 18.
[0108] In operation S230, in response to the fulfillment of the iteration termination condition, the multiple target nodes that the moving element passes through to reach the endpoint node are output as the target path of the movable object.
[0109] In the embodiments of this disclosure, during the process of a mobile element simulating a movable object moving from a starting node to an ending node, each mobile element selects the next node to be traveled to, until all mobile elements have moved to the ending node. The iteration termination condition can be that all mobile elements have completed the construction of their motion trajectories, or that a preset iteration count limit has been reached. Upon iteration termination, each mobile element corresponds to a path, and one or more paths can be selected from the paths corresponding to each mobile element as the final target path. For example, the initial selection might yield paths such as... Figure 3The first path shown is the target path 1-6-11-16-17-18, which the mobile element 1 passes through from the starting node 1 to the ending node 18.
[0110] In the embodiments of this disclosure, a global pheromone table for N nodes is pre-constructed, comprising the pheromone values corresponding to each of the N nodes. In each iteration, the mobile element performs path planning based on the pheromone values of each node in the global pheromone table. After completing any iteration (e.g., the k-th iteration), the pheromone table needs to be updated so that path planning can be performed according to the updated pheromone table in the next iteration. Specifically, the following operations are performed:
[0111] Determine the current optimal path corresponding to the current (kth) iteration;
[0112] Calculate the current global turning cost of the current optimal path generated in the k-th iteration;
[0113] Based on the historical global pheromone table generated by the previous iteration (k-1) and the current global turning cost obtained by the k-th iteration, an updated global pheromone table is generated for executing the next iteration (k+1), so that the mobile element can use the updated global pheromone table to execute the next iteration (k+1). The global pheromone table includes the node pheromone values corresponding to N nodes.
[0114] In the embodiments of this disclosure, taking the current iteration number as the k-th iteration as an example, the current optimal path obtained in the k-th iteration is determined, and the global turning cost of the current optimal path is calculated. Further, the global pheromone table generated in the (k-1)-th iteration is defined as the historical global pheromone table. Based on the pheromone values of each node in the historical global pheromone table generated in the (k-1)-th iteration and the current global turning cost of the current optimal path generated after the k-th iteration, the historical global pheromone table generated in the (k-1)-th iteration is updated to obtain the updated global pheromone table generated in the k-th iteration.
[0115] In the embodiments of this disclosure, since only the global turning cost of the optimal path in the k-th iteration needs to be calculated in the k-th iteration, the updated global pheromone table generated in the k-th iteration differs from the historical global pheromone table generated in the (k-1)-th iteration only in the pheromone content of each node in the optimal path. For example, only the pheromones of nodes 1, 6, 11, 16, 17, and 18 on the first path are updated, while the pheromones of other nodes, such as 2, 7, 12, 3, 8, and 9, remain the same as those in the (k-1)-th iteration.
[0116] In the embodiments of this disclosure, only the pheromones of each node on the optimal path are updated after each iteration. This ensures that the pheromones on the optimal path gradually increase, increasing the attractiveness for other moving elements to find this optimal path. Compared to traditional path planning algorithms, updating only the pheromones on the optimal path maintains the concentration of pheromones and avoids the problem of pheromone dispersion at each node caused by updating the pheromones of all nodes. This is beneficial for finding the optimal path quickly, improving the convergence speed, and reducing the computational cost of updating the pheromones of each node, thus improving the efficiency of path planning. On the other hand, considering only whether it is the optimal path may lead to the path planning getting stuck in a local optimum, resulting in an unsmooth path. For example, when there are frequent turns or sharp turns on the path, it is not conducive to driving safety. To avoid the above problems, the embodiments of this disclosure incorporate a global turning cost. By considering the turning cost and the optimal path, multi-objective optimization is achieved. That is, multiple aspects of optimization of the optimal path and path smoothness can be achieved to obtain a globally optimal path that is safe to drive and easy to operate, thus improving the reliability of the path planning algorithm.
[0117] In the embodiments of this disclosure, determining the current optimal path corresponding to the current iteration includes steps 11 to 13.
[0118] In step 11, the nodes that each of the multiple moving elements passes through from its starting node to its ending node in the current iteration are read as multiple candidate paths.
[0119] In the embodiments of this disclosure, all paths that can be traveled from the starting node to the ending node can be considered as candidate paths. For example... Figure 3 As shown, the starting node is 1 and the ending node is 18. There can be multiple candidate paths from the starting node 1 to the ending node 18, for example... Figure 3 The three candidate paths in the figure can also be other candidate paths not shown in the figure, such as 1-6-7-12-17-22-23-18.
[0120] In step 12, the total path cost of each candidate path is calculated.
[0121] In the embodiments of this disclosure, the total path cost is the sum of the path costs of each candidate path from the starting node to the ending node. The total path cost can be a distance cost representing the length of the journey in the candidate path, or an obstacle cost representing the number of obstacles in the candidate path, etc. The calculation of the total path distance cost is used as an example for illustrative explanation.
[0122] Specifically, calculate the total path distance cost for each candidate path. Calculate the sum of the distances between any two points along the path from the starting node to the ending node for each candidate path. For example, formula (2) or formula (3):
[0123] Total path distance cost = Formula (2)
[0124] Total path distance cost = Formula (3)
[0125] in, Let i be the number of any node i in each candidate path. Let Z be the number of the node preceding node i, and Z be the total number of nodes in each candidate path.
[0126] In step 13, the current optimal path is determined from multiple candidate paths based on the total path cost.
[0127] In the embodiments of this disclosure, when the total path cost is the total path distance cost, the candidate path with the minimum total path distance cost can be determined from multiple candidate paths as the current optimal path; or, the candidate path with a total path distance cost less than a threshold can be determined from multiple candidate paths as the current optimal path, etc. When the total path cost is the total path obstacle cost, the candidate path with the minimum total path obstacle cost can be determined from multiple candidate paths as the current optimal path; or, the candidate path with a total path obstacle cost less than a threshold can be determined from multiple candidate paths as the current optimal path, etc. The determined optimal path may be only one optimal path, or it may include multiple optimal paths.
[0128] In embodiments of this disclosure, calculating the current global turning cost of the current optimal path includes steps 21 and 22.
[0129] In step 21, obtain the global turning angle and the number of global turns corresponding to the multiple turns the moving element makes during the movement along the current optimal path.
[0130] In the embodiments of this disclosure, the global turning angle is the sum of all turning angles from the starting node to the ending node on the current optimal path, or the average of all turning angles; the global number of turns is the sum of all the number of turns from the starting node to the ending node on the current optimal path.
[0131] For example, taking an optimal path as an example, it is calculated that there are 5 turns from the starting node to the ending node on the optimal path, with turning angles of 15°, 15°, 90°, 180° and 60° respectively. Therefore, the global turning angle of the optimal path is 360° (or 72°) and the global number of turns is 5.
[0132] In step 22, the current global turning cost of the current optimal path is calculated based on the global turning angle and the number of global turns.
[0133] In the embodiments of this disclosure, the current global turning cost of the current optimal path is calculated based on the global turning angle and the number of global turns. See formula (4):
[0134] Formula (4)
[0135] in, This represents the global turning angle for the current optimal path. This represents the global number of turns for the current optimal path.
[0136] and These represent different weights, and the structure and motion settings of the movable object are analyzed. and Turning angles and the number of turns can be converted into grid lengths. Specifically,
[0137] and You can refer to formulas (5) and (6) respectively:
[0138] Formula (5)
[0139] Formula (6)
[0140] in, For a moving object, the constant velocity. The angular velocity of a movable object when it turns. This represents the acceleration and deceleration time for a movable object to rotate once. , , The values can be set based on experience or test data.
[0141] In the embodiments of this disclosure, by adding a global turning cost to the calculation of the global path cost, the path planning algorithm can easily select a smoother path with fewer turns, reducing sharp turns and frequent changes of direction in the path. Especially in complex environments, such as in narrow or crowded spaces, it helps to avoid collisions between moving objects and obstacles, thus solving the driving safety problem.
[0142] In the embodiments of this disclosure, after calculating the current global turning cost, an updated global pheromone table for performing the next iteration is generated based on the historical global pheromone table generated by the previous iteration and the current global turning cost, including steps 31 to 33.
[0143] In step 31, the historical node pheromone values of the current optimal nodes included in the current optimal path are read from the historical global pheromone table to generate the historical path pheromone of the current optimal path.
[0144] In the embodiments of this disclosure, after determining the current final path according to the above embodiments, each node on its optimal path can be defined as the current optimal node, and each node has its own pheromone value. For example... Figure 3 As shown, once the first path is determined to be the optimal path, nodes 1, 6, 11, 16, 17, and 18 on the first path can be considered as the current optimal nodes, and each node corresponds to a pheromone value. Further, based on the pheromone values of each node, the historical path pheromone of the current optimal path is generated. This can be achieved by summing the pheromone values of each node, or by weighted summation, etc., to obtain the historical path pheromone.
[0145] In step 32, based on the current global turning cost and historical path pheromones, an updated path pheromone for the current optimal path is generated.
[0146] In the embodiments of this disclosure, the path pheromone is updated according to formula (7):
[0147] Formula (7)
[0148] in, The updated path pheromone after the (k+1)th iteration. For pheromone evaporation rate, The pheromone of the historical path after the k-th iteration. The calculation can be referenced from formula (8):
[0149] Formula (8)
[0150] in, and All are constants greater than 1, set based on experience; This is the current optimal path. This represents the cost of a global turn in the current situation.
[0151] In the embodiments of this disclosure, in order to avoid getting trapped in a local optimum due to pheromone accumulation and thus losing the ability to further search the space, the updated path pheromone is limited to an upper and lower limit range, as can be seen in formula (9):
[0152] Formula (9)
[0153] In step 33, the historical global pheromone table is updated based on the updated path pheromone, and an updated global pheromone table is generated.
[0154] In the embodiments of this disclosure, after calculating the updated path pheromone according to the above formulas (7) to (9), the global pheromone table containing the updated path pheromone is updated to generate an updated global pheromone table. Compared with the historical global pheromone table, only the path pheromone corresponding to the optimal path changes in the updated global pheromone table.
[0155] Figure 4 A schematic diagram of a candidate node according to an embodiment of the present disclosure is shown.
[0156] In the embodiments of this disclosure, since a complete trajectory of the mobile element traveling from a starting node to an ending node cannot be represented in any iteration during the iteration process, only the trajectory of the mobile element traveling from the starting node to the current node can be obtained in any iteration, such as... Figure 4 As shown, the trajectory of the moving element from the starting node 1 to the current node 6 can be obtained (e.g., Figure 4 (The black part is shown in the middle). Further, it's necessary to move from the current node 6 to the next node to reach the destination node. Therefore, it's crucial to select appropriate candidate nodes for the next movement.
[0157] In embodiments of this disclosure, performing any one of multiple iterations includes the following operations:
[0158] In response to a mobile element reaching the current node, the next node is determined from M candidate nodes so that the mobile element moves to the next node, until each mobile element reaches the destination node, completing the current iteration. The candidate nodes are: the remaining nodes among the N nodes excluding the nodes already visited by the mobile element, where M is a positive integer and M is less than N.
[0159] In embodiments of this disclosure, such as Figure 4 As shown, for example, when a mobile element reaches node 6, it can choose multiple nodes as its next destination node, such as node 7 or node 11. Therefore, node 7 or node 11 can be considered as M candidate nodes for the mobile element. Further, a node is selected from candidate nodes 7 or 11 to proceed to, until each mobile element reaches the destination node, completing the current iteration.
[0160] In embodiments of this disclosure, minimum path cost is used to characterize the minimum distance a mobile element is to travel along a reference path that includes at least a start node, a candidate node, and an end node.
[0161] In the embodiments of this disclosure, calculating the minimum path cost includes steps 41 to 43.
[0162] In step 41, the first path cost from the starting node to the candidate node is calculated.
[0163] In step 42, the second path cost from the candidate node to the destination node is calculated.
[0164] In step 43, the minimum path cost corresponding to the candidate node is calculated based on the first path cost and the second path cost.
[0165] In the embodiments of this disclosure, the minimum path cost of all possible reference paths traversed by the mobile element is calculated based on the starting node, candidate nodes, and ending node. Specifically, s represents the starting node, n represents the candidate node, and g represents the ending node.
[0166] Specifically, the first path cost from the starting node to the candidate node is calculated according to formula (10); the second path cost from the candidate node to the ending node is calculated according to formula (11); and the minimum path cost corresponding to the candidate node is calculated according to formula (12).
[0167] Formula (10)
[0168] Formula (11)
[0169] Formula (12)
[0170] in, and The coordinates of the starting node s; and Let n be the coordinates of the candidate node. and Let g be the coordinates of the endpoint node g. This represents the actual cost from the starting node s to the candidate node n. Let n be the estimated cost from candidate node n to destination node g.
[0171] like Figure 4 As shown, the starting node is 1, the ending node is 18, and the moving element follows the path with candidate node 11, resulting in the first path 1-6-11-16-17-18; the moving element follows the path with candidate node 7, resulting in the second path 1-7-8-9-10-15-20-25-24-23-18. Calculations show that... Figure 4 The minimum path cost of the first path shown is less than the minimum path cost of the second path.
[0172] In embodiments of this disclosure, the local turning cost is used to characterize the degree of curvature of the turn to be made during the process of a mobile element moving from the previous node to the current node and further to a candidate node.
[0173] In the embodiments of this disclosure, calculating the local turning cost includes steps 51 to 53.
[0174] In step 51, the number of local turns to be made during the process of the mobile element moving from the previous node to the current node and further to the candidate node is obtained.
[0175] In step 52, the local turning angle to be turned is obtained during the process of the mobile element moving from the previous node to the current node and further to the candidate node.
[0176] In step 53, the local turning cost of the candidate node is calculated based on the number of local turns and the local turning angle.
[0177] In embodiments of this disclosure, such as Figure 3 As shown, for example, if the current node r is node 16, the number of local turns is the previous node. The angle between the line segment from node 11 to the current node r (node 16) and the line segment from the current node r (node 16) to the next node r+1 (node 17). The turning angle is the angle between the line segment from node 11 to node 16 and the line segment between node 16 and node 17, i.e., the turning angle is 90°, and the number of turns is 1.
[0178] In embodiments of this disclosure, Figure 3 The paths shown are for illustrative purposes only. In actual driving areas, paths may include more turning angles and the number of turns. For example, turning angles may be 10°, 25°, 30°, 45°, 90°, 150°, 180°, 270°, 360°, etc.
[0179] Specifically, the cost of a local turn is calculated based on the number of local turns and the local turn angle. Refer to the following formula (13).
[0180] Formula (13)
[0181] in, For the number of local turns, This represents the local turning angle. Among them, It is a coefficient that converts the number of turns into grid length. These are the coefficients that convert the turning angle into the grid length. These two coefficients can be pre-calculated based on the grid length.
[0182] Figure 5 A flowchart illustrating a method for determining the next node according to an embodiment of this disclosure is shown schematically. Figure 5 As shown, determining the next node from M candidate nodes includes operations S510 to S530.
[0183] In operation S510, heuristic information for each of the M candidate nodes is generated based on the minimum path cost and / or local turning cost corresponding to each of the M candidate nodes.
[0184] In the embodiments of this disclosure, the minimum path cost corresponding to each of the M candidate nodes can be used as a basis. Generate heuristic information for each of the M candidate nodes. That is, formula (12):
[0185] Formula (12)
[0186] The minimum path cost corresponding to each candidate node is calculated according to formula (12), and this minimum path cost is used as the heuristic information for each of the M candidate nodes. Alternatively, the heuristic information can be calculated by referring to formula (14):
[0187] Formula (14)
[0188] in, It is a constant greater than 1, set based on experience.
[0189] In embodiments of this disclosure, the minimum path cost may also be determined by differentiating the minimum path cost.
[0190] In the embodiments of this disclosure, the local turning costs corresponding to each of the M candidate nodes can be used as a basis. Generate heuristic information for each of the M candidate nodes. That is, formula (13):
[0191] Formula (13)
[0192] The local turning cost corresponding to each candidate node is calculated according to formula (13), and this local turning cost is used as the heuristic information for each of the M candidate nodes. Alternatively, the heuristic information can be calculated by referring to formula (15):
[0193] Formula (15)
[0194] In embodiments of this disclosure, the local turning cost may also be differentiated to determine the minimum value.
[0195] In the embodiments of this disclosure, heuristic information for each of the M candidate nodes can be generated based on the minimum path cost and local turning cost corresponding to each of the M candidate nodes. The heuristic information for each of the M candidate nodes is calculated using formula (16):
[0196] Formula (16)
[0197] In the embodiments of this disclosure, the heuristic information for each of the M candidate nodes is generated based on the minimum path cost and local turning cost corresponding to each of the M candidate nodes, and is not limited to the calculation method of the above formula (16). For example, it can also be that the minimum path cost and local turning cost corresponding to each of the M candidate nodes are summed; or, for another example, that the minimum path cost and local turning cost corresponding to each of the M candidate nodes are weighted and summed; and so on.
[0198] In operation S520, the historical node pheromone values of M candidate nodes are read from the historical global pheromone table.
[0199] In operation S530, the next node is determined from M candidate nodes based on heuristic information and pheromone values of historical nodes.
[0200] In the embodiments of this disclosure, the node with the smallest heuristic information value and the largest pheromone value of the historical node can be selected as the next node. If the heuristic information is determined based on the minimum path cost, then the current path cost is minimized when the heuristic information value is minimized; if the heuristic information is determined based on the local turning cost, then the current path local turning cost is minimized when the heuristic information value is minimized; if the heuristic information is determined based on both the minimum path cost and the local turning cost, then the current path is optimal under the combined evaluation of the path cost and the local turning cost when the heuristic information value is minimized. When the pheromone value of the historical node is maximized, it indicates that the current path has been selected by previous moving elements and is considered a good choice. Therefore, by balancing the two factors of heuristic information and pheromone, the probability of finding the globally optimal path can be increased, and the convergence speed can be accelerated.
[0201] In the embodiments of this disclosure, the shortest path for the current iteration is determined by calculating the distance. Furthermore, based on the shortest path, the global turning cost is further evaluated, allowing both distance and turning cost to be considered as objectives during the iteration process, thus avoiding getting trapped in local optima due to a single factor. Furthermore, to avoid pheromone dispersion across nodes, pheromone is optimized only on the optimal path, ensuring a gradual increase in pheromone levels on the optimal path, increasing the attractiveness for other moving elements to find this optimal path, and improving convergence speed. Simultaneously, to avoid getting trapped in local optima due to pheromone accumulation, the numerical range of updated pheromone is reasonably controlled using maximum and minimum values to improve spatial search capabilities.
[0202] In the embodiments of this disclosure, during path planning, a tabu list can be set up based on the nodes already visited by the mobile element to record the state of recently visited nodes. This prevents the mobile element from reselecting a node it has already selected, thus avoiding a loop and affecting path search efficiency. Due to the existence of the tabu list, when a mobile object encounters a complex network environment, especially when entering a network environment with many concave obstacles, it is prone to deadlock. That is, all traversable grids or nodes around it are recorded in the tabu list and are restricted from access or movement. At this time, the mobile element cannot select the next node, thus becoming deadlocked.
[0203] Figure 6 A schematic diagram illustrating a deadlock state according to an embodiment of the present disclosure is shown.
[0204] like Figure 6 As shown, when the moving element moves from the starting node 1 to the current node 13, since the tabu list restricts the selection of other surrounding nodes, the current node 13 is in a deadlock state because it cannot select to enter the next node.
[0205] Figure 7 A flowchart illustrating a method for escaping a deadlock state according to an embodiment of this disclosure is shown schematically.
[0206] like Figure 7 As shown, the method includes operation S710 and operation S720.
[0207] In operation S710, in response to a mobile element moving to a deadlocked node and falling into a deadlock state, the mobile element is instructed to roll back to the previous node to escape the deadlock state.
[0208] In embodiments of this disclosure, such as Figure 6 As shown, when the current node 13 becomes deadlocked, the moving element is instructed to roll back to the previous node 8. If the deadlock persists after one rollback, the rollback continues until the deadlock is resolved. Figure 6 As shown, when the rollback occurs twice at node 3, node 4 can be selected as the next node to terminate the rollback.
[0209] When operating the S720, the node information of the deadlocked node is stored in the tabu table.
[0210] In the embodiments of this disclosure, if the mobile element selects either node 8 or node 13, it will fall into a deadlock state. Therefore, node 8 and node 13 can be recorded in the taboo table to prevent other mobile elements from falling into deadlock again.
[0211] In the embodiments of this disclosure, the rollback mechanism allows deadlocked mobile elements to roll back to a mesh where the next node can be selected, thus achieving higher efficiency and fewer iterations. Furthermore, even when updating the mesh that caused the deadlock, it effectively prevents more mobile elements from frequently falling into deadlock.
[0212] In the embodiments of this disclosure, before a mobile element moves from the current node to the next node, a tabu list is used to determine whether the mobile element will fall into a deadlock state at the next node.
[0213] In the embodiments of this disclosure, according to the above embodiments, based on the historical path traversed by the mobile element, information of nodes that have been deadlocked within a specified interval is added to a taboo list so that the mobile element avoids selecting the taboo node and getting deadlocked in subsequent path planning. The node information in the taboo list is dynamically updated; when another node not included in the taboo list becomes deadlocked, its information is also added to the taboo list, thus achieving dynamic updating of the taboo list. When another mobile element needs to move to the same node (e.g., to...), Figure 6 As shown in node 3), at this point, node 8 or node 13 can also be candidate nodes. Therefore, we can first determine whether node 8 or node 13 is recorded in the taboo list. If it is, we can directly instruct the moving element not to select node 8 or node 13, but to directly select a node other than node 8 or node 13. For example... Figure 6 Node 4 in the diagram effectively reduces the probability of the mobile element getting stuck in deadlock.
[0214] In the embodiments of this disclosure, multiple target nodes have been determined according to the above embodiments, and a target path has been determined based on the multiple target nodes. Since the target path is formed by connecting a large number of target nodes, the connections between these nodes are not smooth enough. Therefore, gradient descent is used to optimize the multiple target nodes using an objective function.
[0215] In embodiments of this disclosure, the path generation method further includes steps 61 to 63.
[0216] In step 61, the collision cost, curvature cost, and smoothing cost of the target path are obtained;
[0217] In step 62, an objective function is established based on collision cost, curvature cost, and smoothing cost;
[0218] In step 63, based on the objective function, the position information of multiple target nodes is optimized to generate multiple smooth nodes as smooth paths for the movable object.
[0219] In embodiments of this disclosure, the objective function for minimizing the desired outcome is defined as a linear combination of three costs. These costs—collision cost, curvature cost, and smoothing cost—can be set based on the actual scenario and experience of the intended travel area of the movable object. By minimizing the desired outcome, the entire target path X is optimized for both safety and smoothness to obtain multiple smooth nodes. Safety can include avoiding collisions and obeying traffic rules; smoothness can include the continuity and absence of abrupt changes in the path. Specifically,
[0220] Formula (17)
[0221] in, These are collision cost, curvature cost, and smoothing cost, respectively. These are the corresponding weights, and X is the set of all nodes on the entire target path.
[0222] Furthermore, a collision-free and smooth target path can be found using gradient descent methods, such as conjugate gradient descent, batch gradient descent, and stochastic gradient descent. The algorithm converges by iteratively updating the discrete point values multiple times until the gradient is sufficiently small or a predetermined number of iterations is reached.
[0223] In the embodiments of this disclosure, a set of discrete path points is obtained through the gradient descent algorithm described above. These points may be sparsely distributed, meaning the distance between points is large. Due to the large distance between sparse path points, the path constructed using these points cannot meet the accuracy requirements of the target path. To solve the above problem, an interpolation method is needed to generate a continuous and smooth curve as the optimal path.
[0224] In the embodiments of this disclosure, multiple smooth nodes are interpolated to generate multiple continuous points, which serve as a continuous smooth path for the movable object. The interpolation method can be, for example, B-spline curves, Bézier curves, piecewise linear interpolation, or Catmull-Rom interpolation.
[0225] The following is an example of the algorithm for Catmull-Rom interpolation, including: selecting four consecutive points as a group for interpolation, ensuring that the smooth curve can pass through all nodes in the path. The following method for interpolating any group refers to formula (18):
[0226] Formula (18)
[0227] Where t is a parameter, which typically varies within the interval [0, 1]. These are the basis functions for Catmull-Rom interpolation. This is the weight matrix. These are the four consecutive points selected.
[0228] At the same time, in order for the curve to pass through the start and end nodes, the selection of the start and end nodes can be fine-tuned:
[0229] Formula (19)
[0230] in, As the starting node, This is the endpoint node.
[0231] In the embodiments of this disclosure, through interpolation processing, the generated path has a smooth transition between nodes without abrupt changes, ensuring the smoothness of the movable object's movement along the path and avoiding motion interruptions or jitter caused by path discontinuities. In real-time, dynamically changing environments, Catmull-Rom interpolation can quickly adjust the path to adapt to environmental changes and provide a reasonable driving path.
[0232] Figure 8 A flowchart illustrating a path generation method according to another embodiment of the present disclosure is shown schematically.
[0233] like Figure 8 As shown, the path generation method includes operations S810 to S880.
[0234] When operating the S810, the working environment is modeled using the mesh method, and the starting and ending nodes of the objects are given.
[0235] During the operation of S820, each mobile element is initialized, and relevant parameters such as the number of mobile elements are set.
[0236] When operating S830, the selected nodes are updated to the tabu list according to the iteration process.
[0237] In operation S840, it is determined whether the mobile element is in a deadlock state. If so, a rollback mechanism is used to free the mobile element from the deadlock state; otherwise, operation S850 is entered.
[0238] In operation S850, it is determined whether the mobile element has reached the destination node. If yes, operation S870 can be executed; otherwise, operation S860 is executed.
[0239] In operation S860, the next node is selected based on the pheromone and heuristic information calculated in the above embodiment.
[0240] In operation S870, it is determined whether the moving element has completed the search target during the iteration process, that is, operation S880 is executed.
[0241] In operation S880, after each iteration, it is checked whether the number of iterations satisfies the inequality N≤Nmax. If so, the path pheromone is updated and operation S890 is executed, i.e., it is checked whether the iteration termination condition is met. If not, the result can be output.
[0242] In operation S890, determine whether the iteration termination condition is met. If yes, the result can be output; otherwise, execute operation S830.
[0243] Figure 9 A block diagram of a path generation apparatus according to an embodiment of the present disclosure is shown schematically.
[0244] like Figure 9 As shown, the path generation device 900 includes a first building module 910, a second building module 920, and an output module 930.
[0245] The first construction module is used to construct N region grids based on the driving area of the movable object. The N region grids correspond to N nodes, and the nodes are marked with position information. N is a positive integer.
[0246] The second construction module is used to construct multiple mobile elements so that multiple iterations are performed through multiple mobile elements to simulate the motion trajectory of a movable object from the starting node to the ending node. The position information of the starting node corresponds to the starting position of the movable object, and the position information of the ending node corresponds to the ending position of the movable object.
[0247] The output module is used to output the multiple target nodes that the moving element passes through to reach the endpoint node in response to the fulfillment of the iteration termination condition, as the target path of the movable object.
[0248] After completing any one of the multiple iterations, the following operations are performed:
[0249] The first determining submodule is used to determine the current optimal path corresponding to the current iteration;
[0250] The first calculation submodule is used to calculate the current global turning cost of the current optimal path;
[0251] The first generation submodule is used to generate an updated global pheromone table for the next iteration based on the historical global pheromone table generated by the previous iteration and the current global turning cost, so that the moving element can use the updated global pheromone table to execute the next iteration. The global pheromone table includes the node pheromone values corresponding to N nodes.
[0252] In embodiments of this disclosure, the first calculation submodule includes an acquisition unit and a first calculation unit.
[0253] The acquisition unit is used to acquire the global turning angle and the number of global turns corresponding to the multiple turns traversed by the moving element during the process of moving along the current optimal path.
[0254] The first calculation unit is used to calculate the current global turning cost of the current optimal path based on the global turning angle and the number of global turns.
[0255] In the embodiments of this disclosure, the first generation submodule includes: a first reading unit, a first generation unit, and a second generation unit.
[0256] The first reading unit is used to read the historical node pheromone values of each of the multiple current optimal nodes included in the current optimal path from the historical global pheromone table, so as to generate the historical path pheromone of the current optimal path.
[0257] The first generation unit is used to generate the updated path pheromone of the current optimal path based on the current global turning cost and historical path pheromone.
[0258] The second generation unit is used to update the historical global pheromone table based on the updated path pheromone, and generate an updated global pheromone table.
[0259] In embodiments of this disclosure, the path generation apparatus 900 further includes: a determination module, configured to perform multiple iterations, wherein any one of the multiple iterations includes the following operations:
[0260] The determination module is used to determine the next node from M candidate nodes in response to the mobile element reaching the current node, so that the mobile element moves to the next node until each mobile element reaches the destination node and the current iteration is completed. The candidate nodes are: the remaining nodes in N nodes excluding the nodes already passed by the mobile element, M is a positive integer and M is less than N.
[0261] In embodiments of this disclosure, the determining module includes: a second generating submodule, a reading submodule, and a second determining submodule.
[0262] The second generation submodule is used to generate heuristic information for each of the M candidate nodes based on the minimum path cost and / or local turning cost corresponding to each of the M candidate nodes. The minimum path cost is used to characterize the minimum distance that the mobile element is to travel during the movement of the reference path, which includes at least the starting node, the candidate node and the ending node. The local turning cost is used to characterize the degree of curvature of the turning to be made during the process of the mobile element moving from the previous node to the current node and further to the candidate node.
[0263] The read submodule is used to read the historical pheromone values of each of the M candidate nodes from the historical global pheromone table.
[0264] The second determination submodule is used to determine the next node from M candidate nodes based on heuristic information and the pheromone values of historical nodes.
[0265] In embodiments of this disclosure, the determining module further includes: a second calculation submodule, a third calculation submodule, and a fourth calculation submodule.
[0266] The second calculation submodule is used to calculate the first path cost from the starting node to the candidate node.
[0267] The third calculation submodule is used to calculate the second path cost from the candidate node to the destination node;
[0268] The fourth calculation submodule is used to calculate the minimum path cost corresponding to the candidate node based on the first path cost and the second path cost.
[0269] In embodiments of this disclosure, the determining module further includes: a first acquisition submodule, a second acquisition submodule, and a fifth calculation submodule.
[0270] The first acquisition submodule is used to acquire the number of local turns to be made during the process of the mobile element moving from the previous node to the current node and further to the candidate node.
[0271] The second acquisition submodule is used to acquire the local turning angle of the mobile element during the process of moving from the previous node to the current node and further to the candidate node.
[0272] The fifth calculation submodule is used to calculate the local turning cost of candidate nodes based on the number of local turns and the local turning angle.
[0273] In embodiments of this disclosure, the first determining submodule includes: a second reading unit and a second calculation unit.
[0274] The second reading unit is used to read the nodes that each of the multiple moving elements passes through from the starting node to the ending node in the current iteration, as multiple candidate paths;
[0275] The second calculation unit is used to calculate the total path cost of each candidate path;
[0276] Based on the total path cost, the current optimal path is determined from multiple candidate paths.
[0277] In embodiments of this disclosure, the path generation apparatus 900 further includes an indication module.
[0278] The instruction module is used to instruct the mobile element to roll back to the previous node to escape the deadlock state when the mobile element moves to the deadlock node and gets stuck in a deadlock state.
[0279] Store the node information of deadlocked nodes in a tabu table.
[0280] In embodiments of this disclosure, the path generation device 900 further includes a determination module.
[0281] The judgment module is used to determine whether the moving element will fall into a deadlock state at the next node before it moves from the current node to the next node, based on the tabu list.
[0282] In embodiments of this disclosure, the path generation device 900 further includes: an acquisition module, a third construction module, and a first generation module.
[0283] The acquisition module is used to obtain the collision cost, curvature cost, and smoothing cost of the target path;
[0284] The third building module is used to establish the objective function based on collision cost, curvature cost, and smoothing cost;
[0285] The first generation module is used to optimize the position information of multiple target nodes based on the objective function, and generate multiple smooth nodes as smooth paths for movable objects.
[0286] In embodiments of this disclosure, the path generation device 900 further includes a second generation module.
[0287] The second generation module is used to interpolate multiple smooth nodes to generate multiple continuous nodes, which serve as a continuous smooth path for the movable object.
[0288] Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure, or at least part of the functions of any one or more of them, can be implemented in one module. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be implemented by dividing them into multiple modules. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as hardware circuitry, such as a Field-Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a System-on-Chip, a System-on-a-Substrate, a System-on-Package, an Application-Specific Integrated Circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as computer program modules, which, when run, can perform corresponding functions.
[0289] For example, any plurality of the first building module 910, the second building module 920, and the output module 930 may be combined into one module / unit / subunit, or any one of these modules / units / subunits may be split into multiple modules / units / subunits. Alternatively, at least a portion of the functionality of one or more of these modules / units / subunits may be combined with at least a portion of the functionality of other modules / units / subunits and implemented in one module / unit / subunit. According to embodiments of this disclosure, at least one of the first building module 910, the second building module 920, and the output module 930 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the first building module 910, the second building module 920, and the output module 930 may be implemented at least partially as a computer program module that can perform corresponding functions when the computer program module is run.
[0290] It should be noted that the data processing system part in the embodiments of this disclosure corresponds to the data processing method part in the embodiments of this disclosure. The specific description of the data processing system part is referred to in the data processing method part, and will not be repeated here.
[0291] Figure 10 A block diagram of an electronic device suitable for implementing the path generation method described above, according to an embodiment of the present disclosure, is shown schematically. Figure 10 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0292] like Figure 10 As shown, an electronic device 1000 according to an embodiment of the present disclosure includes a processor 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage portion 1008 into a random access memory (RAM) 1003. The processor 1001 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1001 may also include onboard memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0293] RAM 1003 stores various programs and data required for the operation of electronic device 1000. Processor 1001, ROM 1002, and RAM 1003 are interconnected via bus 1009. Processor 1001 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 1002 and / or RAM 1003. It should be noted that programs may also be stored in one or more memories other than ROM 1002 and RAM 1003. Processor 1001 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in one or more memories.
[0294] According to embodiments of this disclosure, the electronic device 1000 may further include an input / output (I / O) interface 1005, which is also connected to a bus 1009. The electronic device 1000 may also include one or more of the following components connected to the input / output (I / O) interface 1005: an input section 1006 including a keyboard, mouse, etc.; an output section 1007 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the input / output (I / O) interface 1005 as needed. A removable medium 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 1010 as needed so that computer programs read from it can be installed into the storage section 1008 as needed.
[0295] According to embodiments of this disclosure, the method flow according to embodiments of this disclosure can be implemented as a computer software program. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1009, and / or installed from removable medium 1011. When the computer program is executed by processor 1001, it performs the functions defined in the system of embodiments of this disclosure. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0296] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0297] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0298] For example, according to embodiments of this disclosure, a computer-readable storage medium may include the ROM 1002 and / or RAM 1003 described above and / or one or more memories other than ROM 1002 and RAM 1003.
[0299] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this disclosure. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the path generation method provided in the embodiments of this disclosure.
[0300] When the computer program is executed by the processor 1001, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0301] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 1009, and / or installed from a removable medium 1011. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0302] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on a user's computing device, partially on a user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0303] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features described in the various embodiments of the present disclosure can be combined and / or combined in various ways, even if such combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments of this disclosure may be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0304] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A path generation method, comprising: N region grids are constructed based on the driving area of the movable object, wherein the N region grids correspond to N nodes, the nodes are marked with location information, and N is a positive integer; Multiple movement elements are constructed to simulate the motion trajectory of the movable object from the starting node to the ending node by performing multiple iterations through the multiple movement elements, wherein the position information of the starting node corresponds to the starting position of the movable object, and the position information of the ending node corresponds to the ending position of the movable object. In response to the fulfillment of the iteration termination condition, the multiple target nodes that the moving element passes through to reach the endpoint node are output as the target path of the movable object. After completing any one of the multiple iterations, the following operations are performed: Determine the current optimal path corresponding to the current iteration; Calculate the current global turning cost of the current optimal path; Based on the historical global pheromone table generated by the previous iteration and the current global turning cost, an updated global pheromone table is generated for executing the next iteration, so that the mobile element can use the updated global pheromone table to execute the next iteration, wherein the global pheromone table includes the node pheromone values corresponding to each of the N nodes.
2. The method according to claim 1, wherein, Calculating the current global turning cost of the current optimal path includes: Obtain the global turning angle and global number of turns corresponding to the multiple turns traversed by the moving element during the process of moving along the current optimal path; Calculate the current global turning cost of the current optimal path based on the global turning angle and the number of global turns.
3. The method according to claim 1, wherein, Based on the historical global pheromone table generated in the previous iteration and the current global turning cost, generating an updated global pheromone table for the next iteration includes: The historical node pheromone values of each of the multiple current optimal nodes included in the current optimal path are read from the historical global pheromone table to generate the historical path pheromone of the current optimal path. Based on the current global turning cost and the historical path pheromone, generate the updated path pheromone for the current optimal path; The historical global pheromone table is updated based on the updated path pheromone, and the updated global pheromone table is generated.
4. The method according to claim 1, wherein, Performing any one of the multiple iterations includes the following operations: In response to the mobile element reaching the current node, the next node is determined from M candidate nodes so that the mobile element moves to the next node until each mobile element reaches the destination node, thus completing the current iteration. The candidate nodes are the remaining nodes among the N nodes, excluding the nodes already visited by the mobile element. M is a positive integer and M is less than N.
5. The method according to claim 4, wherein, Determining the next node from M candidate nodes includes: Based on the minimum path cost and / or local turning cost corresponding to each of the M candidate nodes, heuristic information for each of the M candidate nodes is generated. The minimum path cost is used to characterize the minimum distance that the mobile element intends to travel during its movement along a reference path that includes at least the starting node, the candidate node, and the ending node. The local turning cost is used to characterize the degree of curvature of the intended turn during the process of the mobile element moving from the previous node to the current node and further to the candidate node. Read the historical node pheromone values of the M candidate nodes from the historical global pheromone table; Based on the heuristic information and the pheromone values of the historical nodes, the next node is determined from the M candidate nodes.
6. The method according to claim 5, further comprising: Calculate the first path cost from the starting node to the candidate node; Calculate the second path cost from the candidate node to the destination node; The minimum path cost corresponding to the candidate node is calculated based on the first path cost and the second path cost.
7. The method according to claim 5, further comprising: The number of local turns to be made during the process of the mobile element moving from the previous node to the current node and further to the candidate node is obtained. The local turning angle to be turned is obtained during the process of the mobile element moving from the previous node to the current node and further to the candidate node. The local turning cost of the candidate node is calculated based on the number of local turns and the local turning angle.
8. The method according to claim 1, wherein, Determining the current optimal path corresponding to the current iteration includes: In the current iteration, each of the multiple mobile elements passes through the nodes it takes from the starting node to the ending node, and these nodes are used as multiple candidate paths. Calculate the total path cost for each of the candidate paths; Based on the total path cost, the current optimal path is determined from the multiple candidate paths.
9. The method according to any one of claims 1-8, further comprising: In response to the mobile element moving to a deadlock node and falling into a deadlock state, the mobile element is instructed to roll back to the previous node to escape the deadlock state; Store the node information of the deadlocked node in the tabu table.
10. The method of claim 9, further comprising: Before the mobile element moves from the current node to the next node, the tabu list is used to determine whether the mobile element will get stuck in a deadlock state at the next node.
11. The method according to any one of claims 1-8, further comprising: Obtain the collision cost, curvature cost, and smoothing cost of the target path; An objective function is established based on the collision cost, the curvature cost, and the smoothing cost; Based on the objective function, the position information of the multiple target nodes is optimized to generate multiple smooth nodes, which serve as the smooth path of the movable object.
12. The method of claim 11, further comprising: Interpolation is performed on the multiple smooth nodes to generate multiple continuous nodes, which serve as the continuous smooth path of the movable object.
13. A path generation apparatus, comprising: The first construction module is used to construct N regional grids based on the driving area of the movable object, wherein the N regional grids correspond to N nodes, the nodes are marked with position information, and N is a positive integer; The second construction module is used to construct multiple mobile elements so that multiple iterations are performed through the multiple mobile elements to simulate the motion trajectory of the movable object from the starting node to the ending node, wherein the position information of the starting node corresponds to the starting position of the movable object, and the position information of the ending node corresponds to the ending position of the movable object. The output module is used to output multiple target nodes that the moving element passes through to reach the endpoint node in response to the fulfillment of the iteration termination condition, as the target path of the movable object; After completing any one of the multiple iterations, the following operations are performed: Determine the current optimal path corresponding to the current iteration; Calculate the current global turning cost of the current optimal path; Based on the historical global pheromone table generated by the previous iteration and the current global turning cost, an updated global pheromone table is generated for executing the next iteration, so that the mobile element can use the updated global pheromone table to execute the next iteration, wherein the global pheromone table includes the node pheromone values corresponding to each of the N nodes.
14. An electronic device, comprising: One or more processors; Memory, used to store one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 12.
15. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 12.
16. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 12.