Global path planning method, device and equipment for forest and orchard agricultural machinery navigation, medium and product

By optimizing the A* algorithm through the obstacle convex hull module and path smoothing module, the problems of high computational cost and path instability in path planning for agricultural machinery in orchards are solved, and efficient and smooth path search and operation are achieved.

CN120609379APending Publication Date: 2025-09-09ZHEJIANG UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510796550.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

The existing technology for path planning of agricultural machinery in orchards has the problems of high computational cost, slow and unstable path search, and especially ineffective search when encountering concave obstacles.

Method used

The obstacle convex hull module is used to transform concave obstacles into convex obstacles. The search simplification module is combined to reduce invalid search directions. The path continuity is optimized through the path smoothing module, and the improved A* algorithm is used for path planning.

Benefits of technology

It improves the efficiency of path planning and the smoothness of operation, reduces invalid searches and zigzag paths, and ensures that agricultural machinery operates efficiently and smoothly in orchards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120609379A_ABST
    Figure CN120609379A_ABST
Patent Text Reader

Abstract

The invention discloses a global path planning method and device for forest and orchard agricultural machinery navigation, equipment, a medium and a product, and relates to the technical field of path planning. The method comprises the following steps: determining convex hull grid map information according to an obtained grid map of a target forest and orchard, and further determining a boundary queue; selecting a node with the minimum evaluation function value as a current node, judging whether the current node is a target node or not, if yes, determining a grid map path based on the traceability dictionary, and performing path smoothing processing to obtain a final path, and if not, determining a path search direction based on convex hull grid map information, and all reachable neighborhood nodes of the current node are added to the boundary queue, and evaluation function values of all reachable neighborhood nodes are updated. And judging whether the updated boundary queue is empty or not, if not, taking the updated boundary queue as the boundary queue, and judging whether the boundary queue is a target node or not. The method aims at improving the path planning efficiency and the operation stability of the forest and orchard agricultural machinery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of path planning technology, and in particular to a global path planning method, device, equipment, medium and product for navigation of agricultural machinery in orchards. Background Art

[0002] Path planning is one of the core technologies for agricultural machinery navigation in orchards. Its goal is to plan the movement paths of agricultural machinery based on orchard environmental map information and operational requirements, with the goal of ensuring operational efficiency and safety. Depending on the scope of path planning, path planning can be divided into global path planning and local path planning. Point-to-point path planning methods for single robots can be broadly categorized as heuristic search-based algorithms (such as the A* algorithm and the Dijkstra algorithm) and sampling search-based algorithms (such as the RRT algorithm and the probabilistic roadmap algorithm). Heuristic search algorithms evaluate nodes in the map using a heuristic function and perform path search using the optimal strategy. Their advantage lies in shorter search paths and the ability to find optimal paths. However, in complex environments, as the number of search nodes increases, the computational complexity of heuristic search algorithms also increases. In high-dimensional spaces or large-scale maps, the computational cost is high, and path search is very slow. Sampling-based path planning methods expand the search space through random sampling, eliminating the need to construct a complete map grid. Therefore, they are more suitable for fast path search in complex environments and high-dimensional spaces. Furthermore, sampling-based path planning methods are often not restricted by discretized grids and are highly adaptable. However, their average path quality is poor, and the generated paths can be tortuous, often requiring additional steps to optimize the path. Furthermore, the results of sampling search algorithms are not certain from run to run, which can create further instability in agricultural machinery operations.

[0003] Therefore, it is crucial to improve the efficiency of agricultural machinery path planning and the smoothness of operations in orchards. Summary of the Invention

[0004] The purpose of this application is to provide a global path planning method, device, equipment, medium and product for navigation of agricultural machinery in orchards, which can improve the efficiency of path planning and the stability of operation of agricultural machinery in orchards.

[0005] To achieve the above objectives, this application provides the following solutions:

[0006] In a first aspect, the present application provides a global path planning method for navigation of agricultural machinery in orchards, comprising:

[0007] Obtain the raster map information of the target orchard;

[0008] Determining convex hull grid map information according to the grid map information;

[0009] Determine a boundary queue; the boundary queue is obtained by initializing a path search based on the convex hull grid map information and according to a preset starting point and end point; the boundary queue contains multiple nodes sorted according to the size of the evaluation function value;

[0010] Based on the boundary queue, selecting a node with the smallest evaluation function value as the current node, and determining whether the current node is a target node to obtain a first determination result;

[0011] If the first judgment result is yes, then determining the grid map path based on a tracing dictionary and performing path smoothing to obtain a final path; the tracing dictionary is determined based on the neighboring nodes corresponding to the node with the minimum total cost from the preset starting point to each other node;

[0012] If the first judgment result is no, determining the path search direction based on the convex hull grid map information, adding all reachable neighboring nodes of the current node to the boundary queue to obtain an updated boundary queue, and updating the evaluation function values ​​of all the reachable neighboring nodes;

[0013] Determine whether the updated boundary queue is empty, and obtain a second determination result;

[0014] If the second judgment result is yes, the planned path cannot be obtained;

[0015] If the second judgment result is no, the updated boundary queue is used as the boundary queue, and the step of "based on the boundary queue, selecting the node with the smallest evaluation function value as the current node, and judging whether the current node is the target node to obtain the first judgment result" is returned.

[0016] In a second aspect, the present application provides a global path planning device for navigation of agricultural machinery in orchards, comprising:

[0017] An information acquisition module is used to obtain the raster map information of the target orchard;

[0018] a convex hull grid map information determining module, configured to determine convex hull grid map information based on the grid map information;

[0019] A boundary queue determination module is used to determine a boundary queue; the boundary queue is obtained by initializing a path search based on the convex hull grid map information and according to a preset starting point and end point; the boundary queue contains multiple nodes sorted according to the size of the evaluation function value;

[0020] A first judgment module is configured to select a node with a minimum evaluation function value as a current node based on the boundary queue, and determine whether the current node is a target node to obtain a first judgment result;

[0021] a smoothing processing module configured to, when the first judgment result is yes, determine a raster map path based on a tracing dictionary and perform path smoothing to obtain a final path; the tracing dictionary is determined based on neighboring nodes corresponding to a node with the minimum total cost from a preset starting point to each other node;

[0022] An updating module, configured to, when the first judgment result is negative, determine a path search direction based on the convex hull grid map information, add all reachable neighboring nodes of the current node to the boundary queue to obtain an updated boundary queue, and update the evaluation function values ​​of all the reachable neighboring nodes;

[0023] A second judgment module is used to judge whether the updated boundary queue is empty and obtain a second judgment result;

[0024] a termination module, configured to stop processing if the second judgment result is yes and the planned path cannot be obtained;

[0025] The return module is used to use the updated boundary queue as the boundary queue and return to the "first judgment module" when the second judgment result is no.

[0026] In a third aspect, the present application provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the global path planning method for navigation of agricultural machinery in orchards as described above.

[0027] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned global path planning method for navigation of agricultural machinery in orchards.

[0028] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above-mentioned global path planning method for navigation of agricultural machinery in orchards.

[0029] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0030] This application provides a global path planning method, apparatus, device, medium, and product for agricultural machinery navigation in orchards. The method determines convex hull grid map information based on a grid map of the target orchard, and then determines a boundary queue. The method then selects the node with the smallest evaluation function value as the current node, determines whether the current node is the target node, and determines if the current node is the target node. If so, the grid map path is determined based on a tracing dictionary, and path smoothing is performed to obtain the final path. If not, the method determines the path search direction based on the convex hull grid map information, adds all reachable neighboring nodes of the current node to the boundary queue, and updates the evaluation function values ​​of all reachable neighboring nodes. The method then determines if the updated boundary queue is empty. If not, the updated boundary queue is used as the boundary queue, and a determination is made as to whether the node is the target node. This resolves the problem of invalid searches that may occur when encountering concave obstacles. Furthermore, the determination of the path search direction improves path planning efficiency. Path smoothing can smooth jagged paths in the grid map, ensuring smoother operation of agricultural machinery during path tracking. Thus, the method improves the efficiency and operational stability of path planning for agricultural machinery in orchards. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0032] Figure 1 Flowchart of the global path planning method for agricultural machinery navigation in orchards;

[0033] Figure 2 This is a schematic diagram of concave polygon obstacle search;

[0034] Figure 3 This is a schematic diagram of convex polygon obstacle search;

[0035] Figure 4 is a schematic diagram of the convex hull of the obstacle;

[0036] Figure 5 Schematic diagram of concave polygonal obstacle;

[0037] Figure 6 Schematic diagram of the convex hull of a concave polygonal obstacle;

[0038] Figure 7 A schematic diagram of the relationship between the orientation of the end point and the starting point and the search for neighboring nodes;

[0039] Figure 8 This is a schematic diagram corresponding to the B-spline curve smoothing algorithm example;

[0040] Figure 9 This is the overall flow chart of the global path planning method;

[0041] Figure 10 A structural diagram of a global path planning device for navigation of agricultural machinery in orchards;

[0042] Figure 11 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0044] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0045] In an exemplary embodiment, Figure 1 As shown, a global path planning method for agricultural machinery navigation in orchards is provided, including:

[0046] Step 100: Obtain raster map information of the target orchard.

[0047] Step 200: Determine convex hull grid map information according to the grid map information.

[0048] The convex hull grid map information is determined according to the grid map information, specifically including:

[0049] The obstacle search method is used to search and traverse the grid map information. When an obstacle grid is encountered, the encroachment information of different obstacles on the grid map is classified and stored in a list to obtain a list of grid coordinates occupied by each obstacle.

[0050] The obstacle contour point acquisition algorithm is used to determine the obstacle boundary grid coordinate list based on the grid coordinate list occupied by each obstacle.

[0051] The obstacle convex hull algorithm is used to determine the grid coordinate list of the obstacle convex hull according to the obstacle boundary grid coordinate list, and the convex hull grid map information is obtained.

[0052] As an optional implementation, an obstacle convex hull algorithm is used to determine the grid coordinate list of the obstacle convex hull based on the obstacle boundary grid coordinate list to obtain convex hull grid map information, specifically including:

[0053] Based on all the contour points in the obstacle boundary grid coordinate list, a base point is selected based on the set rules; the base point is used as the starting point.

[0054] The cosine theorem is used to determine the angle between the line connecting the contour points outside the base point and the base point and the positive x-axis, and the points are sorted in ascending order according to the angle to obtain a sorted list of contour points.

[0055] According to the sorted list of contour points, a contour point is randomly selected as the current point based on the sorting order, and the vector cross product between the current point and the two top points in the convex hull stack is determined to be positive; the convex hull stack is used to store the contour points of the convex hull.

[0056] If yes, add the current point to the convex hull stack; if no, pop the current point out of the stack contour point.

[0057] Fill the convex hull stack, determine the corresponding convex hull, and obtain the convex hull grid map information.

[0058] As an optional implementation, the cv2.fillPoly() function is used to fill the convex hull stack, determine the corresponding convex hull, and obtain the convex hull grid map information.

[0059] Step 300: Determine a boundary queue. This boundary queue is obtained by initializing a path search based on the convex hull grid map information and the preset starting and ending points. The boundary queue contains multiple nodes sorted by the value of an evaluation function. The evaluation function uses a cost function, which is a calculation formula corresponding to the Euclidean distance.

[0060] Step 400: Based on the boundary queue, select the node with the smallest evaluation function value as the current node, and determine whether the current node is the target node to obtain a first determination result.

[0061] Step 500: If the first judgment result is yes, the grid map path is determined based on the tracing dictionary and smoothed to obtain the final path. The tracing dictionary is determined based on the neighborhood nodes corresponding to the node with the lowest total cost from the starting point to each other node. Optionally, the grid map path is smoothed using a B-spline method to obtain the final path.

[0062] Step 600: If the first judgment result is no, the path search direction is determined based on the convex hull grid map information, and all reachable neighboring nodes of the current node are added to the boundary queue to obtain an updated boundary queue, and the evaluation function values ​​of all reachable neighboring nodes are updated.

[0063] Step 700: Determine whether the updated boundary queue is empty, and obtain a second determination result.

[0064] Step 800: If the second judgment result is yes, the planned path cannot be obtained.

[0065] Step 900 : If the second judgment result is no, the updated boundary queue is used as the boundary queue, and the process returns to step 400 .

[0066] The agricultural environment changes slowly, placing low demands on real-time global path planning. Agricultural machinery typically has ample time to perform global path planning within a known environment before departure. Heuristic search algorithms not only meet the efficiency requirements of agricultural machinery, but also typically generate the same path each time they run, making them more suitable for tasks in orchards that require repetitive operations along the same path, such as weeding, irrigation, and pesticide application. Therefore, using heuristic search algorithms for point-to-point path planning for agricultural machinery has particular practical value in orchards.

[0067] The A* algorithm is an efficient heuristic search algorithm that is widely used in path planning problems for agricultural machinery. It introduces the idea of ​​the greedy algorithm into the Dijkstra algorithm in the form of a heuristic function, which can reduce the search space while ensuring the optimal path is found, thereby improving search efficiency. When encountering obstacles with concave polygonal outlines, the classic A* algorithm will misestimate the cost from the concave part of the obstacle to the target node due to its introduction of the greedy algorithm, causing the path search to fall into the concave part of the obstacle, and the algorithm to perform an invalid search. However, for convex polygonal obstacles, no invalid search will be performed, such as Figure 2 and Figure 3 shown.

[0068] When searching for a path, the classic A* algorithm will traverse the values ​​of all reachable neighboring nodes based on the current node. However, in a normal forest orchard environment, the scale of obstacles is small compared to the entire map, and the optimal path can be found without looking back during path planning. Even if the A* algorithm traverses and sorts the values ​​of all 8 neighboring nodes when searching for a path, the resulting path usually only extends in the direction of 5 of the neighboring nodes. This is because the angles between the other 3 directions and the direction of the path planning target point pointed by the current node are greater than 90°. In order to obtain the optimal solution, the final path will not take a "backtrack" with a longer path length. However, when traversing the neighboring nodes in these 3 directions, their evaluation functions F(n) are also involved in the calculation. In a path search, for most current nodes, the evaluation function H(n) values ​​of these three neighboring nodes will be greater than the evaluation function H(n) values ​​of the remaining five neighboring nodes. Since the eight nodes have the same path cost G(n), their evaluation function F(n) values ​​will be greater than the evaluation function F(n) values ​​of the remaining five neighboring nodes. This results in the priority of these three neighboring nodes being lower than that of the remaining five neighboring nodes in the boundary queue, and subsequent searches will hardly use the information of these three neighboring nodes. The related calculations of these three nodes become a waste of computing resources.

[0069] Because this application uses grid-map-based path planning, the generated paths often take the form of broken lines, lacking fluidity and naturalness. Frequent changes in direction can result in unnecessary and complex movements, significantly impacting the operational stability of agricultural machinery. Therefore, in grid-map path planning, a path smoothing algorithm can effectively optimize path continuity, reduce sharp turns, and improve path feasibility.

[0070] In practical applications, this application proposes three modules for fast global path planning of agricultural machinery in orchards, namely the obstacle convex hull module, the search simplification module and the path smoothing module, which can quickly perform point-to-point smooth path search efficiency on the orchard map. For agricultural robots equipped with edge computing terminals or single-chip microcomputers as control units, only a small amount of computing resources are required to perform fast smooth path planning.

[0071] To enable rapid path planning in orchards, this application improves the A* algorithm, increasing path search speed and smoothness. The obstacle convex hull module and search simplification module can significantly improve the A* algorithm's search efficiency. The path smoothing module can optimize the paths generated by raster maps and improve the smoothness of agricultural machinery navigation. For agricultural robots equipped with edge computing terminals or single-chip microcomputers as control units, this application only requires a small amount of computing resources to perform fast and smooth point-to-point path planning.

[0072] 1. Obstacle convex hull module.

[0073] To address the problem of the A* algorithm failing to search concave obstacles, this application designs an obstacle convex hull module, which converts concave polygons in the map into convex ones. This module improves the path search performance of the improved A* algorithm and can be applied to the map pre-processing of the classic A* algorithm to accelerate the search speed of the classic A* algorithm. The obstacle convex hull module mainly consists of three algorithms: the obstacle search algorithm, the obstacle contour point acquisition algorithm, and the obstacle convex hull algorithm.

[0074] The obstacle search algorithm takes grid map information as input and outputs a list of grid coordinates occupied by each obstacle. First, a breadth-first search is used to traverse the grid map information. When an obstacle grid is encountered, the grid map encroachment information of each obstacle is classified and stored in a list.

[0075] The obstacle contour point acquisition algorithm takes as input a list of grid coordinates occupied by each obstacle and outputs a list of grid coordinates representing the obstacle's boundaries. The corresponding judgment method is to determine whether the four adjacent grids above, below, left, and right are also occupied by the obstacle. If at least one adjacent grid is not occupied by the obstacle, the current grid is considered an obstacle boundary point. The list of grid coordinates occupied by the obstacle is traversed, and the boundary points are stored in a new list and output.

[0076] The convex hull of an obstacle is the smallest convex polygon that contains all the pixels of a given obstacle. On a grid map, you can imagine the convex hull as a "rubber band" that wraps around the obstacle, such as Figure 4 As shown, the blue part is the obstacle, and the red line is the convex hull of the obstacle map.

[0077] The obstacle convex hull algorithm takes as input the coordinates of the obstacle outline (a list of grid coordinates of the obstacle boundary) and outputs a list of grid coordinates of the obstacle convex hull. The specific process is as follows.

[0078] Select base point: Select the point with the smallest y coordinate among all input contour points as the starting point. If multiple points have the same y coordinate, select the point with the smallest x coordinate.

[0079] Sorting: Use the law of cosines to calculate the angle between the line connecting the contour points other than the starting point (base point) and the starting point and the positive x-axis, sort them from small to large according to the angle, and store them in the contour point sorting list.

[0080] Initialize the convex hull stack: Use a stack to store the current convex hull. During initialization, push the starting point and the first contour point in the list into the stack.

[0081] Construct the convex hull: Take a contour point from the sorted list of contour points in order as the current point. If the current point forms a left-turn relationship with the two points at the top of the stack (the vector cross product is positive), push the point onto the stack; otherwise, pop the contour point from the stack. Repeat this step until the sorted list of contour points is traversed.

[0082] Use the cv2.fillPoly() function to fill the convex hull stack and obtain the convex hull corresponding to the concave polygon obstacle to obtain the convex hull raster map information.

[0083] Figure 5 and Figure 6 This is an example of the convex hull algorithm for concave polygonal obstacles. Figure 5 Here are two example obstacles before running the convex hull algorithm; Figure 6 After running the convex hull algorithm, the obstacle convex hull replaces the obstacle. It can be seen that the two concave polygon obstacles have been "filled" into convex polygons.

[0084] 2. Search for simplified modules.

[0085] To address the problem of ineffective search in the A* algorithm, the 8-node neighborhood search algorithm is simplified to 5 nodes, which can significantly improve the speed of path search. The input of the search simplification module is the coordinates of the end point and the starting point, and the output is the positional relationship between the 5 neighborhood nodes and the current node in the search direction. With the agricultural machinery starting point as the center, the map is divided into eight equal parts. The search direction is determined according to the part where the end point is located. When searching for a path, only five neighborhood nodes are searched in the direction of the end point, such as Figure 4 As shown. Figure 7 For example, the end point (yellow dot) is in the area to the right of the starting point (red dot). The nodes traversed during the path search are neighboring node 2, neighboring node 3, neighboring node 5, neighboring node 7, and neighboring node 8.

[0086] 3. Path smoothing module.

[0087] The B-spline-based method is used to optimize the path generated by the improved A* algorithm based on the grid map, generating a continuous and smooth path. The input is the list of path points generated by the improved A* algorithm in the grid map by the two modules above, and the output is the list of smoothed path point coordinates. The specific effect is as follows Figure 8 As shown in the figure, the red dots and red dotted lines are examples of path points and paths generated by the improved A* algorithm, and the blue solid line is the path smoothed by the B-spline curve method.

[0088] Based on the above three modules, the overall process of the fast global path planning method for agricultural machinery navigation in orchards is as follows: Figure 9 shown.

[0089] ① Use the obstacle convex hull module to transform the concave obstacles in the grid map (grid map information) into convex obstacles to obtain the convex hull grid map.

[0090] ② Get the starting point and end point of the path. According to the orientation of the end node and the starting node, use the search simplification module to determine the path search direction. The output is the position relationship between the five neighboring nodes and the current node in the search direction.

[0091] ③ Initialize path search: Create a boundary queue to store the map boundary nodes that have been searched, and sort the nodes according to the value of the evaluation function F(n), determine the next search node, store the path starting point node in the boundary queue, and set its initial evaluation function F(n) value (usually 0); create a traceback dictionary to store the neighboring nodes of each node that minimize the total cost to reach this node (minimum F(n) value); create a cost dictionary to record the minimum cost to reach each node (minimum F(n) value).

[0092] ④ From the boundary queue, take out the node with the smallest evaluation function F(n) value as the current node.

[0093] ⑤ Determine whether the current node is the target node (path end point). If so, find the grid map path according to the tracing dictionary.

[0094] ⑥ According to the convex hull grid map obtained by the obstacle convex hull module and the path search direction obtained by the search simplification module, all reachable neighboring nodes of the current node are added to the boundary queue and their evaluation function F(n) value is calculated.

[0095] ⑦If this is the first time to calculate the evaluation function F(n) value of the neighborhood node, or its evaluation function F(n) value is less than the original evaluation function F(n) value, then update the evaluation function F(n) value of the neighborhood node in the boundary queue and cost dictionary, and update the source of the neighborhood node to the current node in the tracing dictionary.

[0096] Repeat steps ④-⑦ until the boundary queue is empty, and no path can be found.

[0097] If there is a path from the start point to the end point, the path smoothing module is used to smooth the path and output the final path.

[0098] This application proposes an A* algorithm with an obstacle convex hull module, a search simplification module, and a path smoothing module. The obstacle convex hull module addresses the invalid search problem that can occur with the A* algorithm when encountering concave obstacles. The search simplification module reduces unnecessary search directions, improving path planning efficiency. The path smoothing module smoothes jagged paths on raster maps, ensuring smoother path tracking for agricultural machinery.

[0099] Path planning is one of the core technologies for agricultural machinery navigation in orchards. Its goal is to plan the movement path of agricultural machinery based on the orchard environment map information and operation requirements, with the goal of operation efficiency and safety. In response to the problem of invalid search of the traditional A* algorithm in the orchard environment, this application proposes an obstacle convex hull module and a search simplification module, which can perform convex hull processing on concave obstacles and reduce invalid path search directions, thereby improving path planning efficiency. In response to the problem of jagged paths generated by raster maps, a path smoothing module is proposed, which can optimize the paths generated by the A* algorithm in the raster map, making them more suitable for agricultural machinery operations and improving operation stability and safety.

[0100] In general, this application can quickly generate a smooth global path for agricultural machinery based on the raster map of the orchard, thereby improving the efficiency of path planning and the smoothness of operation of agricultural machinery in the orchard.

[0101] In an exemplary embodiment, Figure 10 As shown, a global path planning device for navigation of agricultural machinery in orchards is provided, comprising:

[0102] The information acquisition module is used to obtain the raster map information of the target forest and orchard.

[0103] The convex hull grid map information determination module is used to determine the convex hull grid map information according to the grid map information.

[0104] The boundary queue determination module is used to determine the boundary queue; the boundary queue is obtained by initializing the path search based on the convex hull grid map information and the preset starting and ending points; the boundary queue contains multiple nodes sorted according to the size of the evaluation function value.

[0105] The first judgment module is used to select a node with the smallest evaluation function value as the current node based on the boundary queue, and judge whether the current node is the target node to obtain a first judgment result.

[0106] The smoothing processing module is used to determine the grid map path based on the tracing dictionary and perform path smoothing to obtain the final path when the first judgment result is yes; the tracing dictionary is determined based on the neighboring nodes corresponding to the node with the minimum total cost from the preset starting point to each other node.

[0107] The update module is used to determine the path search direction based on the convex hull grid map information when the first judgment result is no, and add all reachable neighboring nodes of the current node to the boundary queue to obtain an updated boundary queue, and update the evaluation function values ​​of all reachable neighboring nodes.

[0108] The second judgment module is used to judge whether the updated boundary queue is empty and obtain a second judgment result.

[0109] The termination module is used to stop processing when the second judgment result is yes and the planned path cannot be obtained.

[0110] The return module is used to use the updated boundary queue as the boundary queue and return to the "first judgment module" when the second judgment result is no.

[0111] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 11As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store global path planning data for navigation of agricultural machinery in orchards. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a global path planning method for navigation of agricultural machinery in orchards is implemented.

[0112] Those skilled in the art will understand that Figure 11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0113] In an exemplary embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0114] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0115] In an exemplary embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0116] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0117] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0118] The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may include, but are not limited to, general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic units, data processing logic units based on quantum computing, and the like.

[0119] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0120] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method and core concept of this application. At the same time, for those skilled in the art, based on the concept of this application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A global path planning method for agricultural machinery navigation in orchards, characterized in that: include: Obtain the raster map information of the target orchard; Determining convex hull grid map information according to the grid map information; Determine a boundary queue; the boundary queue is obtained by initializing a path search based on the convex hull grid map information and according to a preset starting point and end point; the boundary queue contains multiple nodes sorted according to the size of the evaluation function value; Based on the boundary queue, selecting a node with the smallest evaluation function value as the current node, and determining whether the current node is a target node to obtain a first determination result; If the first judgment result is yes, determining the grid map path based on the tracing dictionary and performing path smoothing to obtain the final path; The tracing dictionary is determined based on the neighboring nodes corresponding to the node with the minimum total cost from the preset starting point to each other node; If the first judgment result is no, determining the path search direction based on the convex hull grid map information, adding all reachable neighboring nodes of the current node to the boundary queue to obtain an updated boundary queue, and updating the evaluation function values ​​of all the reachable neighboring nodes; Determine whether the updated boundary queue is empty, and obtain a second determination result; If the second judgment result is yes, the planned path cannot be obtained; If the second judgment result is no, the updated boundary queue is used as the boundary queue, and the step of "based on the boundary queue, selecting the node with the smallest evaluation function value as the current node, and judging whether the current node is the target node to obtain the first judgment result" is returned.

2. The global path planning method for agricultural machinery navigation in orchards according to claim 1 is characterized in that: Determining the convex hull grid map information according to the grid map information specifically includes: An obstacle search method is used to search and traverse the grid map information. When an obstacle grid is encountered, the encroachment information of different obstacles on the grid map is classified and stored in a list to obtain a list of grid coordinates occupied by each obstacle. Adopting the obstacle contour point acquisition algorithm, the obstacle boundary grid coordinate list is determined based on the grid coordinate list occupied by each obstacle; The obstacle convex hull algorithm is used to determine the grid coordinate list of the obstacle convex hull according to the obstacle boundary grid coordinate list, and the convex hull grid map information is obtained.

3. The global path planning method for agricultural machinery navigation in orchards according to claim 2 is characterized in that: The obstacle convex hull algorithm is used to determine the grid coordinate list of the obstacle convex hull based on the obstacle boundary grid coordinate list, and obtain the convex hull grid map information, which specifically includes: Selecting a base point based on all the contour points in the obstacle boundary grid coordinate list based on a set rule; the base point serves as the starting point; Using the law of cosines, determine the angle between the line connecting the contour points other than the base point and the base point and the positive x-axis, and sort the contour points in ascending order according to the angle to obtain a sorted list of contour points; According to the sorted list of contour points, a contour point is randomly selected as a current point based on the sorting order, and a vector cross product between the current point and two top points in a convex hull stack is determined to be positive; the convex hull stack is used to store the contour points of the convex hull; If so, add the current point to the convex hull stack; If not, pop the current point off the stack contour point; The convex hull stack is filled, the corresponding convex hull is determined, and convex hull grid map information is obtained.

4. The global path planning method for agricultural machinery navigation in orchards according to claim 3 is characterized in that: The cv2.fillPoly() function is used to fill the convex hull stack, determine the corresponding convex hull, and obtain the convex hull grid map information.

5. The global path planning method for agricultural machinery navigation in orchards according to claim 1, characterized in that: The B-spline method is used to smooth the raster map path to obtain the final path.

6. The global path planning method for agricultural machinery navigation in orchards according to claim 1, characterized in that: The evaluation function uses the Euclidean distance formula in the cost function.

7. A global path planning device for agricultural machinery navigation in orchards, characterized in that: include: An information acquisition module is used to obtain the raster map information of the target orchard; a convex hull grid map information determining module, configured to determine convex hull grid map information based on the grid map information; A boundary queue determination module is used to determine a boundary queue; the boundary queue is obtained by initializing a path search based on the convex hull grid map information and according to a preset starting point and end point; the boundary queue contains multiple nodes sorted according to the size of the evaluation function value; A first judgment module is configured to select a node with a minimum evaluation function value as a current node based on the boundary queue, and determine whether the current node is a target node to obtain a first judgment result; a smoothing processing module, configured to determine a raster map path based on a tracing dictionary and perform path smoothing processing to obtain a final path when the first judgment result is yes; The tracing dictionary is determined based on the neighboring nodes corresponding to the node with the minimum total cost from the preset starting point to each other node; An updating module, configured to, when the first judgment result is negative, determine a path search direction based on the convex hull grid map information, add all reachable neighboring nodes of the current node to the boundary queue to obtain an updated boundary queue, and update the evaluation function values ​​of all the reachable neighboring nodes; A second judgment module is used to judge whether the updated boundary queue is empty and obtain a second judgment result; a termination module, configured to stop processing if the second judgment result is yes and the planned path cannot be obtained; The return module is used to use the updated boundary queue as the boundary queue and return to the "first judgment module" when the second judgment result is no.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the global path planning method for navigation of agricultural machinery in orchards as claimed in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the global path planning method for navigation of agricultural machinery in orchards described in any one of claims 1-6 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the global path planning method for navigation of agricultural machinery in orchards described in any one of claims 1-6 is implemented.

Citation Information

Cited By

  • Aircraft route planning method and device, computer equipment and storage medium

    CN121252798A