Multi-map path planning method and device
By integrating the information and weights of multiple maps, calculating and selecting the optimal path, the problem of limited efficiency and accuracy in multiple map scenarios is solved, and efficient path planning in complex environments is achieved.
Patent Information
- Application Number
- CN202411966402.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-27
AI Technical Summary
Traditional path planning algorithms are difficult to effectively integrate the information of multiple maps in multiple map scenarios, and cannot fully consider the interactions between maps, resulting in limited efficiency and accuracy of path planning when facing complex and changing environments.
By obtaining the information of the comprehensive map, including the predetermined weights, obstacle distribution and obstacle types of multiple maps, the path generation value and heuristic function value of each node's neighbor node in each map, and weighted calculations are performed based on the weights of each map, and the path with the smallest total cost is selected to achieve the optimal path planning from the starting point to the target point.
This method can improve the accuracy and efficiency of path planning in complex and variable environments, ensure the high stability and adaptability of path planning, effectively deal with random and fixed obstacles, and find the path with the highest efficiency and safety.
Smart Images

Figure CN119803502A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of path planning, and in particular to a multi-map path planning method and device. Background Art
[0002] As a core technology in automated control and intelligent systems, path planning is mainly focused on solving the problem of finding the optimal path from the starting point to the end point in a complex environment. The traditional A* algorithm performs well in path finding in a single map environment with its graph search technology based on heuristic functions and cost functions. However, it usually only searches for paths on a single static map, ignoring the impact of environmental differences and dynamic obstacles in multi-map scenarios, resulting in limited efficiency and accuracy of path planning when faced with a variety of complex situations, such as changes in environmental conditions, obstacle distribution, dynamic changes, etc. At the same time, when dealing with multi-map scenarios, existing algorithms often lack an effective information integration mechanism and cannot fully consider the interactions between maps, which makes it difficult for the algorithm to make timely and effective adjustments when faced with path blocking problems caused by random obstacles. Therefore, developing a path planning method that can effectively combine multiple map information, obstacle distribution, and dynamic changes has become a key challenge to improve the accuracy and efficiency of path planning in complex and changing environments. Summary of the invention
[0003] The embodiments of the present invention provide a multi-map path planning method and device to improve the accuracy and efficiency of path planning in complex and changing environments and ensure the high stability and adaptability of path planning.
[0004] In order to achieve the above object, on the one hand, a multi-map path planning method is provided, the method comprising:
[0005] S1, obtain the information of the comprehensive map, the starting point and the target point of the path planning, where:
[0006] The comprehensive map is: a map set formed by integrating information of multiple maps; the information of the comprehensive map includes: a predetermined weight of each map in the comprehensive map, obstacle distribution, and obstacle type of each node in the comprehensive map;
[0007] The obstacle types include random obstacles and fixed obstacles; the random obstacles are obstacles that exist in at least one of the multiple maps of the comprehensive map; the fixed obstacles are obstacles that exist in multiple maps of the comprehensive map;
[0008] The multiple maps include: maps of different scenarios or different constraints; the different constraints include: different environments, different time levels, different obstacle distributions and / or different preset scenario weights;
[0009] S2, calculating the optimal path from the starting point to the target point according to the information of the comprehensive map and a predetermined path planning algorithm, including:
[0010] Calculating the path cost value and heuristic function value of the neighbor nodes of the selected node in the comprehensive map in each map of the comprehensive map;
[0011] Performing weighted calculation on the path cost value and heuristic function value of the neighboring node according to the predetermined weight of each map in the comprehensive map, obtaining the total path cost value, total heuristic function value and total cost of the neighboring node, and taking the selected node as the parent node of the node with the smallest total path cost value among the neighboring nodes;
[0012] The neighbor node with the smallest total cost value is selected as the next selected node. When the selected node is the target point, the path is traced back according to the parent-child relationship between the nodes to obtain the optimal path from the starting point to the target point.
[0013] Preferably, in the multi-map path planning method, in step S2:
[0014] The neighbor nodes are: nodes adjacent to the selected node in the comprehensive map;
[0015] The heuristic function value is obtained by calculating the Euclidean distance.
[0016] Preferably, the multi-map path planning method, wherein in step S2, the neighbor node with the smallest total cost value is selected as the next selected node, and when the selected node is the target point, the path is traced back according to the parent-child relationship between the nodes to obtain the optimal path from the starting point to the target point, including:
[0017] S21, initializing a set of nodes to be calculated and a set of visited nodes, and adding the starting point to the set of nodes to be calculated;
[0018] S22, selecting a node with the smallest total cost value from the set of nodes to be calculated as the current parent node, removing the current parent node from the set of nodes to be calculated, and adding the current parent node to the set of visited nodes;
[0019] S23, determining whether the current parent node is the target point, if so, tracing back the path through the parent-child relationship between the nodes in the visited node set, obtaining the planned path, and ending the process;
[0020] If not, multiple nodes are selected from the neighbor nodes of the current parent node, which are located within the effective range of the comprehensive map, are not fixed obstacles, and are not in the visited node set, as nodes to be visited;
[0021] In step S2, the path cost value and the heuristic function value of the neighboring nodes of the selected node in the comprehensive map in each map in the comprehensive map are calculated, including:
[0022] S24, cyclically judging whether each of the to-be-visited nodes in each map in the comprehensive map is an obstacle in each map in the comprehensive map, and if so, selecting a replacement node from the surrounding nodes of the current to-be-visited node through a predetermined obstacle replacement strategy, and calculating the path cost value and heuristic function value of the replacement node in the current map as the path cost value and heuristic function value of the current to-be-visited node in the current map;
[0023] If not, calculate the path cost and heuristic function value of the current node to be visited in the current map;
[0024] And, in step S2, the path cost value and the heuristic function value of the neighboring node are weightedly calculated according to the predetermined weight of each map in the comprehensive map, the total path cost value, the total heuristic function value and the total cost of the neighboring node are obtained, and the selected node is used as the parent node of the node with the smallest total path cost value among the neighboring nodes, including:
[0025] S25, calculating the total path cost value, the total heuristic function value and the total cost of each of the nodes to be visited;
[0026] S26, determining whether each of the nodes to be visited is in the set of nodes to be calculated; if so, selecting a node with the smallest total path cost in the set of nodes to be calculated, setting the current parent node as the parent node of the node, and updating the total path cost and total cost of the node to the total path cost and total cost calculated according to the current parent node; if not, adding the node to be visited to the set of nodes to be calculated;
[0027] S27, return to step S22.
[0028] Preferably, in the multi-map path planning method, in step S24, the predetermined obstacle replacement strategy for selecting a replacement node from the surrounding nodes of the current node to be visited by using a predetermined obstacle replacement strategy is:
[0029] Acquire surrounding nodes in eight directions with the node to be visited as the center, the eight directions are: up, down, left, right and four diagonal positions, and the surrounding nodes are: nodes that are within the effective range of the current map, are not fixed obstacles or random obstacles, are not in the visited node set, and are not neighbor nodes of the current parent node;
[0030] A node with the smallest heuristic function value is selected from the surrounding nodes as a replacement node.
[0031] Preferably, in the multi-map path planning method, if there are no qualified surrounding nodes around the node to be visited, an inaccessible sign is returned, and the path cost value of the node to be visited is set to infinity.
[0032] Preferably, in the multi-map path planning method, in step S23, when the current parent node is the target point, tracing back the path through the parent-child relationship between the nodes in the visited node set to obtain the planned path includes:
[0033] The target point is taken as the current node, the parent node of the current node is searched in the visited node set, and the current node is updated to the parent node, until the current node is the starting point, and the planned path is obtained.
[0034] Preferably, in the multi-map path planning method, in step S25, the total path cost value, the total heuristic function value and the total cost of each of the nodes to be visited are calculated, wherein:
[0035] The total path cost is calculated by the following formula:
[0036]
[0037] g represents the total path cost value, g(i) represents the path cost value of the node to be visited on the i-th map, num_maps represents the number of all maps, i represents the i-th map, and w(i) represents the predetermined weight of the i-th map;
[0038] The total heuristic function value is calculated by the following formula:
[0039]
[0040] h represents the total heuristic function value, h(i) represents the heuristic function value of the node to be visited on the i-th map;
[0041] The total cost is calculated by the following formula:
[0042] f=g+h
[0043] f represents the total cost.
[0044] Preferably, in the multi-map path planning method, the predetermined path planning algorithm is an A* search algorithm.
[0045] On the other hand, an embodiment of the present invention provides a multi-map path planning device, which includes a memory and a processor, the memory stores at least one program, and the at least one program is executed by the processor to implement any of the multi-map path planning methods described above.
[0046] On the other hand, an embodiment of the present invention provides a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, it implements any of the multi-map path planning methods described above.
[0047] The above technical solution has the following technical effects:
[0048] The technical solution of the embodiment of the present invention integrates the information of multiple maps into a comprehensive map, wherein the comprehensive map contains the predetermined weight, obstacle distribution and obstacle type (random obstacles and fixed obstacles) of each map; each map represents different scenarios or constraints, such as different environments, time levels, obstacle distribution and preset scenario weights; according to the information of the comprehensive map, the path cost and heuristic function value of the neighbor nodes of each node in each map are calculated, and weighted calculation is performed in combination with the weights of each map to obtain the total path cost, total heuristic function value and total cost of the neighbor nodes; the neighbor node with the smallest total cost is selected as the next selected node, and its parent node is set as the current selected node until the selected node is the target point; then the path is traced back according to the parent-child relationship between the nodes, so as to obtain the optimal path from the starting point to the target point, which can adapt to complex and changing environments, effectively handle random and fixed obstacles, and ensure that the most efficient and safe path is found based on the comprehensive multi-map information.
[0049] In a further embodiment, the technical solution of the embodiment of the present invention initializes the set of nodes to be calculated and the set of visited nodes, and adds the starting point to the set of nodes to be calculated; cyclically selects the node with the smallest total cost from the set of nodes to be calculated as the current parent node, and moves it to the set of visited nodes; if the current parent node is the target point, the planned path is obtained by backtracking through the set of visited nodes; otherwise, the neighbor nodes of the current parent node are expanded as the nodes to be visited; for random obstacles in the nodes to be visited, the algorithm adopts a predetermined obstacle replacement mechanism to select replacement nodes and calculate their path costs; for non-obstacle nodes, the path cost and heuristic function value are directly calculated; then, the total path cost, total heuristic function value and total cost of each node to be visited in all maps are calculated, and the nodes to be visited are updated or added to the set of nodes to be calculated according to these values, and this process is repeated until the optimal path is found. In this way, the algorithm can adapt to different scenarios and constraints, intelligently handle fixed obstacles and random obstacles, and comprehensively consider the weights and obstacle distribution of multiple maps, so as to calculate the optimal path from the starting point to the target point, thereby improving the accuracy and adaptability of path planning;
[0050] In a further embodiment, when the node to be visited is determined to be a random obstacle, the technical solution of the embodiment of the present invention obtains neighbor nodes in eight directions around the node to be visited, including up, down, left, right and four diagonal positions, by taking the node to be visited as the center; screens out qualified surrounding nodes, which must be within the effective range of the current map and are not fixed obstacles or random obstacles, and are not in the set of visited nodes, and are not neighbor nodes of the current parent node; calculates the heuristic function value of each surrounding node, and selects the node with the smallest heuristic function value as the replacement node, ensuring that when encountering random obstacles, the algorithm can flexibly select the optimal replacement path, thereby improving the flexibility and adaptability of path planning, and ensuring that an effective path can be found in a complex environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic diagram of a multi-map path planning method according to an embodiment of the present invention;
[0052] Figure 2 A flowchart of a multi-map path planning method according to an embodiment of the present invention;
[0053] Figure 3 A flowchart of an obstacle replacement strategy in a multi-map path planning method according to an embodiment of the present invention;
[0054] Figure 4 A schematic diagram of an optimal path on a comprehensive map in a multi-map path planning method according to an embodiment of the present invention;
[0055] Figure 5 Schematic diagram of the structure of a multi-map path planning device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0056] To further illustrate the various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, a person of ordinary skill in the art should be able to understand other possible implementations and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0057] The present invention will now be further described with reference to the accompanying drawings and specific implementation methods.
[0058] Embodiment 1:
[0059] In order to improve the accuracy and efficiency of path planning in complex and changing environments and ensure the high stability and adaptability of path planning, an embodiment of the present invention provides a multi-map path planning method. Figure 1 FIG. 1 is a flow chart of a multi-map path planning method according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0060] S1, obtain the information of the comprehensive map, the starting point and the target point of the path planning, where:
[0061] The comprehensive map is: a map set formed by integrating the information of multiple maps; the information of the comprehensive map includes: the predetermined weight of each map in the comprehensive map, the obstacle distribution and the obstacle type of each node in the comprehensive map;
[0062] Obstacle types include: random obstacles and fixed obstacles; random obstacles are obstacles that exist in at least one of the multiple maps in the comprehensive map; fixed obstacles are obstacles that exist in multiple maps in the comprehensive map;
[0063] Multiple maps include: maps with different scenarios or different constraints; different constraints include: different environments, different time levels, different obstacle distributions and / or different preset scenario weights;
[0064] S2, calculating the optimal path from the starting point to the target point based on the information of the comprehensive map and the predetermined path planning algorithm, including:
[0065] Calculate the path cost value and heuristic function value of the neighbor nodes of the selected node in the comprehensive map in each map of the comprehensive map;
[0066] The path cost values and heuristic function values of the neighboring nodes are weightedly calculated according to the predetermined weights of each map in the comprehensive map to obtain the total path cost value, total heuristic function value and total cost of the neighboring nodes, and the selected node is used as the parent node of the node with the smallest total path cost value among the neighboring nodes;
[0067] The neighbor node with the smallest total cost value is selected as the next selected node. When the selected node is the target point, the path is traced back according to the parent-child relationship between the nodes to obtain the optimal path from the starting point to the target point.
[0068] Preferably, the predetermined path planning algorithm is an A* search algorithm.
[0069] Embodiment 2:
[0070] In traditional path planning, the optimal path search is usually performed based on a single map, while the embodiments of the present invention take into account the combined impact of multiple maps. Specifically, each map represents a different scenario or constraint, such as different obstacle distributions or scenario weights; during the path planning process, the path cost is calculated separately for each map, including the cumulative path length and heuristic distance from the starting point to the target point; then, the path cost of each map is multiplied by the corresponding weight for weighting, and the total path cost is finally obtained, and the optimal path is selected based on this standard. This multi-map weighted mechanism can effectively respond to complex decision-making requirements in multiple scenarios. It can not only quickly plan paths, but also take into account the multi-dimensional limitations of maps and optimize the path planning process.
[0071] Moreover, in real environments, obstacles are often random or dynamically changing, and traditional algorithms handle these unpredictable obstacles in a relatively simple manner or directly discard them. An embodiment of the present invention designs an obstacle replacement strategy. When a random obstacle affects the path search, an open space node with the smallest heuristic distance (h value) is found near the obstacle, and the path cost of the node is calculated as a reference value for the current obstacle node. Although the calculation of the path cost is based on the replacement node, the algorithm does not change the actual selection of the obstacle node, but retains the position of the obstacle node in the planned path. This ensures that the impact of obstacles on path planning is fully considered, and effectively improves the flexibility and adaptability of path planning. This replacement mechanism is particularly suitable for application in dynamic environments, such as robot navigation or intelligent transportation application scenarios, and can significantly improve the reliability and execution efficiency of planning. As a result, Figure 2 FIG. 1 is a flow chart of a multi-map path planning method according to an embodiment of the present invention. Figure 2 As shown, the method includes:
[0072] Step 1: Obtain the information of the comprehensive map, the starting point and the target point location of the path planning.
[0073] The comprehensive map is: a map set formed by integrating the information of multiple maps; the information of the comprehensive map includes: the predetermined weight of each map in the comprehensive map, the obstacle distribution and the obstacle type of each node in the comprehensive map;
[0074] Obstacle types include: random obstacles and fixed obstacles; random obstacles are obstacles that exist in at least one of the multiple maps in the comprehensive map; fixed obstacles are obstacles that exist in multiple maps in the comprehensive map;
[0075] The multiple maps include: maps with different scenarios or different constraints; different constraints include: different environments, different time levels, different obstacle distributions and / or different preset scenario weights.
[0076] In a specific embodiment, the comprehensive map includes three maps (such as map_1, map_2, map_3), and the weights of the three maps are: map_1=0.4, map_2=0.3, map_3=0.3.
[0077] Step 2: Initialize the set of nodes to be calculated (openlist) and the set of visited nodes (closelist), and add the starting point to the set of nodes to be calculated.
[0078] In a specific embodiment, when the set of nodes to be calculated is empty, an empty path is output and the parameter disTraj is set to -1, and then the process ends.
[0079] Step 3: Select the node with the smallest total cost value (f value) from the set of nodes to be calculated as the current parent node, remove the current parent node from the set of nodes to be calculated, and add the current parent node to the set of visited nodes.
[0080] Step 4: determine whether the current parent node is the target point. If so, trace back the path through the parent-child relationship between the nodes in the visited node set to obtain the planned path and end the process.
[0081] If not, multiple nodes among the neighbor nodes of the current parent node that are within the effective range of the comprehensive map, are not fixed obstacles, and are not in the visited node set are selected as the nodes to be visited.
[0082] Preferably, the neighbor node is: a node adjacent to the selected node in the integrated map.
[0083] Preferably, the planned path is obtained by tracing back the path of the parent-child relationship between each node in the visited node set, including: taking the target point as the current node, searching for the parent node of the current node in the visited node set, and updating the current node to the parent node until the current node is the starting point, and the planned path is obtained.
[0084] Step 5, looping to determine whether each to-be-visited node in each map in the comprehensive map is an obstacle on each map in the comprehensive map, if so, selecting a replacement node from the surrounding nodes of the current to-be-visited node through a predetermined obstacle replacement strategy, and calculating the path cost value (g(i) value) and heuristic function value (h(i) value) of the replacement node in the current map as the path cost value and heuristic function value of the current to-be-visited node in the current map;
[0085] If not, calculate the path cost and heuristic function value of the current node to be visited in the current map.
[0086] Preferably, the heuristic function value is obtained by calculating the Euclidean distance, specifically, by the following formula:
[0087]
[0088] h(n) represents the h value from point n to the target point, x1 and y1 represent the coordinates of point n; x2 and y2 represent the coordinates of the target point.
[0089] In a specific embodiment, the predetermined obstacle replacement strategy for selecting a replacement node from the surrounding nodes of the current node to be visited by using a predetermined obstacle replacement strategy is:
[0090] Acquire surrounding nodes in eight directions with the node to be visited as the center, wherein the eight directions are: up, down, left, right, and four diagonal positions; preferably, the surrounding nodes are: nodes that are within the effective range of the current map, are not fixed obstacles or random obstacles, are not in the visited node set, and are not neighbor nodes of the current parent node;
[0091] The node with the smallest heuristic function value among the surrounding nodes is selected as the replacement node.
[0092] Preferably, if there are no surrounding nodes that meet the conditions around the node to be visited, an inaccessible flag is returned, and the path cost value of the node to be visited is set to infinity.
[0093] Step 6, calculate the total path cost value (g value), the total heuristic function value (h value) and the total cost of each node to be visited.
[0094] Preferably, the total path cost is calculated by the following formula:
[0095]
[0096] g represents the total path cost, g(i) represents the path cost of the node to be visited on the i-th map, mum_maps represents the number of all maps, i represents the i-th map, and w(i) represents the predetermined weight of the i-th map;
[0097] The total heuristic function value is calculated by the following formula:
[0098]
[0099] h represents the total heuristic function value, h(i) represents the heuristic function value of the node to be visited on the i-th map;
[0100] The total cost is calculated using the following formula:
[0101] f=g+h
[0102] f represents the total cost.
[0103] Step 7, determine whether each node to be visited is in the set of nodes to be calculated. If so, select the node with the smallest total path cost in the set of nodes to be calculated, set the current parent node as the parent node of the node, and update the total path cost and total cost of the node to the total path cost and total cost calculated based on the current parent node; if not, add the node to be visited to the set of nodes to be calculated.
[0104] Step 8, return to step 3.
[0105] In a specific embodiment, Figure 3 FIG. 1 is a flow chart of an obstacle replacement strategy in a multi-map path planning method according to an embodiment of the present invention. Figure 3 As shown, the obstacle replacement strategy includes:
[0106] (1) Taking the obstacle node as the center, obtain the surrounding nodes in eight directions, where the surrounding nodes in the eight directions are: the surrounding nodes in the top, bottom, left, right, and four diagonal positions;
[0107] (2) Add the surrounding nodes that are within the effective range of the current map, are not fixed obstacles or random obstacles, are not in the visited node set, and are not neighbor nodes of the current parent node to the possible_neighbors set;
[0108] (3) Determine whether the possible_neighbors set is empty. If so, set the g value to infinity; if not, calculate the h values of all surrounding nodes, i.e., replacement nodes, in the possible_neighbors set, and select the surrounding node with the smallest h value as the final replacement node, which means that the straight-line distance from the surrounding node to the target point is the shortest (the distance between two points), and calculate the g value of the surrounding node;
[0109] (4) Output the g value of the final replacement node.
[0110] In a specific embodiment, Figure 4 FIG. 1 is a schematic diagram of an optimal path on a comprehensive map in a multi-map path planning method according to an embodiment of the present invention. Figure 4 As shown in the figure, the black part is a fixed obstacle, the gray part is a random obstacle, the red dot is the starting point, and the blue dot is the target point. By combining multiple maps of the comprehensive map and their corresponding weights, the A* search algorithm is used in combination with multi-map weighting and obstacle replacement strategy to generate an optimal path from the starting point to the target point, where the optimal path passes through the nodes of random obstacles through the obstacle replacement strategy.
[0111] The embodiments of the present invention improve the accuracy and efficiency of path planning by integrating the distribution and weights of obstacles in multiple maps through an improved path planning algorithm. Specifically, by introducing mechanisms such as weighting of multiple maps and obstacle replacement strategies, path planning can maintain high stability and flexibility in complex and changing environments, ensuring that the optimal path can be found in the map and that timely responses can be made when encountering dynamic obstacles.
[0112] Embodiment three:
[0113] The present invention also provides a multi-map path planning device, such as Figure 5 As shown, the device includes a processor 501, a memory 502, a bus 503, and a computer program stored in the memory 502 and executable on the processor 501. The processor 501 includes one or more processing cores. The memory 502 is connected to the processor 501 via the bus 503. The memory 502 is used to store program instructions. When the processor 501 executes the computer program, the steps in the above method embodiment of the first embodiment of the present invention are implemented.
[0114] Further, as an executable solution, the multi-map path planning device can be a computer unit, which can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The computer unit may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that the composition structure of the above-mentioned computer unit is only an example of a computer unit and does not constitute a limitation on the computer unit. It may include more or less components than the above, or a combination of certain components, or different components. For example, the computer unit may also include input and output devices, network access devices, buses, etc., which are not limited in the embodiments of the present invention.
[0115] Further, as an executable solution, the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer unit, and various interfaces and lines are used to connect the various parts of the entire computer unit.
[0116] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the computer unit by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0117] Embodiment 4:
[0118] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the method described above are implemented.
[0119] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.
Claims
1. A multi-map path planning method, characterized in that: include: S1, obtain the information of the comprehensive map, the starting point and the target point of the path planning, where: The comprehensive map is: a map set formed by integrating information of multiple maps; the information of the comprehensive map includes: a predetermined weight of each map in the comprehensive map, obstacle distribution, and obstacle type of each node in the comprehensive map; The obstacle types include random obstacles and fixed obstacles; the random obstacles are obstacles that exist in at least one of the multiple maps of the comprehensive map; the fixed obstacles are obstacles that exist in multiple maps of the comprehensive map; The multiple maps include: maps of different scenarios or different constraints; the different constraints include: different environments, different time levels, different obstacle distributions and / or different preset scenario weights; S2, calculating the optimal path from the starting point to the target point according to the information of the comprehensive map and a predetermined path planning algorithm, including: Calculating the path cost value and heuristic function value of the neighbor nodes of the selected node in the comprehensive map in each map of the comprehensive map; Performing weighted calculation on the path cost value and heuristic function value of the neighboring node according to the predetermined weight of each map in the comprehensive map, obtaining the total path cost value, total heuristic function value and total cost of the neighboring node, and taking the selected node as the parent node of the node with the smallest total path cost value among the neighboring nodes; The neighbor node with the smallest total cost value is selected as the next selected node. When the selected node is the target point, the path is traced back according to the parent-child relationship between the nodes to obtain the optimal path from the starting point to the target point.
2. The multi-map path planning method according to claim 1, characterized in that: In step S2: The neighbor nodes are: nodes adjacent to the selected node in the comprehensive map; The heuristic function value is obtained by calculating the Euclidean distance.
3. The multi-map path planning method according to claim 1, characterized in that: In step S2, the neighbor node with the smallest total cost value is selected as the next selected node. When the selected node is the target point, the path is traced back according to the parent-child relationship between the nodes to obtain the optimal path from the starting point to the target point, including: S21, initializing a set of nodes to be calculated and a set of visited nodes, and adding the starting point to the set of nodes to be calculated; S22, selecting a node with the smallest total cost value from the set of nodes to be calculated as the current parent node, removing the current parent node from the set of nodes to be calculated, and adding the current parent node to the set of visited nodes; S23, determining whether the current parent node is the target point, if so, tracing back the path through the parent-child relationship between the nodes in the visited node set, obtaining the planned path, and ending the process; If not, multiple nodes are selected from the neighbor nodes of the current parent node, which are located within the effective range of the comprehensive map, are not fixed obstacles, and are not in the visited node set, as nodes to be visited; In step S2, the path cost value and the heuristic function value of the neighboring nodes of the selected node in the comprehensive map in each map in the comprehensive map are calculated, including: S24, cyclically judging whether each of the to-be-visited nodes in each map in the comprehensive map is an obstacle in each map in the comprehensive map, and if so, selecting a replacement node from the surrounding nodes of the current to-be-visited node through a predetermined obstacle replacement strategy, and calculating the path cost value and heuristic function value of the replacement node in the current map as the path cost value and heuristic function value of the current to-be-visited node in the current map; If not, calculate the path cost and heuristic function value of the current node to be visited in the current map; And, in step S2, the path cost value and the heuristic function value of the neighboring node are weightedly calculated according to the predetermined weight of each map in the comprehensive map, the total path cost value, the total heuristic function value and the total cost of the neighboring node are obtained, and the selected node is used as the parent node of the node with the smallest total path cost value among the neighboring nodes, including: S25, calculating the total path cost value, the total heuristic function value and the total cost of each of the nodes to be visited; S26, determining whether each of the nodes to be visited is in the set of nodes to be calculated; if so, selecting a node with the smallest total path cost in the set of nodes to be calculated, setting the current parent node as the parent node of the node, and updating the total path cost and total cost of the node to the total path cost and total cost calculated according to the current parent node; if not, adding the node to be visited to the set of nodes to be calculated; S27, return to step S22.
4. The multi-map path planning method according to claim 3, characterized in that: In step S24, a predetermined obstacle replacement strategy is used to select a replacement node from the surrounding nodes of the current node to be visited. The predetermined obstacle replacement strategy is: Acquire surrounding nodes in eight directions with the node to be visited as the center, the eight directions are: up, down, left, right and four diagonal positions, and the surrounding nodes are: nodes that are within the effective range of the current map, are not fixed obstacles or random obstacles, are not in the visited node set, and are not neighbor nodes of the current parent node; A node with the smallest heuristic function value is selected from the surrounding nodes as a replacement node.
5. The multi-map path planning method according to claim 4, characterized in that: If there are no surrounding nodes that meet the conditions around the node to be visited, an inaccessible flag is returned and the path cost value of the node to be visited is set to infinity.
6. The multi-map path planning method according to claim 3, characterized in that: In step S23, when the current parent node is the target point, the planned path is obtained by tracing back the path of the parent-child relationship between the nodes in the visited node set, including: The target point is taken as the current node, the parent node of the current node is searched in the visited node set, and the current node is updated to the parent node, until the current node is the starting point, and the planned path is obtained.
7. The multi-map path planning method according to claim 3, characterized in that: In step S25, the total path cost value, the total heuristic function value and the total cost of each of the nodes to be visited are calculated, where: The total path cost is calculated by the following formula: g represents the total path cost value, g(i) represents the path cost value of the node to be visited on the i-th map, num_maps represents the number of all maps, i represents the i-th map, and w(i) represents the predetermined weight of the i-th map; The total heuristic function value is calculated by the following formula: h represents the total heuristic function value, h(i) represents the heuristic function value of the node to be visited on the i-th map; The total cost is calculated by the following formula: f=g+h f represents the total cost.
8. The multi-map path planning method according to claim 1, characterized in that: The predetermined path planning algorithm is an A* search algorithm.
9. A multi-map path planning device, characterized in that: It includes a memory and a processor, the memory stores at least one program, and the at least one program is executed by the processor to implement the multi-map path planning method as described in any one of claims 1 to 8.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the multi-map path planning method as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Multi-constraint multi-level path planning method
CN115936279A
A*path planning method based on multi-attribute map
CN118192605A
A-satellite unmanned aerial vehicle path planning method and system based on adaptive weight and layering
CN118938962A
Vehicle motion path planning method
CN119043364A
Apparatus for predicting disease based on sleep analysis installed in senior house
KR1020250057193A