Global path planning method, electronic device, and storage medium
Patent Information
- Application Number
- CN202211212189.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-30
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2042-09-30
AI Technical Summary
导致最终的路径并不符合最短路径的要求
[0014] The method in this application optimizes the global path planning algorithm by using a road network file-based strategy, reducing the constraints on the placement of waypoints and removing the requirements on the heading of waypoints. Furthermore, under the condition of simplifying intersections, the method of reading files to obtain the cost matrix effectively improves the efficiency of the global path planning algorithm.
Smart Images

Figure CN117804474B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of autonomous driving technology, and particularly relates to global path planning methods, electronic devices, and storage media. Background Technology
[0002] With the development of artificial intelligence and modern manufacturing technology, autonomous driving technology has entered people's daily lives and is changing traditional travel methods. Autonomous driving technology mainly consists of several aspects, including localization, perception, prediction, decision-making, and control. Planning usually refers to path planning methods, which are mainly divided into global path planning and local path planning. Global path planning mainly refers to planning a path with the shortest distance or least time consumption from the vehicle's starting point, destination, and road topology.
[0003] Conventional global path planning algorithms require detailed location or pose information for waypoints at intersections in a road network structure. This approach makes setting waypoints relatively cumbersome and, without a thorough understanding of the global road network structure, cannot accurately determine reasonable waypoints. Specifically, setting waypoints requires a human understanding of the global map to determine the optimal location of the waypoint at the intersection, ensuring a better global path is found. Since intersections typically have many connecting road segments, setting the wrong waypoint can lead to selecting incorrect connecting segments and ultimately causing detours. Therefore, this invention designs a method for converging intersections into points, thereby enhancing the planning capabilities of the global path planning algorithm.
[0004] Currently, global path planning mainly employs algorithms such as A*, Dijkstra's algorithm, Bellman-Ford algorithm, and Johnson's algorithm. Among these, A* (A-Star) is a highly efficient direct search method for finding the shortest path in static road networks and is also an effective algorithm for solving many search problems. The closer the distance estimate in the algorithm is to the actual value, the faster the final search speed. Dijkstra's algorithm is an algorithm based on greedy algorithms, breadth-first search algorithms, and dynamic programming to find the shortest path from a point in a graph to all other points, with a time complexity of O(n²). Bellman-Ford's algorithm is more general than Dijkstra's algorithm because it does not have requirements on edges and can handle negative weight edges and negative weight cycles. Its disadvantage is its high time complexity, reaching O(VE), where V is the number of vertices and E is the number of edges. Dijkstra's algorithm and Bellman-Ford's algorithm solve single-source shortest path problems, while Johnson's algorithm solves all-source shortest path problems. Dijkstra's algorithm requires all edge weights in the graph to be non-negative, which is not suitable for general cases. Johnson's algorithm proposes an algorithm to "re-weight" all edge weights so that the edge weights are non-negative, thus allowing Dijkstra's algorithm to be used to calculate the shortest path.
[0005] The global path planning algorithm requires the starting point, ending point, and map data as input. The output is the navigation path information from the starting point to the ending point. This process does not need to consider environmental information; it only needs to perform long-term path planning. In graph theory, the shortest path problem describes finding a path between two vertices in a graph that minimizes the sum of edge weights. The main elements include nodes, where the key of a node is a road ID and the value is a way, representing the waypoint information corresponding to the road ID, containing two or more ordered waypoints. Relations represent the connections between nodes, describing which nodes the current node is allowed to reach.
[0006] The drawback is that when a waypoint lands at an intersection, the waypoint will match the nearest road segment among multiple roads at the intersection before performing global path planning. This results in the final path not meeting the shortest path requirement. Summary of the Invention
[0007] This invention provides a global path planning method and apparatus that can improve the computational efficiency of global path planning.
[0008] In a first aspect, embodiments of the present invention provide a global path planning method for off-road environments, comprising: acquiring map information of the off-road environment; mapping road segments formed by connecting each intersection in the map information to a first node in the map information, wherein the length of the first node is the length of the corresponding road segment; for road segments that allow reverse travel, mapping the reverse travel road segments to a second node in the map information; for intersections, mapping the intersections to a third node in the map information, wherein the connection relationship of the third node is such that it can reach all first nodes intersecting with the third node, and all first nodes intersecting with the third node can reach the third node; and performing a shortest path search with a specified waypoint or destination as the endpoint.
[0009] Secondly, embodiments of the present invention provide a global path planning execution device, comprising: for off-road environments, including: a first mapping module configured to acquire map information of the off-road environment, and map road segments formed by connecting each intersection in the map information to first nodes in the map information, wherein the length of the first node is the length of the corresponding road segment; a second mapping module configured to map road segments that allow reverse travel to second nodes in the map information for such road segments; a third mapping module configured to map intersections to third nodes in the map information for such intersections, wherein the connection relationship of the third nodes is such that all first nodes intersecting with the third node can be reached, and all first nodes intersecting with the third node can reach the third node; and a search module configured to perform shortest path search with a specified waypoint or destination as the endpoint.
[0010] Thirdly, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of the global path planning method of any embodiment of the present invention.
[0011] Fourthly, embodiments of the present invention provide a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the global path planning method of any embodiment of the present invention.
[0012] Fifthly, embodiments of the present invention also provide a computer program product, the computer program product including a computer program stored on a non-volatile computer-readable storage medium, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the steps of the global path planning method of any embodiment of the present invention.
[0013] In a sixth aspect, embodiments of the present invention also provide a mobile tool, the mobile tool including the electronic device described in the third aspect.
[0014] The method in this application optimizes the global path planning algorithm by using a road network file-based strategy, reducing the constraints on the placement of waypoints and removing the requirements on the heading of waypoints. Furthermore, under the condition of simplifying intersections, the method of reading files to obtain the cost matrix effectively improves the efficiency of the global path planning algorithm. Attached Figure Description
[0015] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 A flowchart of a global path planning method provided in an embodiment of the present invention;
[0017] Figure 2 A flowchart illustrating another global path planning method provided in an embodiment of the present invention;
[0018] Figure 3 A typical scenario diagram illustrating a specific example of the global path planning method provided in an embodiment of the present invention;
[0019] Figure 4 A topological diagram illustrating a specific example of a global path planning method provided in an embodiment of the present invention;
[0020] Figure 5 A simplified diagram of an intersection road, which is a specific example of a global path planning method provided in an embodiment of the present invention.
[0021] Figure 6 A schematic diagram of the algorithm pseudocode for another specific example of the global path planning method provided in an embodiment of the present invention;
[0022] Figure 7 This is a schematic diagram of the structure of a global path planning execution device provided in an embodiment of the present invention;
[0023] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] Those skilled in the art will recognize that embodiments of this application can be implemented as a system, apparatus, device, method, or computer program product. Therefore, this disclosure can be specifically implemented in the following forms: entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0026] For ease of understanding, the technical terms used in this application are explained below:
[0027] The term "mobile device" as used in this application includes, but is not limited to, vehicles with the six levels of autonomous driving technology (L0-L5) as defined by the Society of Automotive Engineers International (SAE International) or the Chinese national standard "Classification of Driving Automation for Automobiles".
[0028] In some embodiments, the mobile device may be a vehicle or robot having various functions, such as:
[0029] (1) Passenger transport function, such as family cars, buses, etc.;
[0030] (2) Cargo carrying function, such as ordinary trucks, box trucks, trailers, enclosed trucks, tank trucks, flatbed trucks, container trucks, dump trucks, special structure trucks, etc.
[0031] (3) Tool functions, such as logistics delivery vehicles, automated guided vehicles (AGVs), patrol vehicles, cranes, hoists, excavators, bulldozers, loaders, road rollers, loaders, off-road engineering vehicles, armored engineering vehicles, sewage treatment vehicles, sanitation vehicles, vacuum trucks, floor scrubbers, water sprinkler trucks, sweeping robots, food delivery robots, shopping guide robots, lawnmowers, golf carts, etc.
[0032] (4) Entertainment functions, such as recreational vehicles, amusement park automatic driving devices, balance bikes, etc.;
[0033] (5) Special rescue functions, such as fire trucks, ambulances, power repair vehicles, and engineering emergency rescue vehicles.
[0034] Please refer to Figure 1The diagram shows a flowchart of an embodiment of the global path planning method of this application for use in off-road environments.
[0035] like Figure 1 As shown, in step 101, map information of the off-road environment is obtained, and the road segments formed by connecting each intersection in the map information are mapped to the first node in the map information. The length of the first node is the length of the corresponding road segment.
[0036] In step 102, for road segments that allow reverse travel, the road segments that allow reverse travel are mapped to the second node in the map information;
[0037] In step 103, for an intersection, the intersection is mapped to a third node in the map information. The connection relationship of the third node is that it can reach all first nodes that intersect with the third node, and all first nodes that intersect with the third node can reach the third node.
[0038] In step 104, the shortest path is searched with the specified waypoint or destination as the endpoint.
[0039] In this embodiment, for step 101, the global path planning device acquires map information of the off-road environment and maps the road segments formed by connecting each intersection in the map information to the first node in the map information. The length of the first node is the length of the corresponding road segment. The connected nodes are formed by directed edges, which describe the topological relationship between the road segments. For example, the road segments connected by the intersection are integrated into a point to represent the road segment connected by the intersection. Any point that matches the location of the intersection is represented by the integrated point to represent the road segment it is located in.
[0040] Then, for step 102, the global path planning device maps the road segments that allow reverse travel to the second node in the map information. Furthermore, for three-way intersections and crossroads, the connectivity of the road segments at the intersection can be processed according to the connectivity of the beginning and end, so that no omissions will occur. If a road is a two-way road, it is represented by two road IDs. If the waypoint of the road segment has a heading, it can be matched with which ID it belongs to more accurately.
[0041] Next, for step 103, the global path planning device maps the intersection to a third node in the map information. The connection relationship of the third node is that it can reach all first nodes that intersect with the third node, and all first nodes that intersect with the third node can reach the third node. For example, in order to solve the problem of waypoints being located at intersections and waypoints being mismatched, the roads at the intersections are first simplified. The length of the waypoints of all intersections is relatively small compared to the length of the main road segment. In order to avoid errors when waypoints are mapped to road segments, points can be used to replace all roads at the intersection.
[0042] Finally, for step 104, the global path planning device performs the shortest path search with the specified waypoint or destination as the endpoint. For example, it saves the cost matrix formed by the shortest paths between nodes to a file, which can be read directly when the algorithm starts.
[0043] The method in this embodiment simplifies the road segments and intersections formed by connecting each intersection in the map information, and finally performs the shortest path search with the specified waypoint or destination as the endpoint. This reduces the constraints on the placement of waypoints and removes the constraints of waypoints on the heading, effectively improving the efficiency of global path planning.
[0044] In the method of the above embodiments, after mapping the intersection to a third node in the map information, the method further includes:
[0045] The global path planning device constructs a directed graph based on the lengths of the first node, the second node, the third node, and the connections between the nodes. For example, for the directed graph shortest path problem, the calculation steps are the same as for solving the undirected graph shortest path problem. The main difference is that the undirected graph shortest path problem uses the single-label method, which assigns a path weight label to each node; while the directed shortest path problem uses the double-label method, which assigns two labels to each node: path and path weight.
[0046] The method in this embodiment constructs a directed graph based on the lengths of the first node, the second node, the third node, and the connection relationships between the nodes, thereby allowing waypoints to be placed arbitrarily. The reason waypoints can be placed arbitrarily is that the road segments connected at an intersection are integrated into a single point to represent that intersection's connected road segment. Any waypoint whose location matches that intersection is represented by this integrated point, and then, based on the final search result, the algorithm backtracks to that waypoint, specifying which road segment at that intersection it represents.
[0047] In some optional embodiments, the length of the third node is 0, and its connection relationship is such that the point can reach all road segments that intersect with the node, and all road segments that intersect with it can reach the point.
[0048] The method in this embodiment improves computational efficiency by setting the length of the third node to 0.
[0049] In some optional embodiments, the shortest path search with a specified waypoint or destination as the endpoint includes:
[0050] The global path planning device calculates the cost value based on the length of each node along each path, and selects the path with the smallest cost value as the shortest path. Each node includes a first node, a second node, and a third node. For example, when the passing point is located in road segment 1, the ASTAR search algorithm will first perform a shortest path search with road segment 1 as the endpoint, and then perform a shortest path search with the reverse road segment of road segment 1 as the endpoint. Finally, the road segment with the shortest path between the two is selected as the optimal road segment.
[0051] The method in this embodiment simplifies the input of waypoints, thus eliminating the need for heading input. The purpose of heading is as follows: if a road is bidirectional and represented by two different road segments (nodes), having a heading for a waypoint can more accurately match which road segment (node) it belongs to. The solution in this embodiment comprehensively considers all directions and selects the optimal search path.
[0052] In some optional embodiments, the shortest path search with a specified waypoint or destination as the endpoint includes:
[0053] The global path planning device employs a planning algorithm to plan paths with specified waypoints or destinations as endpoints. This planning algorithm includes a graph-based heuristic search algorithm, such as the ASTA algorithm. The ASTA algorithm is a highly efficient direct search method for finding the shortest path in a static road network and is also an effective algorithm for solving many search problems. The closer the distance estimate in the algorithm is to the actual value, the faster the final search speed.
[0054] The method in this embodiment uses a planning algorithm to plan the path with a specified waypoint or destination as the endpoint, thereby reducing the constraints on the placement of waypoints and eliminating the requirement for the heading of waypoints.
[0055] Further reference Figure 2 This document illustrates a flowchart of another global path planning method provided in an embodiment of this application. The flowchart primarily describes the process... Figure 1The flowchart further defines the steps of the process of "searching for the shortest path with a specified waypoint or destination as the endpoint".
[0056] like Figure 2 As shown, in step 201, the cost matrix formed by the shortest paths between each node and other nodes, as well as the calculation results of each cost matrix, are saved.
[0057] In step 202, when searching for the shortest path with a specified waypoint or destination as the endpoint, the corresponding cost matrix is found from the saved cost matrix, and the shortest path is determined based on the calculation result of the found cost matrix.
[0058] In this embodiment, for step 201, the global path planning device saves the cost matrix formed by the shortest path between each node and other nodes, as well as the calculation results of each cost matrix. For example, the space-for-time method can be used for optimization, and Dijkstra's algorithm is first used to calculate the cost between nodes in the simplified topology, and the cost matrix formed by the shortest path between nodes is saved to a file.
[0059] Then, for step 202, when the global path planning device searches for the shortest path with a specified waypoint or destination as the endpoint, it finds the corresponding cost matrix from the saved cost matrix and determines the shortest path based on the calculation result of the found cost matrix. For example, when the algorithm starts, it directly reads the cost file, reducing the time spent calling Dijkstra to calculate the cost matrix each time ASTA starts the program. Dijkstra does not require real-time calculation and can be calculated in advance, while ASTA requires real-time calculation. Using the pre-calculated cost matrix by Dijkstra can save time.
[0060] The method in this embodiment can effectively improve the efficiency of the global path planning algorithm by saving the cost matrix formed by the shortest path between each node and other nodes, as well as the calculation results of each cost matrix.
[0061] In some optional embodiments, saving the cost matrix formed by the shortest paths between each node and other nodes, and the calculation results of each cost matrix, includes:
[0062] The global path planning device stores the cost matrices formed by the shortest paths between each node and other nodes obtained by the shortest path algorithm, as well as the calculation results of each cost matrix. The shortest path algorithm includes algorithms with completeness for the search, such as Dijkstra's algorithm. For example, Dijkstra's algorithm is first used to calculate and save the cost matrices formed by all the shortest paths. Then, ASTAR is used to search for the shortest path. After finding a shortest path, the corresponding cost matrix is directly called. In a specific embodiment, the entire global path planning time only requires the first call to Dijkstra's algorithm.
[0063] The method in this embodiment reduces computation time by directly reading the cost file when the algorithm starts.
[0064] Please refer to Figure 3 The diagram illustrates a typical scenario of a specific example of the global path planning method provided in an embodiment of the present invention.
[0065] like Figure 3 As shown in the diagram, green lines represent road segments, red dots represent waypoints, and yellow dots represent destinations. The yellow lines are connecting lines at intersections. Waypoints in locations with numerous intersecting routes are prone to mismatching road segments, leading to global path errors. If the green lines represent two-way road segments, then two roads need to be constructed.
[0066] Please refer to Figure 4 This illustrates a topological diagram of a specific example of a global path planning method provided in an embodiment of the present invention.
[0067] like Figure 4 As shown, road segments are simplified to nodes, and nodes are connected by directed edges. These directed edges represent the topological relationships between road segments. If the current road segment allows reverse travel, then its reverse road segment is represented as another node. For example, node1 and node2 represent road segments in the road network, and node1_node3 represents the directed edge connecting the two road segments.
[0068] Please refer to Figure 5 The diagram shows a simplified intersection road diagram, which is a specific example of a global path planning method provided by an embodiment of the present invention.
[0069] like Figure 5As shown, to address the issue of waypoint mismatches when waypoints are located at intersections, the roads at intersections are first simplified. The length of waypoints in all intersection segments is relatively small compared to the length of the main road segments. Furthermore, to avoid errors when mapping waypoints to road segments, all roads at intersections are represented as points. All road segments at an intersection exist as points, specifically represented by a special node with a length of 0. The connectivity is such that this node can reach all road segments intersecting with it, and all road segments intersecting with it can reach this node.
[0070] Please refer to Figure 6 It shows a schematic diagram of the algorithm pseudocode of another specific example of the global path planning method provided in an embodiment of the present invention.
[0071] like Figure 6 As shown, finding the shortest path using multiple waypoints is an NP problem. To shorten the solution time for NP problems, this algorithm employs a greedy approach. To simplify the input of waypoints, the heading is no longer required. When a waypoint is located on segment node2, the ASTAR search algorithm first performs a shortest path search with node2 as the endpoint, and then performs another shortest path search with rv_node2 as the endpoint, where rv_node2 represents the reverse path represented by node2. Finally, the segment with the shortest path between the two is selected as the optimal segment. To improve the efficiency of the heuristic search algorithm, a space-for-time trade-off is used for optimization. Specifically, Dijkstra's algorithm is first used to calculate the cost between nodes in the simplified topology. For example, the cost matrix formed by the shortest paths between nodes is saved to a file. When the algorithm starts, it directly reads the cost file, reducing the time spent by calling Dijkstra's algorithm to calculate the cost matrix each time ASTAR starts the program.
[0072] Please refer to Figure 7 The diagram shows a schematic representation of the structure of a global path planning execution device provided in an embodiment of the present invention.
[0073] like Figure 7 As shown, the global path planning device 700 includes a first mapping module 710, a second mapping module 720, a third mapping module 730, and a search module 740.
[0074] The first mapping module 710 is configured to acquire map information of the off-road environment and map the road segments formed by connecting each intersection in the map information to the first node in the map information, wherein the length of the first node is the length of the corresponding road segment; the second mapping module 720 is configured to map road segments that allow reverse driving to the second node in the map information for such road segments; the third mapping module 730 is configured to map intersections to the third node in the map information for such intersections, wherein the connection relationship of the third node is such that it can reach all first nodes intersecting with the third node, and all first nodes intersecting with the third node can reach the third node; the search module 740 is configured to perform shortest path search with a specified waypoint or destination as the endpoint.
[0075] It should be understood that Figure 7 The modules and references described in the document Figure 1 and Figure 2 The steps described in the text correspond to those in the method described above. Therefore, the operations, features, and corresponding technical effects described above also apply to the method described in the text. Figure 7 The various modules in the document will not be described in detail here.
[0076] It is worth noting that the modules in the embodiments of this disclosure are not intended to limit the solutions of this disclosure. For example, the first mapping module can be described as a module that acquires map information of the off-road environment and maps the road segments formed by connecting each intersection in the map information to the first node in the map information, where the length of the first node is the length of the corresponding road segment. Alternatively, related functional modules can also be implemented using a hardware processor; for example, the first mapping module can also be implemented using a processor, which will not be elaborated further here.
[0077] In other embodiments, the present invention also provides a non-volatile computer storage medium storing computer-executable instructions that can execute the global path planning method in any of the above method embodiments;
[0078] In one embodiment, the non-volatile computer storage medium of the present invention stores computer-executable instructions, which are configured as follows:
[0079] Obtain map information of the off-road environment, and map the road segments formed by connecting each intersection in the map information to the first node in the map information, where the length of the first node is the length of the corresponding road segment;
[0080] For road segments that allow reverse travel, the reverse travel segment is mapped to the second node in the map information;
[0081] For intersections, the intersections are mapped to third nodes in the map information. The connection relationship of the third nodes is that they can reach all first nodes that intersect with the third nodes, and all first nodes that intersect with the third nodes can reach the third nodes.
[0082] Search for the shortest path with the specified waypoint or destination as the endpoint.
[0083] Non-volatile computer-readable storage media may include a stored program area and a stored data area, wherein the stored program area may store an operating system and an application program required for at least one function; the stored data area may store data created based on the use of the global path planning device, etc. Furthermore, the non-volatile computer-readable storage medium may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the non-volatile computer-readable storage medium may optionally include memory remotely located relative to the processor, and this remote memory may be connected to the global path planning device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0084] In some embodiments, the present invention also provides a mobile device, including a body and an electronic device according to any of the foregoing embodiments mounted on the body. The mobile device may be an unmanned vehicle, such as an unmanned sweeper, unmanned floor scrubber, unmanned logistics vehicle, unmanned passenger car, unmanned sanitation vehicle, unmanned minibus / bus, truck, mining truck, etc., or it may be a robot, etc.
[0085] This invention also provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium. The computer program includes program instructions, which, when executed by a computer, cause the computer to perform any of the above-described global path planning methods.
[0086] Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present invention, such as... Figure 8 As shown, the device includes one or more processors 810 and a memory 820. Figure 8 Taking a processor 810 as an example, the device for the global path planning method may further include an input device 830 and an output device 840. The processor 810, memory 820, input device 830, and output device 840 can be connected via a bus or other means. Figure 8Taking a bus connection as an example, the memory 820 is the aforementioned non-volatile computer-readable storage medium. The processor 810 executes various server functions and data processing by running non-volatile software programs, instructions, and modules stored in the memory 820, thereby implementing the global path planning method described in the above embodiment. The input device 830 can receive input digital or character information and generate key signal inputs related to user settings and function control of the communication compensation device. The output device 840 may include a display screen or other display device.
[0087] The above-described product can execute the method provided in the embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in this embodiment can be found in the method provided in the embodiments of the present invention.
[0088] In one implementation, the above-described electronic device is used in a global path planning apparatus for a client, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0089] Obtain map information of the off-road environment, and map the road segments formed by connecting each intersection in the map information to the first node in the map information, where the length of the first node is the length of the corresponding road segment;
[0090] For road segments that allow reverse travel, the reverse travel segment is mapped to the second node in the map information;
[0091] For intersections, the intersections are mapped to third nodes in the map information. The connection relationship of the third nodes is that they can reach all first nodes that intersect with the third nodes, and all first nodes that intersect with the third nodes can reach the third nodes.
[0092] Search for the shortest path with the specified waypoint or destination as the endpoint.
[0093] The electronic devices described in this application exist in various forms, including but not limited to:
[0094] (1) Mobile communication devices: These devices are characterized by their mobile communication capabilities and primarily aim to provide voice and data communication. These terminals include: smartphones (e.g., iPhones), multimedia phones, feature phones, and low-end phones, etc.
[0095] (2) Ultra-mobile personal computer devices: These devices fall under the category of personal computers, possessing computing and processing capabilities, and generally also have mobile internet access features. These terminals include PDAs, MIDs, and UMPCs, such as the iPad.
[0096] (3) Portable entertainment devices: These devices can display and play multimedia content. This category includes: audio and video players (e.g., iPods), handheld game consoles, e-book readers, as well as smart toys and portable car navigation devices.
[0097] (4) Server: A device that provides computing services. The components of a server include a processor, hard disk, memory, system bus, etc. Servers are similar to general computer architectures, but because they need to provide highly reliable services, they have higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.
[0098] (5) Other electronic devices with data interaction functions.
[0099] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0100] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.
[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A global path planning method for off-road environments, comprising: Obtain map information of the off-road environment, and map the road segments formed by connecting each intersection in the map information to the first node in the map information, where the length of the first node is the length of the corresponding road segment; For road segments that allow reverse travel, the reverse travel segment is mapped to the second node in the map information; For intersections, the intersections are mapped to third nodes in the map information. The connection relationship of the third nodes is that they can reach all first nodes that intersect with the third nodes, and all first nodes that intersect with the third nodes can reach the third nodes. The process of searching for the shortest path with a specified waypoint or destination as the endpoint includes: saving the cost matrix formed by the shortest paths between each node and other nodes, as well as the calculation results of each cost matrix; when searching for the shortest path with a specified waypoint or destination as the endpoint, finding the corresponding cost matrix from the saved cost matrix, and determining the shortest path based on the calculation results of the found cost matrix.
2. The method according to claim 1, characterized in that, After mapping the intersection to a third node in the map information, the method further includes: A directed graph is constructed based on the first node and its length, the second node and its length, the third node and its length, and the connection relationships between the nodes.
3. The method according to claim 1, characterized in that, The length of the third node is 0.
4. The method according to claim 1, characterized in that, The shortest path search with a specified waypoint or destination as the endpoint includes: The cost value is calculated based on the length of each node along each path, and the path with the smallest cost value is selected as the shortest path. Each node includes a first node, a second node, and a third node.
5. The method according to claim 4, characterized in that, The shortest path search with a specified waypoint or destination as the endpoint includes: A planning algorithm is used to plan a path with a specified waypoint or destination as the endpoint, wherein the planning algorithm includes a graph-based heuristic search algorithm.
6. The method according to claim 1, characterized in that, The storage of the cost matrix formed by the shortest paths between each node and other nodes, and the calculation results of each cost matrix, include: The cost matrix formed by the shortest paths between each node and other nodes obtained by the shortest path algorithm, as well as the calculation results of each cost matrix, are stored. The shortest path algorithm includes algorithms that are complete for the search.
7. A global path planning execution device for off-road environments, comprising: The first mapping module is configured to acquire map information of the off-road environment and map the road segments formed by connecting each intersection in the map information to the first node in the map information, wherein the length of the first node is the length of the corresponding road segment. The second mapping module is configured to map road segments that allow reverse driving to the second node in the map information. The third mapping module is configured to map an intersection to a third node in the map information. The connection relationship of the third node is that it can reach all first nodes that intersect with the third node, and all first nodes that intersect with the third node can reach the third node. The search module is configured to perform shortest path search with a specified waypoint or destination as the endpoint. This includes saving the cost matrix formed by the shortest paths between each node and other nodes, as well as the calculation results of each cost matrix. When performing shortest path search with a specified waypoint or destination as the endpoint, the module finds the corresponding cost matrix from the saved cost matrix and determines the shortest path based on the calculation results of the found cost matrix.
8. An electronic device comprising: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the method according to any one of claims 1 to 6.
9. A mobile device comprising a body and an electronic device according to claim 8 mounted on the body.
10. A storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.