Optimum harvesting area of convex and concave polygon field for path planning of robot combine harvester

This paper presents an optimum harvesting area of a convex and concave polygon for the path planning of a robot combine harvester. A convenient optimum harvesting area for a convex and concave polygon is proposed. The notion is that path planning specifically for a robot combine harvester is required to choose the crop field optimum harvesting area; otherwise, crop losses may occur during harvesting of the field. For a safe turning margin of the robot combine harvester, the surrounding crop near the boundary zone is cut twice or thrice by manual operation. However, this surrounding cutting crop is not exactly straight, and sometimes it is curved or meanders. In addition, path planning with a conventional AB point method in order to take a corner position from the global positioning system by visual observation is a time-consuming operation. A curved or meandering crop is not cut and left in the field during harvesting, and the harvesting area is not optimum. Therefore, a suitable N-polygon algorithm and split of convex hull and cross-point method for determining the optimum harvesting area for path planning are proposed, which reduce the crop losses in the field. The results show that this developed algorithm estimates the optimum harvesting area for a convex or concave polygon field and its corner vertices, takes all crop portions, and reduces crop losses. It is also illustrated that the working path calculated based on the corner vertices minimizes the total operational processing time.

population and their increasing age. In general, a human operator is unable to operate a farm vehicle over a long period of time in the field, whereas a robot vehicle can work frequently for long periods in adverse conditions. When a robot vehicle is designed, four issues must be taken into account: what work has to be done, what way does the work need to be completed, which information is necessary, and which positions must be measured [10]. In agricultural farming, the first answer is usually provided by the human operator, and the last two are more or less solved by the measurement of field environments and positions based on environmental and positioning sensors. However, the most difficult issue for the robot vehicle is proper field operation, that is, how to drive the robot in the field with more precision. Reid [13] stated that proper path planning is one of the key tasks in the planning process. Field efficiency and operational costs with the use of high-end technology are driven by the proper planning of field operation. Proper field operation reduces the production costs and increases the adoption of agricultural robots by farmers [15]. In general, a robot exploits a path planning algorithm (called the AB point method) that can find a path from point A to B so that no collisions with obstacles occur and that the path will be optimal with respect to a certain measure [10]. For agricultural robots, this kind of path planning algorithm can be used, but it will not cover the entire field.
Researchers are continually working to develop a route planning for agricultural robots that may cover the entire field. For instances, Taïx et al. [19] derived a field coverage algorithm for convex polygonal fields with one vertex of concavity. The field is divided into a working area and a turning area. In addition, non-convex fields with large obstacles are subdivided along boundary segments defined by concave vertices. A tool in Hofstee et al. [7] was developed to determine the optimum path for field operations in single convex fields. By contrast, a field can be split into subfields based on the longest side of the field or the longest segment of a field polygon [18]. A higher-level algorithm introduced in Oksanen and Visala [11] was based on the trapezoidal split of a complex-shaped field plot into smaller parts. Acar et al. [1] described the cellular decompositions of a field in various patterns for path planning between two points and to cover the free space. Plessen [12] used three patterns for path planning with partial field coverage for smaller field operating machines (such as spraying machines) collaborating with out-field support units (such as mobile depots). Willigenburg et al. [20] proposed online kinematic minimum time path planning and control in the presence of obstacles for an industrial fruit-picking robot. Bochtis et al. [2] developed a route planning method for a deterministic behavior robot that generates route plans for intra-and inter-row orchard operations based on the adoption of an optimal area coverage method developed for arable farming operations. Hameed et al. [6] developed a novel side-to-side 3D coverage path planning method that ensures zero skips/overlaps regardless of the topographical nature of the field terrain, and saves a significant percentage of uncovered area if an appropriate driving angle is chosen. Driscoll [3] derived an algorithm for solving the optimal complete coverage problem on a field boundary with n sides. Jin and Tang [8] reported on a path planning algorithm based on a developed geometric model for generating an optimized full-coverage pattern for a given 2D field by using Boustrophedon paths. A prototype optimized infield route planner used for mowing operations was used to evaluate the working distance and traffic intensity [4]. Seyyedhasani and Dvorak [16] proposed a vehicle routing problem (VRP) and optimization routing techniques for multiple vehicles in order to complete field work quickly.
From the above research studies, it can be summarized that most of the research describes an algorithm and tools/techniques for optimal field coverage considering soil compaction, obstacles, turning radii, energy savings [14], working area, and time. However, no specific research has been conducted on a robot combine harvester that reduces crop losses and operational processing time using path planning based on the optimum harvesting area of a crop, especially if the crop pattern is not in a row (as with wheat). Therefore, a need arises for developing a convenient optimum harvesting area method for determining the work path of the robot combine harvester so that it may cover all parts of the wheat and paddy crop periphery. After harvesting, no crop will be left in the field. This paper's research objective is to develop an algorithm that can estimate the optimum harvesting area for a convex or concave polygon field and determine the corner vertex to calculate the working path of a robot combine harvester. This research is conducted on a robot combine harvester developed by Zhang el al. [21]. The automatic path planning for the robot combine harvester is required to choose the crop field optimum harvesting area. Otherwise, crop losses may occur during harvesting in the field. In general, a boundary zone in the field includes water inlets and outlets or objects that are very dangerous for an operating robot. In order to make the turning margin safe for the robot combine harvester, the surrounding crop near a boundary zone is cut twice or thrice by manual operation. However, this surrounding cut crop is not exactly straight; sometimes it is curved or meandering, as shown in Fig. 1. This curved or meandering portion occurs mostly if the crop pattern is not in a row. Path planning is conducted using the corner position AB, and the parallel path is calculated based on the path AB in Fig. 1. Developing path planning with a conventional AB point method in order to take a corner position from the global positioning system by visual observation is a time-consuming operation. The curved or meandering crop is not cut, and the harvesting area is not optimum. During harvesting, this curved or meandering crop may be left in the field. In order to consider the crop losses in the field and the operational processing time, an optimum harvesting area with a convex or concave polygon form in the field is very important. Therefore, the main contribution of this paper is to develop an optimum harvesting area method for convex and concave polygons for the path planning of robot combine harvester. This reduces crop losses and minimizes the operational processing time for path planning.
The remainder of this paper is organized as follows. Section 2 presents the research platform and overall system algorithm, which will provide an idea of how to determine the optimum harvesting area for the estimated working path of a robot combine harvester for a convex or concave polygon. In Sect. 3, results are described for the convex and concave polygon field. Finally, brief concluding remarks are presented in Sect. 4.

Research platform and sensors
This research was conducted for a robot combine harvester (model-YANMAR AG1100) developed by Zhang et al. [21] that was designed to harvest cereal crops such as paddy, wheat, and soybean. This robot combine harvester was equipped with an on-board computer to log data from the positioning and inertial sensors by using RS-232C serial and USB ports. This robot combine harvester is fully controlled by a control area network (CAN). The travel speed of the robot combine harvester ranges from 1 to 2 m/s during the harvesting of crops. Figure 2 shows the robot combine harvester with a general-purpose 2.5 m header. A Topcon GB-3 GPS receiver with a PG-S1 antenna was used in this research for measuring the Real-Time Global Positioning System (RTK-GPS) position. This RTK-GPS can provide the position, direction of travel, and speed of the robot combine harvester, and also a provides position accuracy of ± 2 cm. The maximum update and output rates of the RTK-GPS are up to 20 Hz. The low-latency configuration (update rate: 5 Hz, latency: 0.02 s, data link: 115200 Bd) was selected for the RTK mode in this research. An Inertial Measurement Unit (IMU) (model VECTORNAV, VN-100) was used as a posture sensor to measure the heading angle of the robot combine harvester, as shown in Fig. 2. The heading angle from the IMU was stored in the on-board computer at a frequency of 200 Hz through a USB serial port.

Optimum harvesting area and path planning algorithm
The overall optimum harvesting area and path planning algorithm for the robot combine harvester is shown in Fig. 3. First, the measured RTK-GPS position P(X i , Y i ) and heading angle ϕ were used to calculate the header end position P(X H , Y H ), which is called the crop perimeter or the exact outline of a crop. Second, the convex hull CH (p 0 , p 1 , …, p i ) was calculated from the crop perimeter position P(X H , Y H ) by using the incremental convex hull method [9]. Third, the actual field shape was selected based on the estimated convex hull. If the field shape was a rectangular polygon, a rotating caliper method was used to find the optimum harvesting area of rectangular field that provided the corner vertices V (X i , Y i ) for path planning. However, when the field shape was a pentagon or L-shaped polygon other than a rectangular polygon, an N-polygon algorithm and the split of convex hull and cross-point method were developed to estimate the optimum harvesting area and the corner vertices V (X i , Y i ) of that polygon. Fourth, the edges of the polygon were obtained by using the estimated corner vertices V (X i , Y i ) and selecting the path direction, which is called the first path. Using this first path, other paths were calculated by considering the header length. Finally, as every path gives start and end points, the waypoints of every path were estimated and stored in a file   of the control pc. This file is the input file of the robot combine harvester for the completely automatic harvesting of a crop. The procedures are described in detail in the following sections.

Header end position
To obtain a safe turning area for the robot combine harvester, the surrounding crop near to the headland was cut twice or thrice in manual operation so that the water inlets and outlets in the field were not damaged. The RTK-GPS Hence, the header's end position (X H , Y H ) was obtained by using Eq. (1) in the ground coordinate system rotating along vector OA by π 2 − ϕ .

Incremental convex hull algorithm
The convex hull of a set of points Q is defined as the smallest convex polygon P that contains all of its points. The convex hull of Q is expressed as CH(Q). An incremental convex hull algorithm developed by Kallay [9] was used to make a convex hull CH(Q) from a finite set of convex polygon points which are the header end position P( p 0 , p i . . . p i ) points from the RTK-GPS position P(X i , Y i ) points. This algorithm reduces the header end position P( p 0 , p i . . . p i ) points by consecutively selecting the outer most positions or points that cover all points inside the convex hull, as shown in Fig. 5. The point set Q is sorted clockwise to create a sort sequence of the convex hull CH ( p 0 , p 1 . . . ., p i ).

Optimum harvesting area of rectangle by rotating caliper method
The optimum harvesting area enclosing rectangle was determined from the estimated convex hull CH(Q) of a rectangle by using the rotating caliper method [5] shown in Fig. 6. In this method, consider L s p i , p j , p k , p l which indicates a straight line passing through p i , p j , p k and p l , as shown in Fig. 6. First, the vertices p i , p j , p k and p l are selected based on the minimum or maximum x and y coordinates. These vertices are rotated to build a set of calipers with an angle θ . After the rotation, the corner vertices of the rectangle can be computed from the coordinates p i , p i+1 , p j , p k and p l when the optimum harvesting area of the rectangle is determined. Details about the rotating caliper method are described in [5,17].

Optimum harvesting area of convex polygon by N-polygon algorithm
The optimum harvesting area for a convex polygon was determined from the vertices of convex hull CH ( p 1 , p 2 , p 3 , . . . . . . p i ) by using the developed N-polygon algorithm, which is described in counter clockwise order in Fig. 7. The vertices p i of convex hull CH indicate the header end position (X i , Y i ). By using the vertices p i p i+1 of convex hull CH, the equation of the ith straight line was obtained.
Let us consider the two straight ith and jth lines, described by Eq.
where a, b and c are the constant parameters that were calculated from the vertices of convex hull CH ( p 1 , p 2 , p 3 , . . . . . . p i ) by the following Eqs. (4), (5) and (6).
Here, j is equal to i + 1.
where C x and C y indicate the centroid of a polygon that is measured by Eqs. (8) and (9).
Finally, when the center of gravity was inside the polygon or convex hull, the cross-point CP(X i , Y i ) was selected, and the area was determined by using Eq. (10). This procedure was continued until the optimum harvesting area was obtained. Afterward, the corner vertices V (X i , Y i ) of convex polygon were selected based on the optimum harvesting area.

Optimum harvesting area of concave polygon by split of convex hull and cross-point method
A method was developed called split of convex hull CH(Q) and cross-point method to estimate the optimum harvesting area of the concave polygon, as shown in Fig. 8. To compute the optimum harvesting area of the concave polygon or concave hull, this method is described by the following steps.
Step 1: Convex hull CH(Q) was determined from a concave polygon whose outline represents the header end position P( p 0 , p 1 . . . .p i ) points. The incremental convex hull algorithm was used to create the convex hull from the concave polygon. The optimum area of that convex hull was computed, which provided the corner vertices (X i , Y i ). These corner vertices were stored.
Step 2: When the optimum area of the convex hull was determined, the L-shape data were added into this optimum area of the convex hull, which represents the concave hull P( p 0 , p 1 . . . .p 1 ). Afterward, this concave hull was divided into two convex polygons. Again, the convex hull CH(Q) was estimated for each convex polygon. These estimated convex hulls were used to calculate the optimum area of both convex hulls CH(Q). The corner vertices of each optimum area of the convex hull were stored.
Step 3: The cross-point CP(X i , Y i ) was obtained by using Eq. (3) from the optimum area of each convex hull CH(Q). This cross-point CP(X i , Y i ) was stored with the corner vertices V (X i , Y i ) of convex hull CH(Q).
Step 4: Using this cross-point CP(X i , Y i ) and corner vertices V (X i , Y i ) of the concave hull, the optimum area of the concave hull was determined. This estimated optimum area was stored in a memory stack. This procedure was continued until the optimum area of the concave hull was calculated.
Step 5: Finally, the corner vertices V (X i , Y i ) of the concave hull CCH(Q) were obtained when the optimum harvesting area of the concave polygon or concave hull was determined.

Working path and waypoint algorithm
The working path of a robot combine harvester was calculated from the estimated corner vertices (x i , y i ) of an optimum harvesting area of a convex or concave polygon field. First, each edge was calculated by using Eq. (11), which is the modified form of the general line equation Ax i + By i + C 0, as described in Fig. 9. By using these edges, the operator determines the working direction of the robot combine harvester. The operator can choose any direction, but in general, the longest direction is better than the shortest one owing to the number of turns. In Fig. 9, the longest edge was selected as the working direction of the robot combine harvester. Second, based on header length d and the turning direction, the next path was estimated by using Eq. (12).
where, a Third, the cross-point (x c , y c ) was determined by using Eq. (13) from the above two lines Eqs. (11) and (12).
Finally, the waypoint (x , y ) for every path was calculated by using the following Eq. (14) where D indicates the distance between the start and end cross-points (x c , y c ).
x , y

Experiment design
The algorithms were verified by a field experiment of wheat harvesting in the field of Hokkaido University, Japan. The robot combine harvester computer was configured with RTK-GPS and IMU sensors that measured the positions and heading angles during the cutting of surrounding crops for the

Estimated header end position
The red points in Fig. 10 indicate the location of the RTK-GPS antenna as a result of harvesting the wheat field periphery in manual operation by the robot combine harvester. Afterward, the header's end position P(X H , Y H ) was determined using Eq. (1) by using the measured RTK-GPS position points P(X i , Y i ) and IMU heading angle ϕ, as depicted in Fig. 10. The values a and b can be changed considering the size of the header mounted on the robot combine harvester. The distances a and b taken in Eq. (1) were 2.5 m and 1.6 m, respectively. This estimated header end position P(X H , Y H ) indicates the actual perimeter or exact outline of wheat in the field that must be harvested by the robot combine harvester. Y H ) of the convex polygon field using the incremental convex hull method. For a concave polygon field, the vertices of concave hull CCH(Q) were estimated by using the split of convex hull and cross-point method shown in Fig. 11c. The result revealed that the header's end position is the finite set of points for both the convex and concave polygon fields, whereas the convex and concave hull give a small set of points of that polygon field, as shown in Fig. 11. The result indicates that the convex and concave hull method reduced the number of point clouds of the crop perimeter and determined the vertices of the convex hull that belong to the crop perimeter position on the boundary or inside the convex and concave polygon fields.

Estimating optimum harvesting area of polygon field
The optimum harvesting area of the convex polygon field was determined from the convex hull of a convex polygon field. When the operator judges that the shape of the crop periphery is a rectangular polygon, the rotating caliper method is used to create an optimum harvesting area of the rectangular field. Figure 12a shows the corner vertices V (X i , Y i ) of an optimum harvesting area of a rectangular polygon field by the rotating caliper method. When the shape of the crop periphery is an arbitrary polygon, the optimum N-polygonal algorithm is used to calculate the corner vertices V (X i , Y i ) of an optimum harvesting area of the convex polygon field by using Eq. (10) with the selected n sides of that polygon, as shown in Fig. 12b. Similarly, the corner vertices V (X i , Y i ) of the concave polygon field are determined by using the split of convex hull and cross-point method, as shown in Fig. 12c.
The results revealed that the optimum harvesting area of the convex and concave polygon field considers the curved or meandering parts of the convex and concave polygon field. As a consequence, the robot combine harvester will completely harvest the wheat or paddy crop without leaving any mowing residual in the field.

Comparison of optimum harvesting area of convex polygon field
The optimum harvesting area of a rectangular polygon during a wheat experiment was also calculated by using the optimum N-polygon algorithm, which can be compared with the optimum harvesting area from the rotating caliper method shown in Fig. 13. The estimated optimum harvesting area (green line) of the rectangular polygon from the optimum Npolygon algorithm was 4586.79 m 2 , whereas the optimum harvesting area (red line) from the rotating caliper method was 4631.63 m 2 . During harvesting, the area of the wheat field periphery (blue line) from the conventional AB point method was also calculated as 4333.97 m 2 , which is smaller than the optimum harvesting area of the rectangular polygon field shown in Fig. 13. The area of the rectangular field from the conventional method can sometimes be smaller or larger than the optimum harvesting area because the corner points are taken from an operator's observations. If the operator is an expert and can take the corner points perfectly, then the harvesting map will be accurate, and the robot combine harvester will harvest the wheat of the entire field. Otherwise, some mowing residual will remain in the field.  Figure 14 shows the simulated working path of the robot combine harvester based on the optimum harvesting area of the convex and concave polygon field. This working path was generated from the estimated corner vertices V (X i , Y i ) of the optimum harvesting area of the convex and concave polygon field by using Eqs. (11) and (12) when the header length was 2.5 m, which is the working width of the robot combine harvester. The total working distances for the convex and concave polygon field in Fig. 14 were obtained as 504.06 m and 381.08 m, respectively, while the number of working paths in both fields was 9. Based on these working distances and an average working speed of 1 m/s, the working time was calculated as 8.4 min for the convex polygon field and 6.4 min for the concave polygon field. Afterward, during the experiment in the rectangular wheat field, the working path was estimated based on the corner vertices V (X i , Y i ) from the optimum area method and conventional AB point method, as shown in Fig. 15. In both methods, the total number of working paths for the robot combine harvester was 16. In the AB point method shown in Fig. 15a, the total working distance was counted as 1890.12 m, while the working time was 31.5 min. The total working distance from the optimum area method was counted as 1941.45 m, as shown in Fig. 15b,  Fig. 12 Estimated optimum harvesting area and corner vertices of convex and concave polygon field Fig. 13 Comparison of the optimum harvesting area with the conventional harvesting area of convex polygon field while the working time was 32.4 min. The results indicated that unlike the optimum area method for a working path, if we provide the working path to the robot combine harvester by using the conventional AB point method, the robot will leave 51.33 m of mowing residual or meandering of wheat in the field. In addition, if we take the corner points based on the conventional AB point method to estimate the working path, the system needs almost 20-25 min to perform calculations. This time can be increased or decreased based on the size of the crop field. On the other hand, the estimated working path based on our proposed optimum area method needs up to 5 min to calculate. Considering these working times and the system estimated time of the working path, the total time was obtained as 56.5 min for the AB point method, whereas the total time for the proposed optimum area method was 37.4 min.

Conclusions
Automatic path planning is an important topic for robotic agricultural vehicles. This paper described an automatic path planning algorithm for a robot combine harvester to harvest wheat or paddy that is not in a row. The exact crop outline measured from the RTK-GPS position and IMU heading provides thousands of points, whose number is reduced by using the incremental convex hull method. Using an estimated convex hull, the optimum harvesting area of a polygon is determined by the rotating caliper and the developed optimum N-polygon algorithm, which is a better optimization of an area than when using the conventional AB point method. Unlike the conventional AB point method, the developed algorithm calculates an optimum harvesting area of the polygon that covers the entirely of the remaining crop and provides appropriate corner vertices. These corner vertices are used to calculate a working path for the robot combine harvester, which is more effective than the working path obtained from the conventional AB point method. The harvesting of a crop based on the working path from the conventional method is not sufficient and depends highly on the operator's visual accuracy. This problem is completely solved by using the developed algorithm in this research. In addition, the work path estimated based on the conventional AB point method needs more times to process all of the information, whereas the developed algorithm requires only a few minutes. Finally, we conclude that the developed algorithm reduces the operational processing time and completely removes the crop losses during a harvesting operation performed in the field by the robot combine harvester in real time.
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecomm ons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.