Full-coverage path planning method, device, equipment and medium
By combining a greedy strategy and the A* algorithm, the problem of drones getting stuck in dead ends in irregular areas is solved, and the reliability and efficiency of full-coverage path planning are improved.
Patent Information
- Application Number
- CN202511538927.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-27
- Publication Date
- 2026-01-13
AI Technical Summary
Traditional greedy local search algorithms are prone to getting stuck in dead ends when planning paths for UAVs in irregular areas, leading to mission failure and the inability to complete full coverage tasks.
The A* pathfinding algorithm is introduced as an aid. When the greedy strategy fails, the algorithm is switched to search for uncovered areas and plan escape routes. The shortest path is calculated using a heuristic function by combining the local greedy strategy and the global A* algorithm.
It improves the success rate and reliability of UAVs in full-coverage missions in complex environments, enhances the algorithm's adaptability to irregular areas and obstacles, and optimizes path quality and efficiency.
Smart Images

Figure CN121323641A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of unmanned aerial vehicle (UAV) path planning technology, and in particular to a method, apparatus, equipment, and medium for full-coverage path planning of UAVs for obstacle avoidance in irregular areas based on intelligent decision-making. Background Technology
[0002] The development of drone technology has shown promising application prospects in multiple fields. Drones have advantages such as ease of operation, strong continuous combat capability, and reduced labor costs. They have been successfully applied in various fields involving terrain coverage, such as surveillance, smart agriculture, photogrammetry, disaster management, civil security, and wildfire tracking, when combined with industry applications in low-altitude environments.
[0003] Unmanned aerial vehicle (UAV) path planning is fundamental to UAV mission execution. Its purpose is to plan the optimal path from the starting position to the target position under specific conditions. Currently, commonly used path planning algorithms include graph search algorithms, operations research linear programming methods, traditional / improved intelligent optimization algorithms, and machine learning algorithms.
[0004] In the field of UAVs performing full-coverage path planning tasks in irregular areas, local search algorithms based on greedy strategies are a representative existing technology. The core of this approach lies in gridding the UAV's working environment. Taking a two-dimensional plane as an example, the entire working area is divided into regular grid cells, each of which can be considered an independent spatial node. During path planning, its decision-making mechanism focuses on local information. At each decision point, i.e., the UAV's current grid position, the algorithm evaluates neighboring grid points. The evaluation criteria typically revolve around distance, tending to select the nearest uncovered grid point as the next target point. The advantage of this algorithm is its relatively low computational cost. Since it only needs to consider a limited number of neighboring points around the current position, without requiring global traversal and complex calculations of the entire working area, it performs excellently in terms of path planning speed, quickly generating preliminary paths in a short time. For example, in relatively simple environments with few obstacles and approximately regular area shapes, this algorithm can efficiently guide the UAV to complete the coverage task for most areas. However, when faced with complex and irregular areas or obstacles, once the drone is surrounded by the covered area or obstacles, it will be stuck in a "dead end", leading to mission failure.
[0005] Greedy search algorithms suffer from insurmountable limitations in full-coverage path planning in complex environments. Their core flaw stems from an over-reliance on "local optima" in their decision-making logic: the algorithm centers solely on the current location, traversing neighboring grid points to select the nearest uncovered point as the next target. The entire decision-making process depends entirely on immediate local environmental information, lacking a holistic understanding of global area distribution, obstacle layout, and the location of uncovered areas. This short-sighted "step-by-step decision" mechanism makes it highly susceptible to path planning bottlenecks in irregular areas or complex scenarios with obstacles. Specifically, when UAVs perform coverage tasks in irregular areas, because the target area's boundary is not a regular geometry (e.g., polygonal boundaries with undulations), the greedy algorithm may be forced to reduce available paths as adjacent grid points exceed the area boundary during its advancement along the boundary. Furthermore, if obstacles exist in the environment, the algorithm will further reduce effective decision options as adjacent points are occupied by obstacles. When the two aforementioned situations overlap—that is, all adjacent grid points at the drone's current location are in a state of "covered," "occupied by obstacles," or "beyond the target area boundary"—the algorithm will fall into a typical "dead end" dilemma. At this point, there may still be a large number of uncovered areas globally, but because the algorithm cannot escape the limitations of the current local environment, it cannot identify the location of distant uncovered areas, nor can it autonomously plan a global path to bypass obstacles or cross covered areas. Ultimately, this leads to the interruption of the path planning chain, and the coverage task is forced to terminate. This limitation can also trigger a chain of problems: even if it does not completely fall into a "dead end," the greedy algorithm may continuously detour due to local optimal choices in complex environments, leading to increased path redundancy, decreased coverage efficiency, and even missing the opportunity to cover critical uncovered areas when approaching the area boundary or areas with dense obstacles due to repeated direction adjustments.
[0006] It is evident that while traditional greedy local search algorithms perform well in open areas, they rely solely on local information for decision-making. When the drone is surrounded by already covered areas or obstacles, it cannot find its next direction of movement, thus getting stuck in a "dead end." This prevents the drone from completing the task of covering the entire irregular area. Summary of the Invention
[0007] In view of the above problems, the present invention provides a full-coverage path planning method, apparatus, device, and medium for overcoming or at least partially solving the above problems. The A* pathfinding algorithm is introduced as an aid. When the greedy strategy fails, the algorithm immediately switches to A* pathfinding mode, finds the nearest uncovered area, and plans a feasible path, thereby ensuring that the UAV can successfully escape its predicament and complete the coverage task of the entire irregular area.
[0008] This invention provides the following solution: A comprehensive path planning method includes: Based on the polygons of the irregular working area, a bounding rectangular grid map of the polygons is created; in the grid map, multiple rectangular obstacles and no-fly zones are predefined; each grid point on the grid map is represented as an object, which is used to store the coordinates of the corresponding grid point, whether it has been covered, and other attributes used for path planning; during the initialization process, all points located inside obstacles or outside the target area are marked as covered; A local greedy strategy is used to evaluate the eight neighboring grid points around the current location of the UAV, calculate the value function of each grid point to determine whether the attribute of each grid point is covered, and determine the next movement position based on the coverage status of each grid point. Once it is determined that the attributes of all the grid points around the drone are covered, the A* algorithm will search the entire grid map to find the nearest uncovered grid point to the current location as the new target point; Use a heuristic function to calculate the shortest path from the current location to the target point.
[0009] Preferably: the value function is used to measure the attractiveness of a grid point, and the value function is expressed by the following formula:
[0010] In the formula: Indicates a reward for coverage status. Indicates distance penalty, Indicates a directional reward.
[0011] Preferably: the coverage status reward is used to determine whether a grid point has been covered or is an obstacle; if the grid point is not covered, its value is 100; if the grid point has been covered, its value is 0; if it is an obstacle, its value is -100.
[0012] Preferably, the distance penalty is based on the Euclidean distance between the grid point and the current location point, used to encourage the drone to move to a closer point; the distance penalty is expressed by the following formula:
[0013] In the formula: express, express, express, express.
[0014] Preferably: the directional reward is used to encourage the UAV to perform sweeping coverage along the target direction, so as to select the neighboring point with the highest value function as the next moving target; the target direction is calculated by the following formula:
[0015] In the formula: express.
[0016] Preferably: the distance is calculated using the following formula to calculate the Euclidean distance:
[0017] In the formula: express, express.
[0018] Preferably, the heuristic function is represented by the following formula:
[0019] In the formula: This represents the distance from the starting point to the current intermediate point. The actual cost, Indicates starting from the current midpoint The estimated cost to reach the target point.
[0020] A full-coverage route planning apparatus for executing the above-described full-coverage route planning method, the apparatus comprising: An initialization unit is used to create a bounding rectangular grid map of the polygon based on the polygon of the irregular working area. In the grid map, multiple rectangular obstacles and no-fly zones are predefined. Each grid point on the grid map is represented as an object, which is used to store the coordinates of the corresponding grid point, whether it has been covered, and other attributes used for path planning. During the initialization process, all points located inside obstacles or outside the target area are marked as covered. The greedy strategy search unit is used to evaluate the eight neighboring grid points around the current position of the UAV using a local greedy strategy, calculate the value function of each grid point to determine whether the attribute of each grid point is covered, and determine the next moving position based on the coverage status of each grid point. The A* algorithm search unit is used to determine that the attributes of all grid points around the drone are covered. The A* algorithm will search the entire grid map and find the nearest uncovered grid point to the current location as the new target point. The shortest path calculation unit is used to calculate the shortest path from the current location point to the target point using a heuristic function.
[0021] A full-coverage path planning device, the device comprising a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the above-described full-coverage path planning method according to the instructions in the program code.
[0022] A computer-readable storage medium for storing program code for executing the above-described full-coverage path planning method.
[0023] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects: This application provides a method, apparatus, device, and medium for full-coverage path planning, which improves the success rate and reliability of full-coverage tasks. Traditional greedy algorithms are prone to getting stuck in dead ends in complex, irregular areas or environments with obstacles, leading to task failure. This invention introduces the A* pathfinding algorithm as an aid, intelligently planning an escape path when the greedy algorithm fails. This mechanism fundamentally solves the reliability problem of traditional algorithms, ensuring that the UAV can complete the coverage task of the entire target area.
[0024] Meanwhile, this invention enhances the algorithm's adaptability to complex environments. Traditional greedy algorithms rely solely on local information for decision-making, lacking a global perspective on the boundaries or obstacles of irregular regions. This invention combines the global search capability of the A* algorithm, enabling it to effectively plan the optimal path when facing complex environments (such as irregular polygonal regions and multiple obstacles). Furthermore, by using the inpolygon function to determine whether a point is within an irregular region, this method can accurately define the work area, avoiding invalid path planning.
[0025] Furthermore, while maintaining efficiency, path quality is optimized. Although greedy algorithms are known for their high efficiency, the paths they generate are sometimes not optimal. This invention uses a greedy strategy in most open areas to maintain efficiency, while switching to the A* algorithm when crossing obstacles or finding new areas, utilizing its heuristic function to find the optimal path. This hybrid strategy retains the speed of the greedy algorithm while improving the overall path quality through the A* algorithm, achieving a balance between efficiency and reliability.
[0026] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0028] Figure 1 This is a flowchart of a full-coverage path planning method provided in an embodiment of the present invention; Figure 2 This is a flowchart of the A* algorithm provided in an embodiment of the present invention; Figure 3 This is a flowchart of the obstacle avoidance and full-coverage path planning algorithm for irregular areas provided in this embodiment of the invention; Figure 4 These are algorithm effect diagrams provided in the embodiments of the present invention; Figure 5 This is a schematic diagram of a full-coverage path planning device provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of a full-coverage path planning device provided in an embodiment of the present invention. Detailed Implementation
[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention are within the scope of protection of the present invention.
[0030] See Figure 1 This invention provides a method for full-coverage path planning, such as... Figure 1 As shown, the method may include: S101: Based on the polygons of the irregular working area, create a bounding rectangular grid map of the polygons; in the grid map, multiple rectangular obstacles and no-fly zones are predefined; each grid point on the grid map is represented as an object, which is used to store the coordinates of the corresponding grid point, whether it has been covered, and other attributes used for path planning; during the initialization process, all points located inside obstacles or outside the target area are marked as covered; S102: A local greedy strategy is used to evaluate the eight adjacent grid points around the current location of the drone, calculate the value function of each grid point to determine whether the attribute of each grid point is covered, and determine the next movement position based on the coverage status of each grid point; in specific implementation, the embodiments of this application can provide the value function to measure the attractiveness of a grid point, and the value function is expressed by the following formula:
[0031] In the formula: Indicates a reward for coverage status. Indicates distance penalty, Indicates a directional reward.
[0032] The coverage status reward is used to determine whether a grid point is covered or is an obstacle; if the grid point is not covered, its value is 100; if the grid point is covered, its value is 0; if it is an obstacle, its value is -100.
[0033] The distance penalty, based on the Euclidean distance between the grid point and the current location, is used to encourage the drone to move to a closer point; the distance penalty is expressed by the following formula:
[0034] In the formula: express, express, express, express.
[0035] The directional reward is used to encourage the drone to perform sweeping coverage along the target direction, so as to select the neighboring point with the highest value function as the next moving target; the target direction is calculated by the following formula:
[0036] In the formula: express.
[0037] S103: Determine that the attributes of all grid points around the drone are covered. Use the A* algorithm to search the entire grid map and find the nearest uncovered grid point to the current location as the new target point; the distance is calculated using the following Euclidean distance formula:
[0038] In the formula: express, express.
[0039] S104: Calculate the shortest path from the current location to the target point using a heuristic function. Specifically, in this embodiment, the heuristic function can be represented by the following formula:
[0040] In the formula: This represents the distance from the starting point to the current intermediate point. The actual cost, Indicates starting from the current midpoint The estimated cost to reach the target point.
[0041] This application provides a full-coverage path planning method, specifically an algorithm for full-coverage path planning in irregular areas. Unlike traditional regular rectangular area coverage, this method uses ray casting to accurately determine the spatial relationship between points and irregular areas, achieving full-coverage path planning within irregular target areas. Ray casting determines whether a point is located inside a polygon (including its boundary), which is used in the algorithm to define the range of the irregular area to be covered—coverage planning is only performed on points falling within this area, while invalid points outside the area are excluded, ensuring that path planning always focuses on the target area and avoiding resource waste.
[0042] Traditional path planning methods are mostly based on greedy local search algorithms, which select the seemingly optimal next step at each decision point to quickly generate a path. However, this method has a significant limitation: when the drone gets stuck, it cannot find a way out, leading to mission failure.
[0043] The method provided in this application addresses this problem by introducing the A* pathfinding algorithm. When the greedy strategy fails to find the next uncovered neighboring point, the algorithm immediately switches to the A* algorithm. The A* algorithm combines the results of the irregular region determination method to find the nearest uncovered region, ensuring the target point is located within an irregular region, and plans a path that bypasses obstacles and irregular boundaries to reach the new target point. This combined strategy not only inherits the efficiency of the greedy algorithm but also overcomes the limitations that traditional methods may encounter in complex irregular regions by leveraging precise region definition and the global pathfinding capability of the A* algorithm, ensuring that the UAV can navigate through dead ends and complete the coverage task for the entire region.
[0044] As can be seen, the full-coverage path planning method provided in this application achieves full coverage of irregular areas: by defining an irregular polygonal work area, this method can efficiently perform full-coverage path planning in areas that are not rectangular or irregularly shaped. In most cases, the UAV adopts a greedy local search strategy with low computational cost to quickly move and cover the area. When this strategy fails (i.e., gets stuck in a "dead end"), the system can intelligently switch to the A* pathfinding algorithm. Dynamic perception and coverage are achieved. During movement, the UAV can dynamically adjust according to its perception range (UAV detection range) and direction of movement, thereby accurately marking and covering grid points along the way, ensuring coverage efficiency.
[0045] The full-coverage path planning method provided in the embodiments of this application will be described in detail below.
[0046] I. Initialization and Map Settings First, initialize on a two-dimensional grid map.
[0047] (1) Map and Obstacles: A specific area that needs to be covered by the drone is precisely defined using a polygon coordinate system. Based on the polygon of the irregular operating area, a polygonal rectangular grid map is created. In this grid map, multiple rectangular obstacles and no-fly zones are predefined, which are areas that the drone cannot enter.
[0048] (2) Grid Point Status: Each grid point on the map is represented as an object. This object stores the point's coordinates, whether it is covered, and other attributes used for path planning. During initialization, all points located within obstacles or outside the target area are marked as covered. In this way, the UAV will not need to access these points in subsequent path planning, thus improving efficiency. The UAV starts from a starting position and immediately covers the grid points around it based on its perception range, laying the foundation for subsequent planning.
[0049] II. Error Modeling and Compensation.
[0050] (1) Core Coverage Strategy: Greedy Algorithm and A* Pathfinding.
[0051] The basic idea behind the core logic of the algorithm is "primarily greedy, supplemented by A*".
[0052] 1. Greedy local search In most cases, drones follow a locally greedy strategy. At each step, the drone evaluates its eight neighboring grid points and calculates a "value function" for each point to determine where to move next.
[0053] The value function is a weighted sum used to measure the attractiveness of a point:
[0054] This represents the coverage reward. This is the most important weight, used to determine whether a point is covered or is an obstacle. If the point is not covered, its value is 100; if the point is covered, its value is 0; if it is an obstacle, its value is -100.
[0055] This represents the distance penalty. This value is based on the Euclidean distance between the point and the current drone position, and its purpose is to encourage the drone to move to a closer point. Its calculation formula is:
[0056] Indicates directional rewards. Encourages drones to perform sweeping coverage along specific directions (such as horizontal or vertical).
[0057] The drone will select the neighboring point with the highest value function as its next moving target.
[0058] If there are uncovered neighboring points (around_covered=1): Select the neighboring point with the highest total score as the next position, update current_index, mark the new coverage area (rotated rectangle) in the new direction, and add the new position to the path.
[0059] Direction calculation:
[0060] If all neighboring points are covered (around_covered=0): Trigger an A* path search to find reachable uncovered points, move along the A* path and update the covered area until a new uncovered area is found.
[0061] 2. A* Pathfinding Algorithm.
[0062] When the drone gets stuck in a "dilemma" (i.e., all 8 surrounding neighboring points are covered or are obstacles), the greedy algorithm fails. At this point, the program calls the A* algorithm to solve the problem. The A* search algorithm, commonly known as the A* algorithm, is a type of heuristic search algorithm that finds the path with the lowest cost across multiple nodes on a graph. It is often used for calculating the movement of NPCs in games or the movement of bots in online games. Like Dijkstra's algorithm, this algorithm finds a shortest path; and like BFS, it performs a heuristic search.
[0063] Finding a new target: The A* algorithm searches the entire map to find the nearest uncovered grid point to the current location as the new target point, calculated using Euclidean distance.
[0064] Path Calculation: The A* algorithm uses a heuristic function to calculate the shortest path from the current point to the target point. This function consists of two parts: The actual cost (distance) from the starting point (current position) to the current intermediate point n.
[0065] : Estimated cost (Euclidean distance) from the current intermediate point n to the target point.
[0066] Cost function The calculation formula is as follows:
[0067] This function considers the actual distance from the current point to the intermediate point and the estimated distance from the intermediate point to the target point, thus efficiently finding the optimal path. The A* algorithm flowchart is as follows: Figure 2 As shown.
[0068] Path execution and coverage: Once the A* algorithm generates a path, the drone will move along this path and continuously update the covered area during the movement. In this way, the drone can escape obstacles and continue its coverage mission.
[0069] III. Termination Conditions.
[0070] The algorithm's main loop will terminate in the following two cases: (1) Complete Coverage: When all grid points within the target area are marked as covered, the all_covered function returns true, and the algorithm terminates successfully.
[0071] (2) Timeout: If the number of iterations exceeds the preset maximum value (e.g., 2000 times), the program will be forced to stop to prevent infinite loop.
[0072] IV. Algorithm Simulation Experiment: like Figure 3 The diagram shown is the overall flowchart of the obstacle avoidance and full-coverage path planning algorithm for irregular areas. Figure 4 The algorithm's performance is shown in the diagram. Through MATLAB simulation, it is verified that the algorithm proposed in this invention successfully achieves 100% full coverage in areas with multiple rectangular obstacles and irregular boundaries.
[0073] During the simulation, the UAV's path was smooth and efficient, with no mission failures due to getting stuck in dead ends. The simulation results clearly demonstrate how the UAV can quickly cover an area in greedy mode, and how it can intelligently switch to the A* pathfinding algorithm when encountering obstacles and the greedy algorithm fails, such as when the UAV is surrounded by obstacles or an already covered area. The A* algorithm performs a global scan and finds an optimal path around obstacles based on a heuristic function (i.e., the total cost from the current point to the target point), leading the UAV out of trouble and continuing to complete the mission.
[0074] Adaptability to irregular areas: This method defines the target area using polygon coordinates and combines this with the inpolygon function to ensure that the UAV operates only within the specific irregular areas that need coverage. Furthermore, the coverage range of the UAV can be adjusted based on its detection range to ultimately achieve coverage of all target areas. This demonstrates the significant advantages of this invention in improving the efficiency and success rate of UAV-based full-coverage missions.
[0075] In summary, the full-coverage path planning method provided in this application improves the success rate and reliability of full-coverage tasks. Traditional greedy algorithms are prone to getting stuck in dead ends and failing to progress in complex, irregular areas or environments with obstacles, leading to task failure. This invention introduces the A* pathfinding algorithm as an aid, which can intelligently plan an escape path when the greedy algorithm fails. This mechanism fundamentally solves the reliability problem of traditional algorithms, ensuring that the UAV can complete the coverage task of the entire target area.
[0076] Meanwhile, this invention enhances the algorithm's adaptability to complex environments. Traditional greedy algorithms rely solely on local information for decision-making, lacking a global perspective on the boundaries or obstacles of irregular regions. This invention combines the global search capability of the A* algorithm, enabling it to effectively plan the optimal path when facing complex environments (such as irregular polygonal regions and multiple obstacles). Furthermore, by using the inpolygon function to determine whether a point is within an irregular region, this method can accurately define the work area, avoiding invalid path planning.
[0077] Furthermore, while maintaining efficiency, path quality is optimized. Although greedy algorithms are known for their high efficiency, the paths they generate are sometimes not optimal. This invention uses a greedy strategy in most open areas to maintain efficiency, while switching to the A* algorithm when crossing obstacles or finding new areas, utilizing its heuristic function to find the optimal path. This hybrid strategy retains the speed of the greedy algorithm while improving the overall path quality through the A* algorithm, achieving a balance between efficiency and reliability.
[0078] See Figure 5This application embodiment can also provide a full-coverage path planning device, such as... Figure 5 As shown, the apparatus for performing the above-described full-coverage path planning method may include: Initialization unit 501 is used to create a bounding rectangular grid map of the polygon based on the polygon of the irregular working area; in the grid map, multiple rectangular obstacles and no-fly zones are predefined; each grid point on the grid map is represented as an object, and the object is used to store the coordinates of the corresponding grid point, whether it has been covered, and other attributes used for path planning; during the initialization process, all points located inside obstacles or outside the target area are marked as covered; The greedy strategy search unit 502 is used to evaluate the eight neighboring grid points around the current position of the UAV using a local greedy strategy, calculate the value function of each grid point to determine whether the attribute of each grid point is covered, and determine the next moving position based on the coverage status of each grid point. The A* algorithm search unit 503 is used to determine that the attributes of all the grid points around the drone are covered. The A* algorithm is used to search the entire grid map and find the grid point that is closest to the current location point and is not covered as the new target point. The shortest path calculation unit 504 is used to calculate the shortest path from the current position point to the target point using a heuristic function.
[0079] This application embodiment can also provide a full-coverage path planning device, the device including a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the steps of the full-coverage path planning method described above according to the instructions in the program code.
[0080] like Figure 6 As shown in the figure, the full-coverage path planning device provided in this application embodiment may include: a processor 10, a memory 11, a communication interface 12, and a communication bus 13. The processor 10, memory 11, and communication interface 12 all communicate with each other through the communication bus 13.
[0081] In this embodiment, the processor 10 may be a central processing unit (CPU), a graphics processing unit (GPU), an application-specific integrated circuit, a digital signal processor, a field-programmable gate array, or other programmable logic devices.
[0082] The processor 10 can call programs stored in the memory 11. Specifically, the processor 10 can execute operations in the embodiments of the full coverage path planning method.
[0083] The memory 11 is used to store one or more programs. The programs may include program code, which includes computer operation instructions. In this embodiment, the memory 11 stores at least a program for implementing the following functions: Based on the polygons of the irregular working area, a bounding rectangular grid map of the polygons is created; in the grid map, multiple rectangular obstacles and no-fly zones are predefined; each grid point on the grid map is represented as an object, which is used to store the coordinates of the corresponding grid point, whether it has been covered, and other attributes used for path planning; during the initialization process, all points located inside obstacles or outside the target area are marked as covered; A local greedy strategy is used to evaluate the eight neighboring grid points around the current location of the UAV, calculate the value function of each grid point to determine whether the attribute of each grid point is covered, and determine the next movement position based on the coverage status of each grid point. Once it is determined that the attributes of all the grid points around the drone are covered, the A* algorithm will search the entire grid map to find the nearest uncovered grid point to the current location as the new target point; Use a heuristic function to calculate the shortest path from the current location to the target point.
[0084] In one possible implementation, the memory 11 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function (such as file creation or data read / write). The data storage area may store data created during use, such as initialization data.
[0085] In addition, memory 11 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.
[0086] Communication interface 12 can be an interface for a communication model, used to connect with other devices or systems.
[0087] Of course, it should be noted that, Figure 6 The structure shown does not constitute a limitation on the full-coverage path planning device in the embodiments of this application. In practical applications, the full-coverage path planning device may include more than Figure 6 More or fewer components as shown, or combinations of certain components.
[0088] This application embodiment may also provide a computer-readable storage medium for storing program code for executing the steps of the above-described full-coverage path planning method.
[0089] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0090] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0091] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0092] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A method for full-coverage path planning, characterized in that, include: Create a bounding rectangular grid map of the polygons based on the polygons of the irregular work area; The grid map predefines multiple rectangular obstacles and no-fly zones; Each grid point on the grid map is represented as an object, which stores the coordinates of the corresponding grid point, whether it is covered, and other attributes used for path planning; during initialization, all points located inside obstacles or outside the target area are marked as covered; A local greedy strategy is used to evaluate the eight neighboring grid points around the current location of the UAV, calculate the value function of each grid point to determine whether the attribute of each grid point is covered, and determine the next movement position based on the coverage status of each grid point. Once it is determined that the attributes of all the grid points around the drone are covered, the A* algorithm will search the entire grid map to find the nearest uncovered grid point to the current location as the new target point; Use a heuristic function to calculate the shortest path from the current location to the target point.
2. The full-coverage path planning method according to claim 1, characterized in that, The value function is used to measure the attractiveness of a grid point, and the value function is expressed by the following formula: In the formula: Indicates a reward for coverage status. Indicates distance penalty, Indicates a directional reward.
3. The full-coverage path planning method according to claim 2, characterized in that, The coverage status reward is used to determine whether a grid point is covered or is an obstacle; if the grid point is not covered, its value is 100; if the grid point is covered, its value is 0. If it is an obstacle, its value is -100.
4. The full-coverage path planning method according to claim 2, characterized in that, The distance penalty, based on the Euclidean distance between the grid point and the current location, is used to encourage the drone to move to a closer point; the distance penalty is expressed by the following formula: In the formula: express, express, express, express.
5. The full-coverage path planning method according to claim 2, characterized in that, The directional reward is used to encourage the drone to perform sweeping coverage along the target direction, so as to select the neighboring point with the highest value function as the next moving target; the target direction is calculated by the following formula: In the formula: express.
6. The full-coverage path planning method according to claim 1, characterized in that, Distance is calculated using the following formula to determine the Euclidean distance: In the formula: express, express.
7. The full-coverage path planning method according to claim 1, characterized in that, The heuristic function is represented by the following formula: In the formula: This represents the distance from the starting point to the current intermediate point. The actual cost, Indicates starting from the current midpoint The estimated cost to reach the target point.
8. A full-coverage path planning device, characterized in that, The apparatus for performing the full-coverage path planning method according to any one of claims 1-7, the apparatus comprising: An initialization unit is used to create a bounding rectangular grid map of the polygon based on the polygon of the irregular working area. In the grid map, multiple rectangular obstacles and no-fly zones are predefined. Each grid point on the grid map is represented as an object, which is used to store the coordinates of the corresponding grid point, whether it has been covered, and other attributes used for path planning. During the initialization process, all points located inside obstacles or outside the target area are marked as covered. The greedy strategy search unit is used to evaluate the eight neighboring grid points around the current position of the UAV using a local greedy strategy, calculate the value function of each grid point to determine whether the attribute of each grid point is covered, and determine the next moving position based on the coverage status of each grid point. The A* algorithm search unit is used to determine that the attributes of all the grid points around the drone are covered. The A* algorithm will search the entire grid map and find the grid point that is closest to the current location point and is not covered as the new target point. The shortest path calculation unit is used to calculate the shortest path from the current location point to the target point using a heuristic function.
9. A full-coverage path planning device, characterized in that, The device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the full-coverage path planning method according to any one of claims 1-7 according to the instructions in the program code.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program code for executing the full-coverage path planning method according to any one of claims 1-7.
Citation Information
Patent Citations
Full-coverage path planning method and device for disinfection robot
CN115421496A
Unmanned aerial vehicle full-coverage path planning method fusing greedy strategy and A star algorithm
CN120252709A
Coverage route planning method for multiple unmanned surface mapping vessels
WO2022057700A1