Agricultural machine navigation diagonal harrowing path planning method and device, equipment and medium
By determining the harrowing direction and operation direction of polygonal plots in the agricultural machinery navigation system, calculating the turning projection distance, and using priority search for the optimal path, the problems of repetitive operations and low turning efficiency in diagonal harrowing of agricultural machinery navigation are solved, achieving efficient and comprehensive path planning.
Patent Information
- Application Number
- CN202511599721.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-04
- Publication Date
- 2026-02-03
AI Technical Summary
Existing agricultural machinery navigation diagonal harrowing path planning schemes suffer from problems such as large areas of repeated work at the edge of the field, high difficulty in vehicle tracking and control, low turning efficiency, and safety hazards when dealing with irregular plots.
By obtaining the harrowing direction and number of work rows of the polygonal plot, the working direction and baseline that meet the set conditions are determined, the turning projection distance is calculated, different types of turning methods are adopted, and the optimal global path is searched according to priority and projection distance to avoid repeated work and improve turning efficiency.
It achieves fuel savings in polygonal plots, reduces tracking deviations in autonomous driving, improves turning efficiency, has a wide range of applications, low over-harrowing rate, and can fully cover plots.
Smart Images

Figure CN121453080A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision target detection technology, and more specifically, to a method, apparatus, equipment, and medium for path planning of diagonal harrowing in agricultural machinery navigation. Background Technology
[0002] Harrowing is a crucial step in farmland operations, primarily used to break up and level the soil. Diagonal harrowing is most effective, but it requires two passes along two different directions, and covers a larger area, increasing the workload for the machine operator. Intelligent driving systems for agricultural machinery can replace manual driving for diagonal harrowing, making it popular among agricultural workers due to its labor-saving benefits. However, existing diagonal harrowing path planning schemes are mostly designed for regular plots. Even those applicable to irregular plots have several drawbacks, such as excessive repetitive work along the edges leading to wasted fuel and economic losses for the user; numerous bulb-shaped turns at the edges increase the difficulty of vehicle tracking and control, reduce efficiency, and the risk of exceeding the permitted area at concave corners, potentially causing unpredictable and dangerous situations. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method, device, equipment and medium for path planning of diagonal harrowing in agricultural machinery navigation, and to solve at least one of the above-mentioned technical problems.
[0004] Firstly, the technical solution of the present invention to solve the above-mentioned technical problems is as follows: a path planning method for diagonal harrowing in agricultural machinery navigation, the method comprising: Obtain the two harrowing directions of the agricultural machinery in the polygonal plot, and the number of working rows corresponding to each harrowing direction. The number of working rows in the two harrowing directions is the number of paths that the agricultural machinery needs to take in the two diagonal directions of the polygonal plot. Determine the baselines for the two working directions and each working direction when the difference in the number of working rows corresponding to the two harrowing directions meets the first set condition and the included angle between the two harrowing directions meets the second set condition. Based on the two working directions and the baseline of each working direction, calculate the projected distance of each turn on each boundary of the polygonal plot; The first job row is determined based on the user-defined job start point and either of the two job directions. Starting from the first work row, based on the priority of each type of turn and the projection distance of each type of turn on each boundary of the polygonal plot, the next optimal work row for each work row is searched in the global path according to each type of turn, so as to obtain the optimal global path that satisfies the minimum cost of each turn, the lowest re-raking rate, and full coverage. Among them, the turn mode corresponding to each pair of adjacent work rows in the optimal global path is the turn mode of the first target type when the next optimal work row is found.
[0005] The beneficial effects of this invention are as follows: This invention determines different path search rules for different types of turning methods. Based on these search rules, it searches for the next optimal work row for each work row in the global path, which saves fuel, reduces tracking deviation in autonomous driving, and improves turning efficiency. Furthermore, the solution of this application can be applied to plots of various shapes, has a wide range of applications, and the planned diagonal harrowing global path has a low re-harrowing rate, high turning efficiency, and can fully cover the entire plot.
[0006] Based on the above technical solution, the present invention can be further improved as follows.
[0007] Furthermore, the aforementioned determination of the two working directions and the baseline for each working direction when the difference in the number of working rows corresponding to the two harrowing directions satisfies the first preset condition, and the included angle between the two harrowing directions satisfies the second preset condition, includes: Determine the two working directions that satisfy the first setting condition when the difference between the number of working rows corresponding to the two harrowing directions satisfies the first setting condition and the angle between the two harrowing directions satisfies the second setting condition. The first setting condition is to minimize the difference between the number of working rows corresponding to the two harrowing directions, and the second setting condition is to maximize the angle between the two harrowing directions. For each work direction, determine multiple straight lines passing through each vertex of the polygonal plot and parallel to the work direction. From these multiple straight lines, excluding the corresponding vertex, select the straight line farthest from the polygonal plot as the baseline corresponding to the work direction.
[0008] Furthermore, the aforementioned different types of turning include the first type of turning, the second type of turning, the third type of turning, the fourth type of turning, and the fifth type of turning. If the different types of turning include the first type of turning, the second type of turning, and the third type of turning, the projected distance of each type of turning on each boundary of the polygonal plot is calculated based on the two working directions and the baseline of each working direction, including: Based on the two working directions, determine the turning center angles corresponding to different types of turning methods. The arcs corresponding to the first turning type and the arcs corresponding to the third turning type complement each other. For each edge of the polygonal plot, determine the first angle between the edge and the current work line corresponding to the baseline of a work direction. The current work line is a straight line parallel to the corresponding baseline. Based on the first angle, the turning center angle and the minimum turning radius corresponding to the turning method of the second target type, determine the projection distance of the chord corresponding to the turning center angle of the turning method of the second target type onto the edge. The second target type is either the first turning type or the third turning type. For each edge of the polygonal plot, based on the minimum turning radius and the turning center angle corresponding to the second turning type, determine the projection distance of the chord corresponding to the turning center angle of the second turning type onto the edge.
[0009] Furthermore, when different types of turning include first-type turning, second-type turning, and third-type turning, the central turning angles corresponding to different types of turning are determined based on the two working directions, including: Calculate the absolute value of the difference between the two operation directions; When the absolute value is less than 180°, the absolute value is determined to be the turning center angle corresponding to the first turning type; When the absolute value is equal to 180°, the absolute value is determined to be the turning center angle corresponding to the second turning type; When the absolute value is greater than 180°, the absolute value is determined to be the turning center angle corresponding to the third turning type.
[0010] Furthermore, the above-mentioned determination of the first job line based on the user-defined job start point and either of the two job directions includes: Based on the user-set starting point, determine the target straight line that passes through the starting point and has the direction of either of the two work directions; The endpoint of the operation is determined by the intersection of the target straight line and the boundary of the polygonal plot that is furthest from the starting point of the operation. Determine the first work row based on the start and end points of the work.
[0011] Furthermore, starting from the first work row, based on the priority of each turn and the projected distance of each turn on each boundary of the polygonal plot, the search for the next optimal work row for each work row in the global path is performed according to each type of turn, to obtain the optimal global path that satisfies the minimum cost of each turn, the lowest re-harrowing rate, and full coverage, including: Starting from the first work row, based on the priority of each turn and the projection distance of each turn on each boundary of the polygon plot, the next optimal work row is searched in the global path according to each type of turn, and the next candidate work row corresponding to each type of turn is obtained. From all the next candidate work rows corresponding to each type of turn, the next optimal work row that satisfies the minimum cost of each turn, the lowest re-harrowing rate, and full coverage is determined. The optimal global path is determined based on all work rows in the global path that satisfy the conditions of minimum cost for each turn, minimum re-harrowing rate, and full coverage.
[0012] Furthermore, the method also includes: For each pair of adjacent work lines in the optimal global path, determine whether the first target turn corresponding to the two adjacent work lines crosses the concave angle; if the first target turn crosses the concave angle, adjust the positions of the start and end work points of the two adjacent work lines so that the turn corresponding to the adjusted two adjacent work lines is located within the polygonal plot, and take the adjusted two adjacent work lines as the two adjacent target work lines; if the first target turn does not cross the concave angle, take the two adjacent work lines as the two adjacent target work lines. For each pair of adjacent target operation lines in the optimal global path, determine whether the second target turn corresponding to the two adjacent target operation lines exceeds the polygonal plot. If the second target turn exceeds the polygonal plot, adjust the positions of the start and end points of the two adjacent target operation lines so that the turning trajectory corresponding to the adjusted two adjacent target operation lines is within the polygonal plot. The adjusted two adjacent target operation lines are taken as the two adjacent final operation lines. If the second target turn does not exceed the polygonal plot, the two adjacent target operation lines are taken as the two adjacent final operation lines. The final global path is determined based on the turning trajectories corresponding to all two adjacent final operation lines.
[0013] Secondly, to solve the above-mentioned technical problems, the present invention also provides a path planning device for diagonal harrowing of agricultural machinery, the device comprising: The acquisition module is used to acquire the two harrowing directions of the agricultural machinery in the polygonal plot, as well as the number of working rows corresponding to each harrowing direction. The number of working rows in the two harrowing directions is the number of paths that the agricultural machinery needs to take in the two diagonal directions of the polygonal plot. The determination module is used to determine the two working directions and the baseline of each working direction when the difference between the number of working rows corresponding to the two harrowing directions meets the first set condition and the included angle between the two harrowing directions meets the second set condition. The projection distance determination module is used to calculate the projection distance of each turn on each boundary of the polygonal plot based on two working directions and the baseline of each working direction. The first work line determination module is used to determine the first work line based on the user-set work start point and either of the two work directions; The optimal global path determination module is used to start from the first work row, and search for the next optimal work row in the global path according to the priority of each type of turn and the projection distance of each type of turn on each boundary of the polygon plot. The optimal global path is obtained by minimizing the cost of each turn, minimizing the re-harrowing rate, and achieving full coverage. The turning mode corresponding to each pair of adjacent work rows in the optimal global path is the turning mode of the first target type when the next optimal work row is found.
[0014] Thirdly, in order to solve the above-mentioned technical problems, the present invention also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the path planning method for diagonal harrowing of agricultural machinery as described in this application.
[0015] Fourthly, in order to solve the above-mentioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the path planning method for diagonal harrowing of agricultural machinery as described in this application.
[0016] Additional aspects and advantages of this application will be set forth in part in the description which follows, and will become apparent from the description or may be learned by practice of this application. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments of the present invention will be briefly introduced below.
[0018] Figure 1 This is a flowchart illustrating a path planning method for diagonal harrowing using agricultural machinery, provided in one embodiment of the present invention. Figure 2 This is a schematic diagram corresponding to a first turning type provided in one embodiment of the present invention; Figure 3 This is a schematic diagram of a second turning type provided in one embodiment of the present invention; Figure 4 This is a schematic diagram corresponding to a third type of turn, as provided in one embodiment of the present invention; Figure 5This is a schematic diagram illustrating the final global path effect according to an embodiment of the present invention; Figure 6 This is a flowchart illustrating another path planning method for diagonal harrowing using agricultural machinery, provided in one embodiment of the present invention. Figure 7 A schematic diagram of a path planning device for diagonal harrowing of agricultural machinery provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present invention. Detailed Implementation
[0019] The principles and features of the present invention are described below. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.
[0020] The technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present invention will now be described with reference to the accompanying drawings.
[0021] The solution provided in this invention can be applied to any application scenario requiring global path planning. The solution provided in this invention can be executed by any electronic device, such as a user's terminal device, including at least one of the following: smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, smart TV, or smart in-vehicle device.
[0022] This invention provides a possible implementation, such as... Figure 1 The diagram shows a flowchart of a path planning method for diagonal harrowing using agricultural machinery. This method can be executed by any electronic device, such as a terminal device, or by both a terminal device and a server. For ease of description, the method provided in this embodiment will be described below using a terminal device as the execution subject. Figure 1 The flowchart shown indicates that the method may include the following steps: S10, obtain the two harrowing directions of the agricultural machinery in the polygonal plot, and the number of operation rows corresponding to each harrowing direction. The number of operation rows in the two harrowing directions is the number of paths that the agricultural machinery needs to take in the two diagonal directions of the polygonal plot. S20, determine the baseline of the two working directions and each working direction when the difference between the number of working rows corresponding to the two harrowing directions meets the first set condition and the included angle between the two harrowing directions meets the second set condition; S30, based on the two working directions and the baseline of each working direction, calculate the projected distance of each turn on each boundary of the polygonal plot; S40: Determine the first job row based on the user-defined job start point and either of the two job directions; S50, starting from the first work row, according to the priority of each type of turn and the projection distance of each type of turn on each boundary of the polygon plot, the next optimal work row of each work row is searched in the global path according to each type of turn, so as to obtain the optimal global path that satisfies the minimum cost of each turn, the minimum re-harrowing rate and full coverage. Among them, the turn mode corresponding to each pair of adjacent work rows in the optimal global path is the turn mode of the first target type when the next optimal work row is found.
[0023] This invention establishes different path search rules for different types of turning methods. Based on these rules, it searches for the next optimal work row in the global path for each work row, which saves fuel, reduces tracking deviations in autonomous driving, and improves turning efficiency. Furthermore, this solution can be applied to various plots of land with different shapes, has a wide range of applications, and the planned diagonal harrowing global path has a low re-harrowing rate, high turning efficiency, and can fully cover the entire plot.
[0024] The following specific embodiments further illustrate the solution of the present invention. In these embodiments, the present invention proposes a new diagonal harrowing path planning method to address the problems existing in existing diagonal harrowing techniques. Diagonal harrowing plots are generally large in area and have long edges. If the number of rows crossed during a turn at the edge is large, the work will extend for tens of meters along the edge. Intersecting turns in this area will result in repeated harrowing at the edge, increasing ineffective work distance, wasting fuel and time. If the number of rows crossed is too small, the turn will be bulb-shaped, which is detrimental to maintaining the accuracy of vehicle tracking and control, and the turning distance will also be long. Therefore, this bulb-shaped turning method has the lowest user acceptance. It is evident that the optimal turning method is to reach the edge of the field, turn into the next row in an arc shape, and minimize the overlap between the turn and the edge. To address this, the present invention calculates different turning types corresponding to different relative positions between work rows, establishes a turning priority rule in the early stages, and searches for the next optimal work row in the global path based on this rule. This avoids the above-mentioned drawbacks and ensures that the turn from the current position to the next row is the optimal turning method.
[0025] Since diagonal harrowing has two working directions, the relative positions of adjacent work rows can be divided into three categories, as follows: Figures 2-4The figures show the cases where the sum of the angle vectors required to turn from the current row to the next row (in this invention, counterclockwise turning angles are negative, and clockwise turning angles are positive) is greater than, equal to, or less than 180°. Within each position type, multiple turning shapes are generated based on whether the distance between the starting and ending points of the turn is sufficient for the agricultural machinery to turn only in the same direction, resulting in multiple different types of turning methods. If the distance between the starting and ending points is insufficient, the agricultural machinery will turn in the order of direction B → direction A → direction B during the turning process. Switching turning directions increases the difficulty of unmanned driving control and tracking, leading to decreased accuracy and increased turning distance. Therefore, the following... Figures 2-4 Light bulb-shaped and cross-shaped turns are less efficient and should be avoided as much as possible; if the distance is too large, it will make the following... Figures 2-4 The long straight section of the arc in the curve can cause overlapping harrowing at the end of the field, reducing work efficiency. Therefore, excessively long distances between the starting and ending points of a turn should be avoided as much as possible. Among the three types of turns, the circular arc turn has the shortest distance and the highest efficiency. Specifically, the shortest turning arc and the highest work efficiency are achieved when adjacent rows turn less than 180° (the first type of turn). Therefore, considering the turning distance, turning angle, and the difficulty of control and tracking, the turning priority rules in Table 1 below can be pre-defined.
[0026] Table 1 Turning Priority Rules Specifically, each type of turning method is determined based on the following: When the angle between the working directions of adjacent work rows is equal to 180°, it is the second type of turn (turn 2); when the angle is less than or greater than 180°, it corresponds to the first type of turn (turn 1) or the third type of turn (turn 3) respectively, and their central angles are 360° supplementary angles. Starting from the first work line, the first work line is taken as the current line. If the remaining available segment of the edge on which the current line falls (referring to the length of the continuous available segment remaining after subtracting the cumulative length occupied by the planned work lines and high-priority turn projections from the total length of the single boundary into which the current line ends) cannot accommodate the arcs corresponding to the first to third turn types, then the straight segment of the arc corresponding to any of the first to third turn types is lengthened. This straight segment can be continuously lengthened up to 6 times the width to form a longer transition segment, thereby separating the start and end points of the turn along the boundary direction and making enough space to accommodate the arc segment. Simultaneously, shift the next row of the current row along the baseline direction by an additional 2 work rows (extend 2 rows) to expand the search range. At this point, the straight segment of the arc is lengthened, and the corresponding turning method after shifting 2 work rows is the fourth turning type (long arc). If the edge on which the current row falls is lengthened in the straight segment of the arc, and the remaining available segment after shifting 2 work rows is still insufficient to accommodate the lengthened arc, adjust the turning method corresponding to the fourth turning type to a bulb shape or a cross shape to obtain the fifth turning type.
[0027] Based on the above, the path planning method for diagonal harrowing of agricultural machinery provided in this embodiment may include the following steps: S10, obtain the two harrowing directions of the agricultural machinery in the polygonal plot, and the number of operation rows corresponding to each harrowing direction. The number of operation rows in the two harrowing directions is the number of paths that the agricultural machinery needs to take in the two diagonal directions of the polygonal plot. The "diagonal harrowing mode" is an intelligent operation path mode supported by an agricultural machinery automatic driving system. Its core feature is that the agricultural machinery automatically plans a path along the diagonal direction of the plot and performs back-and-forth harrowing operations to achieve more efficient soil breaking, leveling, and stubble mixing effects, especially suitable for large, regularly shaped fields. This application's solution applies to polygonal plots in the diagonal harrowing mode. The aim of this solution is to ensure that the number of operation rows corresponding to the two harrowing directions is as equal as possible, thereby improving operational efficiency and quality.
[0028] Optionally, the two harrowing directions of the agricultural machinery in the polygonal plot and the number of working rows corresponding to each harrowing direction can be calculated based on the coordinates of the boundary vertices of the polygonal plot and the working width of the agricultural machinery.
[0029] S20, determine the baseline of the two working directions and each working direction when the difference between the number of working rows corresponding to the two harrowing directions meets the first set condition and the included angle between the two harrowing directions meets the second set condition; Optionally, in S20, determining the baselines for the two working directions and each working direction when the difference in the number of working rows corresponding to the two harrowing directions satisfies a first preset condition and the included angle between the two harrowing directions satisfies a second preset condition includes: S201, determine the two working directions that satisfy the first setting condition when the difference between the number of working rows corresponding to the two harrowing directions satisfies the first setting condition and the angle between the two harrowing directions satisfies the second setting condition. The first setting condition is to minimize the difference between the number of working rows corresponding to the two harrowing directions, and the second setting condition is to maximize the angle between the two harrowing directions. S202, For each working direction, determine multiple straight lines passing through each vertex of the polygonal plot and parallel to the working direction. From the multiple straight lines, except for the corresponding vertex, select the straight line farthest from the polygonal plot as the baseline corresponding to the working direction.
[0030] Based on the above analysis of turning priorities, the optimal turning point exists between the number of work rows in two different harrowing directions. Therefore, the desired number of work rows in the two harrowing directions is... and The difference should be minimized; at the same time, to ensure good soil breaking effect during diagonal harrowing, the angle α between the two harrowing directions should be maximized. Considering that vertical harrowing of two rows requires a large traction force from the agricultural machinery, a certain amount of angle optimization space needs to be reserved, and an acceptable deviation threshold should be set. Then, given the input quantity (Including the boundaries and operation parameters of the input polygonal plot) Formula 1 is used to calculate the objective function for the two diagonal harrowing directions. From this, the two operation directions satisfying the first and second predefined conditions can be calculated. and and the baselines for the two working directions. and .
[0031] The objective function is the formulaic expression corresponding to the first and second predicate conditions: (1) S30, based on the two working directions and the baseline of each working direction, calculate the projected distance of each turn on each boundary of the polygonal plot; Among them, for each type of turn, there is a projected distance on each boundary of the polygonal plot. If the turn "presses" too far on the boundary of the polygonal plot, it means that the turn will travel a long distance along the boundary, which is easy to repeat the operation (re-harrowing). This projected distance can be used as a threshold to judge when searching for the next optimal operation row in the global search: "After the current row is finished, can this kind of turn be used to cut to the next row without pressing the boundary too much?"
[0032] Optionally, the different types of turning methods include a first turning type, a second turning type, a third turning type, a fourth turning type, and a fifth turning type. If the different types of turning methods include a first turning type, a second turning type, and a third turning type, one implementation of the above S30 is as follows: S301, based on the two working directions, determine the turning center angle corresponding to different types of turning methods, and the arc corresponding to the first turning type and the arc corresponding to the third turning type complement each other; specifically, the arc corresponding to the first turning type and the arc corresponding to the third turning type can form a complete arc.
[0033] Optionally, when the different types of turning include a first turning type, a second turning type, and a third turning type, one possible implementation of S301 above is as follows: S3011, calculate the absolute value of the difference between two working directions; S3012, when the absolute value is less than 180°, the absolute value is determined to be the turning center angle corresponding to the first turning type; see details below. Figure 2 As shown.
[0034] S3013, when the absolute value equals 180, the turning center angle corresponding to the second turning type is determined; see details below. Figure 3 As shown.
[0035] S3014, when the absolute value is greater than 180°, the turning center angle corresponding to the third turning type is determined. See details below. Figure 4 As shown.
[0036] S302, for each side of the polygonal plot, determine the first angle between the side and the current working line corresponding to the baseline of a working direction. The current working line is a straight line parallel to the corresponding baseline. Based on the first angle, the turning center angle and the minimum turning radius corresponding to the turning method of the second target type, determine the projection distance of the chord corresponding to the turning center angle of the turning method of the second target type onto the side. The second target type is either the first turning type or the third turning type. Optionally, for each edge of the polygonal plot, based on the first included angle, the turning central angle corresponding to the turning method of the second target type, and the minimum turning radius, the projection distance of the chord corresponding to the turning central angle of the second target type onto the edge is determined, specifically including: For each edge of the polygonal plot, based on the turning center angle and minimum turning radius corresponding to the turning method of the second target type, determine the chord corresponding to the turning center angle of the second target type. Then, based on the first included angle, determine the projection distance of the chord corresponding to the turning center angle of the second target type onto the edge.
[0037] S303, for each side of the polygonal plot, based on the minimum turning radius and the turning center angle corresponding to the second turning type, determine the projection distance of the chord corresponding to the turning center angle of the second turning type onto the side.
[0038] As an example, given the minimum turning radius R of the agricultural machinery and the boundaries of the input polygonal plot (from the plot vertex dataset)... Composition, where the i-th point (The polygonal plot has n boundaries). The projected distance of the three higher-priority turning methods in Table 1 above on each edge of the polygonal plot can be quantitatively calculated. The projected distance for each edge can be calculated sequentially using the following method: For the i-th edge, its two endpoints are respectively , , → Direction vector , → Direction vector The two work directions are denoted as follows: and .
[0039] Set past , direction is The straight line is , set , direction is The straight line is Calculate according to formula (2) and intersection ,in, , for The two points on the top, , for The two points on the top.
[0040] (2) calculate vector Calculate the vector according to formula (3) Direction in the coordinate system Calculated by formula (4) Along the direction of the vector Move 10 meters to get Similarly, calculate vector ,Will Along the direction of the vector Move 10 meters to get .
[0041] (3) (4) For the first type of turn, the projection distance of the chord corresponding to the turning center angle of the first type of turn onto the edge is calculated in the following way: calculate The projection of the inscribed arc onto edge i, vector 1. for The vector is calculated according to formula (5). dot product Calculate the two vectors according to formula (6) The included angle ,in, , Let x and y be the x and y coordinates of the two vectors, respectively. The projected distance can be obtained from formula (7). Similarly, calculate The projection of the inscribed arc onto edge i, vector 2. for The vector, calculate the vector dot product Two vectors The included angle is The desired projection distance can be obtained. Then the projection distance of turn 1 (the first type of turn) on edge i is... .
[0042] (5) Similarly, for the third type of turn, the projection distance of the chord corresponding to the turning center angle of the third type of turn onto the edge is calculated in the following way: calculate The projection of the inscribed arc onto edge i. Vector for The vector is calculated according to formula (5). dot product Calculate the two vectors according to formula (6) The included angle ,in , They are respectively The required projected distance can be obtained from formula (7). Similarly, calculate The projection of the inscribed arc onto edge i, vector for The vector, calculate the vector dot product Two vectors The included angle is The desired projection distance can be obtained. Then the projection distance of turn 3 (the third type of turn) on edge i is... In this scheme, since the calculation method for the projected distance of the third turning type and the first turning type on edge i is the same, some parameters in the first turning type and the third turning type are represented by the same identifier, for example, vectors and The vectors are all , vector sum All vectors are denoted as .
[0043] For the second type of turn, the projection distance of the chord corresponding to the turning center angle of the second type of turn onto the edge is calculated in the following way: When the two work directions are aligned, meaning the absolute value of the difference between the two work directions equals 180°, it is considered a turn 2 (second type of turn). The turning arc is tangent to the two parallel work lines, thus the actual turn is a semicircle, hence 2. The projection of R (minimum turning radius) onto edge i is the desired result.
[0044] In direction For example, let's assume... direction The straight line is Take according to formula (4) Another point ,Pick vector , → vector The two vectors are calculated using formula (8). and The cross product modulus between ,in, , Let x and y be the x and y coordinates of the two vectors, respectively. The two vectors are calculated using formula (9). and The acute angle between them Then the projected distance of turn 2 (the second type of turn) on edge i is... It can be obtained from formula (10).
[0045] (8) (10) The projection distance of the chord corresponding to the turning center angle of the fourth and fifth turning types onto the edge can be determined in the same way as the projection distance of the chord corresponding to the turning center angle of the first to third turning types onto the edge, which will not be elaborated here.
[0046] S40: Determine the first job row based on the user-defined job start point and either of the two job directions; Here, the user-defined job start point refers to the position where the job begins. One possible implementation of S40 is as follows: S401, based on the user-set start point, determine the target straight line passing through the start point and with the direction of either of the two work directions; S402, the intersection point that is furthest from the starting point of the operation among the intersection points of the target straight line and the boundary of the polygonal plot is determined as the end point of the operation; S403, determine the first work line based on the start and end points of the work.
[0047] As an example, based on the user-defined job start point Based on either of the two work directions, for example The first work line (the straight line where the work row is located) is first determined by formula (11). (That is, the target straight line, expressed as a straight line with x-coordinate and y-coordinate) is positioned, and then this target straight line is successively compared with the boundary of the polygonal plot. Calculate the intersection point according to formula (11), where, , for The two points on the top, , for If the intersection of two points lies on the corresponding boundary, record it. This will ultimately yield all intersections between the target line and the boundary of the polygonal plot. Calculate the distance from the starting point of the operation among all intersections. The farthest point As the endpoint of the operation, it constitutes the first operation line. .
[0048] tan( (11) S50, starting from the first work row, according to the priority of each type of turn and the projection distance of each type of turn on each boundary of the polygon plot, the next optimal work row of each work row is searched in the global path according to each type of turn, so as to obtain the optimal global path that satisfies the minimum cost of each turn, the minimum re-harrowing rate and full coverage. Among them, the turn mode corresponding to each pair of adjacent work rows in the optimal global path is the turn mode of the first target type when the next optimal work row is found.
[0049] The purpose of searching for the next optimal work row for each work row in the global path according to each type of turning is to determine the path (work row) one by one from the polygonal plots to obtain the optimal global path. For each path in the optimal global path, the turns corresponding to each path must meet the requirements of minimum turning cost, minimum re-harrowing rate, and full coverage. Minimum turning cost means prioritizing the use of turning templates with short arcs, no intersections, no boundary crossings, and no repeated harrowing, so as to minimize the four factors of travel distance, time, fuel consumption, and control complexity at the same time. Minimum re-harrowing rate means minimizing the proportion of the already harrowed area that is repeatedly rolled by the agricultural machinery, that is, when using the same turning template, minimizing the overlap between the turning area and the already worked area, thereby reducing fuel waste, soil compaction, and operation time. Full coverage means that after the agricultural machinery travels along the planned path, all workable areas within the polygonal plot are harrowed exactly once, with no missed harrowing, no blind spots, and no boundary crossings.
[0050] In the optimal global path, each pair of adjacent job lines can correspond to a turn, and the first target type can be any one of the first turn type, the second turn type, or the third turn type.
[0051] Optionally, in S50 above, starting from the first work row, based on the priority of each type of turn and the projection distance of each turn on each boundary of the polygonal plot, the next optimal work row for each work row is searched in the global path according to each type of turn, to obtain the optimal global path that satisfies the minimum cost of each turn, the lowest re-harrowing rate, and full coverage, including: S501, starting from the first work row, according to the priority of each type of turn and the projection distance of each type of turn on each boundary of the polygon plot, search for the next optimal work row of each work row in the global path according to each type of turn, and obtain the next candidate work row of each work row corresponding to each type of turn. From all the next candidate work rows of each work row corresponding to different types of turn, determine the next optimal work row that satisfies the minimum cost of each turn, the minimum re-harrowing rate, and full coverage. S502: Determine the optimal global path based on all work rows in the global path that satisfy the conditions of minimum cost for each turn, minimum re-harrowing rate, and full coverage.
[0052] Alternatively, another specific implementation of the above S50 includes: a. Take the first operation line as the current line and determine that the endpoint of the current line falls on the target edge of the polygonal plot; b. Determine the turning method of the third target type corresponding to the current remaining available segment of the target edge. The turning method of the third target type corresponding to the current remaining available segment indicates that the arc corresponding to the turning method of the third target type can be placed on the current remaining available segment. The third target type is any turning type from the first turning type to the fifth turning type. c. Based on the turning method of the third target type, determine the next line in the global path of the current line; d, take the next line of the current line in the global path as the new current line, and re-execute steps a to d until the next optimal job line of each job line in the global path is found, thus obtaining the optimal global path.
[0053] As an example, the specific process of searching for the next optimal work row for each work row in the global path, starting from the first work row and based on the priority of each type of turn and the projected distance of each turn on each boundary of the polygon plot, is as follows: For each boundary under a certain turning type, initialize the boundary index i=1 and the turning type j=1, then the current job line The start and end points are , The two endpoints of the corresponding boundary i are , , → Boundary direction vector The projection threshold (projection distance) of the circular arc turn k (k=1,2,3) corresponding to boundary i is: Where k=1 represents the first turning type, k=2 represents the second turning type, and k=3 represents the third turning type. Let the current work line direction be... The corresponding baseline is The other direction is The corresponding baseline is W represents the working width.
[0054] For the first turning type, starting from the first work row, the following method is used to search for the next optimal work row in the global path according to the turning method of the first turning type, based on the projected distance of the first turning type on each boundary of the polygon plot: Calculation points direction of movement :Pass Direction is straight line With past Direction is straight line intersection ,like Outside the polygonal plot, the direction of movement is... Direction, otherwise, for In the opposite direction.
[0055] Based on formulas (3) and (4), the points Along the direction of movement move Get points ,calculate To the baseline distance Calculate the baseline according to formula (12). To obtain the distance that the ideal next row needs to be translated. ,in, Initialize to 0, and then obtain the ideal line containing the next row. If the row is not planned, then calculate the straight line. The intersection point with the boundary i of the polygonal plot is the start and end point of the current row; if the row has already been planned, then... Calculated according to formula (12) To obtain the distance that the ideal next row needs to be translated. This leads to the line containing the next row. Then, check again whether the line has been planned, and repeat this process until... , because, if If the diameter is too large, the straight section of the bow-shaped turn will be longer. This invention can be set to... .
[0056] (12) For the third-turn type, the following method is used to search for the next optimal operation row for each operation row in the global path, starting from the first operation row, based on the projection distance of the third-turn type on each boundary of the polygon plot: Based on formulas (3) and (4), the points Along the direction of movement move in the opposite direction Get points ,calculate To the baseline distance Calculate the baseline according to formula (12). To obtain the distance that the ideal next row needs to be translated. ,in, Initialize to 0, and then obtain the ideal line containing the next row. If the row is not planned, then calculate the straight line. The intersection point with the boundary i of the polygonal plot is the start and end point of the current row; if the row has already been planned, then... Calculated according to formula (12) To obtain the distance that the ideal next row needs to be translated. This leads to the line containing the next row. Then, check again whether the line has been planned, and repeat this process until... Because the priority of turn 3 (third turn type) is lower than the priority of turn 2 (second turn type), this invention can be set... .
[0057] For the second turning type, starting from the first operation row, the search for the next optimal operation row in the global path is performed based on the projection distance of the second turning type on each boundary of the polygonal plot, according to the turning method of the second turning type: Based on formulas (3) and (4), the points Along the direction of movement move Get points ,calculate To the baseline distance Calculated according to formula (12) To obtain the distance that the ideal next row needs to be translated. ,in, The initial value is 0, thus obtaining the ideal line containing the next row. If the row is not planned, then calculate the straight line. The intersection point with the boundary i of the polygonal plot is the start and end point of the current row; if the row has already been planned, then... Calculated according to formula (12) To obtain the distance that the ideal next row needs to be translated. This leads to the line containing the next row. Then, check again whether the line has been planned, and repeat this process until... Because turn 2 has a lower priority than turn 1, The present invention can be set .
[0058] In this application, the search method for the next optimal work row for each work row corresponding to the first to third turning types can also be used to search for the next optimal work row for each work row corresponding to the fourth turning type (turn 4) in Table 1. Specifically, the corresponding thresholds (projection distances) are different. Optionally, the threshold... , , .
[0059] Optionally, for the fifth turn type, starting from the first operation row, the search for the next optimal operation row for each operation row in the global path is performed according to the turning method of the fifth turn type, based on the projected distance of the fifth turn type on each boundary of the polygon plot: Point Along the direction of movement The distance calculated according to formula (13) for the opposite direction of movement is initialized to m=1. The next work row is calculated with reference to the processing procedure of the first turning type. If the next row is not found, the point is moved to the next position. Along Move in the opposite direction, refer to the processing procedure for the second type of turn to calculate the next work row; if no next row is found, then move the point... Along the direction of movement Move in the direction of the current line, referring to the processing procedure for the third type of turn to calculate the next work row. If no next row is found, m = m + 1, and search again until the work line obtained by translation is the current row. If no next row is found, execute the processing procedure for the fourth type of turn, threshold. , Without setting any limits, the planning is complete when no more job rows can be found.
[0060] (13) Optionally, the above method further includes: S60, for each pair of adjacent work lines in the optimal global path, determine whether the first target turn corresponding to the two adjacent work lines crosses the concave angle; if the first target turn crosses the concave angle, adjust the positions of the start and end work points of the two adjacent work lines so that the turn corresponding to the adjusted two adjacent work lines is located within the polygonal plot, and take the adjusted two adjacent work lines as two adjacent target work lines; if the first target turn does not cross the concave angle, take the two adjacent work lines as two adjacent target work lines. Among them, a concave angle refers to a vertex on the boundary of a polygonal plot whose interior angle is greater than 180°. The two adjacent sides of each vertex with an interior angle greater than 180° are concave into the polygonal plot, which makes it easy for turning lines to fly out of the boundary.
[0061] Optionally, the specific implementation process for determining whether the first target turn corresponding to two adjacent work lines crosses the concave angle is as follows: Step 1: Quick Filtering by Concave Corner Vertex: a. Traverse the vertex sequence of the polygonal plot in a counter-clockwise direction, for each vertex... Calculate the cross product of adjacent vectors: b. If cross < 0, then mark Let be the vertex of the concave angle, and record its two adjacent edges. and .
[0062] Step 2: Detection of concave angle segments: a. Connect the end point S of one of two adjacent work lines with the starting point E of the other work line to form a line segment SE; b. For each concave vertex : ① Find SE and intersection ,like Falling If the line segment is inside and not an endpoint, record the "crossing concave angle" flag; ② Similarly, find SE and intersection ,like Falling If the line segment is inside and not an endpoint, record the "crossing concave angle" flag; c. If any flag is true, it is determined that the first target has turned and crossed the concave angle.
[0063] Step 3: Pull back from the start and end points: Once it is determined that the concave angle has been crossed, the straight line SE is immediately used to intersect the current row and the next row again. The intersection points are then used to replace the original S and E, that is, to adjust the positions of the start and end points of the two adjacent work rows so that the adjusted turning line segment is completely within the polygonal plot.
[0064] S70, for each pair of adjacent target operation lines in the optimal global path, determine whether the second target turn corresponding to the two adjacent target operation lines exceeds the polygonal plot. If the second target turn exceeds the polygonal plot, adjust the positions of the start and end operation points of the two adjacent target operation lines so that the turning trajectory corresponding to the adjusted two adjacent target operation lines is within the polygonal plot. The adjusted two adjacent target operation lines are taken as the two adjacent final operation lines. If the second target turn does not exceed the polygonal plot, the two adjacent target operation lines are taken as the two adjacent final operation lines. The specific implementation process for determining whether the second target turn corresponding to two adjacent target operation lines exceeds the polygonal plot is as follows: Step 1: Generate the trajectory to be inspected: a. Using the end point S′ of one of two adjacent target work lines and the start point E′ of the other work line as the starting and ending points, generate the corresponding geometric trajectory (turning trajectory) according to the determined target turning type (priority 1-5): Priority 1-3: Single circular arc trajectory; Priority 4: Long arc-shaped trajectory (circular arc + straight line); Priority 5: Dubins three-segment circular trajectory; b. Discretize the turning trajectory into an ordered sequence of points {P} k} (k=0,1,…,N), with a point spacing ≤0.1 m.
[0065] Step 2: Point-by-point ray tracing for outliers: a. For each point P k Perform parity testing using X-ray method: From P k Draw rays in any direction (preferably horizontal to the right) and calculate the total number of intersections with the boundary of the polygonal plot; b. If the total number of intersection points is even, then P k If the location is outside the polygonal plot, record the "boundary violation" flag and immediately terminate the traversal.
[0066] Step 3: Coarse inspection of the banded area (optional acceleration): a. For priority 4-5, first use S′E′ as the center line and offset R on both sides to form a strip area with a width of 2R; b. If any offset line in the strip area intersects the boundary at an interior point, an out-of-bounds violation is detected in advance, and the process proceeds directly to step 4.
[0067] Step 4: Out-of-bounds handling: Once an out-of-bounds error is detected, execute: a. Calculate the maximum distance d_max from the turning trajectory to the corresponding boundary i; b. Translate boundary i inward along the normal by d_max to obtain virtual boundary i′; c. Recalculate the intersection of one of the two adjacent target operation lines with i′ as the new endpoint S″ and the intersection of the other operation line with i′ as the new starting point E″, so that the adjusted second target turning trajectory is tangent to the original boundary and lies entirely within the polygonal plot.
[0068] S80 determines the final global path based on all two adjacent final work lines and the turning trajectories corresponding to all two adjacent final work lines. See details in [link to documentation]. Figure 5 The diagram shown is shown in the image.
[0069] To better illustrate and understand the principle of the method provided by this invention, the following description uses an optional specific embodiment to illustrate the solution of this invention. It should be noted that the specific implementation of each step in this specific embodiment should not be construed as a limitation of the solution of this invention. Other implementations that can be conceived by those skilled in the art based on the principle of the solution provided by this invention should also be considered within the scope of protection of this invention.
[0070] In this embodiment, the present invention designs a method for planning diagonal harrowing paths for agricultural machinery. Because the minimum turning radius of agricultural machinery is relatively large, turning is a crucial factor affecting operational efficiency. The present invention plans the operational path based on optimal turning, and the key points and protection points in the planning process are described as follows: 1. The overall implementation process of this invention is as follows: A1. In the polygonal plot of the planned path, in order to plan turns between work rows that are conducive to vehicle kinematics, with the goal of minimizing the difference in the number of work lines in the two harrowing directions, calculate the two work directions for diagonal harrowing, as well as the baseline for subsequent path planning; A2. According to the different priorities of turns, calculate the projection distance of each type of turn on the boundary of the polygonal plot, as the basis for global search of the next row, to ensure that the turn type of the next row found is a high-priority turn compared to the current row; A3. Calculate the first work row according to the work starting point set by the user and the work direction calculated in step A1; A4. Based on the principle of best conforming to vehicle kinematics, according to the threshold conditions calculated in the aforementioned steps, search for the next work row from the first work row to make the turn optimal, and the subsequent work row search is also based on this; A5. Plan the turn between the current work row and the next work row searched in step A4, and at the same time determine whether the straight part after the turn has caused the starting and ending points to be reversed from the work direction due to the reduction of the turning distance. If they are reversed, it is unreasonable and should be discarded, and then search for the next row according to step A4.
[0071] 2. Qualitative analysis of turning types between adjacent work rows. The relative positions of adjacent work rows in diagonal harrowing are analyzed, categorized into three relative positions (the sum of the angle vectors required to turn from the current row to the next row is greater than, equal to, or less than 180°). For each position type, based on whether the distance between the starting and ending points of the turn is sufficient for the agricultural machinery to turn only in the same direction, three turning shapes are generated. Taking into account the turning distance, turning angle, and control tracking difficulty, the turning efficiency of different turning shapes is analyzed, and turning priority rules are established. The process of analyzing the turning efficiency of different turning shapes: If the distance is insufficient, the agricultural machinery will turn in the order of direction B → direction A → direction B during the turning process. Switching turning directions increases the difficulty of unmanned control tracking, resulting in decreased accuracy and increased turning distance. Figures 1-3 Light bulb-shaped and cross-shaped turns are less efficient and should be avoided as much as possible; if the distance is too large, it will make... Figures 1-3The straight section of the arc is relatively long, and its intersection with other turns can cause overlapping harrowing at the end of the field, reducing work efficiency. Therefore, excessively long distances between the starting and ending points of turns should be avoided as much as possible. Among the three types of turns with relative positions, the circular arc turn is the shortest and most efficient. Specifically, when the turns between adjacent rows are less than 180°, the turning arc is the shortest and the work efficiency is the highest. Based on this, the turning priority rules in Table 1 are formulated.
[0072] 3. Taking into account both the turning efficiency of the agricultural machinery and ensuring the required soil breaking rate, the two working directions of diagonal harrowing are calculated. As can be seen from the turning priority analysis above, the optimal turn exists between two harrowing rows in different directions. Therefore, it is desirable that the number of working rows in the two harrowing directions differ as little as possible. Simultaneously, to ensure good soil breaking effect during diagonal harrowing, the angle between the two working directions should be as large as possible. However, considering that vertical harrowing of the two working rows requires a large traction force from the agricultural machinery, and reserving a certain angle optimization space, this invention sets an appropriate acceptable deviation threshold.
[0073] 4. Based on the calculated two diagonal harrowing directions and the qualitative analysis of the different turning priorities between adjacent work rows, the projected distance of the higher-priority circular turns on each edge is quantitatively calculated. When the distance is greater than this, it is an arc-shaped turn, and the turning efficiency depends on the length of the straight section in the middle of the arc-shaped turn; the shorter the section, the higher the efficiency. When the distance is less than this, the turn requires turning in direction A first, then in direction B, and then in direction A again. The turn consists of three arc segments, resulting in lower turning efficiency. Furthermore, the smaller the distance between the start and end points of the turn, the longer the length of the three arc segments will be, and the lower the turning efficiency will be.
[0074] Therefore, see Figure 6 The flowchart shown in this application illustrates that the proposed solution may include the following steps: S1, obtain the plot boundary polygon and path planning input parameters to determine the two harrowing directions of the agricultural machinery in the polygon plot, and the number of operation rows corresponding to each harrowing direction. The number of operation rows in the two harrowing directions is the number of paths that the agricultural machinery needs to take in the two diagonal directions of the polygon plot. S2, determine the two working directions for diagonal harrowing. Specifically, determine the two working directions and the baseline of each working direction when the difference in the number of working rows corresponding to the two harrowing directions satisfies the first set condition and the included angle between the two harrowing directions satisfies the second set condition. Then, based on the two working directions and the baseline of each working direction, calculate the projection distance of each type of turn on each boundary of the polygonal plot. S3, determine the first job line based on the job start point, that is, determine the first job line based on the job start point set by the user and either of the two job directions; S4, globally search for the next optimal operation path and plan the turns from the current row to the next row. Specifically, starting from the first operation row, according to the priority of each type of turn and the projection distance of each type of turn on each boundary of the polygon plot, search for the next optimal operation row for each operation row in the global path according to each type of turn, and obtain the optimal global path that satisfies the minimum cost of each turn, the minimum re-harrowing rate, and full coverage. Among them, the turn mode corresponding to each two adjacent operation rows in the optimal global path is the turn mode of the first target type when the next optimal operation row is found.
[0075] S5, determine if the turn is reasonable. If reasonable, proceed to the next step; if unreasonable, use the following adjustment strategy: Specifically, for each pair of adjacent work lines in the optimal global path, it is determined whether the first target turn corresponding to the two adjacent work lines crosses the concave angle; if the first target turn crosses the concave angle, the positions of the start and end work points of the two adjacent work lines are adjusted so that the turn corresponding to the adjusted two adjacent work lines is located within the polygonal plot, and the adjusted two adjacent work lines are taken as two adjacent target work lines; if the first target turn does not cross the concave angle, the two adjacent work lines are taken as two adjacent target work lines. For each pair of adjacent target operation lines in the optimal global path, determine whether the second target turn corresponding to the two adjacent target operation lines exceeds the polygonal plot. If the second target turn exceeds the polygonal plot, adjust the positions of the start and end points of the two adjacent target operation lines so that the turning trajectory corresponding to the adjusted two adjacent target operation lines is within the polygonal plot. The adjusted two adjacent target operation lines are taken as the two adjacent final operation lines. If the second target turn does not exceed the polygonal plot, the two adjacent target operation lines are taken as the two adjacent final operation lines. If the above adjustment strategy is still unreasonable, the current job row or the next job row can be discarded according to the discard strategy. S6, determine whether the global path search is complete. If so, determine the final global path based on the turning trajectories corresponding to all two adjacent final operation lines and all two adjacent final operation lines.
[0076] The solution of the present invention has the following advantages: This invention addresses the pain point of low efficiency in path planning for diagonal harrowing operations compared to manual driving, by analyzing the relationship between the relative positions of turns between adjacent rows, the distance between the start and end points of turns, and the minimum turning radius of the agricultural machinery. Different types of turn priority rules are established, and based on these rules, the optimal next row's working path is searched within the global path. This saves fuel, reduces tracking deviations in the autonomous vehicle, and improves turning efficiency at the edge of the field. For situations where directly planning a path at a concave corner might exceed the plot boundary, the invention pre-judges whether a turn will exceed the boundary. If the start and end points of the turns are adjusted, the final planned global path can be guaranteed not to exceed the boundary.
[0077] This invention can be used in agricultural machinery navigation systems with different minimum turning radii, and can be applied to plots of various shapes. It has a wide range of applications, and the planned diagonal harrowing global path has a low re-harrowing rate, high turning efficiency, and can fully cover the entire plot.
[0078] Based on and Figure 1 Based on the same principle as the method shown, this embodiment of the invention also provides a path planning device 20 for diagonal harrowing of agricultural machinery, such as... Figure 7 As shown, the agricultural machinery navigation diagonal harrowing path planning device 20 may include an acquisition module 210, a determination module 220, a projection distance determination module 230, a first work row determination module 240, and an optimal global path determination module 250, wherein: The acquisition module 210 is used to acquire the two harrowing directions of the agricultural machinery in the polygonal plot, and the number of working rows corresponding to each harrowing direction. The number of working rows in the two harrowing directions is the number of paths that the agricultural machinery needs to take in the two diagonal directions of the polygonal plot. The determination module 220 is used to determine the two working directions and the baseline of each working direction when the difference between the number of working rows corresponding to the two harrowing directions meets the first set condition and the included angle between the two harrowing directions meets the second set condition. Projection distance determination module 230 is used to calculate the projection distance of each turn on each boundary of the polygonal plot based on two working directions and the baseline of each working direction. The first work line determination module 240 is used to determine the first work line based on the user-set work start point and either of the two work directions; The optimal global path determination module 250 is used to start from the first work row, and search for the next optimal work row in the global path according to the priority of each type of turn and the projection distance of each type of turn on each boundary of the polygon plot. The optimal global path is obtained by minimizing the cost of each turn, minimizing the re-harrowing rate, and achieving full coverage. The turning mode corresponding to each two adjacent work rows in the optimal global path is the turning mode of the first target type when the next optimal work row is obtained.
[0079] Optionally, when determining the baseline of the two working directions and each working direction when the difference in the number of working rows corresponding to the two harrowing directions satisfies the first preset condition and the included angle between the two harrowing directions satisfies the second preset condition, the determination module 220 is specifically used for: Determine the two working directions that satisfy the first setting condition when the difference between the number of working rows corresponding to the two harrowing directions satisfies the first setting condition and the angle between the two harrowing directions satisfies the second setting condition. The first setting condition is to minimize the difference between the number of working rows corresponding to the two harrowing directions, and the second setting condition is to maximize the angle between the two harrowing directions. For each work direction, determine multiple straight lines passing through each vertex of the polygonal plot and parallel to the work direction. From these multiple straight lines, excluding the corresponding vertex, select the straight line farthest from the polygonal plot as the baseline corresponding to the work direction.
[0080] Optionally, the different types of turning include a first turning type, a second turning type, a third turning type, a fourth turning type, and a fifth turning type. If the different types of turning include a first turning type, a second turning type, and a third turning type, the projection distance determination module 230, when calculating the projection distance of each type of turning on each boundary of the polygonal plot based on the two working directions and the baseline of each working direction, is specifically used for: Based on the two working directions, determine the turning center angles corresponding to different types of turning methods. The different types of turning methods include the first turning type, the second turning type, the third turning type, the fourth turning type, and the fifth turning type. The arcs corresponding to the first turning type and the arcs corresponding to the third turning type complement each other. For each edge of the polygonal plot, determine the first angle between the edge and the current work line corresponding to the baseline of a work direction. The current work line is a straight line parallel to the corresponding baseline. Based on the first angle, the turning center angle and the minimum turning radius corresponding to the turning method of the second target type, determine the projection distance of the chord corresponding to the turning center angle of the turning method of the second target type onto the edge. The second target type is either the first turning type or the third turning type. For each edge of the polygonal plot, based on the minimum turning radius and the turning center angle corresponding to the second turning type, determine the projection distance of the chord corresponding to the turning center angle of the second turning type onto the edge.
[0081] Optionally, when the aforementioned different types of turning include a first turning type, a second turning type, and a third turning type, the projection distance determination module 230, when determining the turning center angle corresponding to the different types of turning based on the two working directions, is specifically used for: Calculate the absolute value of the difference between the two operation directions; When the absolute value is less than 180°, the absolute value is determined to be the turning center angle corresponding to the first turning type; When the absolute value is equal to 180°, the absolute value is determined to be the turning center angle corresponding to the second turning type; When the absolute value is greater than 180°, the absolute value is determined to be the turning center angle corresponding to the third turning type.
[0082] Optionally, when the first job line determination module 240 determines the first job line based on the user-set job start point and either of the two job directions, it is specifically used for: Based on the user-set starting point, determine the target straight line that passes through the starting point and has the direction of either of the two work directions; The endpoint of the operation is determined by the intersection of the target straight line and the boundary of the polygonal plot that is furthest from the starting point of the operation. Determine the first work row based on the start and end points of the work.
[0083] Optionally, the optimal global path determination module 250, starting from the first work row, searches for the next optimal work row for each work row in the global path according to the priority of each type of turn and the projection distance of each turn on each boundary of the polygonal plot, to obtain the optimal global path that satisfies the minimum cost of each turn, the lowest re-harrowing rate, and full coverage. Specifically, this is used for: Starting from the first work row, based on the priority of each turn and the projection distance of each turn on each boundary of the polygon plot, the next optimal work row is searched in the global path according to each type of turn, and the next candidate work row corresponding to each type of turn is obtained. From all the next candidate work rows corresponding to each type of turn, the next optimal work row that satisfies the minimum cost of each turn, the lowest re-harrowing rate, and full coverage is determined. The optimal global path is determined based on all work rows in the global path that satisfy the conditions of minimum cost for each turn, minimum re-harrowing rate, and full coverage.
[0084] Optionally, the above method further includes: The optimization module is used to determine whether the first target turn of each pair of adjacent work lines in the optimal global path crosses a concave angle. If the first target turn crosses the concave angle, the starting and ending points of the two adjacent work lines are adjusted so that the turns of the adjusted two adjacent work lines are located within the polygonal plot, and the adjusted two adjacent work lines are used as adjacent target work lines. If the first target turn does not cross the concave angle, the two adjacent work lines are used as adjacent target work lines. For each pair of adjacent target work lines in the optimal global path, it is determined whether the second target turn of the two adjacent target work lines exceeds the polygonal plot. If the second target turn exceeds the polygonal plot, the starting and ending points of the two adjacent target work lines are adjusted so that the turns of the adjusted two adjacent target work lines are located within the polygonal plot, and the adjusted two adjacent target work lines are used as adjacent final work lines. If the second target turn does not exceed the polygonal plot, the two adjacent target work lines are used as adjacent final work lines. Based on all pairs of adjacent final work lines and the turns of all pairs of adjacent final work lines, the final global path is determined.
[0085] The path planning device for diagonal harrowing of agricultural machinery in this embodiment of the invention can execute the path planning method for diagonal harrowing of agricultural machinery provided in this embodiment of the invention. The implementation principle is similar. The actions performed by each module and unit in the path planning device for diagonal harrowing of agricultural machinery in each embodiment of the invention correspond to the steps in the path planning method for diagonal harrowing of agricultural machinery in each embodiment of the invention. For detailed functional descriptions of each module of the path planning device for diagonal harrowing of agricultural machinery, please refer to the descriptions in the corresponding path planning methods for diagonal harrowing of agricultural machinery shown above, which will not be repeated here.
[0086] The aforementioned agricultural machinery navigation diagonal harrowing path planning device can be a computer program (including program code) running on a computer device, for example, the agricultural machinery navigation diagonal harrowing path planning device is an application software; the device can be used to execute the corresponding steps in the method provided in the embodiments of the present invention.
[0087] In some embodiments, the path planning device for diagonal harrowing of agricultural machinery provided in this invention can be implemented using a combination of hardware and software. As an example, the path planning device for diagonal harrowing of agricultural machinery provided in this invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the path planning method for diagonal harrowing of agricultural machinery provided in this invention. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0088] In other embodiments, the agricultural machinery navigation diagonal harrowing path planning device provided in this invention can be implemented in software. Figure 7 A path planning device for diagonal harrowing of agricultural machinery, stored in a memory, is shown. It can be software in the form of programs and plug-ins, and includes a series of modules, including an acquisition module 210, a determination module 220, a projection distance determination module 230, a first work row determination module 240, and an optimal global path determination module 250, for implementing the path planning method for diagonal harrowing of agricultural machinery provided in the embodiments of the present invention.
[0089] The modules described in the embodiments of the present invention can be implemented in software or hardware. The names of the modules are not, in some cases, limiting the scope of the module itself.
[0090] Based on the same principles as the methods shown in the embodiments of the present invention, the embodiments of the present invention also provide an electronic device, which may include, but is not limited to: a processor and a memory; the memory for storing computer programs; and the processor for executing the methods shown in any embodiment of the present invention by invoking the computer programs.
[0091] In one alternative embodiment, an electronic device is provided, such as Figure 8 As shown, Figure 8The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.
[0092] Among these, electronic devices can also be terminal devices. Figure 8 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.
[0093] This invention provides a computer-readable storage medium storing a computer program that, when run on a computer, enables the computer to execute the corresponding content in the aforementioned method embodiments.
[0094] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.
Claims
1. A path planning method for diagonal harrowing using agricultural machinery, characterized in that, include: Obtain the two harrowing directions of the agricultural machinery in the polygonal plot, and the number of work rows corresponding to each harrowing direction. The number of work rows in the two harrowing directions is the number of paths that the agricultural machinery needs to take in the two diagonal directions of the polygonal plot. Determine the baselines of the two working directions and each working direction when the difference between the number of working rows corresponding to the two harrowing directions satisfies a first set condition and the included angle between the two harrowing directions satisfies a second set condition. Based on the two said working directions and the baseline of each said working direction, calculate the projected distance of each turn on each boundary of the polygonal plot; Determine the first job row based on the user-defined job start point and either of the two job directions; Starting from the first work row, based on the priority of each turn and the projection distance of each turn on each boundary of the polygonal plot, the next optimal work row for each work row is searched in the global path according to each type of turn, so as to obtain the optimal global path that satisfies the minimum cost of each turn, the lowest re-raking rate, and full coverage. The turn mode corresponding to each two adjacent work rows in the optimal global path is the turn mode of the first target type when the next optimal work row is found.
2. The method according to claim 1, characterized in that, The determination of the baselines for the two working directions and each working direction when the difference in the number of working rows corresponding to the two harrowing directions satisfies a first preset condition and the included angle between the two harrowing directions satisfies a second preset condition includes: Two working directions are determined when the difference between the number of working rows corresponding to the two harrowing directions satisfies a first setting condition and the angle between the two harrowing directions satisfies a second setting condition. The first setting condition is to minimize the difference between the number of working rows corresponding to the two harrowing directions, and the second setting condition is to maximize the angle between the two harrowing directions. For each work direction, multiple straight lines passing through each vertex of the polygonal plot and parallel to the work direction are determined. From the multiple straight lines, except for the corresponding vertex, the straight line farthest from the polygonal plot is selected as the baseline corresponding to the work direction.
3. The method according to claim 1, characterized in that, Different types of turning include a first turning type, a second turning type, a third turning type, a fourth turning type, and a fifth turning type. If the different types of turning include a first turning type, a second turning type, and a third turning type, the step of calculating the projected distance of each type of turning on each boundary of the polygonal plot based on the two working directions and the baseline of each working direction includes: Based on the two working directions, the turning center angles corresponding to different types of turning methods are determined, and the arcs corresponding to the first turning type and the arcs corresponding to the third turning type complement each other. For each side of the polygonal plot, determine the first angle between the side and the current work line corresponding to a baseline of the work direction, wherein the current work line is a straight line parallel to the corresponding baseline. Based on the first angle, the turning center angle and the minimum turning radius corresponding to the turning mode of the second target type, determine the projection distance of the chord corresponding to the turning center angle of the turning mode of the second target type onto the side. The second target type is either the first turning type or the third turning type. For each side of the polygonal plot, the projection distance of the chord corresponding to the turning center angle of the second turning type onto the side is determined based on the minimum turning radius and the turning center angle corresponding to the second turning type.
4. The method according to claim 3, characterized in that, When the different types of turning include a first turning type, a second turning type, and a third turning type, determining the turning center angle corresponding to the different types of turning based on the two working directions includes: Calculate the absolute value of the difference between the two stated work directions; When the absolute value is less than 180°, the absolute value is determined to be the turning center angle corresponding to the first turning type; When the absolute value is equal to 180°, the absolute value is determined to be the turning center angle corresponding to the second turning type; When the absolute value is greater than 180°, the absolute value is determined to be the turning center angle corresponding to the third turning type.
5. The method according to any one of claims 1 to 4, characterized in that, The process of determining the first job row based on the user-defined job start point and either of the two job directions includes: Based on the user-set starting point, determine a target straight line that passes through the starting point and has a direction that is either of the two work directions; The intersection point between the target straight line and the boundary of the polygonal plot that is furthest from the starting point of the operation is determined as the end point of the operation; The first work row is determined based on the work start point and the work end point.
6. The method according to any one of claims 1 to 4, characterized in that, Starting from the first work row, based on the priority of each turn and the projection distance of each turn on each boundary of the polygonal plot, the next optimal work row is searched in the global path according to each type of turn, to obtain the optimal global path that satisfies the minimum cost of each turn, the lowest re-harrowing rate, and full coverage, including: Starting from the first work row, based on the priority of each turn and the projection distance of each turn on each boundary of the polygonal plot, the next optimal work row for each work row is searched in the global path according to each type of turn, so as to obtain the next candidate work row for each work row corresponding to each type of turn. From all the next candidate work rows for each work row corresponding to different types of turn, the next optimal work row that satisfies the minimum cost of each turn, the lowest re-harrowing rate, and full coverage is determined. The optimal global path is determined based on all work rows in the global path that satisfy the conditions of minimum cost for each turn, minimum re-harrowing rate, and full coverage.
7. The method according to any one of claims 1 to 4, characterized in that, The method further includes: For each pair of adjacent work lines in the optimal global path, determine whether the first target turn corresponding to the two adjacent work lines crosses the concave angle; if the first target turn crosses the concave angle, adjust the positions of the start and end work points of the two adjacent work lines so that the turn corresponding to the adjusted two adjacent work lines is located within the polygonal plot, and take the adjusted two adjacent work lines as two adjacent target work lines; if the first target turn does not cross the concave angle, take the two adjacent work lines as two adjacent target work lines. For each pair of adjacent target work lines in the optimal global path, determine whether the second target turn corresponding to the two adjacent target work lines exceeds the polygonal plot. If the second target turn exceeds the polygonal plot, adjust the positions of the start and end points of the two adjacent target work lines so that the turning trajectory corresponding to the adjusted two adjacent target work lines is within the polygonal plot. The adjusted two adjacent target work lines are then used as the two adjacent final work lines. If the second target turn does not exceed the polygonal plot, the two adjacent target work lines are used as the two adjacent final work lines. The final global path is determined based on the turning trajectories corresponding to all two adjacent final operation lines.
8. A path planning device for diagonal harrowing of agricultural machinery, characterized in that, include: The acquisition module is used to acquire the two harrowing directions of the agricultural machinery in the polygonal plot, and the number of work rows corresponding to each harrowing direction. The number of work rows in the two harrowing directions is the number of paths that the agricultural machinery needs to take in the two diagonal directions of the polygonal plot. The determining module is used to determine the two working directions and the baseline of each working direction when the difference between the number of working rows corresponding to the two harrowing directions meets a first set condition and the included angle between the two harrowing directions meets a second set condition. The projection distance determination module is used to calculate the projection distance of each turn on each boundary of the polygonal plot based on the two operating directions and the baseline of each operating direction. The first work line determination module is used to determine the first work line based on the user-set work start point and either of the two work directions; The optimal global path determination module is used to start from the first work row, and search for the next optimal work row in the global path according to the priority of each type of turn and the projection distance of each type of turn on each boundary of the polygonal plot, so as to obtain the optimal global path that satisfies the minimum cost of each turn, the lowest re-harrowing rate, and full coverage. The turning mode corresponding to each two adjacent work rows in the optimal global path is the turning mode of the first target type when the next optimal work row is obtained.
9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1-7.