Airline planning method and device, electronic equipment and storage medium
The route planning method for agricultural drones generates efficient operation routes by using a minimum circumscribed polygon and cutting segments with excessive distance or angle differences, addressing inefficiencies in full coverage planning and enabling precise, targeted fruit tree spraying.
Patent Information
- Application Number
- CN202310788566.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2043-06-29
AI Technical Summary
Agricultural drones used for spraying and pest control at fruit tree sites often employ full coverage planning, which results in wasted pesticides and low efficiency due to invalid flight segments, and lack targeted operations based on the specific location of each fruit tree.
A route planning method that generates a minimum circumscribed polygon around fruit tree points, performs greedy planning based on shortest distance, and cuts segments with excessive distance or angle differences to create an efficient operation route tailored to fruit tree locations.
This method enables precise spraying and targeted operations on each fruit tree, reducing unnecessary flight segments and improving operational efficiency by adapting to fruit tree planting directions.
Smart Images

Figure CN119247967A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of drone technology, and more specifically, to a route planning method, device, electronic device, and storage medium. Background Art
[0002] At present, agricultural drones are used for path planning of spraying and pest control at fruit tree sites. Most of them adopt full coverage planning, that is, only the plot information is considered, and the specific location of the fruit trees is not considered for all-round operations. On the one hand, this operation method has the problems of waste of pesticides and low operation efficiency due to invalid flight segments; on the other hand, the spraying and pest control of fruit trees is not specific and comprehensive enough, and it is impossible to implement targeted operations according to the differences of each fruit tree. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a route planning method, device, electronic device and storage medium, which can improve work efficiency while achieving precise spraying of each fruit tree.
[0004] In order to achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0005] In a first aspect, an embodiment of the present application provides a route planning method, the method comprising:
[0006] Obtain location information of multiple fruit tree points in the plot to be operated;
[0007] Based on the location information of multiple fruit tree points, the minimum circumscribed polygon of all fruit tree points is generated;
[0008] Starting from any vertex of the minimum circumscribed polygon, greedy planning based on the shortest distance is performed on all fruit tree points to obtain a first route;
[0009] The first route is subjected to a cutting process to obtain a first cutting result; the cutting process is used to delete a route segment formed by adjacent fruit tree points and having a distance difference with an adjacent route segment greater than a distance threshold, and / or a route segment formed by adjacent fruit tree points and having an angle with an adjacent route segment greater than an angle threshold;
[0010] If the first cutting result meets the set requirements, an operation route is generated based on the first cutting result.
[0011] Optionally, the step of performing greedy planning based on the shortest distance on all fruit tree points starting from any vertex of the minimum circumscribed polygon to obtain the first route includes:
[0012] Taking any vertex of the minimum circumscribed polygon as a target point;
[0013] Determine a reference fruit tree point that is closest to the target point, and connect the target point and the reference fruit tree point;
[0014] The target point is replaced by the reference fruit tree point, and the step of determining the reference fruit tree point closest to the target point is returned to be executed until all fruit tree points are traversed to obtain the first route.
[0015] Optionally, the first cutting result includes each first candidate fruit tree point and each first candidate flight segment, and the method further includes:
[0016] If the first cutting result does not meet the set requirements, greedy planning based on the shortest distance is performed on all first candidate fruit tree points and all first candidate flight segments to obtain a second route;
[0017] performing the cutting process on the second route to obtain a second cutting result;
[0018] If the second cutting result meets the set requirement, an operation route is generated based on the second cutting result.
[0019] Optionally, the step of performing greedy planning based on the shortest distance on all first candidate fruit tree points and all first candidate flight segments to obtain the second route includes:
[0020] Taking any vertex of the minimum circumscribed polygon as a target point;
[0021] Determine a reference point that is closest to the target point, wherein the reference point is any one of the first candidate fruit tree points or any one of the endpoints of the first candidate flight segments;
[0022] connecting the target point and the reference point;
[0023] The target point is replaced by the reference point or the endpoint of the first candidate segment other than the reference point, and the step of determining the reference point closest to the target point is returned to be executed until all first candidate fruit tree points and all first candidate segments are traversed to obtain the second route.
[0024] Optionally, the method further comprises:
[0025] If the second cutting result does not meet the set requirements, the vertices of the minimum circumscribed polygon are changed, and greedy planning based on the shortest distance is cyclically performed on the current cutting result until a second cutting result that meets the set requirements is obtained.
[0026] Optionally, the method further comprises:
[0027] If the second cutting result obtained after traversing all vertices of the minimum circumscribed polygon still does not meet the set requirements, a sliding prediction method is used to perform greedy planning based on the shortest distance on the current cutting result to obtain a third route;
[0028] performing the cutting process on the third route to obtain a third cutting result;
[0029] If the third cutting result meets the set requirement, an operation route is generated based on the third cutting result.
[0030] Optionally, the current cutting result includes each current candidate fruit tree point and each current candidate flight segment;
[0031] The step of performing greedy planning based on the shortest distance on the current cutting result by using the sliding prediction method to obtain the third route includes:
[0032] Starting from any vertex of the minimum circumscribed polygon, connecting the vertex with any current candidate fruit tree point or any endpoint of the current candidate flight segment that is closest to the vertex;
[0033] Get the location information of each traversed fruit tree point;
[0034] According to the location information of each traversed fruit tree point, predict the location information of the next virtual point;
[0035] Determine a reference point where the distances to other untraversed fruit tree points are superimposed on the distances between the virtual point and other untraversed fruit tree points, wherein the reference point is any untraversed current candidate fruit tree point or any endpoint of the current candidate flight segment;
[0036] Connect the reference point with the last traversed fruit tree point, and return to execute the step of obtaining the position information of each traversed fruit tree point until all current candidate fruit tree points and all current candidate flight segments are traversed to obtain the third route.
[0037] Optionally, the method further comprises:
[0038] If the third cutting result does not meet the set requirements, the vertices of the minimum circumscribed polygon are changed, and greedy planning based on the shortest distance is cyclically performed on the current cutting result by using a sliding prediction method until a third cutting result that meets the set requirements is obtained.
[0039] Optionally, the method further comprises:
[0040] If the third cutting result obtained after traversing all vertices of the minimum circumscribed polygon still does not meet the set requirements, the distance threshold and / or the angle threshold is increased, and the step of performing greedy planning based on the shortest distance for all fruit tree points starting from any vertex of the minimum circumscribed polygon is returned to execute until the first cutting result, the second cutting result or the third cutting result that meets the set requirements is obtained.
[0041] Optionally, the method further comprises:
[0042] The cutting result is evaluated, wherein the cutting result is the first cutting result, the second cutting result, or the third cutting result.
[0043] Optionally, the cutting result includes each candidate fruit tree point and each candidate flight segment, and the step of evaluating the cutting result includes:
[0044] Calculate the ratio between the number of all candidate fruit tree points and the number of all fruit tree points to obtain an evaluation value;
[0045] If the evaluation value is less than the set evaluation threshold, it is determined that the cutting result meets the set requirement;
[0046] If the evaluation value is not less than the set evaluation threshold, it is determined that the cutting result does not meet the set requirement.
[0047] Optionally, the cutting result is a first cutting result or a second cutting result or a third cutting result, and the cutting result includes each candidate fruit tree point and each candidate flight segment;
[0048] The steps of generating an operation route based on the cutting results include:
[0049] Insert each of the candidate fruit tree points into the candidate flight segment closest to itself;
[0050] All candidate flight segments are connected according to the shortest distance to form the operating route.
[0051] In a second aspect, an embodiment of the present application further provides a route planning device, the device comprising:
[0052] An acquisition module is used to acquire the location information of multiple fruit tree points in the plot to be operated;
[0053] A generation module, used for generating the minimum circumscribed polygon of all fruit tree points based on the location information of multiple fruit tree points;
[0054] Route planning module for:
[0055] Starting from any vertex of the minimum circumscribed polygon, greedy planning based on the shortest distance is performed on all fruit tree points to obtain a first route;
[0056] The first route is subjected to a cutting process to obtain a first cutting result; the cutting process is used to delete a route segment formed by adjacent fruit tree points and having a distance difference with an adjacent route segment greater than a distance threshold, and / or a route segment formed by adjacent fruit tree points and having an angle with an adjacent route segment greater than an angle threshold;
[0057] If the first cutting result meets the set requirements, an operation route is generated based on the first cutting result.
[0058] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a processor and a memory, wherein the memory is used to store a program, and the processor is used to implement the route planning method in the first aspect when executing the program.
[0059] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the route planning method in the first aspect described above.
[0060] Compared with the prior art, the embodiments of the present application provide a route planning method, device, electronic device and storage medium. First, based on the location information of multiple fruit tree points in the plot to be operated, the minimum circumscribed polygon of all fruit tree points is generated; then, starting from any vertex of the minimum circumscribed polygon, greedy planning based on the shortest distance is performed on all fruit tree points to obtain a first route; then, the first route is cut to delete the segments formed by adjacent fruit tree points and the distance difference between the adjacent segments is greater than the distance threshold, and / or the segments formed by adjacent fruit tree points and the angle between the adjacent segments is greater than the angle threshold, to obtain a first cutting result, and when the first cutting result meets the set requirements, an operation route is generated based on the first cutting result. That is, the route is planned according to the specific location of each fruit tree point, so that targeted operations can be carried out according to the differences of each fruit tree and precise spraying of each fruit tree can be achieved. At the same time, the first route is planned starting from any vertex of the minimum circumscribed polygon formed by all the fruit tree points, and the segments in the first route formed by adjacent fruit tree points and the distance difference between the adjacent segments is greater than the distance threshold (that is, the segments with a longer distance between the fruit tree points) and / or the segments formed by adjacent fruit tree points and the angle between the adjacent segments is greater than the angle threshold (that is, the corner segments) are deleted. At the same time, the operating route is generated when the first cutting result meets the set requirements, so that the operating route can be generated that is suitable for the fruit tree planting direction, has fewer turns, and the distance between adjacent fruit trees is not too long, thereby improving the operating efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1A schematic diagram of a route planning method provided in an embodiment of the present application is shown. Figure 1 .
[0062] Figure 2 A fruit tree identification effect diagram provided in an embodiment of the present application is shown.
[0063] Figure 3 An example diagram of raw data information provided by an embodiment of the present application is shown.
[0064] Figure 4 An example of the route planning process provided by the embodiment of the present application is shown Figure 1 .
[0065] Figure 5 An example of the route planning process provided by the embodiment of the present application is shown Figure 2 .
[0066] Figure 6 An example of the route planning process provided by the embodiment of the present application is shown Figure 3 .
[0067] Figure 7 A schematic diagram of a route planning method provided in an embodiment of the present application is shown. Figure 2 .
[0068] Figure 8 An example of the route planning process provided by the embodiment of the present application is shown Figure 4 .
[0069] Fig. 9 An example of the route planning process provided by the embodiment of the present application is shown Figure 5 .
[0070] Fig.10 An example of the route planning process provided by the embodiment of the present application is shown Figure 6 .
[0071] Fig.11 An example diagram of an operating route provided in an embodiment of the present application is shown.
[0072] Fig.12 A block diagram of a route planning device provided in an embodiment of the present application is shown.
[0073] Fig.13 A block diagram of an electronic device provided in an embodiment of the present application is shown.
[0074] Icon: 100 - route planning device; 101 - acquisition module; 102 - generation module; 103 - route planning module; 10 - electronic device; 11 - processor; 12 - memory; 13 - bus. DETAILED DESCRIPTION
[0075] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present application.
[0076] At present, agricultural drones are used to plan the paths for spraying and pest control at fruit tree sites. The following two methods are usually used:
[0077] The first is full coverage planning, that is, only considering the plot information, and not considering the specific location of the fruit trees for all-round operations. This operation method, on the one hand, has the problem of waste of pesticides and low operation efficiency due to invalid flight segments; on the other hand, the spraying and pest control of fruit trees is not specific and comprehensive enough, and it is impossible to implement targeted operations according to the differences of each fruit tree.
[0078] The second method is to superimpose the results of fruit tree identification on the basis of full coverage planning, that is, to adjust the route of full coverage planning according to the results of fruit tree identification. However, since only the route of full coverage planning is adjusted, there are still too many invalid flight segments. In addition, due to the limitations of different fruit tree scenarios, parameters such as the planting distance and planting orientation of each row of fruit trees need to be designed or adjusted on-site by users. Its intelligence level is not enough, its versatility is not strong, its robustness to different fruit trees is low, and it does not fully consider the actual arrangement of fruit trees. At the same time, the planning effect is not good for some scenarios with multiple orientations or more complex fruit tree arrangements, resulting in low operation efficiency.
[0079] In order to solve the above problems, the embodiment of the present application plans the route according to the specific location of each fruit tree point, so that targeted operations can be carried out according to the differences of each fruit tree, and precise spraying of each fruit tree can be achieved. At the same time, the first route is planned starting from any vertex of the minimum circumscribed polygon formed by all the fruit tree points, and the segments in the first route formed by adjacent fruit tree points and the distance difference between the adjacent segments is greater than the distance threshold (that is, the segments with a longer distance between the fruit tree points) and / or the segments formed by adjacent fruit tree points and the angle between the adjacent segments is greater than the angle threshold (that is, the corner segments) are deleted. At the same time, an operating route is generated when the first cutting result meets the set requirements, so that an operating route that is adapted to the fruit tree planting direction, has fewer turns, and the distance between adjacent fruit trees is not too long can be generated, thereby improving the operating efficiency.
[0080] The route planning technology provided in the embodiments of the present application can be applied to electronic devices. The electronic device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a server, etc., or a drone (for example, an agricultural drone, a forestry drone, a surveying drone, etc.). Users can choose different devices according to actual application scenarios, and the embodiments of the present application do not impose any restrictions on this.
[0081] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0082] Please refer to Figure 1 , Figure 1 A schematic flow chart of a route planning method provided in an embodiment of the present application is shown. The route planning method is applied to an electronic device and may include the following steps:
[0083] S101, obtaining location information of a plurality of fruit tree points in a plot to be operated.
[0084] In this embodiment, the position information of the fruit tree points in the operation plot can be obtained by using visual technology and artificial intelligence technology to identify each fruit tree in the operation plot.
[0085] Optionally, a surveying drone can be used to pre-fly the plot to be operated (e.g., an orchard), and the location information of each fruit tree in the plot to be operated can be identified using visual technology and artificial intelligence technology, for example, Figure 2 As shown in the figure, identify each fruit tree in the plot to be operated as follows Figure 2 Afterwards, the obtained location information of each fruit tree point can be fed back to the user, and the user can confirm whether there is misidentification or missed identification, and whether the location information needs to be corrected. After the user confirms that it is correct, the location information of each fruit tree point is saved, for example, the location information is converted into a json format file and uploaded to the cloud.
[0086] It should be noted that the location information of the multiple fruit tree points obtained in step S101 is the location information of each fruit tree point that needs to be operated (for example, sprayed). For example, it can be the location information of all fruit tree points in the plot to be operated, or it can be the location information of all fruit tree points in a certain area of the plot to be operated. The specific location information can be flexibly selected by the user according to actual needs, and the embodiment of the present application does not impose any limitation on this.
[0087] That is, if it is necessary to spray pesticides on the fruit trees in the operation plot, the location information of each fruit tree point in the operation plot is obtained; if most areas of the operation plot have been sprayed with pesticides, but only a certain area is missed and needs to be sprayed again, the location information of each fruit tree point in the area is obtained. Figure 3 As shown in , the original data information includes the location information of each fruit tree point that needs to be operated in the plot to be operated.
[0088] S102, based on the location information of multiple fruit tree points, generating the minimum circumscribed polygon of all the fruit tree points.
[0089] In this embodiment, after the location information of a plurality of fruit tree points that need to be operated is obtained, the minimum circumscribed polygon surrounding the plurality of fruit tree points may be generated based on the location information of the plurality of fruit tree points.
[0090] Optionally, the minimum circumscribed polygon may be a minimum circumscribed rectangle, a minimum circumscribed pentagon, a minimum circumscribed hexagon, etc. The number of sides of the minimum circumscribed polygon is not limited here, and it only needs to include all fruit tree points that need to be operated. The following embodiment is described using the minimum circumscribed rectangle as an example.
[0091] What needs to be mentioned is that the existing minimum circumscribed polygon algorithm can be used to generate the minimum circumscribed polygon surrounding all fruit tree points, which will not be elaborated in the embodiments of the present application.
[0092] S103, starting from any vertex of the minimum circumscribed polygon, perform greedy planning based on the shortest distance on all fruit tree points to obtain a first route.
[0093] In this embodiment, after the minimum circumscribed polygon of all fruit tree points is generated based on the location information of multiple fruit tree points, the coordinates of each vertex of the minimum circumscribed polygon can be obtained. Since the location information of each fruit tree point to be operated and the minimum circumscribed polygon of all fruit tree points are known at this time, the shortest distance point planning can be used to generate the first route starting from any vertex of the minimum circumscribed polygon and connecting each fruit tree point.
[0094] It should be pointed out that starting from any vertex of the minimum circumscribed polygon, greedy planning based on the shortest distance is performed on all fruit tree points in order to make the final operation route adapt to the fruit tree planting direction. For example, if the operation route cannot be planned starting from a vertex of the minimum circumscribed polygon, it means that the currently predicted fruit tree planting direction may not be appropriate, and it is necessary to replace the vertex of the minimum circumscribed polygon and re-plan. In this way, the user does not need to specify the fruit tree planting direction, but plans based on the minimum circumscribed polygon, and finally generates an operation route that adapts to the fruit tree planting direction.
[0095] In this embodiment, starting from any vertex of the minimum circumscribed polygon, greedy planning based on the shortest distance is performed on all fruit tree points, that is, the shortest distance point planning, which means: treating each fruit tree point as a separate individual, starting from any vertex of the minimum circumscribed polygon, searching for the next fruit tree point based on the shortest distance each time until the last fruit tree point, to obtain the first route.
[0096] In an optional implementation, the process of performing greedy planning based on the shortest distance on all fruit tree points starting from any vertex of the minimum circumscribed polygon in step S103 to obtain the first route may include sub-steps S1031 to S1033.
[0097] S1031: Take any vertex of the minimum circumscribed polygon as the target point.
[0098] S1032, determine the reference fruit tree point that is closest to the target point, and connect the target point and the reference fruit tree point.
[0099] S1033, replace the target point with the reference fruit tree point, and return to execute sub-step S1032 until all fruit tree points are traversed to obtain the first route.
[0100] This can be understood as: after returning to execute sub-step S1032, step S1033 will continue to be executed until all fruit tree points are traversed and the first route is obtained.
[0101] For example, see Figure 4 , starting from any vertex A of the minimum circumscribed polygon, find the fruit tree point 1 that is closest to vertex A, and connect vertex A and fruit tree point 1; then, continue to find the fruit tree point 2 that is closest to fruit tree point 1, and connect fruit tree point 1 and fruit tree point 2; and so on, until the last fruit tree point 6, and get the first route A→1→2→3→7→8→4→5→9→10→6.
[0102] S104, performing a cutting process on the first route to obtain a first cutting result; the cutting process is used to delete the flight segments formed by adjacent fruit tree points and whose distance difference with the adjacent flight segments is greater than a distance threshold, and / or the flight segments formed by adjacent fruit tree points and whose angle with the adjacent flight segments is greater than an angle threshold.
[0103] In this embodiment, from Figure 4 It can be seen that the first route obtained by planning with the shortest distance point has many corners, resulting in high energy consumption of the drone and low operating efficiency. In addition, the first route is unreasonable in the eyes of users and does not conform to the direction of fruit tree planting.
[0104] Therefore, after the first route is obtained by using the shortest distance point planning, the first route needs to be cut to delete the segments formed by adjacent fruit tree points and whose distance difference with adjacent segments is greater than the distance threshold (i.e., segments with longer distances between fruit tree points) and / or segments formed by adjacent fruit tree points and whose angles with adjacent segments are greater than the angle threshold (i.e., corner segments).
[0105] Optionally, the distance threshold may be 3 to 5 meters, and the angle threshold may be 30 to 60 degrees. In this embodiment, when the route planning is just started, the distance threshold and the angle threshold may be smaller, for example, the distance threshold is 3 meters, and the angle threshold is 30 degrees. If the operation route cannot be planned, the distance threshold and the angle threshold are gradually increased. By adopting such a planning process from tight to loose, the operation route finally obtained has fewer turns and the distance between adjacent fruit trees is not too long.
[0106] In practice, the planting distances of different types of fruit trees in different regions are not fixed, but in the same plot, the distance difference between the line segments formed by adjacent fruit trees is often relatively small. For example, please refer to Figure 5 , fruit tree point 1 and fruit tree point 2 form segment S1, fruit tree point 2 and fruit tree point 3 form segment S2, and the distance difference between S1 and S2 is usually relatively close.
[0107] Therefore, starting from the starting point of the first route, we can determine whether the distance difference between the segments formed by adjacent fruit tree points is greater than the distance threshold, and delete the segments with longer distances between fruit tree points. For example, if the distance difference between S2 and S1 is greater than the distance threshold, it means that the distance between fruit tree points 2 and 3 is too long, and S2 is deleted; if the distance difference between S2 and S1 is not greater than the distance threshold, S1 and S2 are connected into a candidate segment.
[0108] At the same time, if the fruit trees are planted in the same row, the angle of the line segment formed between the adjacent fruit trees is often smaller; if the fruit trees are planted in different rows, the angle of the line segment formed between the adjacent fruit trees is often larger. Figure 5 , fruit tree point 1 and fruit tree point 2 form segment S1, fruit tree point 2 and fruit tree point 3 form segment S2, fruit tree point 3 and fruit tree point 7 form segment S3, the angle between S1 and S2 is relatively small, and the angle between S2 and S3 is relatively large.
[0109] Therefore, starting from the starting point of the first route, we can determine whether the angle of the segments formed by the adjacent fruit tree points is greater than the angle threshold, and delete the turning segments. Figure 5 As shown, S2 and S3 form an angle, and it is determined whether the angle is greater than the angle threshold. If it is greater than the angle threshold, it means that there is a turn, and S2 is deleted at this time; accordingly, if the angle formed by S1 and S2 is not greater than the angle threshold, S1 and S2 are connected into a candidate segment.
[0110] In this embodiment, the flight segments formed by adjacent fruit tree points and whose distance difference with adjacent flight segments is greater than the distance threshold are deleted, that is, the flight segments with longer distances between fruit tree points are deleted; the flight segments formed by adjacent fruit tree points and whose angles with adjacent flight segments are greater than the angle threshold are deleted, that is, the flight segments at the turning points are deleted; thereby ensuring that the subsequent generation of operating routes has fewer turns and the distances between adjacent fruit trees are not too long.
[0111] In this embodiment, after the first route is cut, a cutting result including candidate fruit tree points and candidate flight segments is obtained. At this time, each candidate flight segment is straight and no turning flight segments exist.
[0112] For example, Figure 4 The first route in is cut and the cutting result is as follows Figure 6As shown, there is 1 candidate fruit tree point and 4 candidate flight segments.
[0113] S105: If the first cutting result meets the set requirements, an operation route is generated based on the first cutting result.
[0114] In this embodiment, after the first route is cut and the first cutting result is obtained, if the number of candidate fruit tree points in the first cutting result is large, the operation route generated based on the first cutting result will have many turns. Therefore, it is necessary to first determine whether there are a large number of candidate fruit tree points in the first cutting result. If not, then generate the operation route based on the first cutting result.
[0115] Optionally, the setting requirement may be: the ratio of the number of all candidate fruit tree points in the first cutting result to the number of all fruit tree points obtained in step S101 is less than a set value, for example, less than 5% to 10%.
[0116] In one possible situation, if there are a large number of candidate fruit tree points in the first cutting result, in order to avoid many turns in the operating route, the operating route cannot be generated directly based on the first cutting result. At this time, further planning is required based on the first cutting result, that is, further planning of the candidate fruit tree points and candidate flight segments.
[0117] Therefore, in Figure 1 Based on Figure 7 After step S104, the route planning method provided in the embodiment of the present application further includes steps S106 to S108.
[0118] S106: If the first cutting result does not meet the set requirements, greedy planning based on the shortest distance is performed on all first candidate fruit tree points and all first candidate flight segments to obtain a second route.
[0119] In this embodiment, if the first cutting result does not meet the set requirements, starting from the same vertex (for example, vertex A) in step S103, greedy planning based on the shortest distance is performed on all first candidate fruit tree points and all first candidate flight segments, that is, the currently predicted fruit tree planting direction is kept unchanged, and the number of candidate fruit tree points after cutting is reduced through the shortest distance point-line planning.
[0120] In the shortest distance point-line planning, the candidate segment is taken as a whole, that is, only the two endpoints of the candidate segment are considered, starting from any vertex of the minimum circumscribed polygon, the next point is searched based on the shortest distance each time. This point may be a candidate fruit tree point or an endpoint of the candidate segment. If it is an endpoint of the candidate segment, the next point is directly searched based on the other endpoint of the candidate segment next time, until all the first candidate fruit tree points and all the first candidate segments are traversed to obtain the second route.
[0121] In this way, taking the candidate segment as a whole and only considering the two endpoints of the candidate segment can effectively shorten the planning time and improve the planning efficiency.
[0122] In an optional implementation, the process of performing greedy planning based on the shortest distance on all first candidate fruit tree points and all first candidate flight segments in step S106 to obtain the second route may include sub-steps S1061 to S1064.
[0123] S1061: Take any vertex of the minimum circumscribed polygon as the target point.
[0124] S1062, determining a reference point that is closest to the target point, wherein the reference point is any first candidate fruit tree point or any endpoint of the first candidate flight segment.
[0125] S1063, connecting the target point and the reference point.
[0126] S1064, replace the target point with the reference point or the endpoint of the first candidate segment other than the reference point, and return to execute sub-step S1062 until all first candidate fruit tree points and all first candidate segments are traversed to obtain the second route.
[0127] This can be understood as: after returning to execute sub-step S1062, steps S1063 to S1064 will continue to be executed until all first candidate fruit tree points and all first candidate flight segments are traversed to obtain the second route.
[0128] For example, see Figure 8 , starting from any vertex A of the minimum circumscribed polygon, since vertex A is an endpoint of candidate segment L1 at this time, directly find the point closest to the other endpoint of candidate segment L1, assuming it is an endpoint of candidate segment L2, then connect the other endpoint of candidate segment L1 with an endpoint of candidate segment L2 (such as Figure 8 Then, continue to find the point closest to the other end point of the candidate segment L2. Assuming it is the candidate fruit tree point, connect the other end point of the candidate segment L2 with the candidate fruit tree point. And so on, until all the first candidate fruit tree points and all the first candidate segments are traversed, the second route is obtained as follows: Figure 8 as shown in .
[0129] S107, performing cutting processing on the second route to obtain a second cutting result.
[0130] S108: If the second cutting result meets the set requirements, an operation route is generated based on the second cutting result.
[0131] In this embodiment, after the second route is obtained by the shortest distance point-line planning, in order to ensure the generation of an operating route that is suitable for the fruit tree planting orientation, has a small number of turns, and the distance between adjacent fruit trees is not too long, the second route also needs to be cut, and it is determined whether the second cutting result meets the set requirements. If the second cutting result meets the set requirements, the operating route is generated based on the second cutting result.
[0132] It should be pointed out that the process of cutting the second route is similar to the process of cutting the first route in step S104; the process of judging whether the second cutting result meets the set requirements is similar to the process of judging whether the first cutting result meets the set requirements in step S105; this embodiment of the present application will not go into details.
[0133] In one possible situation, if the second cutting result does not meet the set requirements, it means that the currently predicted fruit tree planting direction may not be suitable. In order to avoid too many turns in the operation route, the operation route cannot be generated directly based on the second cutting result. It is necessary to change the predicted fruit tree planting direction (that is, change the vertices of the minimum circumscribed polygon) and then re-plan.
[0134] Therefore, please refer to Continue Figure 7 After step S107, the route planning method provided in the embodiment of the present application also includes step S109.
[0135] S109, if the second cutting result does not meet the set requirements, then by changing the vertices of the minimum circumscribed polygon, greedy planning based on the shortest distance is cyclically performed on the current cutting result until a second cutting result that meets the set requirements is obtained.
[0136] This can be understood as changing the vertices of the minimum circumscribed polygon. For example, starting from vertex B of the minimum circumscribed polygon, greedy planning based on the shortest distance is performed on the current cutting result, that is, returning to execute steps S106 to S108 until a second cutting result that meets the set requirements is obtained, and then an operation route is generated based on the second cutting result.
[0137] In one possible situation, if the second cutting result obtained after changing all the vertices of the minimum circumscribed polygon still does not meet the set requirements, that is, all predicted fruit tree planting directions have been tried, and the second cutting result that meets the set requirements cannot be obtained, then it means that there are still a large number of candidate fruit tree points in the current second cutting result. In order to avoid too many turns in the operation route, the operation route cannot be generated directly based on the current second cutting result. At this time, further planning is required based on the current second cutting result.
[0138] Therefore, please refer to Continue Figure 7After step S109, the route planning method provided in the embodiment of the present application further includes steps S110 to S112.
[0139] S110, if the second cutting result obtained after traversing all vertices of the minimum circumscribed polygon still does not meet the set requirements, a sliding prediction method is used to perform greedy planning based on the shortest distance on the current cutting result to obtain a third route.
[0140] In this embodiment, if the first cutting result does not meet the set requirements, starting from the same vertex (for example, vertex A) in step S103, the current second cutting result is subjected to greedy planning based on the shortest distance by using a sliding prediction method, that is, according to the initially predicted fruit tree planting direction, the number of candidate fruit tree points after cutting is reduced by using the shortest distance sliding prediction planning.
[0141] In the shortest distance sliding prediction planning, it is necessary to predict the position of a virtual point based on the location information of the planned fruit tree points. The prediction method can be estimated based on the deviations of the previous fruit tree points. At the same time, among all the unplanned fruit tree points, the point with the smallest sum of the distance between itself and other unplanned fruit tree points and the distance between the virtual point and other unplanned fruit tree points is taken as the next point. This point may be a candidate fruit tree point or an endpoint of a candidate segment. If it is an endpoint of a candidate segment, all the fruit tree points in the candidate segment will be directly regarded as planned fruit tree points in the next prediction to find the next point until all the current candidate fruit tree points and candidate segments are traversed to obtain the third route.
[0142] In this way, each time the next point is looked for, a virtual point is predicted based on the location information of the planned fruit tree point, and the point among all the unplanned fruit tree points with the smallest sum of the distance between itself and other unplanned fruit tree points and the distance between the virtual point and other unplanned fruit tree points is taken as the next point. Therefore, the planned third route will be more in line with the flight direction of the drone and more in line with the direction of fruit tree planting.
[0143] From the above content, it can be seen that the shortest distance point planning introduced in steps S103 to S105 and the shortest distance point line planning introduced in steps S106 to S108 are both to find the next point with the shortest distance. However, in practice, combined with Figure 4, taking fruit tree points 2, 3, and 4 as an example, when identifying the positions of the fruit tree points, fruit tree point 3 was missed, resulting in the fruit tree point positions obtained in step S101 being only fruit tree points 2 and 4. In this case, when looking for the next point based on fruit tree point 2, since fruit tree point 3 was missed, it is likely that the next point found is fruit tree point 7, which obviously does not conform to the direction of fruit tree planting and requires a turn. Therefore, in order to avoid the above situation, the shortest distance sliding prediction planning is adopted to predict a virtual point, which is equivalent to the missed fruit tree point 3, thereby assisting in finding the next fruit tree point 4, so that the planned route is more in line with the flight direction of the drone and the fruit tree planting direction.
[0144] In an optional implementation, the current cutting result may include each current candidate fruit tree point and each current candidate route segment. In step S110, the current cutting result is subjected to greedy planning based on the shortest distance by using a sliding prediction method to obtain the third route. The process may include sub-steps S1101 to S1105.
[0145] S1101, starting from any vertex of the minimum circumscribed polygon, connecting the vertex with any current candidate fruit tree point or any endpoint of the current candidate flight segment that is closest to the vertex.
[0146] S1102, obtaining the location information of each traversed fruit tree point.
[0147] S1103, predicting the location information of the next virtual point based on the location information of each traversed fruit tree point.
[0148] S1104, determining a reference point with the smallest distance from the distance superimposed between the virtual point and other untraversed fruit tree points, the reference point being any untraversed current candidate fruit tree point or any endpoint of the current candidate flight segment.
[0149] S1105, connect the reference point and the last traversed fruit tree point, and return to execute sub-step S1102 until all current candidate fruit tree points and all current candidate flight segments are traversed to obtain the third route.
[0150] This can be understood as: after returning to execute sub-step S1102, steps S1103 to S1105 will continue to be executed until all current candidate fruit tree points and all current candidate flight segments are traversed to obtain the third route.
[0151] For example, see Fig. 9, starting from any vertex A of the minimum circumscribed polygon, since vertex A is an endpoint of candidate segment L1 at this time, fruit tree points 1, 2, and 3 in candidate segment L1 all become traversed fruit tree points. At this time, based on the position information of fruit tree points 1, 2, and 3, the position of the next virtual point is predicted. The position of the virtual point can be predicted based on the interval between fruit tree point 1 and fruit tree point 2 and the interval between fruit tree point 2 and fruit tree point 3. Fig. 9 As shown in ; then, among all the unplanned fruit tree points (i.e., fruit tree points 4, 5, 6, 7, 8, 9, 10), find the fruit tree point whose sum of the distance between itself and other unplanned fruit tree points and the distance between the virtual point and other unplanned fruit tree points is the smallest, that is, fruit tree point 4, and fruit tree point 4 is the reference point in sub-step S1104; then, connect fruit tree point 4 and fruit tree point 3. Since fruit tree point 4 is an end point of candidate segment L2, the traversed fruit tree points become fruit tree points 1, 2, 3, 4, 5. The position of the next virtual point is predicted based on all or part of the traversed fruit tree points (e.g., fruit tree points 3, 4, 5) as shown in FIG. Fig. 9 As shown in , and so on, repeat the above process until all current candidate fruit tree points and all current candidate flight segments are traversed, and the third route is obtained as Fig. 9 as shown in .
[0152] S111, performing cutting processing on the third route to obtain a third cutting result.
[0153] S112: If the third cutting result meets the set requirements, an operation route is generated based on the third cutting result.
[0154] In this embodiment, after the third route is obtained by using the shortest distance sliding prediction planning, in order to ensure the generation of an operating route that is suitable for the planting orientation of fruit trees, has a small number of turns, and the distance between adjacent fruit trees is not too long, the third route also needs to be cut, and it is determined whether the third cutting result meets the set requirements. If the third cutting result meets the set requirements, the operating route is generated based on the third cutting result.
[0155] It should be pointed out that the process of cutting the third route is similar to the process of cutting the first route in step S104; the process of judging whether the third cutting result meets the set requirements is similar to the process of judging whether the first cutting result meets the set requirements in step S105; this embodiment of the present application will not go into details.
[0156] In one possible scenario, if the third cutting result does not meet the set requirements, it means that the currently predicted fruit tree planting direction may not be suitable. In order to avoid too many turns in the operation route, the operation route cannot be generated directly based on the third cutting result. It is necessary to change the predicted fruit tree planting direction (i.e., change the vertices of the minimum circumscribed polygon) and then re-plan.
[0157] Therefore, please refer to Continue Figure 7 After step S111, the route planning method provided in the embodiment of the present application also includes step S113.
[0158] S113, if the third cutting result does not meet the set requirements, then by changing the vertices of the minimum circumscribed polygon, the current cutting result is cyclically subjected to greedy planning based on the shortest distance by adopting a sliding prediction method, until a third cutting result that meets the set requirements is obtained.
[0159] This can be understood as changing the vertices of the minimum circumscribed polygon. For example, starting from vertex B of the minimum circumscribed polygon, a sliding prediction method is used to perform greedy planning based on the shortest distance on the current cutting result, that is, returning to execute steps S110 to S112 until a third cutting result that meets the set requirements is obtained, and then an operation route is generated based on the third cutting result.
[0160] In one possible scenario, if the third cutting result obtained after changing all vertices of the minimum circumscribed polygon still does not meet the set requirements, that is, after trying all predicted fruit tree planting directions, the third cutting result that meets the set requirements cannot be obtained, it means that there are still a large number of candidate fruit tree points in the current third cutting result. In order to avoid many turns in the operation route, the operation route cannot be directly generated based on the current third cutting result. Since the operation route cannot be planned at this time, it means that the distance threshold and angle threshold set for the route cutting process are too strict, and it is necessary to increase the distance threshold and angle threshold and re-plan.
[0161] Therefore, please refer to Continue Figure 7 After step S113, the route planning method provided in the embodiment of the present application also includes step S114.
[0162] S114, if the third cutting result obtained after traversing all vertices of the minimum circumscribed polygon still does not meet the set requirements, increase the distance threshold and / or angle threshold, and return to step S103 until the first cutting result or the second cutting result or the third cutting result that meets the set requirements is obtained.
[0163] This can be understood as: after returning to execute step S103, steps S104 to S114 will continue to be executed until the first cutting result, the second cutting result or the third cutting result that meets the set requirements is obtained, and an operation route is generated based on the first cutting result, the second cutting result or the third cutting result.
[0164] That is, if the operating route still cannot be planned through the process of the above steps S101 to S113, it is necessary to increase the distance threshold and angle threshold used in the route cutting process (for example, the distance threshold is increased from 3m to 4m, and the angle threshold is increased from 30° to 40°), relax the standard of the route cutting process and re-plan according to the process of steps S101 to S113. If the operating route still cannot be planned, continue to increase the distance threshold and angle threshold, and so on, until the operating route is planned.
[0165] It should be pointed out that there are upper limits for increasing the distance threshold and the angle threshold. For example, the distance threshold is 5m and the angle threshold is 60°. This is the only way to ensure that the final operating route is adapted to the orientation of fruit tree planting, has fewer turns, and the distance between adjacent fruit trees is not too long.
[0166] From the foregoing content, it can be seen that after cutting the first route to obtain the first cutting result, or cutting the second route to obtain the second cutting result, or cutting the third route to obtain the third cutting result, it is necessary to determine whether there are a large number of candidate fruit tree points in the cutting results. If not, then generate an operation route based on the cutting results.
[0167] Therefore, after step S104, after step S107 and after step S111, the route planning method provided in the embodiment of the present application further includes step S10A.
[0168] S10A, evaluating the cutting result, wherein the cutting result is the first cutting result, the second cutting result, or the third cutting result.
[0169] This can be understood as: after step S104, the first cutting result is evaluated; after step S107, the second cutting result is evaluated; after step S111, the third cutting result is evaluated.
[0170] In this embodiment, the cutting results are evaluated, that is, it is determined whether there are a large number of candidate fruit tree points in the cutting results. If there are a large number of candidate fruit tree points in the cutting results, an operation route cannot be generated based on the cutting results; if there are not a large number of candidate fruit tree points in the cutting results, an operation route can be generated based on the cutting results.
[0171] In a possible implementation, the cutting result may include each candidate fruit tree point and each candidate flight segment, and the process of evaluating the cutting result in step S10A may include sub-steps S10A1 to S10A3.
[0172] S10A1, calculate the ratio between the number of all candidate fruit tree points and the number of all fruit tree points to obtain an evaluation value.
[0173] S10A2: If the evaluation value is less than the set evaluation threshold, it is determined that the cutting result meets the set requirement.
[0174] S10A3: If the evaluation value is not less than the set evaluation threshold, it is determined that the cutting result does not meet the set requirement.
[0175] In this embodiment, the evaluation threshold can be set to 5% to 10%, and can be flexibly set by the user according to the actual fruit tree planting conditions (for example, topography, planting orientation, planting spacing, etc.), and the embodiment of the present application does not impose any restrictions on this.
[0176] In one possible scenario, the final cutting result that meets the set requirements is likely to contain a small number of candidate fruit tree points. When generating an operating route based on the cutting result, it is necessary to first insert each independent candidate fruit tree point into the candidate segment closest to itself, and then connect the obtained candidate segments into an operating route.
[0177] Therefore, the cutting result can be the first cutting result, the second cutting result, or the third cutting result, and the cutting result includes each candidate fruit tree point and each candidate flight segment. The process of generating an operation route based on the cutting results in steps S105, S108 and S112 may include sub-steps S1 to S2.
[0178] S1, insert each candidate fruit tree point into the candidate segment closest to itself.
[0179] In this embodiment, since the candidate segments are also obtained by connecting various fruit tree points, taking a candidate fruit tree point as an example, the fruit tree point closest to the candidate fruit tree point can be found in all candidate segments. For example, please refer to Fig.10 , for candidate fruit tree point 4, find the nearest fruit tree point 3; then, calculate the total length of the candidate segment before the candidate fruit tree point is inserted into the fruit tree point, and the total length of the candidate segment after the candidate fruit tree point is inserted into the fruit tree point. For example, calculate the total length of the candidate segment L1 when the candidate fruit tree point 4 is inserted before the fruit tree point 3, and the total length of the candidate segment L1 when the candidate fruit tree point 4 is inserted after the fruit tree point 3; then, insert the candidate fruit tree points into the candidate segments in a way that minimizes the total length. For example, when the candidate fruit tree point 4 is inserted after the fruit tree point 3, the total length of the candidate segment L1 is the smallest. Fig.10 As shown, candidate fruit tree point 4 is inserted after fruit tree point 3.
[0180] S2, connect all candidate segments according to the shortest distance to form an operating route.
[0181] In this embodiment, after each candidate fruit tree point is inserted into the candidate segment closest to itself, all candidate segments are connected according to the shortest distance, for example, Fig.10 As shown, the candidate segment L1 and the candidate segment L2 are connected to obtain the operating route.
[0182] For example, according to the route planning method described above, Figure 3 The various fruit tree points that need to be operated are shown, and the final operation route is planned as follows Fig.11 As shown, from Fig.11 It can be seen that the operating route is adapted to the direction of fruit tree planting, the number of turns is small, and the distance between adjacent fruit trees is not too long.
[0183] Compared with the prior art, the route planning method provided in the embodiment of the present application has the following beneficial effects:
[0184] First, the flight route is planned according to the specific location of each fruit tree, so that targeted operations can be carried out according to the differences of each fruit tree and precise spraying of each fruit tree can be achieved.
[0185] Then, the first route is planned starting from any vertex of the minimum circumscribed polygon formed by all the fruit tree points, and the segments in the first route formed by adjacent fruit tree points and whose distance difference with adjacent segments is greater than the distance threshold (i.e., segments with a longer distance between fruit tree points) and / or segments formed by adjacent fruit tree points and whose angles with adjacent segments are greater than the angle threshold (i.e., corner segments) are deleted. At the same time, an operating route is generated when the first cutting result meets the set requirements, thereby generating an operating route that is adapted to the fruit tree planting direction, has fewer turns, and whose distance between adjacent fruit trees is not too long, thereby improving operating efficiency.
[0186] Third, the route is cut based on the distance difference and angle between adjacent flight segments, rather than simply based on the distance of the flight segments. This is more in line with the actual planting conditions of fruit trees and can adapt to different types of fruit trees in different regions.
[0187] Fourth, the user does not need to specify the direction of fruit tree planting. Instead, planning is performed based on the minimum circumscribed polygon, and ultimately an operation route that is suitable for the direction of fruit tree planting can be generated.
[0188] Fifth, after the shortest distance point planning and the shortest distance point-line planning, and after changing the predicted direction of the fruit tree point, if the operation route still cannot be planned, the shortest distance sliding prediction planning is adopted. By predicting a virtual point to assist in finding the next point, route planning errors caused by missed recognition / misidentification of causal tree points can be avoided, making the planned route more in line with the flight direction of the drone and the planting direction of the fruit trees.
[0189] In order to execute the corresponding steps in the above method embodiment and each possible implementation mode, an implementation mode of a route planning device is given below.
[0190] Please refer to Fig.12 , Fig.12 The block diagram of the route planning device 100 provided in the embodiment of the present application is shown. The route planning device 100 is applied to an electronic device, and includes: an acquisition module 101, a generation module 102 and a route planning module 103.
[0191] The acquisition module 101 is used to acquire the location information of multiple fruit tree points in the plot to be operated.
[0192] The generating module 102 is used to generate the minimum circumscribed polygon of all the fruit tree points based on the location information of the multiple fruit tree points.
[0193] The route planning module 103 is used to:
[0194] Starting from any vertex of the minimum circumscribed polygon, perform greedy planning based on the shortest distance for all fruit tree points to obtain the first route;
[0195] The first route is cut to obtain a first cutting result; the cutting is used to delete a route formed by adjacent fruit tree points and having a distance difference with an adjacent route segment greater than a distance threshold, and / or a route formed by adjacent fruit tree points and having an angle with an adjacent route segment greater than an angle threshold;
[0196] If the first cutting result meets the set requirements, an operation route is generated based on the first cutting result.
[0197] Optionally, the route planning module 103 performs greedy planning based on the shortest distance for all fruit tree points starting from any vertex of the minimum circumscribed polygon to obtain the first route, including:
[0198] Take any vertex of the minimum circumscribed polygon as the target point;
[0199] Determine the reference fruit tree point closest to the target point, and connect the target point and the reference fruit tree point;
[0200] The target point is replaced by the reference fruit tree point, and the process returns to the step of determining the reference fruit tree point closest to the target point until all fruit tree points are traversed to obtain the first route.
[0201] Optionally, the first cutting result includes each first candidate fruit tree point and each first candidate flight segment; the route planning module 103 is further used for:
[0202] If the first cutting result does not meet the set requirements, greedy planning based on the shortest distance is performed on all first candidate fruit tree points and all first candidate flight segments to obtain the second route;
[0203] Performing a cutting process on the second route to obtain a second cutting result;
[0204] If the second cutting result meets the set requirements, an operation route is generated based on the second cutting result.
[0205] Optionally, the route planning module 103 performs greedy planning based on the shortest distance on all first candidate fruit tree points and all first candidate flight segments to obtain the second route, including:
[0206] Take any vertex of the minimum circumscribed polygon as the target point;
[0207] Determine a reference point that is closest to the target point, wherein the reference point is any first candidate fruit tree point or any endpoint of the first candidate flight segment;
[0208] Connect the target point with the reference point;
[0209] The target point is replaced by the reference point or the endpoint of the first candidate segment other than the reference point, and the step of determining the reference point closest to the target point is returned to be executed until all first candidate fruit tree points and all first candidate segments are traversed to obtain the second route.
[0210] Optionally, the route planning module 103 is further used for:
[0211] If the second cutting result does not meet the set requirements, the vertices of the minimum circumscribed polygon are changed, and greedy planning based on the shortest distance is cyclically performed on the current cutting result until a second cutting result that meets the set requirements is obtained.
[0212] Optionally, the route planning module 103 is further used for:
[0213] If the second cutting result obtained after traversing all vertices of the minimum circumscribed polygon still does not meet the set requirements, the current cutting result is subjected to greedy planning based on the shortest distance by using sliding prediction to obtain the third route;
[0214] Performing a cutting process on the third route to obtain a third cutting result;
[0215] If the third cutting result meets the set requirements, an operation route is generated based on the third cutting result.
[0216] Optionally, the current cutting result includes each current candidate fruit tree point and each current candidate route segment; the route planning module 103 performs greedy planning based on the shortest distance on the current cutting result in a sliding prediction manner to obtain the step of obtaining the third route, including:
[0217] Starting from any vertex of the minimum circumscribed polygon, connect the vertex with any current candidate fruit tree point or any endpoint of the current candidate flight segment that is closest to the vertex;
[0218] Get the location information of each traversed fruit tree point;
[0219] According to the location information of each traversed fruit tree point, predict the location information of the next virtual point;
[0220] Determine a reference point with the smallest distance between the distance superimposed virtual point and other untraversed fruit tree points, the reference point being any untraversed current candidate fruit tree point or any endpoint of the current candidate flight segment;
[0221] Connect the reference point with the last traversed fruit tree point, and return to execute the step of obtaining the position information of each traversed fruit tree point until all current candidate fruit tree points and all current candidate flight segments are traversed to obtain the third route.
[0222] Optionally, the route planning module 103 is further used for:
[0223] If the third cutting result does not meet the set requirements, the vertices of the minimum circumscribed polygon are changed, and the current cutting result is cyclically subjected to greedy planning based on the shortest distance by using a sliding prediction method until a third cutting result that meets the set requirements is obtained.
[0224] Optionally, the route planning module 103 is further used for:
[0225] If the third cutting result obtained after traversing all vertices of the minimum circumscribed polygon still does not meet the set requirements, the distance threshold and / or angle threshold is increased, and the step of performing greedy planning based on the shortest distance for all fruit tree points starting from any vertex of the minimum circumscribed polygon is returned until the first cutting result, the second cutting result or the third cutting result that meets the set requirements is obtained.
[0226] Optionally, the route planning module 103 is further used for:
[0227] The cutting result is evaluated, wherein the cutting result is the first cutting result, the second cutting result, or the third cutting result.
[0228] Optionally, the cutting result includes each candidate fruit tree point and each candidate flight segment; the route planning module 103 performs a method of evaluating the cutting result, including:
[0229] Calculate the ratio between the number of all candidate fruit tree points and the number of all fruit tree points to obtain an evaluation value;
[0230] If the evaluation value is less than the set evaluation threshold, it is determined that the cutting result meets the set requirements;
[0231] If the evaluation value is not less than the set evaluation threshold, it is determined that the cutting result does not meet the set requirements.
[0232] Optionally, the cutting result is a first cutting result, a second cutting result, or a third cutting result, and the cutting result includes each candidate fruit tree point and each candidate flight segment; the route planning module 103 executes a method of generating an operation route based on the cutting result, including:
[0233] Insert each candidate fruit tree point into the candidate segment closest to it;
[0234] Connect all candidate flight segments according to the shortest distance to form an operating route.
[0235] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the route planning device 100 described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0236] Please refer to Fig.13 , Fig.13 The electronic device 10 provided in the embodiment of the present application is shown in a block diagram. The electronic device 10 includes a processor 11, a memory 12 and a bus 13, and the processor 11 is connected to the memory 12 via the bus 13.
[0237] The memory 12 is used to store programs, such as Fig.12 The route planning device 100 shown includes at least one software function module that can be stored in the memory 12 in the form of software or firmware. After receiving the execution instruction, the processor 11 executes the program to implement the route planning method disclosed in the above embodiment.
[0238] The memory 12 may include a high-speed random access memory (RAM) and may also include a non-volatile memory (NVM).
[0239] The processor 11 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 11 or an instruction in the form of software. The above processor 11 may be a general processor, including a central processing unit (CPU), a microcontroller unit (MCU), a complex programmable logic device (CPLD), a field programmable gate array (FPGA), an embedded ARM and other chips.
[0240] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by the processor 11, the route planning method disclosed in the above embodiment is implemented.
[0241] In summary, the route planning method, device, electronic device and storage medium provided in the embodiments of the present application plan the route according to the specific location of each fruit tree point, so that targeted operations can be carried out according to the differences of each fruit tree, and precise spraying of each fruit tree can be achieved. At the same time, the first route is planned starting from any vertex of the minimum circumscribed polygon formed by all fruit tree points, and the segments in the first route formed by adjacent fruit tree points and the distance difference between the adjacent segments is greater than the distance threshold (that is, the segments with a longer distance between the fruit tree points) and / or the segments formed by adjacent fruit tree points and the angle between the adjacent segments is greater than the angle threshold (that is, the corner segments) are deleted. At the same time, when the first cutting result meets the set requirements, an operating route is generated, so that an operating route that is adapted to the fruit tree planting direction, has fewer turns, and the distance between adjacent fruit trees is not too long can be generated, thereby improving the operating efficiency.
[0242] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A route planning method, characterized in that: The method comprises: Obtain location information of multiple fruit tree points in the plot to be operated; Based on the location information of multiple fruit tree points, the minimum circumscribed polygon of all fruit tree points is generated; Starting from any vertex of the minimum circumscribed polygon, greedy planning based on the shortest distance is performed on all fruit tree points to obtain a first route; The first route is subjected to a cutting process to obtain a first cutting result; the cutting process is used to delete a route segment formed by adjacent fruit tree points and having a distance difference with an adjacent route segment greater than a distance threshold, and / or a route segment formed by adjacent fruit tree points and having an angle with an adjacent route segment greater than an angle threshold; If the first cutting result meets the set requirements, an operation route is generated based on the first cutting result.
2. The method according to claim 1, characterized in that The step of performing greedy planning based on the shortest distance on all fruit tree points starting from any vertex of the minimum circumscribed polygon to obtain the first route includes: Taking any vertex of the minimum circumscribed polygon as a target point; Determine a reference fruit tree point that is closest to the target point, and connect the target point and the reference fruit tree point; The target point is replaced by the reference fruit tree point, and the step of determining the reference fruit tree point closest to the target point is returned to be executed until all fruit tree points are traversed to obtain the first route.
3. The method according to claim 1, characterized in that The first cutting result includes each first candidate fruit tree point and each first candidate flight segment, and the method further includes: If the first cutting result does not meet the set requirements, greedy planning based on the shortest distance is performed on all first candidate fruit tree points and all first candidate flight segments to obtain a second route; performing the cutting process on the second route to obtain a second cutting result; If the second cutting result meets the set requirement, an operation route is generated based on the second cutting result.
4. The method according to claim 3, characterized in that The step of performing greedy planning based on the shortest distance on all first candidate fruit tree points and all first candidate flight segments to obtain the second route includes: Taking any vertex of the minimum circumscribed polygon as a target point; Determine a reference point that is closest to the target point, wherein the reference point is any one of the first candidate fruit tree points or any one of the endpoints of the first candidate flight segments; connecting the target point and the reference point; The target point is replaced by the reference point or the endpoint of the first candidate segment other than the reference point, and the step of determining the reference point closest to the target point is returned to be executed until all first candidate fruit tree points and all first candidate segments are traversed to obtain the second route.
5. The method according to claim 3, characterized in that The method further comprises: If the second cutting result does not meet the set requirements, the vertices of the minimum circumscribed polygon are changed, and greedy planning based on the shortest distance is cyclically performed on the current cutting result until a second cutting result that meets the set requirements is obtained.
6. The method according to claim 5, characterized in that The method further comprises: If the second cutting result obtained after traversing all vertices of the minimum circumscribed polygon still does not meet the set requirements, a sliding prediction method is used to perform greedy planning based on the shortest distance on the current cutting result to obtain a third route; performing the cutting process on the third route to obtain a third cutting result; If the third cutting result meets the set requirement, an operation route is generated based on the third cutting result.
7. The method according to claim 6, characterized in that The current cutting result includes each current candidate fruit tree point and each current candidate flight segment; The step of performing greedy planning based on the shortest distance on the current cutting result by using the sliding prediction method to obtain the third route includes: Starting from any vertex of the minimum circumscribed polygon, connecting the vertex with any current candidate fruit tree point or any endpoint of the current candidate flight segment that is closest to the vertex; Get the location information of each traversed fruit tree point; According to the location information of each traversed fruit tree point, predict the location information of the next virtual point; Determine a reference point where the distances to other untraversed fruit tree points are superimposed on the distances between the virtual point and other untraversed fruit tree points, wherein the reference point is any untraversed current candidate fruit tree point or any endpoint of the current candidate flight segment; Connect the reference point with the last traversed fruit tree point, and return to execute the step of obtaining the position information of each traversed fruit tree point until all current candidate fruit tree points and all current candidate flight segments are traversed to obtain the third route.
8. The method according to claim 6, characterized in that The method further comprises: If the third cutting result does not meet the set requirements, the vertices of the minimum circumscribed polygon are changed, and greedy planning based on the shortest distance is cyclically performed on the current cutting result by using a sliding prediction method until a third cutting result that meets the set requirements is obtained.
9. The method according to claim 8, characterized in that The method further comprises: If the third cutting result obtained after traversing all vertices of the minimum circumscribed polygon still does not meet the set requirements, the distance threshold and / or the angle threshold is increased, and the step of performing greedy planning based on the shortest distance for all fruit tree points starting from any vertex of the minimum circumscribed polygon is returned to execute until the first cutting result, the second cutting result or the third cutting result that meets the set requirements is obtained.
10. The method according to any one of claims 1 to 9, characterized in that: The method further comprises: The cutting result is evaluated, wherein the cutting result is the first cutting result, the second cutting result, or the third cutting result.
11. The method according to claim 10, characterized in that The cutting result includes each candidate fruit tree point and each candidate flight segment, and the step of evaluating the cutting result includes: Calculate the ratio between the number of all candidate fruit tree points and the number of all fruit tree points to obtain an evaluation value; If the evaluation value is less than the set evaluation threshold, it is determined that the cutting result meets the set requirement; If the evaluation value is not less than the set evaluation threshold, it is determined that the cutting result does not meet the set requirement.
12. The method according to any one of claims 1 to 9, characterized in that: The cutting result is a first cutting result, a second cutting result, or a third cutting result, and the cutting result includes each candidate fruit tree point and each candidate flight segment; The steps of generating an operation route based on the cutting results include: Insert each of the candidate fruit tree points into the candidate flight segment closest to itself; All candidate flight segments are connected according to the shortest distance to form the operating route.
13. A route planning device, characterized in that: The device comprises: An acquisition module is used to acquire the location information of multiple fruit tree points in the plot to be operated; A generation module, used for generating the minimum circumscribed polygon of all fruit tree points based on the location information of multiple fruit tree points; Route planning module for: Starting from any vertex of the minimum circumscribed polygon, greedy planning based on the shortest distance is performed on all fruit tree points to obtain a first route; The first route is subjected to a cutting process to obtain a first cutting result; the cutting process is used to delete a route segment formed by adjacent fruit tree points and having a distance difference with an adjacent route segment greater than a distance threshold, and / or a route segment formed by adjacent fruit tree points and having an angle with an adjacent route segment greater than an angle threshold; If the first cutting result meets the set requirements, an operation route is generated based on the first cutting result.
14. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a program, and the processor is used to implement the route planning method according to any one of claims 1 to 12 when executing the program.
15. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the route planning method as described in any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Route planning method and device, computer equipment and storage medium
CN112631338A
Spraying path planning method and apparatus
WO2022036863A1
Route planning method and apparatus, device, unmanned aerial vehicle and readable storage medium
WO2022141314A1
