A method for full coverage path planning of agricultural multi-robots in complex areas
Through the improved Maklink line decomposition method and Dijkstra method, combined with the reciprocating coverage mode and the improved NSGA-II algorithm, the problem of unreasonable sub-region division and optimization target conflict in full coverage path planning of agricultural multi-robots in complex areas is solved, and efficient resource utilization and operation efficiency are achieved.
Patent Information
- Application Number
- CN202411676071.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-11-22
AI Technical Summary
The existing agricultural multi-robot full coverage path planning method has problems such as unreasonable sub-region division and conflicts between optimization goals in complex areas, resulting in waste of resources and reduced operational efficiency.
The agricultural planting area is decomposed into convex sub-regions through the improved Maklink line decomposition method. The planting path is planned using the reciprocating coverage mode based on the minimum width direction. The connection path is planned using the Dijkstra method, and a full coverage path planning model is built to aim at the shortest total connection path and the balance of workload allocation. The solution is solved by the improved NSGA-II algorithm.
It effectively avoids unreasonable sub-region division, reduces management complexity, improves resource utilization efficiency, optimizes path planning, balances workload allocation, and improves operational efficiency.
Smart Images

Figure CN119200618B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of agricultural planting technology, and in particular to a method for full coverage path planning of agricultural multi-robots in complex areas. Background Art
[0002] With the continuous advancement of global agricultural modernization, agricultural robots are becoming increasingly important as a key tool for improving the efficiency and accuracy of agricultural production and planting.
[0003] In agricultural production and planting, a single robot often finds it difficult to cope with large-scale and complex tasks. The collaborative operation of multiple robots can achieve efficient and coordinated operations through reasonable task allocation and path planning, and full coverage path planning is the key to ensuring that agricultural robots complete their tasks efficiently and without omissions. Traditional agricultural operation methods often have problems such as low efficiency, high omission rate, and waste of resources. The current full coverage path planning technology divides the plantable area into multiple sub-areas, which are then assigned to multiple robots. By reasonably planning the robot's operation path, the number of turns at the head of the field can be significantly reduced, the missed area can be reduced, and the operation efficiency and quality can be improved. However, the current method still has some defects:
[0004] (1) Irrational sub-area division: Existing methods may result in too many sub-areas when dividing plantable areas, increasing the complexity of management and scheduling. This irrational division will lead to waste of resources and reduced operation efficiency.
[0005] (2) Conflicts between optimization objectives: The allocation of sub-areas and the planting sequence often need to consider multiple optimization objectives, such as balanced distribution of workload, minimization of the number of turns, and minimization of path length. When performing multi-objective optimization, existing technologies often have difficulty balancing multiple objectives, which may result in other objectives being affected when one objective is met, thereby affecting the overall work efficiency. Therefore, optimizing multiple objectives while meeting a single optimization objective still needs to be further improved. Summary of the invention
[0006] In view of this, an embodiment of the present invention provides a method for full coverage path planning of multiple agricultural robots in complex areas to at least solve the above-mentioned problems.
[0007] An embodiment of the present invention provides a method for full coverage path planning of agricultural multi-robots in a complex area, comprising decomposing a designated agricultural planting area into a plurality of convex sub-areas by an improved Maklink line decomposition method; determining the minimum width direction of each of the plurality of convex sub-areas by a clamping method; planning the planting path inside each of the convex sub-areas based on the minimum width direction by a reciprocating coverage mode; planning the connection path between any two of the plurality of convex sub-areas by a Dijkstra method; constructing a full coverage path planning model with the shortest total connection path of all robots and balanced workload distribution of all robots as objective functions based on the planting path inside each convex sub-area and the connection path between any two convex sub-areas based on the planting path inside each convex sub-area and the connection path between the any two convex sub-areas as objective functions; solving the full coverage path planning model by an improved NSGA-Ⅱ algorithm to obtain a full coverage path result of multiple robots.
[0008] In one implementation, the improved Maklink line decomposition method is used to decompose the designated agricultural planting area into a number of convex sub-areas, including: step 1: obtaining a set of all obstacle polygon vertices of the designated agricultural planting area, and selecting a vertex from the set of all obstacle polygon vertices; step 2: determining whether the selected vertex is a concave vertex, if it is a concave vertex, executing step 1, otherwise executing step 3; step 3: making the nearest link line from the vertex to the working area boundary of the designated agricultural planting area, as well as all link lines between the vertex and the remaining obstacle polygon vertices except the obstacle polygon where the vertex is located; step 4: deleting all link lines that pass through the obstacle polygon among the link lines of the vertex, and removing the remaining link lines from Sort from short to long to generate a vertex link line set; Step 5: Take out a link line from the vertex link line set in order from short to long, and judge the external angle of the vertex at this time. If the external angles of the vertices do not exceed 180°, execute step 7; if the link line does not exist, execute step 6; Step 6: Take out two link lines from the vertex link line set in order from short to long, and judge the external angle of the vertex at this time. If the external angles of the vertices do not exceed 180°, execute step 7; Step 7: Keep the current link line and ignore the remaining link lines of the vertex; Step 8: Repeat steps 1-7 until all vertices in the vertex link line set are considered; Step 9: Decompose the designated agricultural planting area into the plurality of convex sub-areas through all the retained link lines.
[0009] In another implementation, whether the selected vertex is a concave vertex is determined by the following method: for the selected vertex in the obstacle polygon , use the positive and negative results of the vector cross product to determine the concave points, specifically:
[0010] The vertex Its adjacent points and Composed of two vectors and , according to the definition of vector cross product:
[0011]
[0012] if , then the vertex is a convex vertex;
[0013] if , then the vertex A concave vertex.
[0014] In another implementation, the use of the Dijkstra method to plan the connection path between any two of the plurality of convex sub-regions includes: simplifying the problem of the shortest zero-repetition coverage connection path between any two of the plurality of convex sub-regions to finding the shortest path between any two vertices in a two-dimensional undirected graph; describing the information of the designated agricultural planting area as an adjacency matrix, and obtaining the shortest path between any two vertices in the two-dimensional undirected graph by solving the adjacency matrix, wherein the graph is assumed to be Include vertices, the adjacency matrix of the graph for Matrix of order:
[0015]
[0016] in, Representation Node and nodes The distance between hour, , when the node and nodes When not directly connected, .
[0017] In another implementation, the full coverage path planning model takes the shortest total connection path of all robots as the objective function , the formula is as follows:
[0018]
[0019] in, is the task number of the sub-area to be planted in the designated agricultural planting area, and the total number of sub-areas is , is the set of all seed areas to be planted, is the planting robot serial number, the total number of robots is , A collection of all planting robots; There are four types of sub-area coverage methods: For sub-region First Path planning for coverage methods, The starting point for the robot to complete a task, that is, the warehouse. For robots First Planting sub-areas using mulch methods , sub-area It's a robot Planting Regions, For robots Planting completed Area to start planting The length of the connection path between regions, Assign to robot The set of all seed-planting areas to be planted, the number of elements in the set is ;
[0020] The full coverage path planning model takes the workload balance of all robots as the objective function , the formula is as follows:
[0021]
[0022] in, For robots The sum of the areas of all planted sub-areas, is the average planting area of all robots;
[0023] The constraints of the full coverage path planning model are:
[0024] Sub-regions are all allocated: ;
[0025] There is no duplicate allocation of sub-areas: .
[0026] In another implementation, the full coverage path planning model is solved by improving the NSGA-Ⅱ algorithm to obtain the full coverage path result of multiple robots, including: step 1, calculating the distance weight matrix, that is, calculating the distance weight matrix between each convex sub-region in the plurality of convex sub-regions by the Dijkstra algorithm; step 2, initializing the population, that is, randomly generating multiple groups of path schemes based on the planting paths inside each convex sub-region and the connection paths between any two convex sub-regions, and using the multiple groups of path schemes as the starting point of the algorithm, representing different coverage paths of multiple robots in the target area, wherein the multiple groups of path schemes are represented as suitable for algorithm processing by chromosome encoding. Data structure; step 3, according to the improved objective function, the population is non-dominated sorted and the crowding degree is calculated; step 4, the next generation population is generated through selection operation, high-quality gene fragment crossover operation and mutation operation, wherein the next generation population is generated through chromosome decoding; step 5, the initialized population and the generated next generation population are merged to form a merged population; step 6, according to the improved objective function, the merged population is non-dominated sorted and the crowding degree is calculated to generate a new population; step 7, repeat steps 3-7 until the improved NSGA-Ⅱ algorithm reaches a preset number of iterations, and the optimal solution of the improved NSGA-Ⅱ algorithm is output, that is, the multi-robot full coverage path result is obtained.
[0027] In another implementation, the distance weight matrix is calculated by treating each convex sub-region as a node in a two-dimensional undirected graph and using the Dijkstra algorithm to calculate After that, we get the distance weight matrix between regions. for Matrix of order:
[0028]
[0029] in, Indicates sub-area and subregions The distance weight between them, when two regions are adjacent, ;
[0030] when hour, ;
[0031] When two regions are not directly connected, Indicates the minimum number of sub-region boundaries that need to be crossed for two regions to be connected.
[0032] In another implementation, the method of the present invention further includes: constructing a constraint weighting function based on the inter-region distance weight matrix as follows:
[0033]
[0034] in, To adjust the variable parameters of the weighted weights, , the weighted objective function for:
[0035]
[0036] in, is the task number of the sub-area to be planted in the designated agricultural planting area, and the total number of sub-areas is , is the set of all seed areas to be planted, is the planting robot serial number, the total number of robots is , A collection of all planting robots. There are four types of sub-area coverage methods: For sub-region First Path planning for coverage methods, The starting point for the robot to complete a task, that is, the warehouse. For robots First Planting sub-areas using mulch methods , sub-area It's a robot Planting Regions, For robots Planting completed Area to start planting The length of the connection path between regions, Assign to robot The set of all seed-planting areas to be planted, the number of elements in the set is , Indicates the first Regions and The minimum number of sub-region boundaries that need to be crossed to connect regions.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] (1) Reasonable division of planting areas: The present invention decomposes the designated agricultural planting area into several convex sub-areas through the improved Maklink line decomposition method, which can effectively avoid unreasonable sub-area division, reduce management complexity, and improve resource utilization efficiency.
[0039] (2) Optimizing path planning: The present invention is based on a reciprocating covering mode in the minimum width direction, which makes the planting path inside each convex area more reasonable, reduces the number of turns, reduces the operation time, and improves the operation efficiency.
[0040] (3) Balanced workload distribution: The present invention can effectively solve the problem of uneven load in multi-robot operations and improve operation efficiency by constructing a full-coverage path planning model with the shortest total connection path of all robots and balanced workload distribution as the objective function.
[0041] (4) Multi-objective optimization: The present invention adopts the improved NSGA-Ⅱ algorithm for solving, which can achieve multi-objective optimization and comprehensively consider multiple factors such as path length, workload and operation efficiency, so as to obtain a better full coverage path planning result. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0043] Figure 1 A flowchart of the steps of a method for planning a path for full coverage of multiple agricultural robots in a complex area according to an embodiment of the present invention;
[0044] Figure 2 For Figure 1 A schematic flow chart of a method for agricultural multi-robot full coverage path planning in a complex area corresponding to an embodiment;
[0045] Figure 3 A schematic diagram of complex region decomposition according to an embodiment of the present invention;
[0046] Figure 4 It is a pseudo code schematic diagram of the improved Maklink line decomposition method according to an embodiment of the present invention;
[0047] Figure 5 A schematic diagram of determining the minimum width direction of a polygon according to an embodiment of the present invention;
[0048] Figure 6 Schematic diagram of four paths of reciprocating coverage according to an embodiment of the present invention;
[0049] Figure 7 A schematic diagram of a connection path between convex sub-regions according to an embodiment of the present invention;
[0050] Figure 8 A schematic diagram of encoding and decoding operations according to an embodiment of the present invention;
[0051] Fig. 9 A schematic diagram of chromosomes and breakpoints according to an embodiment of the present invention;
[0052] Fig.10 A schematic diagram of the crossover of high-quality gene fragments according to an embodiment of the present invention;
[0053] Fig.11 It is a pseudo code schematic diagram of the improved NSGA-II algorithm of an embodiment of the present invention;
[0054] Fig.12 It is a schematic diagram of the improved NSGA-II algorithm flow of an embodiment of the present invention;
[0055] Fig.13 The embodiment of the present invention is based on Figure 1 Comparison chart of algorithm results;
[0056] Fig.14 Schematic diagram of the distribution of the parato frontier solution set according to an embodiment of the present invention. DETAILED DESCRIPTION
[0057] In order to have a clearer understanding of the technical features, purposes and effects of the embodiments of the present application, the specific implementation methods of the embodiments of the present application are now described with reference to the accompanying drawings.
[0058] In this document, “exemplary” means “serving as an example, instance or illustration”, and any illustration or implementation described in this document as “exemplary” should not be construed as a more preferred or more advantageous technical solution.
[0059] In order to simplify the drawings, only the parts related to the present application are shown in each figure by way of example, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, in some figures, only one or more of the parts with the same structure or function are shown by way of example, or only one or more of them are marked.
[0060] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in the field based on the embodiments in the embodiments of the present invention should fall within the scope of protection of the embodiments of the present invention.
[0061] The specific implementation of the embodiment of the present invention is further described below in conjunction with the accompanying drawings of the embodiment of the present invention.
[0062] See also Figure 1 and Figure 2 , this embodiment mainly includes the following steps:
[0063] Step S101, decomposing the designated agricultural planting area into a plurality of convex sub-areas by using an improved Maklink line decomposition method;
[0064] Step S102, determining the minimum width direction of each convex sub-region among the plurality of convex sub-regions by a clamping method;
[0065] Step S103, based on the minimum width direction, adopting a reciprocating covering mode to plan the planting path inside each convex sub-area;
[0066] Step S104, using the Dijkstra method to plan a connection path between any two convex sub-regions among the plurality of convex sub-regions;
[0067] Step S105, based on the planting paths inside the convex sub-areas and the connection paths between any two convex sub-areas, a full coverage path planning model is constructed with the shortest total connection path of all robots and balanced workload distribution of all robots as the objective function;
[0068] Step S106, solving the full coverage path planning model by improving the NSGA-Ⅱ algorithm to obtain a multi-robot full coverage path result.
[0069] See also Figure 3 As shown in (a), in a 200*200 map, obstacles are represented by black areas, and the remaining area is decomposed into multiple sub-areas by Maklink lines. Traditional Maklink lines meet the following three requirements:
[0070] (1) Maklink lines cannot pass through obstacles;
[0071] (2) One endpoint of the Maklink line is a vertex of the obstacle polygon, and the other endpoint is a vertex of the obstacle polygon or a point on the free space boundary;
[0072] (3) For each vertex of the obstacle, only the minimum number of Maklink lines with the shortest Euclidean distance are retained so that the vertex does not have an external angle greater than 180°.
[0073] Therefore, the retained Maklink lines make the decomposed sub-regions all convex polygons. However, the traditional Maklink line decomposition results include the re-decomposition of convex sub-regions, resulting in too many sub-regions in the results. Figure 3 As shown in (a), the dotted Maklink line is a redundant decomposition line.
[0074] In order to minimize the number of sub-regions, concave point judgment should be performed first to exclude concave vertices to be decomposed.
[0075] Optionally, whether the selected vertex is a concave vertex is determined by the following method: for the selected vertex in the obstacle polygon , use the positive and negative results of the vector cross product to determine the concave point, specifically: Its adjacent points and Composed of two vectors and , according to the definition of vector cross product:
[0076]
[0077] if , then the vertex is a convex vertex;
[0078] if , then the vertex A concave vertex.
[0079] Optionally, the designated agricultural planting area is decomposed into a number of convex sub-areas by using an improved Maklink line decomposition method, including:
[0080] Step 1: Obtain a set of all obstacle polygon vertices in the designated agricultural planting area, and select a vertex from the set of all obstacle polygon vertices;
[0081] Step 2: Determine whether the selected vertex is a concave vertex. If it is a concave vertex, execute step 1; otherwise, execute step 3;
[0082] Step 3: Make the nearest link line from the vertex to the boundary of the working area of the designated agricultural planting area, and all the link lines between the vertex and the vertices of the remaining obstacle polygons except the obstacle polygon where the vertex is located;
[0083] Step 4: Delete all link lines that pass through the obstacle polygon among the link lines of the vertex, and sort the remaining link lines from short to long to generate a vertex link line set;
[0084] Step 5: Take a link line from the vertex link line set in order from short to long, and determine the external angle of the vertex at this time. If the external angle of the vertex does not exceed 180°, execute step 7; if the link line does not exist, execute step 6;
[0085] It should be understood that the absence of the link line means that if, in the vertex link line set, each link line has an external angle greater than 180° at the vertex, then the link line does not exist.
[0086] Step 6: Take two link lines from the vertex link line set in order from short to long, and determine the external angle of the vertex at this time. If the external angle of the vertex does not exceed 180°, execute step 7;
[0087] Step 7: Keep the current link line and ignore the remaining link lines of the vertex;
[0088] Step 8: Repeat steps 1-7 until all vertices in the vertex link line set are considered;
[0089] Step 9: Decompose the designated agricultural planting area into the plurality of convex sub-areas through all the retained link lines.
[0090] After performing the above steps, if Figure 3 As shown in (b) in the figure, all generated Maklink lines divide the free space within the workspace boundary into several polygonal sub-regions, and all polygonal sub-regions are convex polygons. The pseudo code diagram of the improved Maklink line decomposition method is as follows: Figure 4 shown.
[0091] It should be noted that the aforementioned content has described the decomposition of the designated agricultural planting area into a number of convex sub-areas by using the improved Maklink line decomposition method, and the sub-areas mentioned subsequently in the present invention all refer to convex sub-areas.
[0092] It should be understood that convex polygon covering path patterns include spiral and reciprocating. In the agricultural field, reciprocating covering is widely used because of its simplicity, ease of implementation and reliability. In the automatic path planning of agricultural machinery, turning maneuvers require reducing the speed of the machinery and causing additional wear on the tracks or tires. By minimizing the number of parallel tracks, the number of turning maneuvers can be effectively reduced. In order to determine the track angle corresponding to the minimized number of parallel tracks, the minimum width direction of the convex polygon must be determined. The minimum width of any convex polygon is the minimum distance between a pair of parallel lines that clamp the polygon. The minimum width only exists in vertex-edge mapping pairs and edge-edge mapping pairs, but not in vertex-vertex mapping pairs. As Figure 5 As shown, by calculating and comparing these widths, the best parallel line orientation can be selected to minimize the number of turns and the cost of covering the path.
[0093] For full coverage issues specific to each sub-region, such as Figure 6 As shown in the figure, there are four coverage paths with different traversal directions as candidate paths. The selection of the entry point of the path inside the sub-area will affect the position of the exit point, and the position of the exit point determines the length of the path connecting to the next sub-area. Therefore, the coverage method of each sub-area and the combination of multiple sub-area coverage methods are also important issues in shortest path optimization.
[0094] There is only one polygonal region vertex that is closest to the starting point or end point of the sub-region path. Examples of region conversion paths are Figure 7 As shown in (a), after completing the coverage of area 2, the planting robot, i.e., the agricultural robot, crosses the ridge area from the end point to reach the nearest node 5, and then passes through nodes 6, 7, 2, and 1 along the ridge area in sequence, and finally reaches the starting point of area 1. The whole process does not repeatedly cover the already planted area.
[0095] Based on this, the problem of the shortest zero-repetition coverage connection path between two sub-regions can be simplified to finding the shortest path between any two vertices in a two-dimensional undirected graph:
[0096] Optionally, the using of the Dijkstra method to plan a connection path between any two convex sub-regions among the plurality of convex sub-regions includes:
[0097] The problem of the shortest zero-repetition coverage connection path between any two convex sub-regions in the plurality of convex sub-regions is simplified to finding the shortest path between any two vertices in a two-dimensional undirected graph;
[0098] The information of the designated agricultural planting area is described as an adjacency matrix, and the shortest path between any two vertices in the two-dimensional undirected graph is obtained by solving the adjacency matrix. Include vertices, the adjacency matrix of the graph for Matrix of order:
[0099]
[0100] in, Representation Node and nodes The distance between hour, , when the node and nodes When not directly connected, .
[0101] It should be understood that the Dijkstra algorithm is an algorithm based on breadth-first search, which obtains the shortest path between nodes by traversing the parent-child relationship of nodes. This method can find the shortest distance between two selected nodes, and then determine the shortest connection path between two sub-areas. It is worth noting that for uncovered areas, the diagonal lines inside the polygon can also be regarded as connection paths without repeated coverage. Figure 7 As shown, when the coverage starting point of area 1 is located at the upper left corner, Figure 7The path length shown in (b) is shorter than the path length shown in (a). At the same time, since 1 is the area to be planted, the path passing through area 1 is considered to have no repeated coverage.
[0102] For the agricultural robot described in the present invention, the length of the operation time is mainly related to the number of trees planted, and the number of trees planted depends on the area of the planting area. Therefore, the total operation time can be approximately replaced by the area of the planting area. At the same time, the connection path between areas belongs to the additional energy consumption of the machine, so the total connection path between areas is used as the evaluation indicator of the machine energy consumption. According to the planting scene and goals, two objective functions are set. The first objective function is to minimize the total connection path of all robots, and the second objective function is to balance the workload of all robots, with the planting area as the evaluation indicator of the workload:
[0103] Optionally, the full coverage path planning model takes the shortest total connection path of all robots as the objective function , the formula is as follows:
[0104]
[0105] in, is the task number of the sub-area to be planted in the designated agricultural planting area, and the total number of sub-areas is , is the set of all seed areas to be planted, is the planting robot serial number, the total number of robots is , A collection of all planting robots; There are four types of sub-area coverage methods: For sub-region First Path planning for coverage methods, The starting point for the robot to complete a task, that is, the warehouse. For robots First Planting sub-areas using mulch methods , sub-area It's a robot Planting Regions, For robots Planting completed Area to start planting The length of the connection path between regions, Assign to robot The set of all seed-planting areas to be planted, the number of elements in the set is ;
[0106] The full coverage path planning model takes the workload balance of all robots as the objective function , the formula is as follows:
[0107]
[0108] in, For robots The sum of the areas of all planted sub-areas, is the average planting area of all robots;
[0109] The constraints of the full coverage path planning model are:
[0110] Sub-regions are all allocated: ;
[0111] There is no duplicate allocation of sub-areas: .
[0112] Alternatively, see Fig.11 and 12 , the full coverage path planning model is solved by improving the NSGA-Ⅱ algorithm to obtain the multi-robot full coverage path result, including:
[0113] Step 1, calculating the distance weight matrix, that is, calculating the distance weight matrix between each convex sub-region in the plurality of convex sub-regions by using the Dijkstra algorithm;
[0114] It should be understood that in order to make the total connection path of multiple robots the shortest, the planting sub-areas of each robot should be as adjacent or close as possible. Before using the Dijkstra algorithm for path planning, the connectivity between sub-areas is first determined, which can shorten the calculation time. By adding corresponding constraints, the algorithm results can also converge to a feasible solution more quickly. In the present invention, the proximity between sub-areas can be described by the inter-area distance weight matrix, which can also be obtained by the Dijkstra algorithm:
[0115] Optionally, the distance weight matrix is calculated, including: treating each convex sub-region as a node in a two-dimensional undirected graph, and using a Dijkstra algorithm to calculate After that, we get the distance weight matrix between regions. for Matrix of order:
[0116]
[0117] in, Indicates sub-area and subregions The distance weight between them, when two regions are adjacent, ;
[0118] when hour, ;
[0119] When two regions are not directly connected, Indicates the minimum number of sub-region boundaries that need to be crossed for two regions to be connected.
[0120] Step 2, initializing the population, i.e., randomly generating multiple groups of path schemes based on the planting paths inside the convex sub-regions and the connection paths between any two convex sub-regions, and using the multiple groups of path schemes as the starting point of the algorithm, representing different coverage paths of multiple robots in the target area, wherein the multiple groups of path schemes are represented as a data structure suitable for algorithm processing through chromosome encoding;
[0121] Step 3: Perform non-dominated sorting and crowding calculation on the population according to the improved objective function;
[0122] Step 4: Generate the next generation population through selection operation, high-quality gene segment crossover operation and mutation operation, wherein chromosome decoding is used to participate in the generation of the next generation population;
[0123] For example, see Figure 8 , 9 10. The present invention regards a combination of sub-region planting sequence and coverage method as a chromosome to perform encoding and decoding operations to assist in finally obtaining a new population.
[0124] The present invention adopts decimal integer coding, and the chromosome is divided into two parts. The length of the first part of the chromosome is equal to the number of sub-regions, which indicates the planting order and coverage method of the robot in the sub-regions. Each gene satisfies the coding rule formula as follows:
[0125]
[0126] Therefore, each gene contains two pieces of information: the sub-region number and the sub-region traversal method. It is not difficult to get the gene decoding rule formula as follows:
[0127]
[0128] Encoding and decoding operations such as Figure 8 As shown, the first gene 33 is obtained by the encoding rule formula from the region number 9 and the region traversal method 1; the decoding is similar, the first gene 33 is divided by 4 plus 1 to obtain the region number 9, and the modulo 4 is obtained to obtain the region traversal method 1.
[0129] The length of the second part of the chromosome is equal to the number of robots minus 1. Each gene represents the breakpoint position of the first part of the gene, and the chromosome is finally divided into gene segments equal to the number of robots. Fig. 9As shown, the first breakpoint is 3, and robot 1 plants areas 9, 10, and 1 in sequence, and the same goes for the other robots.
[0130] like Fig.10 As shown in the figure, the selection operation is followed by crossover and mutation operations. The crossover operation is performed by retaining high-quality gene segments. The specific operation is as follows: In the selection operation, two individuals are randomly selected through a binary tournament, one of which has a lower non-dominant level as Parent1 and the other as Parent2. The offspring produced by the mutation operation is called offspring. In order to retain the high-quality gene segments in the Parent1 individual, a gene segment obtained by breakpoint separation is randomly selected in Parent1, and a gene segment of the corresponding length is selected in Parent2 for crossover. In order to ensure the constraint condition, that is, all sub-regions are allocated and there are no duplications, the genes corresponding to the sub-regions in Parent2 that are repeated with the high-quality gene segments obtained from Parent1 are removed, and the genes in Parent2 that were originally replaced by the high-quality gene segments are used to fill the vacant gene positions in order. Finally, the obtained offspring individuals are retained as offspring, and the breakpoint chromosomes of the offspring are the same as those of Parent2. Fig.10 The example illustrates the implementation process of high-quality gene segment crossover, where "14-13-30" is the high-quality gene segment of Parent1, which is retained in the offspring. The remaining genes of the offspring come from Parent2.
[0131] It should be understood that such a crossover operation has practical significance. The reason why the gene fragment of the parent Parent1 is intercepted according to the breakpoint is that the high-quality characteristics of Parent1 as a high-quality individual are mainly reflected in the sub-region number and its order assigned by a robot, and the corresponding gene fragment separated by the breakpoint is the high-quality gene segment. The high-quality fragment of the high-quality individual is cross-transplanted to the gene position of the same length of the low-quality individual, so that the low-quality individual expresses some of the high-quality characteristics of the high-quality individual, thereby generating a new individual offspring. At the same time, through the allocation and exchange of the remaining genes, it is ensured that the offspring meets the constraints and avoids the offspring being screened out by the constraints.
[0132] This method improves the crossover operation of the traditional genetic algorithm, imitates the principle of biological species evolution, selectively inherits high-quality gene fragments in the population, effectively increases the spread of high-quality characteristics in the population, and enhances the inspiration for low-quality individuals. By controlling the probability of appropriate crossover of high-quality gene fragments, it will help the population converge to the global approximate solution faster overall.
[0133] It should also be understood that conventional mutation operations may cause high-quality offspring individuals to break away from the constraints and result in the elimination of high-quality individuals due to individual genes. Therefore, the mutation operation design is combined with the constraints. For the selected variant gene position, the sub-region number and the sub-region coverage sequence number are obtained according to the original gene decoding, and only the coverage sequence number is mutated, and then a new mutated gene is generated. Such an operation can make the offspring individuals fully meet the constraints and is conducive to the retention of high-quality individuals. In actual operation, the mutation probability is appropriately adjusted to improve population diversity.
[0134] Step 5: Merge the initial population and the generated next generation population to form a merged population;
[0135] Step 6: Perform non-dominated sorting and crowding calculation on the merged population according to the improved objective function to generate a new population;
[0136] It should be understood that the improved objective function here refers to the weighted objective function and the unweighted objective function .
[0137] Step 7: Repeat steps 3-7 until the improved NSGA-II algorithm reaches a preset number of iterations, and output the optimal solution of the improved NSGA-II algorithm, that is, obtain the multi-robot full coverage path result.
[0138] Optionally, the method of the present invention further comprises: constructing a constraint weighting function based on the inter-region distance weight matrix: as follows:
[0139]
[0140] in, To adjust the variable parameters of the weighted weights, , the weighted objective function for:
[0141]
[0142] in, is the task number of the sub-area to be planted in the designated agricultural planting area, and the total number of sub-areas is , is the set of all seed areas to be planted, is the planting robot serial number, the total number of robots is , A collection of all planting robots. There are four types of sub-area coverage methods: For sub-region First Path planning for coverage methods, The starting point for the robot to complete a task, that is, the warehouse. For robots First Planting sub-areas using mulch methods , sub-area It's a robot Planting Regions, For robots Planting completed Area to start planting The length of the connection path between regions, Assign to robot The set of all seed-planting areas to be planted, the number of elements in the set is , Indicates the first Regions and The minimum number of sub-region boundaries that need to be crossed to connect regions.
[0143] Finally, simulation analysis was carried out, and the algorithm was programmed using Matlab. The hardware equipment was an Intel(R) Core(TM) i5-8500@3.00Ghz CPU, 15.8GB of memory, and the program running software was Matlab R2024a. In order to fully verify the feasibility of the algorithm, the present invention selected a satellite image of a planting area to simulate and verify the overall algorithm. Map information includes map size, obstacle areas, and decomposed sub-areas. In order to avoid the influence of randomness on the results, the average value of the first Pareto solution after the algorithm was run 10 times was calculated as the result. The experimental parameters were set as follows: the population size was 200, the crossover probability of high-quality gene fragments was 0.2, the mutation probability was 0.05, and the constraint weighting factor was , in order to observe the convergence of the algorithm, the number of iterations is set to 100. The present invention uses the traditional NSGA-II algorithm and the improved NSGA-II (INSGA-II) algorithm proposed in this paper to simulate the region. The evaluation indicators of the algorithm mainly include the actual application effect, convergence speed and accuracy, and operation speed.
[0144] See also Fig.13(a) is the algorithm result of NSGA-II, and (b) is the algorithm result of INSGA-II. The specific path of the algorithm result of NSGA-II is as follows: Robot a: traverses areas 8-10-11 in sequence, passing through endpoints 26-17-18-19-22-12-11-20-16-17-24-26 in sequence; Robot b: traverses areas 3-4-2 in sequence, passing through endpoints 26-8-9-3-4-15-10-6-21-26 in sequence; Robot c: traverses areas 7-6 in sequence, passing through endpoints 26-8-9-8-7-26 in sequence; Robot b: traverses areas 9-5-1 in sequence, passing through endpoints 26-17-16-20-11-12-23-14-3-10-9-8-2 in sequence 6; The specific path of the algorithm result of INSGA-II is as follows: robot a: traverses areas 1-2 in sequence, passing endpoints 26-21-2-6-21-26 in sequence; robot b: traverses areas 6-7-11 in sequence, passing endpoints 26-7-8-16-17-24-26 in sequence; robot c: traverses areas 9-10-8 in sequence, passing endpoints 26-17-16-20-11-12-22-27-25-24-26 in sequence; robot b: traverses areas 4-5-3 in sequence, passing endpoints 26-8-9-10-15-14-28-5-15-20-16-17-24-26 in sequence.
[0145] See Table 1 for detailed map information and the actual effects of the two algorithms. From Table 1, we can see that although the INSGA-II algorithm The value is large, but The value is significantly smaller and within the acceptable range. This phenomenon occurs because the INSGA-II algorithm The distance matrix is weighted so that the algorithm results are more inclined to be assigned to a robot's adjacent sub-area. Fig.13 As shown, it can be observed that in the results of the INSGA-II algorithm, the sub-areas assigned to each robot are adjacent, while in the results of the NSGA-II algorithm, the sub-areas of the robots are not adjacent, resulting in a longer connection path.
[0146] Table 1 Comparison of the results of the two algorithms
[0147]
[0148] It should be understood that the objective function The total length of the connection path is an important indicator in the path planning of agricultural robots. The present invention further compares the total length of the connection path when different numbers of agricultural robots are used. As shown in Table 2, for different numbers of robots, the results of INSGA-II are always smaller than those of NSGA-II, indicating that the coverage order and method of the sub-areas are better.
[0149] Table 2 Comparison of total connection path results of the two algorithms
[0150]
[0151] See also Fig.14 The Pareto frontier solution set distribution effect corresponding to the algorithm. The horizontal axis in the figure is the first objective function. , the ordinate is the second objective function From the figure, we can see that the solution of INSGA-II is generally better than that of NSGA-II, and it can be clearly seen that the solution of INSGA-II forms a clear Pareto front, indicating that the optimal solution distribution is more dense and uniform. Therefore, the convergence speed and accuracy of INSGA-II are significantly better than those of traditional NSGA-II.
[0152] In summary, the beneficial effects of the present invention are:
[0153] (1) Reasonable division of planting areas: The present invention decomposes the designated agricultural planting area into several convex sub-areas through the improved Maklink line decomposition method, which can effectively avoid unreasonable sub-area division, reduce management complexity, and improve resource utilization efficiency.
[0154] (2) Optimizing path planning: The present invention is based on a reciprocating covering mode in the minimum width direction, which makes the planting path inside each convex area more reasonable, reduces the number of turns, reduces the operation time, and improves the operation efficiency.
[0155] (3) Balanced workload distribution: The present invention can effectively solve the problem of uneven load in multi-robot operations and improve operation efficiency by constructing a full-coverage path planning model with the shortest total connection path of all robots and balanced workload distribution as the objective function.
[0156] (4) Multi-objective optimization: The present invention adopts the improved NSGA-Ⅱ algorithm for solving, which can achieve multi-objective optimization and comprehensively consider multiple factors such as path length, workload and operation efficiency, so as to obtain a better full coverage path planning result.
[0157] It should be noted that the present invention may be a method, a system, an apparatus and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0158] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.
[0159] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0160] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, Python, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect through the Internet). In some embodiments, by using the state information of the computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit may execute the computer-readable program instructions, thereby implementing various aspects of the present invention.
[0161] Various aspects of the present invention are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flowchart and / or block diagram and the combination of the boxes in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0162] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0163] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0164] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.
[0165] Embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.
Claims
1. A method for full coverage path planning of agricultural multi-robots in complex areas, characterized in that: include: The designated agricultural planting area is decomposed into several convex sub-areas by using the improved Maklink line decomposition method; Determine the minimum width direction of each convex sub-region among the plurality of convex sub-regions by a clamping method; Based on the minimum width direction, a reciprocating covering mode is adopted to plan the planting path inside each convex sub-area; Using the Dijkstra method to plan a connection path between any two convex sub-regions among the plurality of convex sub-regions; Based on the planting paths inside the convex sub-areas and the connection paths between any two convex sub-areas, a full coverage path planning model is constructed with the shortest total connection path of all robots and balanced workload distribution of all robots as the objective function. The full coverage path planning model takes the shortest total connection path of all robots as the objective function f1, and the formula is as follows: Wherein, t (t=1, 2, ..., NT) is the task number of the sub-area to be planted in the designated agricultural planting area, the total number of sub-areas is NT, T (t∈T) is the set of all sub-areas to be planted, r (r=1, 2, ..., NR) is the planting robot number, the total number of robots is NR, R (r∈R) is the set of all planting robots; m (m=0, 1, 2, 3) is the coverage mode of the sub-area, there are four types in total, t m The path planning for sub-area t in the mth coverage mode is as follows: A0 is the starting point for the robot to complete a task, i.e., the warehouse. Plant sub-region t for robot r in the mth covering mode. Sub-region t is the nth region planted by robot r. T is the length of the connection path between the robot r completing planting the nth area and starting to plant the n+1th area, r is the set of all seed-to-be-planted regions assigned to robot r, and the number of set elements is nt (n=1, 2, …, nt); The full coverage path planning model takes the workload balance of all robots as the objective function f2, and the formula is as follows: Among them, Ar(T r ) is the sum of the areas of all planting sub-regions of robot r, is the average planting area of all robots; The constraints of the full coverage path planning model are: Sub-regions are all allocated: There is no duplicate allocation of sub-areas: By improving the NSGA-Ⅱ algorithm to solve the full coverage path planning model, the multi-robot full coverage path results are obtained, including: Step 1, calculating the distance weight matrix, that is, calculating the distance weight matrix between each convex sub-region in the plurality of convex sub-regions by using the Dijkstra algorithm; Step 2, initializing the population, i.e., randomly generating multiple groups of path schemes based on the planting paths inside the convex sub-regions and the connection paths between any two convex sub-regions, and using the multiple groups of path schemes as the starting point of the algorithm, representing different coverage paths of multiple robots in the target area, wherein the multiple groups of path schemes are represented as a data structure suitable for algorithm processing through chromosome encoding; Step 3: Perform non-dominated sorting and crowding calculation on the population according to the improved objective function; Step 4: Generate the next generation population through selection operation, high-quality gene segment crossover operation and mutation operation, wherein chromosome decoding is used to participate in the generation of the next generation population; Step 5: Merge the initial population and the generated next generation population to form a merged population; Step 6: Perform non-dominated sorting and crowding calculation on the merged population according to the improved objective function to generate a new population; Step 7: Repeat steps 3-7 until the improved NSGA-II algorithm reaches a preset number of iterations, and output the optimal solution of the improved NSGA-II algorithm, that is, obtain the multi-robot full coverage path result.
2. The method according to claim 1, characterized in that The improved Maklink line decomposition method is used to decompose the designated agricultural planting area into several convex sub-areas, including: Step 1: Obtain a set of all obstacle polygon vertices in the designated agricultural planting area, and select a vertex from the set of all obstacle polygon vertices; Step 2: Determine whether the selected vertex is a concave vertex. If it is a concave vertex, execute step 1; otherwise, execute step 3; Step 3: Make the nearest link line from the vertex to the boundary of the working area of the designated agricultural planting area, and all the link lines between the vertex and the vertices of the remaining obstacle polygons except the obstacle polygon where the vertex is located; Step 4: Delete all link lines that pass through the obstacle polygon among the link lines of the vertex, and sort the remaining link lines from short to long to generate a vertex link line set; Step 5: Take a link line from the vertex link line set in order from short to long, and determine the external angle of the vertex at this time. If the external angle of the vertex does not exceed 180°, execute step 7; if the link line does not exist, execute step 6; Step 6: Take two link lines from the vertex link line set in order from short to long, and determine the external angle of the vertex at this time. If the external angle of the vertex does not exceed 180°, execute step 7; Step 7: Keep the current link line and ignore the remaining link lines of the vertex; Step 8: Repeat steps 1-7 until all vertices in the vertex link line set are considered; Step 9: Decompose the designated agricultural planting area into the plurality of convex sub-areas through all the retained link lines.
3. The method according to claim 2, characterized in that Determine whether the selected vertex is a concave vertex by the following method: For the selected vertex P in the obstacle polygon i , use the positive and negative results of the vector cross product to determine the concave points, specifically: The vertex P i Respectively with its adjacent point P i-1 (x i-1 ,y i-1 ) and P i+1 (x i+1 ,y i+1 ) form two vectors and According to the definition of vector cross product: if Then the vertex P i is a convex vertex; if Then the vertex P i A concave vertex.
4. The method according to claim 1, characterized in that The using of the Dijkstra method to plan a connection path between any two convex sub-regions among the plurality of convex sub-regions includes: The problem of the shortest zero-repetition coverage connection path between any two convex sub-regions in the plurality of convex sub-regions is simplified to finding the shortest path between any two vertices in a two-dimensional undirected graph; The information of the designated agricultural planting area is described as an adjacency matrix. By solving the adjacency matrix, the shortest path between any two vertices in the two-dimensional undirected graph is obtained, where the graph G = (V, E) contains n vertices, and the adjacency matrix D of the graph is an n×n matrix: Among them, d ij Represents node v i and node v j The distance between them, when i=j, d ij = 0, when node v i and node v j When not directly connected, d ij =∞.
5. The method according to claim 1, characterized in that The calculating distance weight matrix comprises: The convex sub-regions are regarded as nodes in a two-dimensional undirected graph, and the Dijkstra algorithm is used to calculate n 二 After that, the distance weight matrix W between regions is obtained as an n×n matrix: Among them, w ij represents the distance weight between sub-region i and sub-region j. When the two regions are adjacent, w ij =1; When i=j, w ij =0; When the two regions are not directly connected, w ij Indicates the minimum number of sub-region boundaries that need to be crossed for two regions to be connected.
6. The method according to claim 5, characterized in that The method further comprises: Based on the inter-region distance weight matrix, the constraint weighting function P(x) is constructed as follows: Among them, α is a variable parameter for adjusting the weighted weight, 0<α<1, and the weighted objective function f1′ is: Wherein, t (t=1, 2, ..., NT) is the task number of the sub-area to be planted in the designated agricultural planting area, the total number of sub-areas is NT, T (t∈T) is the set of all sub-areas to be planted, r (r=1, 2, ..., NR) is the planting robot number, the total number of robots is NR, R (r∈R) is the set of all planting robots, m (m=0, 1, 2, 3) is the sub-area coverage mode, there are four types in total, t m The path planning for sub-area t in the mth coverage mode is as follows: A0 is the starting point for the robot to complete a task, i.e., the warehouse. Plant sub-region t for robot r in the mth covering mode. Sub-region t is the nth region planted by robot r. T is the length of the connection path between the robot r completing planting the nth area and starting to plant the n+1th area, r is the set of all seed-to-be-planted regions assigned to robot r, and the number of set elements is nt (n=1, 2, ..., nt). Indicates the minimum number of sub-region boundaries that need to be crossed to connect the nth region and the n+1th region planted by the robot.
Citation Information
Patent Citations
Robot full-coverage path planning region division method and device, medium and equipment
CN111562787A
Urban low-altitude environment-oriented unmanned aerial vehicle path planning method and equipment
CN114138006A