A method for generating full coverage paths
Through the combination of precise unit decomposition method and generalized travel dealer problem, the problem of inefficient full coverage path planning in the existing technology is solved, and efficient and low-energy cleaning tasks are achieved.
Patent Information
- Application Number
- CN202211695181.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-28
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2042-12-28
AI Technical Summary
The existing full coverage path planning algorithm is inefficient in complex environments, has high repetition rates, making it difficult to achieve high coverage and low energy consumption cleaning tasks.
Using the precise unit decomposition method, the environment with obstacles is converted into polygons. By extracting the obstacle boundary line and environmental boundary line, a sub-region without obstacles is generated and converted into a generalized traveler problem to achieve the full Coverage path planning.
It improves the working efficiency and battery life of the cleaning robot, reduces the spatial complexity and time complexity of the algorithm, and achieves cleaning tasks with high coverage and low energy consumption.
Smart Images

Figure CN116184924B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automatic cleaning, and in particular to a method for generating a full coverage path. Background Art
[0002] The coverage path planning problem can be stated as: given a specified area and sensor model, generate a path for the mobile robot that provides complete coverage, satisfies motion and space constraints, and minimizes some cost indicators (usually path length or execution time). The current full coverage path planning algorithms are mainly divided into random traversal path planning and non-random traversal path planning. In the early stage of cleaning robot application, most of them adopted random path planning. Its strategy is that the robot randomly rotates a certain angle after encountering an obstacle, and then continues to move forward, and so on. In theory, random path planning can achieve full coverage, but it is only a method of exchanging time for space. If there are many obstacles in the environment, it takes more time to achieve a high coverage rate. At the same time, the repetition rate of this method is very high, and the robot's work efficiency is low. The emergence of non-random traversal path planning methods has improved the above problems to a certain extent. Non-random traversal path planning methods are mainly divided into regional decomposition method, template model method and biologically inspired neural network method. Regional decomposition method decomposes the entire working area into several obstacle-free sub-areas, plans reciprocating paths or spiral paths in the sub-areas, and then connects the paths in each sub-area to obtain a full coverage path for the entire environment. The template model method first defines several templates of the environment map, and the robot plans the path by matching with the template. This method is easy to implement and has a fast calculation speed, but there is a problem of entering an infinite loop in complex environments. The biologically inspired neural network method can adapt to different environments and the planning results are relatively good, but the algorithm requires a certain learning process, the amount of calculation is large, and the real-time performance of the algorithm is poor.
[0003] Although there are many methods for full coverage path planning, they all have some shortcomings in practical applications. Among them, the unit decomposition method has the best effect. The early unit decomposition method mainly used the approximate cell decomposition method. The environment map used for approximate decomposition is a grid map. However, the grid map method consumes linearly with the increase of the environment, but the time complexity of finding the optimal path increases exponentially, making the grid map method unsuitable for full coverage path planning in large environments. The spanning tree method is an alternative method for this problem, but unfortunately, this method will generate a large number of corners. The robot will experience deceleration, turning and acceleration at the corners, which seriously consumes the energy of the robot body and affects the endurance of the machine. In addition, the approximate decomposition method based on the grid map will cause the robot to be unable to completely clean the edges of the wall and obstacles. A large number of uncleaned areas will be left near the obstacles and the edges of the wall, resulting in a decrease in the overall cleaning coverage rate.
[0004] In order to make up for the shortcomings of the existing coverage path planning methods, the present invention transforms the environment with obstacles into a polygon with a number of holes based on the precise unit decomposition method, wherein the holes represent the obstacles inside the environment, obtained by extracting the boundary lines of the obstacles, and the boundary lines of the polygons containing the holes represent the boundaries of the environment, obtained by extracting the boundary lines of the given area to be cleaned. Based on precise unit decomposition, the present invention decomposes the environment into sub-areas without obstacles, and each sub-area generates multiple cleaning directions, and transforms the final solution problem into a generalized traveling salesman problem to achieve full coverage planning. Summary of the invention
[0005] The present invention aims to provide a method for generating a full coverage path in view of the above-mentioned deficiencies in the prior art.
[0006] The technical solution to achieve the purpose of the present invention is:
[0007] A method for generating a full coverage path comprises the following steps:
[0008] S1, obtaining geometric shape features of the area to be cleaned, where the geometric shape features mainly refer to the contour line of the area to be cleaned, and the contour line is composed of the boundary line of the area to be cleaned and the boundary line of the internal obstacles of the area to be cleaned;
[0009] S2, according to the contour line, converting the contour line into a polygon with holes, and then dividing the polygon with holes into a plurality of clean areas without obstacles;
[0010] S3, setting the starting point and the end point of the coverage path;
[0011] S4, generating a full coverage sub-path within each cleaning area;
[0012] S5, generating a full coverage path according to the multiple full coverage sub-paths;
[0013] S6, the boundary edge and obstacle edge paths are added to the full coverage path.
[0014] Furthermore, the area to be cleaned on the global map is the entire global map or a part of the global map. The specific steps of obtaining the area to be cleaned on the global map are as follows:
[0015] According to the user input, the selected points on the global map are obtained as geometric feature points of the area to be cleaned;
[0016] Determining the boundary of the area to be cleaned based on the feature points, wherein the boundary is the area boundary selected by the user on the global map rather than the boundary of the coverage path planning, includes: connecting multiple feature points in a predetermined order to determine the area to be cleaned.
[0017] Furthermore, obtaining the geometric shape features of the area to be cleaned specifically includes:
[0018] Obtain the contours of the area to be cleaned and its internal obstacles;
[0019] Based on the extracted contour information, the polygon is expanded;
[0020] According to the polygon information after the expansion process, the polygon area is subjected to secondary processing, and the secondary processing includes determining whether the expanded obstacle polygon intersects with the boundary polygon. If there is an intersection, the polygon information after the intersection is re-extracted to achieve the purpose of no intersection between the boundary line polygon and the obstacle polygon.
[0021] Then the polygonal geometric features with holes are obtained.
[0022] Furthermore, it also includes an accurate decomposition method based on polygons with holes, which uses trapezoidal decomposition method or ox-plough decomposition method to decompose polygons with holes into sub-areas that do not contain obstacles.
[0023] Furthermore, generating a full coverage sub-path of a cleaning sub-area specifically includes: obtaining the width of a cleaning execution device of the cleaning robot as a cleaning width of the path; the sub-area obtains the main direction of its geometric shape, and generating a coverage path of the sub-area according to the main direction of the sub-area.
[0024] Furthermore, the specific method of generating a full coverage path from sub-coverage paths connecting sub-areas includes: generating an adjacency graph composed of sub-coverage paths, wherein a node of the adjacency graph represents a self-coverage path or a starting point or an end point, and an edge of the adjacency graph represents the shortest path from an end point of a self-coverage path to a starting point of another sub-path.
[0025] Furthermore, each edge between nodes has a cost, which represents the cost of the shortest path from one node to another, thus forming a cost matrix. The cost matrix is asymmetric, and the full coverage path with the lowest cost is obtained by solving the traveling salesman problem.
[0026] Furthermore, the edge path at the boundary of the area to be cleaned and the edge path of the obstacle are added to the full coverage path to form a new full coverage path. The boundary and the obstacle will expand by a machine width, and the edge path is added to obtain a full coverage path with high coverage.
[0027] Compared with the prior art, the present invention has the following beneficial effects:
[0028] (1) The present invention provides a method for generating a full coverage path with a high coverage rate. The total length of the coverage path is the shortest, thereby improving the endurance of the cleaning robot and the working efficiency of the cleaning robot.
[0029] (2) The present invention provides a full coverage path generation method, which reduces the spatial complexity and time complexity of the algorithm and further improves the working efficiency of the cleaning robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a flowchart of the full coverage path generation method;
[0031] Figure 2 It is a scenario diagram of the full coverage path generation method;
[0032] Figure 3 It is a schematic diagram of the division of the area to be cleaned in the full coverage path generation method;
[0033] Figure 4 It is a schematic diagram of the sweeping direction in the full coverage path generation method;
[0034] Figure 5 It is a schematic diagram of polygonal straight line segmentation in the full coverage path generation method;
[0035] Figure 6 It is a schematic diagram of the shortest path transition line in the full coverage path generation method;
[0036] Figure 7 It is a schematic diagram of trapezoidal decomposition in the full coverage path generation method;
[0037] Figure 8 This is a schematic diagram of the decomposition of cattle plowing in the full coverage path generation method;
[0038] Fig. 9 It is a schematic diagram of the adjacency graph of the covering path in the full covering path generation method;
[0039] Fig.10 It is a schematic diagram of the full coverage path. DETAILED DESCRIPTION
[0040] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0041] The disclosure below provides many different embodiments or examples for realizing different structures of the present invention. In order to simplify the present invention, the components and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not indicate the relationship between the various embodiments and / or settings discussed in itself. In addition, the present invention provides examples of various specific processes and materials, but a person of ordinary skill in the art can realize the applicability of other processes and / or the use of other materials. In addition, the structure of the first feature "on" the second feature described below may include an embodiment in which the first and second features are formed in direct contact, and may also include an embodiment in which another feature is formed between the first and second features, so that the first and second features may not be in direct contact.
[0042] In the description of the present invention, it should be noted that, unless otherwise specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a mechanical connection or an electrical connection, or it can be the internal connection between two components. It can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to the specific circumstances.
[0043] These and other aspects of the embodiments of the present invention will become clear with reference to the following description and drawings. In these descriptions and drawings, some specific implementation methods of the embodiments of the present invention are specifically disclosed to represent some ways of implementing the principles of the embodiments of the present invention, but it should be understood that the scope of the embodiments of the present invention is not limited. On the contrary, the embodiments of the present invention include all changes, modifications and equivalents that fall within the spirit and connotation of the appended claims.
[0044] Refer to the following Figure 1-Figure 9 The full coverage path planning method and system proposed in the embodiments of the present invention are described in detail.
[0045] A full coverage path planning method according to an embodiment of the present invention is as follows Figure 1 The process shown includes the following steps:
[0046] S1, obtaining geometric shape features of the area to be cleaned, where the geometric shape features mainly refer to the contour line of the area to be cleaned, and the contour line is composed of the boundary line of the area to be cleaned and the boundary line of the internal obstacles of the area to be cleaned;
[0047] S2, according to the contour line, converting the contour line into a polygon with holes, and then dividing the polygon with holes into a plurality of clean areas without obstacles;
[0048] S3, setting the starting point and the end point of the coverage path;
[0049] S4, generating a full coverage sub-path within each cleaning area;
[0050] S5, generating a full coverage path according to the multiple full coverage sub-paths;
[0051] S6, the boundary edge and obstacle edge paths are added to the full coverage path.
[0052] In some embodiments, in step: obtaining the geometric shape features of the area to be cleaned is specifically:
[0053] According to the global map Figure 2 As shown in the schematic diagram and the feature points drawn by the user on the global map on the host computer, these feature points form the polygon vertices of the area to be cleaned in a predetermined order. The area to be cleaned is obtained from the global map according to the vertex information of the polygon, and then the contour line of the area to be cleaned is extracted. After obtaining the contour line, the area boundary line and the obstacle boundary line are distinguished according to the size of the polygon area enclosed by each contour line. After obtaining the boundary line, the boundary line is expanded according to the width of the robot, the area boundary line is expanded inward, and the obstacle boundary line is expanded outward. After the expansion process, if the obstacle boundary line intersects with the area boundary line, the intersecting polygon needs to be processed twice. The purpose of the secondary processing is to ensure that the area boundary line and the obstacle boundary line cannot intersect. Finally, the contour line information is converted into polygon information with holes.
[0054] In some embodiments, in step S2: dividing the polygon with holes into a plurality of clean areas without obstacles such as Figure 3 As shown, specifically:
[0055] In order to completely cover the area to be cleaned, it is necessary to divide the area to be cleaned into monotonous sub-areas that do not intersect with each other. The sub-areas are combined into the area to be cleaned. The general decomposition method is trapezoidal decomposition or ox-plow decomposition. Figure 7 and Figure 8 The following are schematic diagrams showing trapezoidal decomposition and ox-tillage decomposition. Each of the two decomposition methods has its own advantages and disadvantages. Users can choose the appropriate decomposition method according to the actual situation. The trapezoidal decomposition can obtain more sub-regions than the ox-tillage decomposition. Since both decompositions are generated by the scan line algorithm, the scan line direction determines the set of cells. In order to find a good decomposition direction, it is necessary to calculate the direction of each edge. A potential good decomposition is the one with the smallest height and w, where the height refers to the monotonic expansion of the sub-region. In the case of a fixed scan direction, the minimum height and corresponds to the minimum number of scans, where the minimum height and is defined as follows:
[0056]
[0057] Where m is the number of sub-regions, ymax,i is the maximum coordinate in the y direction, y min,i It is the smallest coordinate in the y direction. The value of w is used to determine which decomposition direction is best, trapezoidal decomposition or ox-plough decomposition.
[0058] In some embodiments, in step S3: setting the starting point and the ending point of the coverage path, specifically:
[0059] The user can set the starting point of the path to make the robot's starting position different. If the starting point and the end point are the same, the robot will return to the original position after completing the task of covering the path, and vice versa.
[0060] In some embodiments, in step S4: generating a full coverage sub-path in each cleaning area, specifically:
[0061] The coverage subpath within each cleaning area is composed of continuous parallel straight line segments and transition lines. Continuous parallel straight lines can be generated perpendicular to any monotonic direction of a simple polygon. Without loss of generality, the monotonic direction can be considered to be the y direction of the polygon. If any line intersects the polygon in the x direction at a single point or does not intersect at all, the polygon is called a y-direction monotonic polygon. Figure 5 As shown, in general, we restrict the scanning direction to be colinear with one of the edges of the polygon, because these directions have been proven to minimize the number of straight line segments covered. Based on this criterion, the scanning line can rotate clockwise or counterclockwise from the bottom vertex to the top vertex or from the top vertex to the bottom vertex of each sub-region. Therefore, there are 4 possible coverage subpaths for each sub-region, such as Figure 4 shown.
[0062] In some embodiments, in step S5: generating a full coverage path according to a plurality of full coverage sub-paths, specifically:
[0063] After multiple coverage sub-paths are generated, they need to be connected. The connection line between each coverage sub-path uses the shortest Euclidean distance and avoids obstacles. The shortest Euclidean distance is calculated through the visibility graph, such as Figure 6 As shown in , the vertices of the visibility graph consist of the vertices of the polygon. After decomposing the input polygon with holes into simple sub-regions and generating a set of covering sub-paths, we need to find the shortest scanning pattern sequence for each covering sub-path so that each cell and the entire area to be cleaned are covered. In order to solve this problem efficiently, we transform the problem into an equivalent generalized traveling salesman problem, where the goal is to start from the starting node n s To the target node n g Find a shortest path that visits exactly each covered subpath cell (dashed ellipsoid) and a set of covered subpaths (gray dots) in each cell, such as Fig. 9 shown. Fig. 9 Each node n i Represents a set of covering subpaths, each N i represents a covering subpath cluster, where the edge connects the start point of a covering subpath in the covering subpath cluster and the end point of another covering subpath, the starting node has outgoing edges connected to all nodes, and the target node has incoming edges from all nodes. Each edge (n i ,n j ) has a non-negative cost value and c ij Represents slave node n i To node n j The cost, c ij Defined as:
[0064] c ij =t ij +t j
[0065] where t j Indicates execution node n j The cost from node i to node j is not equal to the cost from node j to node i, so the cost matrix C = (c ij ) is asymmetric, for example c ij ≠c ji Once the cost matrix is obtained, the sequence connecting each covered subpath can be obtained by solving the traveling salesman problem to obtain the full covered path.
[0066] In some embodiments, in step S6: adding the boundary edge and obstacle edge paths to the full coverage path, specifically:
[0067] If the path of the coverage path is planned along the boundary of the obstacle or the area to be cleaned, the robot may hit the boundary when turning because of the large number of turns at the boundary in the path. In order to solve this problem, the obstacle and the area boundary are usually expanded, and then the edge cleaning path is added. Generally, the edge cleaning path has fewer turns and can avoid collision with the boundary. Fig.10 Shown is the total coverage path after adding the edge sweeping path.
[0068] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating a full coverage path, characterized in that: The steps include: S1, obtaining the geometric shape features of the area to be cleaned, the geometric shape features mainly refer to the contour line of the area to be cleaned, and the contour line is composed of the boundary line of the area to be cleaned and the boundary line of the internal obstacle of the area to be cleaned; the area boundary line is expanded inwardly, and the obstacle boundary line is expanded outwardly, and the expansion width is consistent with the width of the robot; according to the polygon information after the expansion processing, the polygon area is secondary processed, and the secondary processing includes determining whether the expanded obstacle polygon intersects with the boundary polygon, and if there is an intersection, re-extracting the polygon information after the intersection to ensure that the boundary line polygon does not intersect with the obstacle polygon; S2, according to the contour line, converting the contour line into a polygon with holes, and then dividing the polygon with holes into a plurality of clean areas without obstacles; the division adopts a trapezoidal decomposition method or a cow-ploughing decomposition method; Both decompositions are generated by the scan line algorithm. The scan line direction determines the set of cells. In order to find a good decomposition direction, it is necessary to calculate the direction of each edge. A potential good decomposition is the one with the smallest height sum w. The height refers to the monotonic expansion of the clean area. Under a fixed scan direction, the minimum height sum corresponds to the minimum number of scans, where the minimum height sum is defined as follows: Where m is the number of sub-regions, y max,i is the maximum coordinate in the y direction, y min,i It is the smallest coordinate in the y direction. The value of w is used to determine which decomposition direction is best for trapezoidal decomposition or ox-plough decomposition. S3, setting the starting point and the end point of the coverage path; S4, generating a full coverage sub-path in each cleaning area: obtaining the width of the cleaning execution device of the cleaning robot as the cleaning width of the path; The cleaning area obtains the main direction of its geometric shape, and generates a coverage path of the cleaning area according to the main direction of the cleaning area; S5, a full coverage path is generated based on multiple full coverage sub-paths; the connection between sub-paths is calculated through the visibility graph to obtain the shortest path in Euclidean distance and avoid obstacles; the path connection order is optimized through the generalized traveling salesman problem, using an asymmetric cost matrix, where the cost includes the path length and path cleaning time; S6, the boundary edge and obstacle edge paths are added to the full coverage path.
2. A method for generating a full coverage path according to claim 1, characterized in that: The area to be cleaned on the global map is the entire global map or a part of the global map. The specific method for obtaining the area to be cleaned on the global map is as follows: According to the user input, the selected points on the global map are obtained as geometric feature points of the area to be cleaned; Determining the boundary of the area to be cleaned based on the feature points, wherein the boundary is the area boundary selected by the user on the global map rather than the boundary of the coverage path planning, includes: connecting multiple feature points in a predetermined order to determine the area to be cleaned.
3. A method for generating a full coverage path according to claim 1, characterized in that: The specific method of generating a full coverage path from sub-coverage paths connecting sub-areas includes: generating an adjacency graph composed of sub-coverage paths, wherein the nodes of the adjacency graph represent a self-coverage path or a starting point or an end point, and the edges of the adjacency graph represent the shortest path from the end point of a self-coverage path to the starting point of another sub-path.
4. A method for generating a full coverage path according to claim 3, characterized in that: Each edge between nodes has a cost, which represents the cost of the shortest path from one node to another, thus forming a cost matrix. The cost matrix is asymmetric, and the lowest cost full coverage path is obtained by solving the traveling salesman problem.
5. A method for generating a full coverage path according to claim 4, characterized in that: The edge paths at the boundary of the area to be cleaned and the edge paths of obstacles are added to the full coverage path to form a new full coverage path. The boundary and obstacles will expand by a machine width, and the edge paths are added to obtain a full coverage path with high coverage.
Citation Information
Patent Citations
Full-coverage path generation method and generation device, intelligent robot and storage medium
CN111202471A
Mobile robot full-coverage path planning method, chip and robot
CN112068557A