Method and apparatus for agricultural machine work path planning
By decomposing farmland plots into convex polygonal sub-plots and generating inward-shrinking work domains, and combining Dubins path and PRM+Dijkstra algorithm, the problems of coverage omission and soil damage in path planning of irregular farmland plots are solved, improving work efficiency and connectivity.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAZHI QINGCHUANG (SUZHOU) AGRI TECH CO LTD
- Filing Date
- 2025-11-04
- Publication Date
- 2026-05-15
AI Technical Summary
When dealing with irregular concave farmland plots, existing technologies often fail to address the issue of traditional path planning methods being prone to interruptions, unable to effectively avoid boundary crossings, and neglecting the kinematic constraints of the vehicle's minimum turning radius, resulting in low operational efficiency.
The land parcel is decomposed into multiple convex polygon sub-blocks. The working area is formed by shrinking the sub-blocks and parallel working lines are generated. The Dubins path and PRM+Dijkstra algorithm are combined to plan the inter-block connectivity path, ensuring that there is no omission in the coverage and avoiding repeated compaction.
It achieves complete coverage of farmland plots of arbitrary shape, reduces soil damage, improves operational efficiency, avoids sharp turns, ensures connectivity between plots, and reduces computational complexity.
Smart Images

Figure CN121187301B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural machinery automation and path planning technology, and in particular to a method and apparatus for agricultural machinery operation path planning. Background Technology
[0002] Real-world land parcels are often irregularly concave. Traditional "ox-plowing" strip paths are prone to interruption at these concave areas, and if Euclidean shortest or free Dubins paths are directly used for inter-parcel connections, they often cross boundaries and become unfeasible; at the same time, the kinematic constraints of the minimum turning radius of vehicles are often ignored. Therefore, a more advanced path planning method is needed. Summary of the Invention
[0003] The purpose of this invention is to provide a method and apparatus for agricultural machinery operation path planning, so as to at least partially solve the above-mentioned problems of the prior art.
[0004] To achieve the above objectives, the present invention provides a method for agricultural machinery operation path planning, comprising:
[0005] Receive the input land parcel coordinates and determine whether the land parcel is a concave polygon; if so, decompose the land parcel into multiple convex polygon sub-blocks.
[0006] Perform a preset width indentation on the boundary of each sub-block to form an indented area and an outer area;
[0007] The work lines within the recessed area of each sub-block are determined, and inter-line turning paths are generated. The work path for each sub-block is obtained based on the work lines and the inter-line turning paths; wherein the inter-line turning paths are located in the outer area.
[0008] Generate inter-block connectivity paths; wherein, the inter-block connectivity paths are located within the peripheral region;
[0009] The operation paths of each sub-block and the inter-block connection paths are spliced together to form the agricultural machinery operation path of the plot.
[0010] Preferably, the step of shrinking the boundary of each sub-block by a preset width includes: shrinking the boundary of each sub-block by a preset width according to the width of the agricultural machinery.
[0011] Preferably, the step of performing a preset width inward reduction on the boundary of each sub-block according to the width of the agricultural machinery includes:
[0012] The preset width is the width of the agricultural machinery; or
[0013] If a sub-block shares a boundary with another sub-block, the width of the shrinkage applied to the shared boundary is half the width of the agricultural machinery.
[0014] Preferably, determining the work line within the recessed area of each sub-block includes:
[0015] Receive the candidate job direction angle as set;
[0016] For each candidate angle, the first work line is generated with the geometric centroid of the contracted region as the base point, and subsequent work lines are generated successively through parallel offset. The endpoints of the work lines are obtained according to the intersection of the work lines and the boundary of the contracted region, until a sequence of work line segments that continuously cover the work is obtained.
[0017] Preferably, the generation of the inter-line turning path includes:
[0018] The turning direction of the vehicle between adjacent work segments is determined based on the parity of the work segment sequence.
[0019] Using the endpoint coordinates and directions of adjacent work segments as the start and end states, the Dubins curve path generation function is called to calculate the inter-line turning path that satisfies the minimum turning radius constraint.
[0020] Preferably, the generated inter-block connectivity path includes:
[0021] Count the endpoints of the job paths for each sub-block;
[0022] Generate a Dubins path between the endpoints of any two sub-blocks;
[0023] Connect all sub-blocks together to form a connected path;
[0024] The shortest connection path is selected as the inter-block connection path.
[0025] Preferably, the generated inter-block connectivity path includes:
[0026] A PRM-based sampling map is constructed within the plot.
[0027] Dijkstra's algorithm is used to find the shortest path on the sampled graph between the end point of any sub-block and the start point of the next sub-block's work path, until all sub-blocks are connected into a single path.
[0028] Another aspect of the present invention provides an apparatus for agricultural machinery operation path planning, for implementing the methods provided in the above aspects and any preferred embodiments thereof, comprising:
[0029] The judgment module is used to receive the input plot coordinates and determine whether the plot is a concave polygon;
[0030] The decomposition module is used to decompose the land parcel into multiple convex polygon sub-blocks when the judgment result of the judgment module is yes.
[0031] The sub-block operation domain determination module is used to perform a preset width inward shrinkage on the boundary of each sub-block, forming an inward shrinkage area and an outer area;
[0032] The sub-block operation path determination module is used to determine the operation line within the inner area of each sub-block and generate the inter-line turning path, and obtain the operation path of each sub-block based on the operation line and the inter-line turning path; wherein, the inter-line turning path is located in the outer area;
[0033] An inter-block connectivity path generation module is used to generate inter-block connectivity paths; wherein, the inter-block connectivity paths are located within the peripheral region;
[0034] The operation path forming module is used to splice the operation paths of each sub-block and the inter-block connection paths to form the agricultural machinery operation path of the plot.
[0035] Preferably, the sub-block operation domain determination module is used to: perform a preset width inward reduction on the boundary of each sub-block according to the width of the agricultural machinery.
[0036] Preferably, the sub-block operation path determination module is used for:
[0037] Receive the candidate job direction angle as set;
[0038] For each candidate angle, the first work line is generated with the geometric centroid of the contracted region as the base point, and subsequent work lines are generated successively through parallel offset. The endpoints of the work lines are obtained according to the intersection of the work lines and the boundary of the contracted region, until a sequence of work line segments that continuously cover the work is obtained.
[0039] Preferably, the sub-block operation path determination module is used for:
[0040] The turning direction of the vehicle between adjacent work segments is determined based on the parity of the work segment sequence.
[0041] Using the endpoint coordinates and directions of adjacent work segments as the start and end states, the Dubins curve path generation function is called to calculate the inter-line turning path that satisfies the minimum turning radius constraint.
[0042] Preferably, the inter-block connectivity path generation module is used for:
[0043] Count the endpoints of the job paths for each sub-block;
[0044] Generate a Dubins path between the endpoints of any two sub-blocks;
[0045] Connect all sub-blocks together to form a connected path;
[0046] The shortest connection path is selected as the inter-block connection path.
[0047] Preferably, the inter-block connectivity path generation module is used for:
[0048] Construct a PRM-based sampling map within the plot;
[0049] Dijkstra's algorithm is used to find the shortest path on the sampled graph between the end point of any sub-block and the start point of the next sub-block's work path, until all sub-blocks are connected into a single path.
[0050] Compared with the prior art, the present invention has at least the following advantages:
[0051] It is suitable for farmland plots of any shape. By narrowing the working area and using parallel working lines, it ensures that the work coverage is complete. The path between plots only detours around the outer non-working area, avoiding repeated compaction of already worked areas, reducing soil damage and improving work efficiency. Attached Figure Description
[0052] Figure 1 This is a flowchart illustrating a method for agricultural machinery operation path planning provided in an embodiment of the present invention.
[0053] Figure 2 This is a flowchart illustrating a method for agricultural machinery operation path planning, provided as another embodiment of the present invention.
[0054] Figure 3 This is a schematic diagram of a device for agricultural machinery operation path planning provided in an embodiment of the present invention.
[0055] Figure 4 This is a flowchart illustrating a method for agricultural machinery operation path planning, as provided in another embodiment of the present invention.
[0056] Figure 5 This diagram illustrates a regional planning route map for a convex polygonal plot of land implemented according to an embodiment of the present invention.
[0057] Figure 6 This diagram illustrates a regional planning route map for a concave polygonal plot of land implemented according to an embodiment of the present invention.
[0058] Figure 7 This diagram illustrates a regional planning route map for a concave polygonal plot of land implemented according to an embodiment of the present invention. Detailed Implementation
[0059] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0060] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be used interchangeably where appropriate to understand the embodiments of the invention described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a product or device comprising a series of units is not necessarily limited to those explicitly listed, but may include other units not explicitly listed or inherent to such product or device.
[0061] In this invention, the terms "upper," "lower," "left," "right," "front," "rear," "top," "bottom," "inner," "outer," "middle," "vertical," "horizontal," "lateral," and "longitudinal" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are primarily for the purpose of better describing the invention and its embodiments, and are not intended to limit the indicated devices, elements, or components to having a specific orientation, or to be constructed and operated in a specific orientation.
[0062] Furthermore, in addition to indicating direction or positional relationship, some of the aforementioned terms may also have other meanings. For example, the term "above" may also be used in certain situations to indicate a dependency or connection. Those skilled in the art can understand the specific meaning of these terms in this invention based on the specific circumstances.
[0063] Furthermore, the terms "installation," "setup," "equipped with," "connection," "linking," and "socketing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral structure; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium, or an internal connection between two devices, components, or parts. Those skilled in the art can understand the specific meaning of these terms in this invention based on the specific circumstances.
[0064] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0065] Example 1
[0066] This invention provides a method for agricultural machinery operation path planning. Figure 1 A flowchart illustrating this method is shown. Figure 1 As shown, the method includes:
[0067] Step 101: Receive the input land plot coordinates and determine whether the land plot is a concave polygon; if so, decompose the land plot into multiple convex polygon sub-blocks.
[0068] Step 102: Perform a preset width indentation on the boundary of each sub-block to form an indented area and an outer area;
[0069] Step 103: Determine the work lines within the recessed area of each sub-block and generate inter-line turning paths. Obtain the work path for each sub-block based on the work lines and the inter-line turning paths; wherein the inter-line turning paths are located in the outer area.
[0070] Step 104: Generate inter-block connectivity paths; wherein the inter-block connectivity paths are located within the peripheral region;
[0071] Step 105: Connect the operation paths of each sub-block and the inter-block connection paths to form the agricultural machinery operation path of the plot.
[0072] The step of shrinking the boundary of each sub-block by a preset width includes: shrinking the boundary of each sub-block by a preset width according to the width of the agricultural machinery.
[0073] The step of reducing the boundary of each sub-block by a preset width according to the width of the agricultural machinery includes:
[0074] The preset width is the width of the agricultural machinery; or
[0075] If a sub-block shares a boundary with another sub-block, the width of the shrinkage applied to the shared boundary is half the width of the agricultural machinery.
[0076] The determination of the work line within the recessed area of each sub-block includes:
[0077] Receive the candidate job direction angle as set;
[0078] For each candidate angle, the first work line is generated with the geometric centroid of the contracted region as the base point, and subsequent work lines are generated successively through parallel offset. The endpoints of the work lines are obtained according to the intersection of the work lines and the boundary of the contracted region, until a sequence of work line segments that continuously cover the work is obtained.
[0079] In one implementation, generating the inter-line turning path includes:
[0080] The turning direction of the vehicle between adjacent work segments is determined based on the parity of the work segment sequence.
[0081] Using the endpoint coordinates and directions of adjacent work segments as the start and end states, the Dubins curve path generation function is called to calculate the inter-line turning path that satisfies the minimum turning radius constraint.
[0082] In another implementation, the generation of inter-block connectivity paths may include:
[0083] Count the endpoints of the job paths for each sub-block;
[0084] Generate a Dubins path between the endpoints of any two sub-blocks;
[0085] Connect all sub-blocks together to form a connected path;
[0086] The shortest connection path is selected as the inter-block connection path.
[0087] The generated inter-block connectivity path includes:
[0088] Construct a PRM-based sampling map within the plot;
[0089] Dijkstra's algorithm is used to find the shortest path on the sampled graph between the end point of any sub-block and the start point of the next sub-block's work path, until all sub-blocks are connected into a single path.
[0090] The method provided in this invention can be applied to farmland plots of any shape. By using a narrowing work area and parallel work lines, it ensures comprehensive coverage. Inter-plot paths only detour around the outer non-work area, avoiding repeated compaction of already worked areas, reducing soil damage, and improving work efficiency. Furthermore, all paths satisfy Dubins vehicle constraints, preventing unworkable sharp turns; inter-plot paths are connected using PRM+Dijkstra's algorithm, avoiding isolated sub-plots; and multi-angle candidate and heuristic strategies reduce computational complexity and improve planning speed.
[0091] Example 2
[0092] Embodiment 2 of the present invention provides a method for agricultural machinery operation path planning. Figure 2 A flowchart illustrating this method is shown. Figure 2 As shown, the method includes:
[0093] Step 201: Receive the input land plot coordinates and determine whether the land plot is a concave polygon; if so, decompose the land plot into multiple convex polygon sub-blocks.
[0094] The input plot coordinates can be, for example, a set of plot vertex coordinates.
[0095] In this embodiment, a convex polygon is defined as follows: if the line connecting any two points of a polygon falls entirely inside the polygon or on its boundary, then the polygon is called a convex polygon.
[0096] The determination method includes: checking for consistency by sequentially calculating the cross product signs of the edge vectors. For example, calculate the cross product of the two edges formed by each group of three consecutive vertices, and determine the turning direction (left or right) by the sign of the cross product. If all non-zero cross products have the same sign, it means that all turning directions are consistent, the interior angles are all less than or equal to 180°, and the polygon is a convex polygon; if the signs are inconsistent, there are concave angles, and the polygon is a concave polygon.
[0097] If the plot is a concave polygon, a convex decomposition algorithm can be used to decompose it into several convex polygon sub-plots. The convex decomposition algorithm can be an existing algorithm, such as `decomposing_concave_polygon`. The concave polygon is decomposed into multiple convex polygons using a recursive segmentation method: a concave vertex in the current polygon is continuously searched, and a vertex forming the most suitable cutting line with that concave point is selected. The polygon is then cut into two sub-polygons along this line. If the sub-polygon is already convex, it is saved; otherwise, the decomposition continues until all sub-polygons are convex. Finally, a set of these convex polygons is returned. Then, for each convex polygon plot, step 202 is executed.
[0098] If the plot is a convex polygon, proceed directly to step 202.
[0099] Step 202: Generate the working domain of the convex polygon plot.
[0100] For convex polygonal plots, each edge of the boundary is offset inwards from the polygon by the width offset of the agricultural machinery; the intersection of adjacent offset edges is calculated to obtain a new sequence of vertices of the inward-shrinking boundary; this inward-shrinking boundary is used as the working domain to avoid collisions between agricultural machinery and the plot boundary during operation.
[0101] Step 203: Generate the work lines for the work domain of the convex polygon plot.
[0102] Set the candidate job direction angle: including the input starting direction angle start_theta. There can be multiple candidate job direction angles.
[0103] For each candidate angle, perform the following operations:
[0104] (1) Generate the first work line using the geometric centroid of the work area as the reference point. Generating work lines from the centroid to the left and right sides will divide the entire plot into two halves as evenly as possible, maximizing the coverage area and creating the most uniform strips. In an alternative approach, work lines can be generated starting from the outermost edge. In the preferred approach, the work lines are straight lines.
[0105] (2) Subsequent work lines are generated sequentially by parallel offset. In the preferred scheme, the distance between adjacent work lines is less than or equal to the working width of the agricultural machinery.
[0106] (3) Intersect with the boundary of the work area to obtain the endpoints of the work line segment.
[0107] (4) Sort by relative position to obtain the line segment sequence of continuous coverage operation.
[0108] Choose the first angle scheme that can successfully generate a valid sequence of work segments as the work path scheme for the convex polygon plot.
[0109] In the preferred embodiment, the effective work line segment can cover the work area to the maximum extent. Furthermore, in the preferred embodiment, after determining the work path, the endpoint of the outermost path can be selected as the work starting point.
[0110] Step 204: Generate the line turning path plan and the operation path for the convex polygon plot.
[0111] In one implementation, the turning connection method between adjacent line segments can be determined based on the parity of the work line sequence.
[0112] For example, the direction of entry / exit can be determined based on parity: if the current work line is the... Items: Even number of items → Travel from the starting point to the ending point of the line (forward); odd-numbered lines → Drive from the end of the line to the beginning (against the flow of traffic).
[0113] In another implementation, all turns are made towards the destination, without considering parity.
[0114] Then, the endpoints and directions of adjacent work segments can be used as the start and end states. .
[0115] The directions of adjacent work segments differ by 180 degrees. For example, if the direction of the first work segment is 0 degrees, then the second segment is 180 degrees, the third segment is 360 degrees (equivalent to 0 degrees), and so on.
[0116] Call the Dubins curve path generation function to calculate the connection path that satisfies the minimum turning radius constraint.
[0117] Finally, all the work segments and connecting paths are spliced together to form the complete work path for the convex polygon plot.
[0118] Step 205: Generate inter-block connectivity paths.
[0119] This step can be divided into the following processes:
[0120] 1. Construct a PRM-based sampling map within the global boundary.
[0121] In other words, to ensure that agricultural machinery can smoothly move from the end point of one protrusion to the starting point of the next protrusion across multiple work areas, a series of attitude nodes (position + orientation) are randomly sampled within the entire plot boundary. Feasible curve connections that satisfy the Dubins minimum turning radius constraint and are entirely within the plot are then established between these nodes, forming a sparse feasible motion graph. Subsequently, a shortest path search (such as Dijkstra's algorithm) is used to find a continuous, feasible, and shortest cross-plot connection path within the plot on this sampled graph, achieving a safe and smooth connection between different work areas.
[0122] The process specifically includes:
[0123] (1) Random points are sampled within the boundaries of the plot, and a discrete heading angle is assigned to each point.
[0124] (2) Sample points at a certain interval on the boundary edge and add attitude states in both positive and negative directions.
[0125] In this step, sampling is set up at the edges of the entire plot.
[0126] During the construction of the PRM graph for inter-block path planning, two types of sampling nodes are generated simultaneously:
[0127] One type is edge sampling points, which are sampled at certain intervals along the outer contour boundary of the plot, and then added with two directional states in both directions after being shrunken inward along the inner normal direction, in order to establish a ring-shaped connecting channel and ensure that vehicles can detour along the edge of the plot;
[0128] Another type is global random sampling points, which are randomly distributed within the boundaries of the plots and assigned several discrete heading angles to each sampling point to enhance the overall connectivity of the graph and provide shortcuts across plots.
[0129] The two types of sampling points together form a set of attitude nodes, which enables the PRM graph to maintain connectivity in the boundary area and form the shortest passage within the plot, thereby ensuring the continuity and global optimality of the inter-plot path.
[0130] Additional sampling is performed in the direction of the interior corners of the vertices to ensure connectivity.
[0131] 2. Use Dijkstra's algorithm to find the shortest path between the end point of the convex polygon plot and the starting point of the next convex polygon plot on the sampled map.
[0132] In the multi-block connectivity path planning stage, the global access order is first determined based on the spatial location of the starting and ending points of each convex polygon block.
[0133] For example, starting from the point The block with the smallest coordinates is used as the global starting block, and the endpoint is used as the ending block. The block with the largest coordinates is used as the global endpoint block, thereby determining the overall operation direction.
[0134] For each intermediate block, the Dubins connection cost between its A and B direction paths (there are two paths for the same position, one for forward entry and one for reverse entry) and the endpoint pose of the previous block is calculated, and the path with the lower cost is selected as the working direction path for that block. After determining the block access order and direction path, based on the PRM sampling map and the Dubins path search algorithm, the shortest feasible transition path is generated block by block within the global boundary range, thus forming a global continuous working trajectory composed of multiple convex block working paths connected in series.
[0135] 3. Repeat the above steps to connect all convex polygonal plots into a connected path.
[0136] Before step 2, the process may further include: attempting to generate a Dubins path between any two candidate states (i.e., convexities to be connected).
[0137] (1) If the path length exceeds the limit, discard it; the limit is a preset value, which can be an empirical value or other values that can be flexibly set according to actual needs.
[0138] (2) If a sampling point on the path exceeds the boundary, discard it.
[0139] (3) Otherwise, it is retained as a directed edge in the graph with a weight equal to the path length.
[0140] Step 206: Connect the operation paths and inter-block connectivity paths of each convex polygon plot to form the agricultural machinery operation path of the plot.
[0141] In this step, based on the inter-block connectivity path determined in step 205, the first block can be selected, and the initial state of the first block, the inter-block connectivity paths, and the coverage paths of each sub-block can be sequentially spliced together to form a global path.
[0142] The method provided in this invention can be applied to farmland plots of any shape. By using a narrowing work area and parallel work lines, it ensures comprehensive coverage. Inter-plot paths only detour around the outer non-work area, avoiding repeated compaction of already worked areas, reducing soil damage, and improving work efficiency. Furthermore, all paths satisfy Dubins vehicle constraints, preventing unworkable sharp turns; inter-plot paths are connected using PRM+Dijkstra's algorithm, avoiding isolated sub-plots; and multi-angle candidate and heuristic strategies reduce computational complexity and improve planning speed.
[0143] Example 3
[0144] Embodiment 3 of the present invention provides a device for agricultural machinery operation path planning, which is used to implement the method provided in Embodiment 1 or 2 above. The specific implementation of the device can be referred to the description of Embodiment 1 and 2 above. Figure 3 A schematic diagram of the device is shown, as follows: Figure 3 As shown, the device includes:
[0145] The judgment module 31 is used to receive the input plot coordinates and determine whether the plot is a concave polygon;
[0146] The decomposition module 32 is used to decompose the land parcel into multiple convex polygon sub-blocks when the judgment result of the judgment module is yes;
[0147] The sub-block operation domain determination module 33 is used to perform a preset width inward shrinkage on the boundary of each sub-block to form an inward shrinkage area and an outer area;
[0148] The sub-block operation path determination module 34 is used to determine the operation line within the inner area of each sub-block and generate the inter-line turning path, and obtain the operation path of each sub-block based on the operation line and the inter-line turning path; wherein the inter-line turning path is located in the outer area.
[0149] Inter-block connectivity path generation module 35 is used to generate inter-block connectivity paths; wherein, the inter-block connectivity paths are located within the peripheral region;
[0150] The operation path forming module 36 is used to splice the operation paths of each sub-block and the inter-block connection paths to form the agricultural machinery operation path of the plot.
[0151] Preferably, the sub-block operation domain determination module 33 is used to: perform a preset width inward reduction on the boundary of each sub-block according to the width of the agricultural machinery.
[0152] Preferably, the sub-block operation path determination module 34 is used for:
[0153] Receive the candidate job direction angle as set;
[0154] For each candidate angle, the first work line is generated with the geometric centroid of the contracted region as the base point, and subsequent work lines are generated successively through parallel offset. The endpoints of the work lines are obtained according to the intersection of the work lines and the boundary of the contracted region, until a sequence of work line segments that continuously cover the work is obtained.
[0155] Preferably, the sub-block operation path determination module 34 is used for:
[0156] The turning direction of the vehicle between adjacent work segments is determined based on the parity of the work segment sequence.
[0157] Using the endpoint coordinates and directions of adjacent work segments as the start and end states, the Dubins curve path generation function is called to calculate the inter-line turning path that satisfies the minimum turning radius constraint.
[0158] Preferably, the inter-block connectivity path generation module 35 is used for:
[0159] Count the endpoints of the job paths for each sub-block;
[0160] Generate a Dubins path between the endpoints of any two sub-blocks;
[0161] Connect all sub-blocks together to form a connected path;
[0162] The shortest connection path is selected as the inter-block connection path.
[0163] Preferably, the inter-block connectivity path generation module 35 is used for:
[0164] Construct a PRM-based sampling map within the plot;
[0165] Dijkstra's algorithm is used to find the shortest path on the sampled graph between the end point of any sub-block and the start point of the next sub-block's work path, until all sub-blocks are connected into a single path.
[0166] The apparatus provided in this invention can be applied to farmland plots of any shape. By using a recessed work area and parallel work lines, it ensures comprehensive coverage. Inter-plot paths only detour around the outer non-work area, avoiding repeated compaction of already worked areas, reducing soil damage, and improving work efficiency. Furthermore, all paths satisfy Dubins vehicle constraints, preventing unworkable sharp turns; inter-plot paths are connected using PRM+Dijkstra's algorithm, avoiding isolated sub-plots; and multi-angle candidate and heuristic strategies reduce computational complexity and improve planning speed.
[0167] Example 4
[0168] This embodiment 4 provides a method for agricultural machinery operation path planning. Figure 4 A flowchart illustrating this method is shown. Figure 4 As shown, the method includes:
[0169] Step 401: Receive the input plot coordinates and determine whether the plot is a concave polygon.
[0170] The input plot consists of a set of vertices:
[0171] .
[0172] in, Indicates the first One vertex, Represents planar coordinates.
[0173] The method to determine whether a polygon is concave is to calculate the cross product of adjacent edge vectors in turn:
[0174]
[0175] If all If the signs are consistent, it is a convex polygon; otherwise, it is a concave polygon.
[0176] If it is a concave polygon, a convex decomposition algorithm is used to divide it into several convex polygon sub-blocks.
[0177] Step 402: Determine the work area of the plot.
[0178] Agricultural machinery has a wide operating width To prevent the vehicle body from exceeding the boundary during operation, the boundaries of the sub-blocks need to be shrunk inward.
[0179] For each edge ,in Indicates the first One vertex, Indicates the first There are vertices, and their direction vectors are... The unit normal vector is The indented edge is Specifically described as follows:
[0180]
[0181]
[0182]
[0183]
[0184] Solving for adjacent shrinkage edges and intersection :
[0185] Set the edge The equation of the corresponding line is:
[0186] Set the edge The equation of the corresponding line is:
[0187] Then the intersection point for:
[0188]
[0189] All intersection points are sorted by polar angle to form a new work domain boundary.
[0190] Step 403: Generate the work lines within the work domain.
[0191] 1. First, determine the candidate directions.
[0192] For example, candidate job orientation angles include:
[0193]
[0194] in Set the starting angle for the user. The direction of the main axis of the sub-block.
[0195] The principal axis direction can be obtained through principal component analysis (PCA). Let the vertex matrix be J.
[0196] ,
[0197] The covariance matrix is
[0198]
[0199] The direction of the eigenvector corresponding to the largest eigenvalue is taken as the main axis direction.
[0200] 2. Generate scan lines
[0201] Given the direction of the task Through the center of mass Construct a straight line:
[0202]
[0203] Intersecting with the boundary of the work domain, we obtain the first work segment. .
[0204] Subsequent work lines are obtained through parallel offset:
[0205]
[0206] in , .
[0207] Until it no longer intersects with the work domain.
[0208] Step 404: Plan the turning paths between work lines.
[0209] In this embodiment, the agricultural machinery satisfies the Dubins kinematic constraints, namely:
[0210] Constant speed motion;
[0211] Turning radius Not less than the vehicle's geometric constraints.
[0212] In this embodiment:
[0213]
[0214] At the ends of the two work lines, define the state:
[0215] ,
[0216] The Dubins curve path generation function is called to obtain the shortest path consisting of 3 arc / straight line segments. Its total length is:
[0217]
[0218] Each type consists of an arc (R / L) and a straight line (S).
[0219] The path is based on the sampling step size. Discretize:
[0220]
[0221] Step 405: Determine the inter-block connectivity path.
[0222] To connect different sub-blocks, construct a probabilistic roadmap:
[0223] 1. Sampling Status Node
[0224] Midpoint of boundary:
[0225] ,
[0226] Direction of the interior angle bisector at the vertex:
[0227]
[0228] Random interior points:
[0229] , ,
[0230] 2. Connecting edges
[0231] For any node pair Try the Dubins path:
[0232]
[0233] 3. Shortest path search
[0234] Construction Graph The shortest path from the starting point to the ending point is found using Dijkstra's algorithm.
[0235] In the specific implementation of this embodiment, to ensure that inter-block connectivity paths do not interfere with completed work areas, improvements were made to the sampling range and path constraints when constructing the probabilistic roadmap. Specifically, the generation range of sampling points is limited to a buffer zone outside the work domain boundary to avoid generating connected nodes within the defined work area. Simultaneously, during Dubins path generation and collision detection, an exclusion judgment for "points within the work domain" is added; if a path trajectory intersects with the work domain, it is directly discarded. Thus, the final retained connectivity paths are all generated along the outermost ring of the plots, achieving transitions between sub-blocks that only bypass non-work areas. This embodiment ensures rapid connectivity for agricultural machinery during cross-block switching while avoiding secondary compaction of the work area, thereby improving the overall continuity and quality of operations.
[0236] Step 406: Global path concatenation.
[0237] The operation paths of each sub-block , Line turning path and inter-block connectivity paths splicing:
[0238]
[0239] Output the global path, including:
[0240] Blocks: Boundaries of each sub-block;
[0241] work_areas: Indentation boundary of sub-block;
[0242] route_segments_per_block: Job segment;
[0243] dubins_paths_all: All Dubins paths.
[0244] Figure 5 This diagram illustrates a regional planning route map for a convex polygonal plot of land implemented according to an embodiment of the present invention. Figure 5 As shown, the plot shrinks to form a work area, and the work lines are arranged in parallel within the work area. The turning paths between the work lines are located in the outer area.
[0245] Figure 6 This diagram illustrates a regional planning route map for a concave polygonal plot of land implemented according to an embodiment of the present invention. Figure 6 As shown, the concave polygonal plot is first divided into multiple convex polygonal plots. Then, for each convex polygonal plot, the plot is shrunk inward to form a work area. The work lines are arranged in parallel within the work area, and the turning paths between the work lines are located in the outer area.
[0246] Figure 7 This diagram illustrates a regional planning route map for a concave polygonal plot of land implemented according to an embodiment of the present invention. Figure 7 As shown, the arrows indicate the planned inter-block connection paths, which allow agricultural machinery to operate on the entire plot using the shortest path.
[0247] The method provided in this invention can be applied to farmland plots of any shape. By using a narrowing work area and parallel work lines, it ensures comprehensive coverage. Inter-plot paths only detour around the outer non-work area, avoiding repeated compaction of already worked areas, reducing soil damage, and improving work efficiency. Furthermore, all paths satisfy Dubins vehicle constraints, preventing unworkable sharp turns; inter-plot paths are connected using PRM+Dijkstra's algorithm, avoiding isolated sub-plots; and multi-angle candidate and heuristic strategies reduce computational complexity and improve planning speed.
[0248] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Those skilled in the art should understand that modifications can be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for agricultural machinery operation path planning, characterized in that, include: Receive the input plot coordinates and determine whether the plot is a concave polygon; If so, decompose the plot into multiple convex polygonal sub-blocks; Perform a preset width indentation on the boundary of each sub-block to form an indented area and an outer area; The work lines within the recessed area of each sub-block are determined, and inter-line turning paths are generated. The work path for each sub-block is obtained based on the work lines and the inter-line turning paths; wherein the inter-line turning paths are located in the outer area. Generate inter-block connectivity paths; wherein, the inter-block connectivity paths are located within the peripheral region; The operation paths of each sub-block and the inter-block connection paths are spliced together to form the agricultural machinery operation path of the plot; The step of shrinking the boundary of each sub-block by a preset width includes: shrinking the boundary of each sub-block by a preset width according to the width of the agricultural machinery. The step of reducing the boundary of each sub-block by a preset width according to the width of the agricultural machinery includes: The preset width is the width of the agricultural machinery; or If a sub-block shares a boundary with another sub-block, the width of the indentation of the shared boundary is half the width of the agricultural machinery. For convex polygonal plots, each edge of the boundary is offset inwards from the polygon by the width offset of the agricultural machinery; the intersection of adjacent offset edges is calculated to obtain a new sequence of vertices of the inward-shrinking boundary; this inward-shrinking boundary is used as the working area to avoid collisions between agricultural machinery and the plot boundary during operation. The specific methods for determining the operational area of a land parcel include: Agricultural machinery has a wide operating width For each edge ,in Indicates the first One vertex, Indicates the first There are vertices, and their direction vectors are... The unit normal vector is The indented edge is Specifically described as follows: Solving for adjacent shrinkage edges and intersection : Set the edge The equation of the corresponding line is: Set the edge The equation of the corresponding line is: Then the intersection point for: All intersection points are sorted by polar angle to form a new work domain boundary.
2. The method for agricultural machinery operation path planning according to claim 1, characterized in that, The process of determining the work line within the recessed area of each sub-block includes: Receive the candidate job direction angle as set; For each candidate angle, the first work line is generated with the geometric centroid of the contracted region as the base point, and subsequent work lines are generated successively through parallel offset. The endpoints of the work lines are obtained according to the intersection of the work lines and the boundary of the contracted region, until a sequence of work line segments that continuously cover the work is obtained.
3. The method for agricultural machinery operation path planning according to claim 2, characterized in that, The generated inter-line turning path includes: The turning direction of the vehicle between adjacent work segments is determined based on the parity of the work segment sequence. Using the endpoint coordinates and directions of adjacent work segments as the start and end states, the Dubins curve path generation function is called to calculate the inter-line turning path that satisfies the minimum turning radius constraint.
4. The method for agricultural machinery operation path planning according to any one of claims 1-3, characterized in that, The generated inter-block connectivity path includes: Count the endpoints of the job paths for each sub-block; Generate a Dubins path between the endpoints of any two sub-blocks; Connect all sub-blocks together to form a connected path; The shortest connection path is selected as the inter-block connection path.
5. The method for agricultural machinery operation path planning according to any one of claims 1-3, characterized in that, The generated inter-block connectivity path includes: A PRM-based sampling map is constructed within the plot. Dijkstra's algorithm is used to find the shortest path on the sampled graph between the end point of any sub-block and the start point of the next sub-block's work path, until all sub-blocks are connected into a single path.
6. A device for planning agricultural machinery operation paths, characterized in that, For implementing the method according to any one of claims 1-5, comprising: The judgment module is used to receive the input plot coordinates and determine whether the plot is a concave polygon; The decomposition module is used to decompose the land parcel into multiple convex polygon sub-blocks when the judgment result of the judgment module is yes. The sub-block operation domain determination module is used to perform a preset width inward shrinkage on the boundary of each sub-block, forming an inward shrinkage area and an outer area; The sub-block operation path determination module is used to determine the operation line within the inner area of each sub-block and generate the inter-line turning path, and obtain the operation path of each sub-block based on the operation line and the inter-line turning path; wherein, the inter-line turning path is located in the outer area; An inter-block connectivity path generation module is used to generate inter-block connectivity paths; wherein, the inter-block connectivity paths are located within the peripheral region; The operation path forming module is used to splice the operation paths of each sub-block and the inter-block connection paths to form the agricultural machinery operation path of the plot.
7. The device for agricultural machinery operation path planning according to claim 6, characterized in that, The sub-block operation domain determination module is used to: reduce the boundary of each sub-block by a preset width according to the width of the agricultural machinery.
8. The device for agricultural machinery operation path planning according to claim 6, characterized in that, The sub-block job path determination module is used for: Receive the candidate job direction angle as set; For each candidate angle, the first work line is generated with the geometric centroid of the contracted region as the base point, and subsequent work lines are generated successively through parallel offset. The endpoints of the work lines are obtained according to the intersection of the work lines and the boundary of the contracted region, until a sequence of work line segments that continuously cover the work is obtained.