A method of agricultural machinery path planning based on divide-and-conquer strategy

Through the agricultural machinery path planning method based on the divide and conquer strategy, lidar is used to construct a three-dimensional point cloud map and morphological expansion operation, combined with the eight-neighbor adjacency check, and the obstacle avoidance path is integrated to solve the obstacle avoidance problem in agricultural machinery operations and achieve Efficient bypassing of agricultural machinery paths and improvement of land utilization.

CN118464028BActive Publication Date: 2024-09-06LONGMEN LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410943471.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-09-06
Estimated Expiration
2044-07-15

AI Technical Summary

Technical Problem

Existing path planning algorithms are difficult to effectively avoid obstacles during agricultural machinery operations, resulting in a large deviation range of agricultural machinery from the predetermined path and a high rate of missed plowing.

Method used

An agricultural machinery path planning method based on the divide-and-conquer strategy is used to collect environmental information through lidar, construct a three-dimensional point cloud map, project obstacle distribution characteristics onto the ground plane, perform morphological expansion operations and contour extraction, obtain the obstacle bypass path, and compare it with the prediction Assume the intersection of the shortest paths, determine the entry and exit points through eight-neighborhood adjacency check, and fuse the obstacle paths to reduce deviations.

Benefits of technology

It realizes that the agricultural machinery can get as close to the obstacle as possible when avoiding the obstacle, reduce the deviation range from the predetermined path, reduce the missed tillage rate, and improve the land utilization rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118464028B
    Figure CN118464028B
Patent Text Reader

Abstract

The invention discloses an agricultural machinery path planning method based on a divide-and-conquer strategy, belonging to the field of agricultural machinery path planning methods. The invention first obtains an obstacle bypassing path around each obstacle bypassing area on a grid map, then obtains an intersection of a preset shortest path and the obstacle bypassing area, deletes the obstacle bypassing area with an empty intersection, sorts the coordinates in the intersection and performs an eight-neighborhood adjacency check to obtain an entry point and an exit point that enter and leave the obstacle bypassing area respectively through the preset shortest path, divides the obstacle bypassing path into two by the initial entry point and the final exit point, inserts the entry point and the exit point into the obstacle bypassing paths on both sides by searching for related points of the entry point and the exit point on the obstacle bypassing path, and retains the movement distance of the agricultural machinery along the preset shortest path to the maximum extent, can ensure that the agricultural machinery can get as close to the obstacle as possible when bypassing the obstacle, and can reduce the deviation range from the preset path while realizing the obstacle bypassing of the agricultural machinery, so as to avoid the problems of a large missed tillage rate of the agricultural machinery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of agricultural machinery path planning methods, and in particular to an agricultural machinery path planning method based on a divide-and-conquer strategy. Background Art

[0002] The application of tractor autonomous driving technology in the agricultural field is gradually becoming one of the focuses of attention. Among them, the innovative application of path planning algorithms is of great significance to the efficiency of farmland operations and sustainable agricultural production. In the field of unmanned driving of intelligent tractors, the planning of tractor routes is a key task. Its main goal is to ensure that the tractor can efficiently perform operating tasks in complex and changeable farmland environments, avoid various obstacles, and maximize the coverage of arable areas to improve the efficiency of agricultural production.

[0003] There are many path planning methods proposed for tractor operations, such as search-based path planning algorithms. This type of method was initially used mainly for maze solving problems. When the robot navigates, the environment is often rasterized to generate a grid map (Grid Map), and then the shortest path from the starting point to the end point is iteratively searched in the grid map. The more representative ones are the A* algorithm and the Dijkstra algorithm. There are also sampling-based path planning algorithms, which continuously sample the environment map and connect the sampling points until the algorithm finds a path from the starting point to the end point. Sampling-based path planning algorithms often have probabilistic completeness, which means that when the number of sampling points is large enough, the resulting path is closer to the optimal path. Therefore, sampling-based path planning algorithms can often only obtain asymptotically optimal solutions. The path-finding goal of the above two types of path planning algorithms is to find the shortest path connecting the starting point and the end point. However, in the process of agricultural machinery operation, the influence of missed tillage factors needs to be considered. Although the above two methods can shorten the travel distance of agricultural machinery, they cannot make the agricultural machinery bypass obstacles in the predetermined direction of advance while getting closer to obstacles. It is easy for the agricultural machinery to deviate too much from the predetermined path, resulting in a large missed tillage rate and other problems. Summary of the invention

[0004] In order to solve the problem that the prior art easily causes the agricultural machinery to deviate too much from the predetermined path, the present invention provides an agricultural machinery path planning method based on a divide-and-conquer strategy.

[0005] The technical solution adopted by the present invention to solve the above technical problems is: a method for agricultural machinery path planning based on a divide-and-conquer strategy, comprising the following steps:

[0006] Step 1: Collect environmental information through LiDAR, filter the original point cloud data, and then build a 3D point cloud map;

[0007] Step 2: Project the obstacle distribution features of the three-dimensional point cloud map onto the plane where the ground is located, construct a two-dimensional grid map, and then obtain the coordinate sets of all grids on the grid map of one or more independent obstacle avoidance areas through morphological dilation operation;

[0008] Step 3: Extract the contour of the expanded grid map to obtain the obstacle avoidance path around each obstacle avoidance area. The obstacle avoidance path includes a plurality of inflection point coordinate sets {M1, M2, M3...M max}, starting from M1, connect each inflection point in sequence according to the order in the set and from M max Directly connect M1, and the closed path formed by the straight lines between all the inflection points is the obstacle avoidance path;

[0009] Step 4: Set the starting point S and the end point T on the grid map, take the straight line between the starting point S and the end point T as the preset shortest path, and obtain the coordinate set of all grids on the preset shortest path;

[0010] Step 5: Take the intersection of the coordinate set of the preset shortest path and the coordinate set of each obstacle avoidance area, delete the obstacle avoidance areas with empty intersections, and retain the intersections that are not empty. Then, sort all the coordinates in the intersections that are not empty according to the x-coordinate change trend and the y-coordinate change trend from the starting point S to the end point T, and obtain the coordinate set of the coincident points corresponding to each obstacle avoidance area.

[0011] Step 6: Perform eight-neighborhood adjacency check on each set of coincident point coordinates. P k As the center grid (0,0), when the coordinate set of the coincident point P k-1 and P k+1 All belong to P k When one of the eight adjacent grids (-1,0), (1,0), (0,-1), (0,1), (-1, -1), (-1, 1), (1, -1), (1, 1) is P k Divide into continuous points, otherwise P k Divided into discontinuities;

[0012] Step 7: Delete the continuous points in the coincident point coordinate set, and then mark the discontinuous points alternately as entry points or exit points according to the order of the discontinuous points in each coincident point coordinate set, and mark the discontinuous point closest to the starting point S as the first entry point. in (1) Until the discontinuity point closest to the end point T is marked as the last exit pointout (n) , thus obtaining the insertion point coordinate set corresponding to the coincident point coordinate set { in (1) , out (1) , in (2) , out (2) , in (3) , out (3) ...... in (n) , out (n)};

[0013] Step 8: Find the relevant points of the entry point and the exit point in the turning point coordinates of the obstacle avoidance path. First, the insertion point coordinate set { in (1) , out (1) , in (2) , out (2) , in (3) , out (3) ...... in (n) , out (n)} and the inflection point coordinate set {M1, M2, M3...M max} Take the intersection and get the value with a certain entry point in (j) Or through point out (j) Coincident inflection point M i , and the inflection point coordinates set is sequentially combined with M i Two adjacent inflection points M i-1 and M i+1 Record as entry point in (j) Or through point out (j) Two related points:

[0014] Then, multiple adjacent point groups {M1, M2}, {M2, M3}, {M3, M4}... are obtained from the inflection point coordinate set until the last adjacent point group {M max , M1}, calculate the area of ​​all the penetration points and exit points that do not coincide with the inflection point in turn with each adjacent point group until the penetration point in (j) Or through pointout (j) With a certain adjacent point group {M i , M i+1}When the area calculation result is 0, the two inflection points M i and M i+1 Record as entry point in (j) Or through point out (j) Two related points:

[0015] Step 9: in (1) The smaller of the two related points is denoted as M in(1a) , the larger one is denoted as M in(1b) ,Will out (n) The smaller of the two related points is denoted as M out(na) , the larger one is denoted as M out(nb) ;

[0016] The inflection point coordinate set is taken from M in(1a) To M out(na) All inflection points of form an increasing point coordinate set, the increasing point coordinate set still uses the inflection point sequence number in the inflection point coordinate set, and is arranged in the order of increasing sequence number;

[0017] The inflection point coordinate set is taken from M in(1b) To M out(1b) All inflection points of form a decreasing point coordinate set, the decreasing point coordinate set still uses the inflection point sequence number in the inflection point coordinate set, and is arranged in the order of decreasing sequence number;

[0018] Step 10: Insert the coordinate set of the point in (1) , out (1) , in (2) , out (2) , in (3) , out (3) ...... in (n) , out (n) Insert the increasing point coordinate set and the decreasing point coordinate set respectively, and search for relevant points of the inflection points in the increasing point coordinate set and the decreasing point coordinate set in sequence according to the arrangement order in the set during insertion, and determine the insertion position according to the relevant points, so as to obtain two fused coordinate sets;

[0019] When a certain turning point M a At the same time, it is the entry pointin (j) and exit point out (j) , will penetrate the point in (j) and exit point out (j) Insert them into the coordinate set at the inflection point M a The adjacent positions before and after, and retain the inflection point M a ;

[0020] When a certain turning point M b At the same time, it is the exit point out (j) and penetration point in (j+1) When the relevant point of out (j) and penetration point in (j+1) Insert them into the coordinate set at the inflection point M b The adjacent positions before and after, and delete the inflection point M b ;

[0021] When a certain turning point M c Entry point only in (j) When the relevant points are found, the search for the exit point out (j) The two related points are closer to M in the order of set arrangement. c The turning point M d , the penetration point in (j) Insert the coordinate set at the inflection point M c The previous adjacent position will penetrate the point out (j) Insert the coordinate set at the inflection point M d The adjacent position after that and keep in (j) and out (j) All inflection points between

[0022] When a certain turning point M e Only for exit point out (j) When the relevant points of in (j+1) The two related points are closer to M in the order of set arrangement. e The turning point M f , will penetrate the point out (j) Insert the coordinate set at the inflection point M e The previous adjacent position will penetrate the point in(j+1) Insert the coordinate set at the inflection point M f The adjacent position after that and delete out (j) and in (j+1) All inflection points between

[0023] Finally, the starting point S and the end point T are inserted into the two fusion coordinate sets, and the starting point S is used as in (1) The first point before, the end point T as out (n) The last point after that is the inflection point coordinate set of the two planned paths. The straight line connecting all the points in the set in sequence is the planned path.

[0024] According to the above technical solution, the beneficial effects of the present invention are:

[0025] The present invention first obtains each obstacle bypassing area and the obstacle bypassing path around each obstacle bypassing area by means of expansion operation and contour extraction on the raster map, and then removes the obstacle bypassing area whose intersection is empty, that is, the obstacle bypassing area that does not interfere with the straight line path between the starting point and the end point by taking the intersection of the preset shortest path and the obstacle bypassing area, and sorts the coordinates in the intersection and performs the eight-neighborhood adjacency check to obtain the entry point and exit point that will enter and leave the obstacle bypassing area respectively when moving along the straight line through the preset shortest path, and the obstacle bypassing path is divided into the obstacle bypassing area by the initial entry point and the final exit point. The obstacle bypass path is divided into two. The entry point and the exit point are inserted into the obstacle bypass paths on both sides by finding the relevant points of the entry point and the exit point on the obstacle bypass path. On the one hand, the movement distance of the agricultural machinery along the preset shortest path is retained to the maximum extent. On the other hand, it can ensure that the agricultural machinery can get as close to the obstacle as possible when bypassing the obstacle. That is, by integrating the obstacle bypass path with the shortest path, two obstacle bypass paths that are closest to the obstacle are obtained. While realizing the agricultural machinery bypassing the obstacle, the deviation range from the preset path can be reduced, avoiding the problems of large missed tillage rate of the agricultural machinery. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 A grid map containing four obstacle avoidance areas in the embodiment;

[0027] Figure 2 A grid map containing obstacle avoidance areas and preset shortest paths;

[0028] Figure 3 A line diagram that is a connection between the turning points of the obstacle avoidance path and the entry and exit points of the preset shortest path;

[0029] Figure 4 is a connection graph of a planned path;

[0030] Figure 5A connection diagram for another planned path. DETAILED DESCRIPTION

[0031] See attached Figures 1 - 5 , the agricultural machinery path planning method based on the divide-and-conquer strategy is described in detail as follows:

[0032] Step 1: Collect environmental information through LiDAR, filter the raw point cloud data, and then build a 3D point cloud map. Connect the Livox Mid-360 LiDAR device to the power supply to start operation. It is necessary to configure the working mode of the radar at the software level to ensure that a stable network connection is established between the radar and the host computer. The LiDAR starts the scanning mechanism, generates high-precision 3D point cloud data, and transmits it to the host computer equipped with ROS in real time, providing a stable data source for further map construction.

[0033] Step 2: Filter the raw point cloud data collected by the LiDAR to remove outliers and improve the quality of the point cloud data. The RANSAC algorithm is used to calculate the normal vector and distance of the ground, and fit the ground model to separate ground points from non-ground points. The purpose of this process is to filter out the point cloud of the ground part so that a grid map containing only obstacles can be constructed when constructing the obstacle avoidance map in the subsequent steps.

[0034] Perform feature extraction on the preprocessed LiDAR data, extract key feature points by calculating the line and surface features in the point cloud data, use point-to-line and point-to-surface methods to perform fast inter-frame feature matching, find the spatial transformation relationship (including translation and rotation) between adjacent point cloud frames, combine with the point cloud data stream returned by the LiDAR, build and update the three-dimensional spatial information of the visited area in real time, and output a three-dimensional point cloud map.

[0035] The three-dimensional point cloud map performs a uniform downsampling operation, which reduces the density of the point cloud data while retaining the obstacle distribution characteristics. The obstacle distribution characteristics of the three-dimensional point cloud map are projected onto the plane where the ground is located through perspective projection, and a two-dimensional grid map of the same size is constructed. The size of the unit grid is set, and the distribution characteristics are mapped into the grid map. Through this process, the way of describing the obstacle distribution is further simplified, providing a map basis for the movement decision of agricultural machinery.

[0036] Then, the boundary of each obstacle occupied area is expanded through morphological dilation operation, such as Figure 1As shown, this embodiment obtains a grid map with four independent obstacle avoidance areas, that is, a coordinate set of all grids on the four independent obstacle avoidance areas is obtained, thereby defining a more conservative and clear restricted area. This processing not only takes into account the impassable area directly around the obstacle, but also includes the space within a certain safe distance from the obstacle, thereby effectively avoiding the risk of collision caused by measurement errors or dynamic obstacle movement.

[0037] Step 3: Extract the contour of the expanded grid map to obtain the obstacle avoidance path around each obstacle avoidance area. The obstacle avoidance path includes a plurality of inflection point coordinate sets {M1, M2, M3...M max}, starting from M1, connect each inflection point in sequence according to the order in the set and from M max Directly connect M1, and the closed path formed by the straight lines between all the inflection points is the obstacle avoidance path.

[0038] Step 4: Figure 2 As shown, a starting point S and an end point T are set on a grid map, a straight line between the starting point S and the end point T is used as a preset shortest path, and a coordinate set of all grids on the preset shortest path is obtained.

[0039] Step 5: Figure 2 As shown, the coordinate set of the preset shortest path and the coordinate set of each obstacle avoidance area are intersected respectively, the three obstacle avoidance areas with empty intersections are deleted, and the non-empty intersections are retained. Then, according to the x-coordinate change trend and the y-coordinate change trend from the starting point S to the end point T, all the coordinates in the non-empty intersections are sorted to obtain the coordinate set of the overlapping points corresponding to each obstacle avoidance area.

[0040] like Figure 3 As shown, the inflection point coordinate set of the obstacle bypass path in this embodiment is {M1, M2, M3, M4, M5, M6, M7, M8, M9}, and the overlap range of the preset shortest path and the obstacle bypass area is all grids of the line segment where points A and B are located, all grids of the line segment where points C and D are located, and all grids of the line segment where points E and F are located, and points M5 and F overlap.

[0041] Step 6: Perform eight-neighborhood adjacency check on each set of coincident point coordinates. P k As the center grid (0,0), when the coordinate set of the coincident point P k-1 and P k+1 All belong to P kWhen one of the eight adjacent grids (-1,0), (1,0), (0,-1), (0,1), (-1, -1), (-1, 1), (1, -1), (1, 1) is P k Divide into continuous points, otherwise P k Divided into discontinuity points.

[0042] Step 7: Delete the continuous points in the coincident point coordinate set, and then mark the discontinuous points alternately as entry points or exit points according to the order of the discontinuous points in each coincident point coordinate set, and mark the discontinuous point closest to the starting point S as the first entry point. in (1) Until the discontinuity point closest to the end point T is marked as the last exit point out (n) , thus obtaining the insertion point coordinate set corresponding to the coincident point coordinate set { in (1) , out (1) , in (2) , out (2) , in (3) , out (3) ...... in (n) , out (n)}.

[0043] like Figure 3 As shown, the first penetration point in this embodiment in (1) Point A, the first exit point out (1) Point B, the second entry point in (2) Point C, the second exit point out (2) Point D, the third entry point in (3) Point E, the third and last exit point out (3) is point F that coincides with M5, and the insertion point coordinate set is { in (1) , out (1) , in (2) , out (2) , in (3) , out(3)}.

[0044] Step 8: Find the relevant points of the entry point and the exit point in the turning point coordinates of the obstacle avoidance path. First, the insertion point coordinate set { in (1) , out (1) , in (2) , out (2) , in (3) , out (3)} and the inflection point coordinate set of the obstacle avoidance path {M1, M2, M3, M4, M5, M6, M7, M8, M9} to obtain the intersection with a certain entry point in (j) Or through point out (j) Coincident inflection point M i , and the inflection point coordinates set is sequentially combined with M i Two adjacent inflection points M i-1 and M i+1 Record as entry point in (j) Or through point out (j) Two related points.

[0045] Then, multiple adjacent point groups {M1, M2}, {M2, M3}, {M3, M4}, {M4, M5}, {M5, M6}, {M6, M7}, {M7, M8}, {M8, M9}, and the last adjacent point group {M9, M1} are obtained from the inflection point coordinate set. The areas of all the entry and exit points that do not coincide with the inflection point are calculated with each adjacent point group in turn, that is, in (1) , out (1) , in (2) , out (2) , in (3) After combining with multiple adjacent point groups in sequence, calculate the area enclosed by the three points.

[0046] When the area is not 0, it means that the three points form a triangle. When the area is 0, it means that the three points are on the same straight line. At this time, there is no need to continue the calculation. The two inflection points in the adjacent point group with a calculation result of 0 are recorded as the two related points of the entry point or exit point.

[0047] like Figure 3 As shown, in(1) That is, the two related points of point A are M1 and M9. out (1) That is, the two related points of point B are M1 and M2. in (2) That is, the two related points of point C are M3 and M4. out (2) That is, the two related points of point D are M7 and M8. in (3) That is, the two related points of point E are M6 and M7.

[0048] like Figure 3 As shown, only M5 and F points coincide, so the two inflection points M4 and M6 adjacent to M5 are recorded as exit points. out (3) That is, two related points of point F.

[0049] Step 9: in (1) That is, the smaller number of the two related points of point A is recorded as M in(1a) , M1 in the embodiment, and the larger one is M in(1b) , M9 in the embodiment; out (3) The smaller of the two related points of point F is denoted as M out(na) , M4 in the embodiment, the larger one is M out(nb) , M6 in the embodiment.

[0050] All inflection points from M1 to M4 in the inflection point coordinate set are formed into an increasing point coordinate set. The increasing point coordinate set still uses the inflection point sequence number in the inflection point coordinate set and is arranged in order of increasing sequence numbers. The increasing point coordinate set in this embodiment is in the order of {M1, M2, M3, M4}.

[0051] All inflection points from M9 to M6 in the inflection point coordinate set form a decreasing point coordinate set. The decreasing point coordinate set still uses the inflection point sequence number in the inflection point coordinate set and is arranged in descending order of the sequence number. The decreasing point coordinate set in the embodiment is in the order of {M9, M8, M7, M6}.

[0052] Step 10: Insert the coordinate set of the point in (1) , out (1) , in (2) , out (2) , in (3) , out (3)} insert the increasing point coordinate set {M1, M2, M3, M4} and the decreasing point coordinate set {M9, M8, M7, M6} respectively, and during the insertion, search for the inflection points in the increasing point coordinate set and the decreasing point coordinate set in turn according to the arrangement order in the set, and determine the insertion position according to the relevant points, so as to obtain two fused coordinate sets.

[0053] Finally, the starting point S and the end point T are inserted into the two fusion coordinate sets, and the starting point S is used as in (1) That is, the first point before point A, and the end point T is out (3) That is, the last point after point F, that is, the inflection point coordinate sets of the two planned paths are obtained respectively, and the straight lines connecting all the points in the set in sequence are the two planned paths.

[0054] There are several cases when the insertion position is determined by the relevant points:

[0055] 1. When a certain inflection point M a At the same time, it is the entry point in (j) and exit point out (j) , will penetrate the point in (j) and exit point out (j) Insert them into the coordinate set at the inflection point M a The adjacent positions before and after, and retain the inflection point M a .

[0056] like Figure 3 , 4 As shown, M1 is a related point of both point A and point B, so point A and point B are respectively inserted into the incremental point coordinate set and located at adjacent positions before and after M1, and the inflection point M1 is retained.

[0057] 2. When a certain inflection point M b At the same time, it is the exit point out (j) and penetration point in (j+1) When the relevant point of out (j) and penetration point in (j+1) Insert them into the coordinate set at the inflection point M b The adjacent positions before and after, and delete the inflection point M b .

[0058] like Figure 3 , 5As shown, M7 is a related point of both point D and point E, so point D and point E are respectively inserted into the incremental point coordinate set and located at adjacent positions before and after M7, and the inflection point M7 is deleted.

[0059] 3. When a certain turning point M c Entry point only in (j) When the relevant points are found, the search for the exit point out (j) The two related points are closer to M in the order of set arrangement. c The turning point M d , the penetration point in (j) Insert the coordinate set at the inflection point M c The previous adjacent position will penetrate the point out (j) Insert the coordinate set at the inflection point M d The adjacent position after that and keep in (j) and out (j) All inflection points in between.

[0060] like Figure 3 , 5 As shown, M9 is only a related point of point A. Of the two related points M7 and M8 of point D, the one closer to M9 is M8. Point A is inserted into the adjacent position before M9 in the coordinate set, and point D is inserted into the adjacent position after M8 in the coordinate set. All inflection points between point A and point D are retained, that is, M9 and M8 are retained.

[0061] 4. When a certain inflection point M e Only for exit point out (j) When the relevant points of in (j+1) The two related points are closer to M in the order of set arrangement. e The turning point M f , will penetrate the point out (j) Insert the coordinate set at the inflection point M e The previous adjacent position will penetrate the point in (j+1) Insert the coordinate set at the inflection point M f The adjacent position after that and delete out (j) and in (j+1) All inflection points in between.

[0062] like Figure 4 , 5As shown, M2 is only a related point of point B. Of the two related points M3 and M4 of point C, M3 is closer to M2. Point B is inserted into the adjacent position before M2 in the coordinate set, and point C is inserted into the adjacent position after M3 in the coordinate set. All inflection points between point B and point C are deleted, that is, M3 and M2 are deleted.

[0063] Finally, insert the starting point S and the end point T into the two fusion coordinate sets, with the starting point S as the first point before point A and the end point T as the last point after point F, to obtain the turning point coordinate sets of the two planned paths. Figure 4 The corresponding inflection point coordinate set is {S, A, M1, B, C, M4, M5 / F, T}, Figure 5 The corresponding inflection point coordinate sets are {S, A, M9, M8, D, E, M6, M5 / F, T}. Connect the two inflection point coordinate sets in order to form a straight line, that is, we get Figure 4 and Figure 5 Two planning paths.

[0064] In this embodiment, each obstacle bypassing area and the obstacle bypassing path around each obstacle bypassing area are first obtained by dilation operation and contour extraction on the raster map. Then, by taking the intersection of the preset shortest path and the obstacle bypassing area, the obstacle bypassing area with an empty intersection, that is, the obstacle bypassing area that does not interfere with the straight line path between the starting point and the end point, can be deleted. After sorting the coordinates in the intersection, the eight-neighborhood adjacency check can be performed to obtain the entry point and exit point that will enter and leave the obstacle bypassing area respectively when moving along the straight line through the preset shortest path. The obstacle bypassing path is divided into two by the initial entry point and the final exit point. The method of finding the relevant points of the entry point and the exit point on the path, and inserting the entry point and the exit point into the obstacle avoidance paths on both sides can, on the one hand, retain the movement distance of the agricultural machinery along the preset shortest path to the maximum extent, and on the other hand, ensure that the agricultural machinery can be as close to the obstacle as possible when avoiding the obstacle. That is, by integrating the obstacle avoidance path with the shortest path, two obstacle avoidance paths closest to the obstacle are obtained. While realizing the agricultural machinery avoiding obstacles, the deviation range from the preset path can be reduced, the missed tillage rate is reduced, and the land utilization rate is improved. It provides a feasible idea for the operation path planning of agricultural machinery.

Claims

1. A method for agricultural machinery path planning based on a divide-and-conquer strategy, characterized in that: The following steps are involved: Step 1: Collect environmental information through LiDAR, filter the original point cloud data, and then build a 3D point cloud map; Step 2: Project the obstacle distribution features of the three-dimensional point cloud map onto the plane where the ground is located, construct a two-dimensional grid map, and then obtain the coordinate sets of all grids on the grid map of one or more independent obstacle avoidance areas through morphological dilation operation; Step 3: Extract the contour of the expanded grid map to obtain the obstacle avoidance path around each obstacle avoidance area. The obstacle avoidance path includes a plurality of inflection point coordinate sets {M1, M2, M3...M max }, starting from M1, connect each inflection point in sequence according to the order in the set and from M max Directly connect M1, and the closed path formed by the straight lines between all the inflection points is the obstacle avoidance path; Step 4: Set the starting point S and the end point T on the grid map, take the straight line between the starting point S and the end point T as the preset shortest path, and obtain the coordinate set of all grids on the preset shortest path; Step 5: Take the intersection of the coordinate set of the preset shortest path and the coordinate set of each obstacle avoidance area, delete the obstacle avoidance areas with empty intersections, and retain the intersections that are not empty. Then, sort all the coordinates in the intersections that are not empty according to the x-coordinate change trend and the y-coordinate change trend from the starting point S to the end point T, and obtain the coordinate set of the coincident points corresponding to each obstacle avoidance area. Step 6: Perform eight-neighborhood adjacency check on each set of coincident point coordinates. P k As the center grid (0,0), when the coordinate set of the coincident point P k-1 and P k+1 All belong to P k When one of the eight adjacent grids (-1,0), (1,0), (0,-1), (0,1), (-1, -1), (-1, 1), (1, -1), (1, 1) is P k Divide into continuous points, otherwise P k Divided into discontinuities; Step 7: Delete the continuous points in the coincident point coordinate set, and then mark the discontinuous points alternately as entry points or exit points according to the order of the discontinuous points in each coincident point coordinate set, and mark the discontinuous point closest to the starting point S as the first entry point. in (1) Until the discontinuity point closest to the end point T is marked as the last exit point out (n) , thus obtaining the insertion point coordinate set corresponding to the coincident point coordinate set { in (1) , out (1) , in (2) , out (2) , in (3) , out (3) ...... in (n) , out (n) }; Step 8: Find the relevant points of the entry point and the exit point in the turning point coordinates of the obstacle avoidance path. First, the insertion point coordinate set { in (1) , out (1) , in (2) , out (2) , in (3) , out (3) ...... in (n) , out (n) } and the inflection point coordinate set {M1, M2, M3...M max } Take the intersection and get the value with a certain penetration point in (j) Or through point out (j) Coincident inflection point M i , and the inflection point coordinates set is sequentially combined with M i Two adjacent inflection points M i-1 and M i+1 Record as entry point in (j) Or through point out (j) Two related points: Then, multiple adjacent point groups {M1, M2}, {M2, M3}, {M3, M4}... are obtained from the inflection point coordinate set until the last adjacent point group {M max , M1}, calculate the area of ​​all the penetration points and exit points that do not coincide with the inflection point in turn with each adjacent point group until the penetration point in (j) Or through point out (j) With a certain adjacent point group {M i , M i+1 }When the area calculation result is 0, the two inflection points M i and M i+1 Record as entry point in (j) Or through point out (j) Two related points: Step 9: in (1) The smaller of the two related points is denoted as M in(1a) , the larger one is denoted as M in(1b) ,Will out (n) The smaller of the two related points is denoted as M out(na) , the larger one is denoted as M out (nb) ; The inflection point coordinate set is taken from M in(1a) To M out(na) All inflection points of form an increasing point coordinate set, the increasing point coordinate set still uses the inflection point sequence number in the inflection point coordinate set, and is arranged in the order of increasing sequence number; The inflection point coordinate set is taken from M in(1b) To M out (1b) All inflection points of form a decreasing point coordinate set, the decreasing point coordinate set still uses the inflection point sequence number in the inflection point coordinate set, and is arranged in descending order of sequence number; Step 10: Insert the coordinate set of the point in (1) , out (1) , in (2) , out (2) , in (3) , out (3) ...... in (n) , out (n) Insert the increasing point coordinate set and the decreasing point coordinate set respectively, and search for relevant points of the inflection points in the increasing point coordinate set and the decreasing point coordinate set in sequence according to the arrangement order in the set during insertion, and determine the insertion position according to the relevant points, so as to obtain two fused coordinate sets; When a certain turning point M a At the same time, it is the entry point in (j) and exit point out (j) , will penetrate the point in (j) and exit point out (j) Insert them into the coordinate set at the inflection point M a The adjacent positions before and after, and retain the inflection point M a ; When a certain turning point M b At the same time, it is the exit point out (j) and penetration point in (j+1) When the relevant point of out (j) and penetration point in (j+1) Insert them into the coordinate set at the inflection point M b The adjacent positions before and after, and delete the inflection point M b ; When a certain turning point M c Entry point only in (j) When the relevant points are found, the search for the exit point out (j) The two related points are closer to M in the order of set arrangement. c The turning point M d , the penetration point in (j) Insert the coordinate set at the inflection point M c The previous adjacent position will penetrate the point out (j) Insert the coordinate set at the inflection point M d The adjacent position after that and keep in (j) and out (j) All inflection points between When a certain turning point M e Only for exit point out (j) When the relevant points of in (j+1) The two related points are closer to M in the order of set arrangement. e The turning point M f , will penetrate the point out (j) Insert the coordinate set at the inflection point M e The previous adjacent position will penetrate the point in (j+1) Insert the coordinate set at the inflection point M f The adjacent position after that and delete out (j) and in (j+1) All inflection points between Finally, the starting point S and the end point T are inserted into the two fusion coordinate sets, and the starting point S is used as in (1) The first point before, the end point T as out (n) The last point after that is the inflection point coordinate set of the two planned paths. The straight line connecting all the points in the set in sequence is the planned path.