Path planning method and device, electronic equipment, storage medium and vehicle
By constructing a path planning method based on regular hexagonal mesh and improving ant colony algorithm, the safety problem of flight path planning in complex wild environments is solved, and efficient and safe path planning for multiple target points in three-dimensional space is achieved.
Patent Information
- Application Number
- CN202410072603.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-16
- Publication Date
- 2025-07-18
AI Technical Summary
The prior art cannot effectively combine weather data and terrain environmental factors in complex environments in the field, resulting in abnormal flight path planning and reducing pilot safety.
A two-dimensional environmental map is constructed based on a regular hexagonal mesh and pre-acquisitioned environmental factors, a three-dimensional environmental map is constructed in combination with a preset digital elevation model, and a path is planned in a two-dimensional environmental map using an improved ant colony algorithm, and a path is constructed and optimized in a three-dimensional environmental map.
On the basis of considering complex environmental factors, the aircraft is safe and efficient multi-objective point path planning in three-dimensional space, improving flight safety and path optimization efficiency.
Smart Images

Figure CN120333429A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of autonomous driving, and in particular, to a path planning method, device, electronic device, storage medium, and vehicle. Background Art
[0002] During the flight of an aircraft, in addition to the operation of the pilot, path planning is required to assist the pilot in driving. Especially in complex environments such as the wild, a short and safe flight path is crucial for the pilot.
[0003] In related technologies, path planning algorithms generally perform path planning and consideration based on existing flight routes. For example, a path planning scheme based on weather data, wind data (direction and speed at a certain altitude), and temperature data (temperature at a certain altitude) of an existing flight route. However, although the above method can perform flight path planning, in a complex environment without a flight route in the wild, it is impossible to perform path planning based on the existing planned flight route combined with weather data. Moreover, the planned route cannot take into account the influence of other terrain environment factors. Therefore, it will lead to abnormal flight path planning and reduce the safety guarantee of the pilot. Summary of the Invention
[0004] To overcome the problems existing in related technologies, the present invention provides a path planning method, device, electronic device, storage medium, and vehicle.
[0005] According to a first aspect of an embodiment of the present invention, a path planning method is provided, the method including:
[0006] Constructing a two-dimensional environment map based on a regular hexagonal grid and pre-acquired environmental factors, and constructing a three-dimensional environment map based on a preset digital elevation model and the pre-acquired environmental factors;
[0007] Planning a path between the departure place and the destination in the two-dimensional environment map according to an improved ant colony algorithm to obtain a two-dimensional path;
[0008] Constructing a three-dimensional path according to the two-dimensional path in the three-dimensional environment map;
[0009] Performing an optimization process on the three-dimensional path to obtain a target three-dimensional path.
[0010] Optionally, the types of the environmental factors include weather factors and non-weather factors. The weather factors are divided into a first weather factor and a second weather factor according to the influence range attribute. The first weather factor includes at least one of wind speed, fog, and rain, and the second weather factor includes at least one of cloud and thunder. The non-weather factors include at least one of mountains, ground buildings, no-fly zones, and signal interference areas.
[0011] Optionally, constructing the two-dimensional environmental map based on the regular hexagon grid and the pre-acquired environmental factors includes:
[0012] Constructing a regular hexagon grid by performing grid encoding on the center points, sizes, and vertex coordinates of the pre-set regular hexagons based on an orthogonal row-column coordinate system;
[0013] Wherein, each regular hexagon grid is a cell, and the cell stores a cell obstacle type, a cell elevation, and a cell passage coefficient. The cell elevation is the passable elevation in the air, and the cell passage coefficient is determined according to a first passage coefficient and a second passage coefficient corresponding to each cell. The first passage coefficient is generated for each cell by the first weather factor through a preset moving window method, and the second passage coefficient is generated for each cell by the second weather factor and the non-weather factor through a preset effective passage area ratio;
[0014] Constructing a two-dimensional environmental map corresponding to a preset environmental area according to the regular hexagon grid, the cell elevation, the cell obstacle type, and the cell passage coefficient. The preset environmental area includes the starting point and the destination point.
[0015] Optionally, constructing the three-dimensional environmental map based on the preset digital elevation model and the pre-acquired environmental factors includes:
[0016] Obtaining the planar information and elevation information corresponding to the non-weather factor, obtaining the influence range information corresponding to the signal interference area in the weather factor and the non-weather factor, and obtaining the DEM data corresponding to the terrain in the preset environmental area;
[0017] Fusing the planar information and elevation information corresponding to the non-weather factor and the DEM data corresponding to the terrain to construct a first equivalent map;
[0018] Fusing the influence range information corresponding to the signal interference area in the weather factor and the non-weather factor to construct a second equivalent map;
[0019] Generating a three-dimensional environmental map according to the first equivalent map and the second equivalent map.
[0020] Optionally, planning a path between the starting point and the destination in the two-dimensional environmental map according to the improved ant colony algorithm to obtain a two-dimensional path includes:
[0021] Determining a starting cell corresponding to the starting point and at least one target cell corresponding to the destination in the two-dimensional environmental map according to the pre-set starting point and destination;
[0022] Calculate the shortest distance between the starting grid element and the target grid element according to the greedy algorithm, and record the number of grid elements of the shortest distance;
[0023] Obtain the ratio of the number of grid elements of the shortest distance to the total number of grid elements, and use the ratio as the initial pheromone;
[0024] Obtain the Euclidean distance between the starting grid element and the target grid element, and use the Euclidean distance as the result of the heuristic function;
[0025] Store the target grid element in the taboo table for search iteration;
[0026] When it is detected that the number of iterations reaches the first threshold, obtain the traversal order corresponding to the target grid element;
[0027] Perform iterative search according to the initial pheromone, the pheromone evaporation rate obtained based on the curve decay model, the result of the heuristic function, and the traversal order corresponding to the target grid element to obtain a two-dimensional path.
[0028] Optionally, constructing a three-dimensional path according to the two-dimensional path in the three-dimensional environment map includes:
[0029] Convert the grid path corresponding to the two-dimensional path into a broken line path, and the broken line path is generated by connecting the center points of each grid element in the grid path;
[0030] Obtain a three-dimensional path according to the mapping of each center point in the broken line path in the three-dimensional environment map, and the three-dimensional path includes elevation information.
[0031] Optionally, optimizing the three-dimensional path to obtain a target three-dimensional path includes:
[0032] Query a local path in the three-dimensional path whose number of flight climbs within a preset time is greater than a second threshold;
[0033] Optimize the local path to obtain a locally optimized path;
[0034] Generate a target three-dimensional path according to the locally optimized path and the three-dimensional path.
[0035] Optionally, optimizing the local path to obtain a locally optimized path includes:
[0036] Judge whether the flight device can pass normally between the lifting nodes in the local path through the grid element passing coefficient, and the lifting nodes include a starting point and at least one lifting node;
[0037] If so, obtain the path between the starting point and the farthest lifting node in the local path as the locally optimized path.
[0038] According to a second aspect of an embodiment of the present invention, a path planning device is provided. The device includes:
[0039] A first construction module, configured to construct a two-dimensional environment map based on a regular hexagonal grid and pre-acquired environmental factors, and construct a three-dimensional environment map based on a preset digital elevation model and the pre-acquired environmental factors;
[0040] A planning module, configured to plan a path between a starting point and a destination in the two-dimensional environment map according to an improved ant colony algorithm to obtain a two-dimensional path;
[0041] A second construction module, configured to construct a three-dimensional path in the three-dimensional environment map according to the two-dimensional path;
[0042] A target path acquisition module, configured to optimize the three-dimensional path to obtain a target three-dimensional path.
[0043] According to a third aspect of an embodiment of the present invention, an electronic device is provided, including:
[0044] A processor;
[0045] A memory for storing executable instructions of the processor;
[0046] Wherein, the processor is configured to execute the instructions to implement the path planning method as described in the first aspect.
[0047] According to a fourth aspect of an embodiment of the present invention, a computer storage medium is provided. When the instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal can execute the path planning method as described in the first aspect of the present invention.
[0048] According to a fifth aspect of an embodiment of the present invention, a vehicle is provided, including the path planning device as described in the second aspect of the present invention.
[0049] According to a sixth aspect of an embodiment of the present invention, a computer program product is provided. When the computer program product runs on a terminal device, the terminal device executes the path planning method as described in any one of the first aspects above.
[0050] The technical solution provided by the embodiment of the present invention may include the following beneficial effects:
[0051] The present invention constructs a two-dimensional environmental map based on a regular hexagon grid and pre-acquired environmental factors, and constructs a three-dimensional environmental map based on a preset digital elevation model and the pre-acquired environmental factors; plans a path between the starting point and the destination in the two-dimensional environmental map according to an improved ant colony algorithm to obtain a two-dimensional path; constructs a three-dimensional path according to the two-dimensional path in the three-dimensional environmental map; and optimizes the three-dimensional path to obtain a target three-dimensional path. By analyzing the environment in complex areas such as the wild, the present invention determines environmental factors affecting flight, quantifies the flight environmental factors through a regular hexagon grid, integrates the environmental factors affecting flight into a two-dimensional plane, and performs two-dimensional flight path planning based on an optimized ant colony algorithm to obtain a two-dimensional path. Based on the equivalent simulated three-dimensional environment obtained from the two-dimensional path, the present invention calculates and optimizes to obtain a three-dimensional flight path. The implementation mode of the present invention enables the consideration of the influence of complex environmental factors in three-dimensional path planning. In scenarios such as land-air coordinated operations and mountain rescue, the optimal path for the aircraft to fly to multiple destinations can be planned in advance, which takes a short time and has high safety, provides a certain reference for subsequent decision-making, better assists the driver, and ensures the driving safety of the driver.
[0052] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present invention, and are used together with the specification to explain the principles of the present invention.
[0054] Figure 1 is one of the step flowcharts of a path planning method shown according to an exemplary embodiment;
[0055] Figure 2 is the second of the step flowcharts of a path planning method shown according to an exemplary embodiment;
[0056] Figure 3 is the third of the step flowcharts of a path planning method shown according to an exemplary embodiment;
[0057] Figure 4 is the fourth of the step flowcharts of a path planning method shown according to an exemplary embodiment;
[0058] Figure 5 is the block diagram of a path planning device shown according to an exemplary embodiment;
[0059] Figure 6 is the block diagram of an electronic device shown according to an exemplary embodiment;
[0060] Figure 7 It is a schematic diagram of an overall path planning process shown according to an exemplary embodiment;
[0061] Figure 8 It is a schematic diagram of grid coding using an orthogonal row-column coordinate system shown according to an exemplary embodiment;
[0062] Figure 9 It is a schematic diagram of judging the path planning order of multiple target points shown according to an exemplary embodiment;
[0063] Figure 10 It is a schematic diagram of an improved ant colony algorithm process shown according to an exemplary embodiment;
[0064] Figure 11 It is a schematic diagram of converting grid roads into polyline roads shown according to an exemplary embodiment;
[0065] Figure 12 It is a schematic diagram of calculating the path height in a three-dimensional space shown according to an exemplary embodiment;
[0066] Figure 13 It is a schematic diagram of a three-dimensional path optimization method shown according to an exemplary embodiment. Specific embodiments
[0067] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0068] The first embodiment of the present invention relates to a path planning method, Figure 1 It is a step flowchart of a path planning method shown according to an exemplary embodiment, as Figure 1 shown, including the following steps:
[0069] Step 101, constructing a two-dimensional environment map based on a regular hexagonal grid and pre-acquired environmental factors, and constructing a three-dimensional environment map based on a preset digital elevation model and the pre-acquired environmental factors;
[0070] Further, the types of the environmental factors include weather factors and non-weather factors. The weather factors are divided into first weather factors and second weather factors according to the influence range attribute. The first weather factors include at least one of wind speed, fog, and rain. The second weather factors include at least one of cloud and thunder. The non-weather factors include at least one of mountain peaks, ground buildings, no-fly zones, and signal interference areas.
[0071] It should be noted that in the embodiments of the present application, the pre-acquired environmental factors are determined according to the influence degree on the flight path planning.
[0072] Specifically, the factors that affect the flight path planning in a complex environment can be divided into weather factors and non-weather factors. Among them, the non-weather factors can include mountain peaks, ground buildings, no-fly zones, and signal interference areas. The weather factors can include weather such as clouds, rain, thunderstorms, wind speed, and fog, which cause certain obstacles to the path planning by affecting the visible range and flight safety of the flying device.
[0073] In particular, since weather factors usually have different effects on flight according to the severity of the weather conditions themselves, but as long as mountain peaks, ground buildings, and no-fly zones appear, they are areas where flight cannot enter.
[0074] Therefore, the two-dimensional mapping of environmental factors is constructed in the following manner: Determine the most suitable flight airspace and safe flight spacing of the aircraft according to the aircraft type; Determine the fuzzy influence degree of various weather factors on a specific aircraft, and determine it with the specific numerical passing coefficient P. And consider mountain peaks, ground buildings, and no-fly zones as impassable, and the grid elements involved later can be represented as 0; Vectorize the non-weather factors, that is, mountain peaks, ground buildings, no-fly zones, and signal interference areas, and record the height range attribute; Based on the consideration of different attributes of weather factors, that is, the weather factors are divided into first weather factors and second weather factors according to the influence range attribute, rasterize the first weather factors such as wind speed, fog, and rain, and record the passing coefficient and influence height range of the wind speed, fog, and rain on the flight in the raster; In addition, for the judgment of the passing coefficient of the wind speed, fog, and rain on the flight, consider the aircraft type, the situation with the largest proportion in the three-dimensional space range of the grid element, and make a fuzzy classification judgment according to experience and refer to relevant research; Vectorize the second weather factors such as clouds and thunderstorms, and record the height range attribute.
[0075] Further, in step 101, the constructing the two-dimensional environmental map based on the regular hexagon grid and the pre-acquired environmental factors includes:
[0076] Construct grid encoding based on the center point, size, and vertex coordinates of the pre-set regular hexagon in the orthogonal row and column coordinate system to obtain a regular hexagon grid;
[0077] Among them, each of the regular hexagonal grids is a grid cell, and the grid cell stores a grid cell obstacle type, a grid cell elevation, and a grid cell passing coefficient. The grid cell elevation is the elevation for air passage, and the grid cell passing coefficient is determined according to a first passing coefficient and a second passing coefficient corresponding to each grid cell. The first passing coefficient is generated for each grid cell by the first weather factor through a preset moving window method, and the second passing coefficient is generated for each grid cell by the second weather factor and the non-weather factor through a preset effective passing area ratio;
[0078] Construct a two-dimensional environment map corresponding to a preset environment area according to the regular hexagonal grid, the grid cell elevation, the grid cell obstacle type, and the grid cell passing coefficient. The preset environment area includes the starting point and the arrival point.
[0079] It should be noted that in the embodiment of the present application, first, a two-dimensional map is constructed. A two-dimensional environment map is constructed based on a regular hexagonal grid and pre-acquired environmental factors. The center point of the regular hexagon can be preset as (X, Y), the size is Size, and the vertices are Point. The vertex coordinates are calculated according to the center point, and then a grid coding is constructed using an orthogonal row and column coordinate system. The upper left corner is used as the starting point (0, 0) of the grid coding, and the grid coding of other grids is calculated according to the rules. The coding situation of the entire area is shown as Figure 8 .
[0080] Each of the regular hexagonal grids is a grid cell, and the grid cell stores a grid cell obstacle type, a grid cell elevation, and a grid cell passing coefficient. Specifically, the construction of the regular hexagonal grid attribute is the construction of the grid cell attribute. In order to achieve the goal of storing multiple pieces of information in the same data, it is necessary to store the grid cell elevation, the grid cell obstacle type, and the grid cell passing coefficient separately. Among them, the design of storing the elevation in the grid cell is quite different. Since the air elevation is based on the entire airspace range, the air-passable elevation is used to represent the elevation range in which an aerial vehicle can pass within the grid cell.
[0081] For the grid cell passing coefficient, the influence of the environmental factors of the aerial path planning is integrated into the regular hexagonal grid cell. Therefore, for different environmental factors, different methods are used for integration to obtain the final grid cell passing coefficient of each grid cell.
[0082] Specifically, for the first weather factors such as wind speed, fog, and rain, the moving window method is adopted, and the circumscribed rectangle of the grid cell is used as the moving range to calculate the first passing coefficient in this area, as shown in the following formula 1.
[0083]
[0084] For non-weather factors and the second weather factor, namely clouds, thunderstorms, mountains, ground buildings, no-fly zones, and signal interference areas, the method of effective passage area ratio is used for quantification to obtain the second passage coefficient. Among them, the effective passage area ratio is the ratio of all passable areas in a certain area to the total area of the area, reflecting the overall passage situation of the area. In the quantification of air environment factors, based on the flyable height range, all area height values within the grid element range are statistically obtained to obtain the area that is completely impassable and the passable area within the grid element, referring to the following formula 2.
[0085]
[0086] Compare the effective passage area ratio with the passage threshold M. If it is greater than the threshold, this grid element is regarded as impassable. If it is less than the threshold, it is regarded as passable. In the same area, under grid element maps of different sizes, the thresholds are experimentally analyzed with 0.2, 0.4, and 0.5, indicating that when the threshold is 0.4, the connectivity and geometric shape of obstacles within the area range are guaranteed. Therefore, considering the characteristics of the grid map, it is preferably to use 0.4 as the threshold of the effective passage area ratio.
[0087] The determination of the passage coefficient of a grid element includes the determination of the passage coefficient of a single environmental factor in the grid element and the determination of the passage coefficient through the superposition and integration of multiple environmental factors. The determination of the passage coefficient of a single environmental factor is based on the basic attributes of the environmental factor and is difficult to quantitatively calculate through specific formulas. Therefore, experience is used for fuzzy classification and judgment.
[0088] For multiple environmental factors in the grid element, the method of overlay analysis is used for comprehensive expression. The passage degree of a local area is often limited by the factor with the greatest degree of obstruction. Therefore, the passage coefficient of the factor with the greatest influence and the smallest passage coefficient is used as the passage coefficient of the grid element.
[0089] Further, in one embodiment, as Figure 2 shown, step 101, the construction of the three-dimensional environmental map based on the preset digital elevation model and the pre-acquired environmental factors includes:
[0090] Step 1011, obtain the planar information and elevation information corresponding to the non-weather factor, obtain the influence range information corresponding to the weather factor and the signal interference area in the non-weather factor, and obtain the DEM data corresponding to the terrain in the preset environmental area;
[0091] Step 1012, fuse the planar information and elevation information corresponding to the non-weather factor and the DEM data corresponding to the terrain to construct the first equivalent map;
[0092] Step 1013: Integrate the influence range information corresponding to the signal interference areas in the weather factors and the non-weather factors to construct a second equivalent map;
[0093] Step 1014: Generate a three-dimensional environmental map based on the first equivalent map and the second equivalent map.
[0094] It should be noted that in the embodiments of the present application, to construct an equivalent DEM map of a three-dimensional space, that is, a three-dimensional environmental map, first, environmental factors are modeled.
[0095] Specifically, in the air environment, weather, mountains, ground buildings, and no-fly zones need to be simulated to carry out data structure design.
[0096] To realize the simulation of the environment, in the embodiments of the present application, environmental factors can be modeled in the following way: The meteorological environment often presents irregular influence areas. To improve the planning efficiency, clouds and thunderstorms in the area are regarded as cylinders; Ground buildings and no-fly zones are usually areas that cannot be penetrated by flight. Therefore, they are regarded as cubes; Other interferences such as radar signal effects are greatly related to the interference radius, emission location, emission angle, equipment performance itself, etc. To simplify subsequent calculations, all signal interference areas are regarded as hemispherical with the center (x, y) as the emission point, presenting from the ground surface, and the attenuation radius is R, obtaining Z(x, y), specifically referring to Formula 3.
[0097]
[0098] It should be noted that compared with a two-dimensional map, there is an elevation element in the construction of a three-dimensional map. Therefore, to construct an equivalent three-dimensional map for subsequent path planning, first, all elements need to be modeled in three-dimensional space. The elements include map elements and elevation elements. Secondly, equivalent DEM construction and integration are carried out according to the characteristics of different elements. Among them, the Digital Elevation Model (DEM) is a terrain model represented by absolute elevation or altitude. The basic process is as follows:
[0099] First, collect elevation information. Considering the characteristics of field flight, mainly consider extracting information on weather, mountains, ground buildings, no-fly zones, and signal interference areas. For ground buildings and no-fly zones, collect their planar information and corresponding elevation information; For signal interference areas and weather, use simulation methods to model and obtain their influence range information; For terrain, collect real regular grid DEM data.
[0100] Second, integrate ground buildings, no-fly zones and terrain to construct a first equivalent map MaP1, and the construction method is as shown in
[0101] Formula 4:
[0102]
[0103] Among them, in the above formula 4, It means that at the (x, y) coordinate position of the map MaP1, the elevations of the terrain and building data are compared, and the maximum value is assigned to MaP1.
[0104] Third, fuse various signal interference areas and weather information to construct the second equivalent map MaP2. To show the complex field environment, the signal interference areas, weather information (clouds, thunderstorms, etc.) and surface information are constructed separately to equivalently express the three-dimensional environment and construct MaP2.
[0105] Fourth, construct a three-dimensional space equivalent map with multiple layers, overlay the above maps MaP1 and MaP2, and comprehensively express the surface information and battlefield threat information to construct an equivalent three-dimensional space environment.
[0106] Step 102, plan the path between the departure place and the destination in the two-dimensional environment map according to the improved ant colony algorithm to obtain a two-dimensional path;
[0107] Furthermore, as Figure 3 shown, step 102 includes, that is, planning the path between the departure place and the destination in the two-dimensional environment map according to the improved ant colony algorithm to obtain a two-dimensional path includes:
[0108] Step 1021, determine the departure grid element corresponding to the departure place and at least one target grid element corresponding to the destination in the two-dimensional environment map according to the preset departure place and destination;
[0109] Step 1022, calculate the shortest distance between the departure grid element and the target grid element according to the greedy algorithm, and record the number of grid elements of the shortest distance;
[0110] Step 1023, obtain the ratio of the number of grid elements of the shortest distance to the total number of grid elements, and use the ratio as the initial pheromone;
[0111] Step 1024, obtain the Euclidean distance between the departure grid element and the target grid element, and use the Euclidean distance as the result of the heuristic function;
[0112] Step 1025, store the target grid element into the taboo table for search iteration;
[0113] Step 1026, when it is detected that the number of iterations reaches the first threshold, obtain the traversal order corresponding to the target grid element;
[0114] Step 1027: Perform iterative search based on the initial pheromone, the pheromone evaporation rate obtained based on the curve decay model, the result of the heuristic function, and the traversal order corresponding to the target grid element to obtain a two-dimensional path.
[0115] It should be noted that in the embodiment of the present application, the two-dimensional path planning is a path planning for multiple target points, that is, a path planning from one starting point to multiple destinations. Therefore, in this planning process, it is necessary to determine a traversal order of the target points, that is, the traversal order corresponding to multiple target grid elements.
[0116] It should be noted that in the embodiment of the present application, as Figure 9 shown, in the air path planning, although there are multiple air target points, almost all of them are single digits, and the determination of the order of the target points has an impact on the overall air path planning. In the air path planning, the method and process for determining the order of the target points are as follows:
[0117] First, establish a regular hexagon grid map and set the starting grid element and the target grid element.
[0118] Second, use the greedy algorithm to calculate the shortest distance between the starting grid element and the target grid element pairwise, and record the number of their grid elements.
[0119] Third, initialize the pheromone. Calculate the ratio of the number of grid elements of the shortest distance between two target grid elements to the total number of grid elements, and use it as the initial pheromone between the two target grid elements.
[0120] Fourth, calculate the Euclidean distance between the starting grid element and the target grid element pairwise, and use it as the result of the heuristic function.
[0121] Fifth, initialize the taboo list, store all target grid elements, and perform search.
[0122] Sixth, after one traversal is completed, update the pheromone concentration.
[0123] Seventh, check whether the iteration count limit is reached. If not, continue the iteration; if so, end and obtain the traversal order of the target points.
[0124] Furthermore, in the two-point path planning, it is to determine the path design from the starting point to the target point, which is manifested as the selection of all connecting grid elements from the starting grid element to the target grid element in the regular hexagon grid. Therefore, since the start node and the end node of the ant colony algorithm are both determined and there are no other target nodes; the node selection, state transition probability function, etc. in the ant colony algorithm are mainly applied to how the current grid element selects the next grid element. The overall process is as Figure 10 shown.
[0125] First, initialize, set the initial value of the pheromone of each grid element, and set the pheromone evaporation rate, that is, the rate at which the pheromone disappears per unit time.
[0126] Among them, the total amount of pheromone refers to the total amount of pheromone left by ants on the entire search path after a search. In the ant colony algorithm, a constant Q is often used to represent it. The total amount of pheromone is determined according to the following formula 5:
[0127]
[0128] The constant Q is replaced by the Q(t) function, and different values are used to represent the total amount of pheromone at different iteration times.
[0129] In addition, in the embodiment of the present application, for the volatilization rate ρ, ρ expresses the speed of volatilization of the pheromone concentration. When the pheromone volatilizes too quickly, the residual pheromone will be low after one iteration of the ant, which has little guiding effect on the subsequent ant search. If the pheromone volatilizes slowly, it will cause too much pheromone residue in each path in the map, and it is easy for the ant search path to fall into the local optimal solution, resulting in the final path found not being the optimal path. Therefore, in view of the characteristics of the ant colony algorithm that it needs to search more irrelevant areas in the early stage and tends more and more to the optimal path in the later stage, the volatilization rate is set dynamically according to time changes. In order to better simulate the relationship between the pheromone volatilization efficiency and time, the curve attenuation model is introduced, as shown in the detailed formula 6:
[0130]
[0131] In the above formula 6, τ max represents the maximum value of the node pheromone concentration, τ min It represents the minimum value of node pheromone concentration, T represents the total number of iterations, and t represents the number of a certain iteration.
[0132] Second, the ants select nodes. Each ant starts from the starting point and selects the next cell according to the ant state transition probability until it finds the target point.
[0133] Among them, all the cells that have been found are tabooed k Record the remaining nodes that have not been changed, which is allowed. k , that is allowed k = Grid element of two-dimensional grid map - tabu k Ant k will not repeatedly select a node, so the probability of node i to all points in the taboo table set is 0.
[0134]
[0135] Among them, in the above formula 7, represents the probability that an ant k at node i chooses node j at a certain time t, τ ij(t) represents the pheromone concentration between node i and node j at a certain moment t, α is the pheromone influence factor, β is the heuristic function influence factor, and η ij (t) represents the heuristic function, which is used for state transition calculation.
[0136] When ant k starts from node i and selects the next node, it is determined by the heuristic function η and the pheromone concentration decide.
[0137] η is the heuristic function between node i and node j; α is the pheromone influence factor, which represents the influence degree of the pheromone released by the ant on the path selection. The larger the α value, the greater the influence of the pheromone on the ant's path selection in this ant colony algorithm. On the contrary, the smaller it is; β is the heuristic function influence factor, which reflects the influence of the road distance on the ant's selection. The larger the β value, the greater the influence of the distance in this ant colony algorithm.
[0138] Among them, in this application, the heuristic function is optimized, and the distance D and the passing cost H are used together to determine the factor η, as shown in Formula 8:
[0139]
[0140] Among them, D ij represents the distance influence from node i to node j, and H ij represents the passing cost from node i to j, which is calculated using the passing coefficient of node j. ξ1 and ξ2 represent D ij and H ij influence weights.
[0141] To consider the influence of global information and local information, the specific calculation method of the distance influence is as shown in Formula 9:
[0142]
[0143] Due to the characteristics of the regular hexagon grid, the distance from each grid cell node to any adjacent grid cell node is equal. Therefore, without considering the distance from node i to the adjacent node, d j,e is used to represent the distance from node j to the target point as the distance function.
[0144] Third, update the pheromone. After the ant selects the grid cell, the pheromone of the passed grid cell is updated.
[0145] Regarding how to determine the pheromone concentration value for road update, as shown in Formula 10:
[0146]
[0147] Among them, represents the increased pheromone concentration on this path, which is calculated according to the following Formula 11:
[0148]
[0149] For the pheromone concentration value in the neighboring area, as shown in Formula 12:
[0150]
[0151] Among them, is the increased concentration of pheromone in the neighboring area, calculated according to the following Formula 13:
[0152]
[0153] Among them, refers to the pheromone from node i, and d r (o i , o j ) refers to the distance between node i and node j.
[0154] Fourth, iterative search. Repeat the second and third steps until the preset stop condition (the number of iterations reaches the upper limit) is reached. In each iteration, the ant will select a path under the guidance of the pheromone trail. The pheromone is continuously updated and volatilized, continuously guiding the subsequent search process.
[0155] Fifth, output the result. Output the found optimal solution and the corresponding path, and end the algorithm.
[0156] Step 103, construct a three-dimensional path in the three-dimensional environmental map according to the two-dimensional path;
[0157] Further, constructing a three-dimensional path in the three-dimensional environmental map according to the two-dimensional path includes: converting the grid path corresponding to the two-dimensional path into a broken line path, where the broken line path is generated by connecting the center points of each grid cell in the grid path; obtaining a three-dimensional path according to the mapping of each center point in the broken line path in the three-dimensional environmental map, and the three-dimensional path includes elevation information.
[0158] It should be noted that in the embodiment of the present application, after obtaining the two-dimensional path in Step 102, it is necessary to convert the two-dimensional path to an equivalent three-dimensional map to construct a three-dimensional path. Among them, path conversion, that is, converting the path from a two-dimensional plane to a three-dimensional space, mainly deals with the height.
[0159] Therefore, it is necessary to first convert the grid path into a broken line path. Specifically, connect the centers of all grid cells in the grid path, and form a broken line with the center points of all grid cells and the intersection points of the connection line and the grid cells, so as to form a broken line path. For example, as Figure 11 shown, connecting the center points of the grid cells in Figure 11 can form a broken line.
[0160] Furthermore, after obtaining the polyline path, it is necessary to determine the path height. According to each center point in the polyline path mapped in the equivalent three-dimensional environment map, a three-dimensional path is obtained, and the three-dimensional path includes elevation information.
[0161] For the determination of the path height, in the above two-dimensional path planning process, only those that completely obstruct the entire flight area are regarded as impassable, and for other areas, the determination is made according to the effective passage area method. Therefore, the path planning in two dimensions is not passable at all heights in the entire flight area, and the determination of the route height needs to consider the obstructed part; at the same time, when the aircraft is vertically ascending and descending, in order to make the flight safer and consume less energy, when considering the flight height, the least vertical ascending and descending situation during the entire flight should be considered.
[0162] Step 104, optimize the three-dimensional path to obtain the target three-dimensional path.
[0163] To solve the above problems, in the process of converting a two-dimensional path to a three-dimensional path, the method of automatically adjusting the height when encountering an obstacle is adopted to cross, and the minimum value is preferably used for this crossing height to reduce the redundant vertical ascending and descending height, as Figure 12 shown. Although this method can quickly construct a three-dimensional path, the path formed by simply crossing the obstacle is obviously not the optimal solution. Therefore, the path needs to be further optimized later to obtain the final optimized target three-dimensional path.
[0164] Furthermore, as Figure 4 shown, step 104 includes that the optimizing the three-dimensional path to obtain the target three-dimensional path includes:
[0165] Step 1041, query in the three-dimensional path for a local path where the number of flight climbs within a preset time is greater than a second threshold;
[0166] Step 1042, optimize the local path to obtain a locally optimized path;
[0167] Step 1043, generate a target three-dimensional path according to the locally optimized path and the three-dimensional path.
[0168] It should be noted that in the embodiments of the present application, the process of optimizing the existing three-dimensional path mainly lies in determining the local optimization based on the traffic conditions and the flight distance:
[0169] First, it is necessary to find a local path with frequent climbs. Specifically, starting from the starting point of the existing path, all subsequent path points can be traversed, and the local path where the number of climbs within the preset time t exceeds the threshold, for example, n times, is recorded. Specifically, for t and n, appropriate values are set according to the fuel consumption and flight speed of the aircraft, and the present application does not make specific limitations.
[0170] Second, after finding the local path, it is necessary to attempt to fly around the found local path and record the feasible paths. As Figure 13 shown, first, it is necessary to determine whether it is possible to directly cross between the lifting nodes such as P1 and P2P3P4P5P6. Specifically, it can be judged through the grid map passage coefficient. If it is possible, calculate the distance from P1 to the farthest node that can be crossed until the farthest node that can be bypassed in the path, that is, P6, is obtained, and record the path from P1 to P6.
[0171] Third, calculate the straight-line distances of the first path plan P1P6 and the second path plan P1P2P3P4P5P6, and obtain S by calculating the xy coordinates
[0172] Fourth, calculate the passing conditions of the first path plan P1P6 and the second path plan P1P2P3P4P5P6. First, obtain the DEM grid cells in the DEM equivalent map that intersect with the two routes, and overlay them with the grid map to obtain the single passing condition of the DEM grid cells; second, respectively count the number of grid cells Count with a grid cell passing coefficient above 0.65.
[0173] Fifth, calculate the fly-around possibility V according to the straight-line distance and the passing condition. The formula is as follows. If is less than , then perform fly-around and end the fly-around attempt; otherwise, modify the end point of the local path to P5 and repeat the second step.
[0174]
[0175] Among them, in the above formula 14, A represents the first path plan P1-P6, and S A represents SP1P6, that is, the Euclidean distance from P1 to P6; B represents the second path plan P1-P2-P3-P4-P5-P6, and S B represents , that is, the sum of the Euclidean distances from P1 to P2, P2 to P3, P3 to P4, P4 to P5, and P5 to P6. Count A represents the number of grid cells with a grid cell passing coefficient above 0.65 in the first path plan P1-P6; Count B represents the number of grid cells with a grid cell passing coefficient above 0.65 in the second path plan P1-P2-P3-P4-P5-P6.
[0176] The present invention constructs a two-dimensional environmental map based on a regular hexagonal grid and pre-acquired environmental factors, and constructs a three-dimensional environmental map based on a preset digital elevation model and the pre-acquired environmental factors; plans a path between the starting point and the destination in the two-dimensional environmental map according to an improved ant colony algorithm to obtain a two-dimensional path; constructs a three-dimensional path in the three-dimensional environmental map according to the two-dimensional path; and optimizes the three-dimensional path to obtain a target three-dimensional path. By analyzing the environment in complex areas such as the wild, the present invention determines the environmental factors affecting flight, quantifies the flight environmental factors through a regular hexagonal grid, integrates the environmental factors affecting flight into a two-dimensional plane, and based on an optimized ant colony algorithm, conducts two-dimensional flight path planning to obtain a two-dimensional path, and based on the equivalent simulated three-dimensional environment obtained from the two-dimensional path, calculates and optimizes to obtain a three-dimensional flight path. The embodiment of the present invention enables the consideration of the influence of complex environmental factors in three-dimensional path planning to be realized. In scenarios such as land-air coordinated operations and mountain rescue, the optimal path for the aircraft to fly to multiple target points can be planned in advance, which takes a short time and has high safety, provides a certain reference for subsequent decision-making, better assists the driver, and ensures the driving safety of the driver.
[0177] The second embodiment of the present invention relates to a path planning device. Figure 5 It is a device block diagram of a path planning device shown according to an exemplary embodiment, as Figure 5 shown. The device includes:
[0178] A construction module 501, configured to construct a two-dimensional environmental map based on a regular hexagonal grid and pre-acquired environmental factors, and construct a three-dimensional environmental map based on a preset digital elevation model and the pre-acquired environmental factors;
[0179] A planning module 502, configured to plan a path between a starting point and a destination in the two-dimensional environmental map according to an improved ant colony algorithm to obtain a two-dimensional path;
[0180] A construction module 503, configured to construct a three-dimensional path in the three-dimensional environmental map according to the two-dimensional path;
[0181] A target path acquisition module 504, configured to optimize the three-dimensional path to obtain a target three-dimensional path.
[0182] The present invention constructs a two-dimensional environmental map based on a regular hexagonal grid and pre-acquired environmental factors, and constructs a three-dimensional environmental map based on a preset digital elevation model and the pre-acquired environmental factors; plans a path between the starting point and the destination in the two-dimensional environmental map according to an improved ant colony algorithm to obtain a two-dimensional path; constructs a three-dimensional path in the three-dimensional environmental map according to the two-dimensional path; and performs optimization processing on the three-dimensional path to obtain a target three-dimensional path. By analyzing the environment in complex areas such as the wild, the present invention determines the environmental factors affecting flight, quantifies the flight environmental factors through a regular hexagonal grid, integrates the environmental factors affecting flight into a two-dimensional plane, and performs two-dimensional flight path planning based on an optimized ant colony algorithm to obtain a two-dimensional path. Based on the equivalent simulated three-dimensional environment on the basis of obtaining the two-dimensional path, a three-dimensional flight path is calculated and optimized. The implementation mode of the present invention enables the consideration of the influence of complex environmental factors in three-dimensional path planning to be realized. In scenarios such as land-air coordinated operations and mountain rescue, the optimal path for the aircraft to fly to multiple target points can be planned in advance, which takes a short time and has high safety, provides a certain reference for subsequent decision-making, better assists the driver, and ensures the driving safety of the driver.
[0183] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment related to the method, and will not be elaborated here.
[0184] The third embodiment of the present invention provides a communication device, as Figure 6 shown, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604. Among them, the processor 601, the communication interface 602, and the memory 603 complete communication with each other through the communication bus 604.
[0185] The memory 603 is used to store a computer program.
[0186] When the processor 601 is used to execute the program stored in the memory 603, the following steps can be implemented:
[0187] Construct a two-dimensional environmental map based on a regular hexagonal grid and pre-acquired environmental factors, and construct a three-dimensional environmental map based on a preset digital elevation model and the pre-acquired environmental factors.
[0188] Plan a path between the starting point and the destination in the two-dimensional environmental map according to an improved ant colony algorithm to obtain a two-dimensional path.
[0189] Construct a three-dimensional path in the three-dimensional environmental map according to the two-dimensional path.
[0190] Perform optimization processing on the three-dimensional path to obtain a target three-dimensional path.
[0191] The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0192] The communication interface is used for communication between the above terminal and other devices.
[0193] The memory may include a Random Access Memory (RAM), or may also include a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.
[0194] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0195] The fourth embodiment of the present invention provides a computer storage medium, in which instructions are stored. When it runs on a computer, it causes the computer to execute the path planning method described in any one of the above embodiments.
[0196] The fifth embodiment of the present invention provides a vehicle, including the path planning device described in the second embodiment of the present invention.
[0197] The sixth embodiment of the present invention provides a computer program product containing instructions. When it runs on a computer, it causes the computer to execute the path planning method described in any one of the above embodiments.
[0198] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or third database to another website, computer, server, or third database via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a third database that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
[0199] It should be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including", or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or device that includes a series of elements includes not only those elements but also other elements not expressly listed, or elements that are inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article, or device that includes the element.
[0200] Each embodiment in this specification is described in a related manner. For the same or similar parts between the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and reference can be made to the corresponding part of the method embodiment for the relevant content.
[0201] The above are only the preferred embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application are all included in the protection scope of the present application.
Claims
1. A path planning method, characterized in that, The method includes: Constructing a two-dimensional environmental map based on a regular hexagon grid and pre-acquired environmental factors, and constructing a three-dimensional environmental map based on a preset digital elevation model and the pre-acquired environmental factors; Planning a path between the starting point and the destination in the two-dimensional environmental map according to an improved ant colony algorithm to obtain a two-dimensional path; Constructing a three-dimensional path in the three-dimensional environmental map according to the two-dimensional path; Performing optimization processing on the three-dimensional path to obtain a target three-dimensional path.
2. The method according to claim 1, wherein The types of the environmental factors include weather factors and non-weather factors. The weather factors are divided into a first weather factor and a second weather factor according to the influence range attribute. The first weather factor includes at least one of wind speed, fog, and rain. The second weather factor includes at least one of cloud and thunder. The non-weather factors include at least one of mountains, ground buildings, no-fly zones, and signal interference areas.
3. The method according to claim 2, wherein The constructing a two-dimensional environmental map based on a regular hexagon grid and pre-acquired environmental factors includes: Performing grid coding construction on the center point, size, and vertex coordinates of the preset regular hexagon based on an orthogonal row-column coordinate system to obtain a regular hexagon grid; Wherein, each regular hexagon grid is a cell. The cell stores a cell obstacle type, a cell elevation, and a cell passage coefficient. The cell elevation is the air-passable elevation. The cell passage coefficient is determined according to a first passage coefficient and a second passage coefficient corresponding to each cell. The first passage coefficient is generated for each cell by the first weather factor through a preset moving window method. The second passage coefficient is generated for each cell by the second weather factor and the non-weather factors through a preset effective passage area ratio; Constructing a two-dimensional environmental map corresponding to a preset environmental area according to the regular hexagon grid, the cell elevation, the cell obstacle type, and the cell passage coefficient. The preset environmental area includes the starting point and the arrival point.
4. The method according to claim 2, wherein The constructing a three-dimensional environmental map based on a preset digital elevation model and the pre-acquired environmental factors includes: Obtaining the planar information and elevation information corresponding to the non-weather factors, obtaining the influence range information corresponding to the weather factors and the signal interference area among the non-weather factors, and obtaining the DEM data corresponding to the terrain in the preset environmental area; Fusing the planar information and elevation information corresponding to the non-weather factors and the DEM data corresponding to the terrain to construct a first equivalent map; Fusing the influence range information corresponding to the weather factors and the signal interference area among the non-weather factors to construct a second equivalent map; Generating a three-dimensional environmental map according to the first equivalent map and the second equivalent map.
5. The method according to claim 1, wherein The planning a path between the starting point and the destination in the two-dimensional environmental map according to an improved ant colony algorithm to obtain a two-dimensional path includes: Determining a starting cell corresponding to the starting point and at least one target cell corresponding to the destination in the two-dimensional environmental map according to the preset starting point and destination; Calculate the shortest distance between the starting grid element and the target grid element according to the greedy algorithm, and record the number of grid elements of the shortest distance; Obtain the ratio of the number of grid elements of the shortest distance to the total number of grid elements, and use the ratio as the initial pheromone; Obtain the Euclidean distance between the starting grid element and the target grid element, and use the Euclidean distance as the result of the heuristic function; Store the target grid element in the taboo table for search iteration; When it is detected that the number of iterations reaches the first threshold, obtain the traversal order corresponding to the target grid element; Perform iterative search according to the initial pheromone, the pheromone evaporation rate obtained based on the curve decay model, the result of the heuristic function, and the traversal order corresponding to the target grid element to obtain a two-dimensional path.
6. The method according to claim 1, characterized in that The constructing a three-dimensional path according to the two-dimensional path in the three-dimensional environment map includes: Convert the grid path corresponding to the two-dimensional path into a broken line path, and the broken line path is generated by connecting the center points of each grid element in the grid path; Obtain a three-dimensional path according to the mapping of each center point in the broken line path in the three-dimensional environment map, and the three-dimensional path includes elevation information.
7. The method according to claim 3, wherein The optimizing the three-dimensional path to obtain a target three-dimensional path includes: Query a local path in the three-dimensional path where the number of flight climbs within a preset time is greater than the second threshold; Optimize the local path to obtain a locally optimized path; Generate a target three-dimensional path according to the locally optimized path and the three-dimensional path.
8. The method according to claim 7, wherein The optimizing the local path to obtain a locally optimized path includes: Judge whether the flight device can pass normally between the lifting nodes in the local path through the grid element passing coefficient, and the lifting nodes include a starting point and at least one lifting node; If so, obtain the path between the starting point and the farthest lifting node in the local path as the locally optimized path.
9. A path planning device, characterized in that, The device includes: A first construction module, configured to construct a two-dimensional environment map based on a regular hexagonal grid and pre-acquired environmental factors, and construct a three-dimensional environment map based on a preset digital elevation model and the pre-acquired environmental factors; A planning module, configured to plan a path between a starting point and a destination in the two-dimensional environment map according to an improved ant colony algorithm to obtain a two-dimensional path; A second construction module, configured to construct a three-dimensional path according to the two-dimensional path in the three-dimensional environment map; A target path acquisition module, configured to optimize the three-dimensional path to obtain a target three-dimensional path.
10. An electronic device, characterized in that, Includes: A processor; A memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the instructions to implement the path planning method according to any one of claims 1 to 8.
11. A computer storage medium, when the instructions in the storage medium are executed by a processor of a mobile terminal, enabling the mobile terminal to execute the path planning method according to any one of claims 1 to 8.
12. A vehicle, characterized in that, Includes the path planning device according to claim 9.