Path planning optimization method, device, equipment and medium for paddy field weeding robot
By constructing a full-coverage path point set, bundling barrier-free path points, and optimizing the path direction and length, a path planning method for paddy field weeding robots solves the problem of resource waste when weed growth density is low, and achieves efficient weeding operation path planning.
Patent Information
- Application Number
- CN202411492703.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-10-24
AI Technical Summary
In the prior art, when weeds grow at a low density or are locally distributed, a simple reciprocating covering path may lead to a waste of resources.
A path planning optimization method for a paddy field weeding robot is adopted. By constructing a full-coverage path point set, bundling an obstacle-free path point set, retaining the shortest obstacle-free path to the target operation location, combining the improved PRM algorithm and A* graph search algorithm, optimizing the path direction and length, and finally performing smoothing to form the optimal weeding operation path.
It optimizes the path length, reduces resource waste, improves the efficiency and practicality of path planning, effectively avoids obstacles, and forms an efficient and optimal weeding operation path.
Smart Images

Figure CN119413172B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of agricultural production, and in particular to a path planning optimization method for a paddy field weeding robot, a corresponding device, an electronic device, and a computer-readable storage medium. Background Art
[0002] During rice production, weeds in rice fields grow vigorously, which not only poses a serious threat to the growth of rice, but also provides good conditions for the breeding of pests and diseases. Weeding is an important part of field management, and path planning is one of the key steps to achieve autonomous weeding by robots. How to intelligently and accurately remove these weeds to reduce damage to the environment has become a focus of widespread attention among researchers.
[0003] In fields with dense weed cover, the traditional reciprocating mulching path is the most effective path. However, when the weed growth density is low or locally distributed, the simple reciprocating mulching path will result in considerable waste of resources.
[0004] In summary, the applicant has made corresponding explorations to solve the problem that when the weed growth density is low or the weeds are locally distributed, the simple reciprocating covering path in the prior art will lead to considerable waste of resources. Summary of the Invention
[0005] The purpose of this application is to solve the above problems and provide a path planning optimization method for a paddy field weeding robot, a corresponding device, an electronic device and a computer-readable storage medium.
[0006] In order to meet the various objectives of this application, this application adopts the following technical solutions:
[0007] A paddy field weeding robot path planning optimization method proposed to meet one of the purposes of this application includes:
[0008] In response to an instruction to perform path planning optimization on the paddy field weeding robot, each grid area to be covered within the paddy field to be weeded, path points corresponding to the grid areas to be covered, and a target operation position point are obtained, and the path points corresponding to each grid area to be covered are sequentially sorted to construct a full coverage path point set, wherein the side length of the grid area to be covered is R;
[0009] Traverse all the path points in the full coverage path point set in sequence according to the preset direction. If the distance between two adjacent path points in the full coverage path point set is less than Then, the two adjacent path points are bundled into corresponding barrier-free path point sets to determine a plurality of barrier-free path point sets, wherein the barrier-free path point sets correspond one-to-one to barrier-free paths, and the barrier-free paths are constructed by one or more path points;
[0010] Retaining path points in the obstacle-free path point set that are on the same horizontal line as the target work location point to determine the shortest obstacle-free path, so as to construct a first obstacle-free path set and its corresponding first start-end point set, wherein the first obstacle-free path set includes multiple shortest obstacle-free paths, and the first start-end point set includes the starting point of each shortest obstacle-free path and its corresponding end point;
[0011] Based on the preset path direction judgment strategy, the path direction of the shortest obstacle-free path is determined according to the first obstacle-free path set and its corresponding first starting and ending point set, so as to determine the second obstacle-free path set and its corresponding second starting and ending point set, and the starting point and end point of each obstacle avoidance path, wherein the second obstacle-free path set is constructed by multiple shortest obstacle-free paths with determined path directions, and the first obstacle-free path set is C = {C1, C2, ..., C i}, the first starting and ending point set U={{S1,E1},{S2,E2},...,{S i ,E i}}, wherein the S i Represents the shortest obstacle-free path C i The starting point, E i Represents the shortest obstacle-free path C i The end point of the second obstacle-free path set is The second starting and ending point set is U′={{S'1,E'1},{S'2,E'2},...,{S' i ,E' i}}, wherein the S' i The shortest obstacle-free path with a determined path direction The starting point, E' i The shortest obstacle-free path with a determined path direction The end point, C1, Indicates the starting point of weeding operations;
[0012] The path direction determination strategy includes:
[0013] Determine U i as well as in, U i Indicates the new start and end point set obtained by deleting the start and end point of the current path from the previous start and end point set. express The shortest obstacle-free path, Indicates the starting point of the current path. Indicates the end point of the current path;
[0014] Traverse the U i Find the same The point S′ with the minimum Euclidean distance, if S′ is the original starting point of the shortest obstacle-free path but It is a positive sequence, and the path direction is consistent with the original path direction;
[0015] If S′ is the original end point of the shortest obstacle-free path but In reverse order, the path direction is opposite to the original path direction;
[0016] The determined path sequence Add to the final path set P and repeat the above steps until U i-1 Is an empty set, get the second obstacle-free path set And its corresponding second starting and ending point set U′={{S'1,E'1},{S'2,E'2},...,{S' i ,E' i}};
[0017] The PRM algorithm based on the introduction of the artificial potential field method determines the route map according to the sampling point data and the connectivity radius, and uses the improved A* graph search algorithm to find the shortest obstacle-avoiding path connecting the starting point and the end point of each obstacle-avoiding path in the route map. The shortest obstacle-free path with the determined path direction in the second obstacle-free path set is connected with the shortest obstacle-avoiding path in sequence to determine the optimal weeding operation path, thereby completing the path planning optimization of the paddy field weeding robot.
[0018] Optionally, after the step of determining the second obstacle-free path set and its corresponding second starting and ending point set, and the starting point and ending point of each obstacle avoidance path, the following steps are included:
[0019] The preset shortest trajectory planning algorithm is used to obtain the second obstacle-free path set C * The shortest connecting trajectory A of two adjacent shortest obstacle-free paths i , wherein the shortest trajectory planning algorithm includes:
[0020]
[0021] Wherein, σ is the obstacle avoidance path planning algorithm, which includes the PRM algorithm with artificial potential field method and the improved A* graph search algorithm, d i For E' i-1 Pointing to S i ' vector, R m Represents the connectivity radius of the PRM algorithm.
[0022] Optionally, the steps of determining the roadmap based on the sampling point data and the connectivity radius based on the PRM algorithm using the artificial potential field method include:
[0023] when When the PRM algorithm based on the artificial potential field method randomly generates nodes n from the state space M i , get a set of valid sampling points N, where i = 1, 2, ..., N;
[0024] The state space is regarded as a virtual force field. The sampling points inside the obstacle are subject to the gravitational force of the sampling points in the free space and the repulsive force of the obstacle center, gradually moving toward the outside of the obstacle and eventually becoming valid sampling points in the free space to determine the sampling point data.
[0025] For each pair of sampling points X i and X j , when d=(X i, X j ) is less than or equal to R m When the sampling point X i and sampling point X j Establish an undirected edge between them, where d=(X i, X j ) represents the sampling point X i and X j the distance between them;
[0026] Based on the above steps, we finally get a roadmap G(V,E), where V is the node set and E is the edge set.
[0027] Optionally, the step of using an improved A* graph search algorithm to find the shortest obstacle-avoiding path connecting the starting point and the end point of each obstacle-avoiding path in the roadmap, and sequentially connecting the shortest obstacle-free paths with the determined path directions in the second obstacle-free path set with the shortest obstacle-avoiding paths to determine the optimal weeding operation path includes:
[0028] The heuristic function of the improved A* graph search algorithm includes:
[0029]
[0030] ω1+ω2+ω3=1,
[0031] Among them, ω i is the weight of each optimization objective, including overlap rate, path length and cumulative turning angle, f i is the converted objective function, γ1 is the overlap rate, γ2 is the path length, F(x) is the heuristic function, r is the turning radius, η is the energy coefficient of the steering control system, and i = 1, 2, 3.
[0032] Optionally, after the step of sequentially connecting the shortest obstacle-free path with the determined path direction and the shortest obstacle-avoiding path in the second obstacle-free path set to determine the optimal weeding operation path, the method includes:
[0033] The optimal weeding operation path is smoothed using a Bezier curve to determine the optimal weeding operation path after smoothing, thereby completing the path planning optimization of the paddy field weeding robot.
[0034] A paddy field weeding robot path planning and optimization device provided for another purpose of the present application includes:
[0035] A grid area acquisition module is configured to respond to an instruction for performing path planning optimization on the paddy field weeding robot. The grid area acquisition module is configured to respond to an instruction for performing path planning optimization on the paddy field weeding robot, acquire each grid area to be covered within the paddy field to be weeded, path points corresponding to the grid area to be covered, and a target operation position point, and sequentially sort the path points corresponding to each grid area to be covered to construct a full coverage path point set, wherein the side length of the grid area to be covered is R;
[0036] The barrier-free path point determination module is configured to sequentially traverse all path points in the full coverage path point set in a preset direction. If the distance between two adjacent path points in the full coverage path point set is less than Then, the two adjacent path points are bundled into corresponding barrier-free path point sets to determine a plurality of barrier-free path point sets, wherein the barrier-free path point sets correspond one-to-one to barrier-free paths, and the barrier-free paths are constructed by one or more path points;
[0037] a first path set determination module, configured to retain path points in the obstacle-free path point set that are on the same horizontal line as the target work location point to determine the shortest obstacle-free path, so as to construct a first obstacle-free path set and a corresponding first start-end point set, wherein the first obstacle-free path set includes multiple shortest obstacle-free paths, and the first start-end point set includes a start point of each shortest obstacle-free path and its corresponding end point;
[0038] The second path set determination module is configured to determine the path direction of the shortest obstacle-free path according to the first obstacle-free path set and its corresponding first starting and ending point set based on a preset path direction judgment strategy, so as to determine the second obstacle-free path set and its corresponding second starting and ending point set, and the starting point and end point of each obstacle avoidance path, wherein the second obstacle-free path set is constructed by multiple shortest obstacle-free paths with determined path directions, and the first obstacle-free path set is C = {C1, C2, ..., C i}, the first starting and ending point set U={{S1,E1},{S2,E2},...,{S i ,E i}}, wherein the S i Represents the shortest obstacle-free path C i The starting point, E i Represents the shortest obstacle-free path C i The end point of the second obstacle-free path set is The second starting and ending point set is U′={{S'1,E'1},{S'2,E'2},...,{S' i ,E' i}}, wherein the S' i The shortest obstacle-free path with a determined path direction The starting point, E' i The shortest obstacle-free path with a determined path direction The end point, C1, Indicates the starting point of weeding operations;
[0039] The path direction determination strategy includes:
[0040] Determine U i as well as in, U i Indicates the new start and end point set obtained by deleting the start and end point of the current path from the previous start and end point set. express The shortest obstacle-free path, Indicates the starting point of the current path. Indicates the end point of the current path;
[0041] Traverse the U i Find the same The point S with the smallest Euclidean distance ′ , if the S ′ is the original starting point of the shortest obstacle-free path but It is a positive sequence, and the path direction is consistent with the original path direction;
[0042] If the S ′ is the original end point of the shortest obstacle-free path but In reverse order, the path direction is opposite to the original path direction;
[0043] The determined path sequence Add to the final path set P and repeat the above steps until U i-1 Is an empty set, get the second obstacle-free path set And its corresponding second starting and ending point set U′={{S'1,E'1},{S'2,E'2},...,{S' i ,E' i}};
[0044] The path planning optimization module is configured to determine a route map based on the sampling point data and the connectivity radius using a PRM algorithm based on the artificial potential field method, and to use an improved A* graph search algorithm to find the shortest obstacle avoidance path connecting the starting point and the end point of each obstacle avoidance path in the route map. The shortest obstacle-free path with the determined path direction in the second obstacle-free path set is sequentially connected with the shortest obstacle avoidance path to determine the optimal weeding operation path, thereby completing the path planning optimization of the paddy field weeding robot.
[0045] An electronic device provided to meet another purpose of the present application includes a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the paddy field weeding robot path planning optimization method described in the present application.
[0046] A computer-readable storage medium is provided to meet another purpose of the present application, which stores a computer program implemented according to the paddy field weeding robot path planning optimization method in the form of computer-readable instructions. When the computer program is called and executed by a computer, the steps included in the corresponding method are executed.
[0047] Compared with the prior art, the present application addresses the problem that a simple reciprocating mulching path in the prior art will lead to considerable waste of resources when the weed growth density is low or the weeds are locally distributed. The present application includes but is not limited to the following beneficial effects:
[0048] First, compared with the traditional reciprocating operation path, the path planning optimization method of the paddy field weeding robot in this application not only retains the fast planning characteristics of the traditional reciprocating full coverage path planning algorithm, but also further optimizes the operation path length through path clipping and reorganization strategies to reduce path resource waste.
[0049] Secondly, the path planning optimization method for a paddy field weeding robot in this application takes into account the robot's kinematic characteristics and multiple key objectives, such as turning angle, path length, and overlap rate, within its path planning algorithm framework. By employing constrained multi-objective optimization techniques, the robot's path planning is modeled. The generated path is then meticulously optimized using an efficient optimization algorithm to ensure both efficiency and practicality.
[0050] Third, the path planning optimization method of the paddy field weeding robot in this application designs an improved PRM path planning algorithm. To address the problem of low algorithm efficiency caused by the sampling points falling on obstacles in the traditional PRM algorithm during the sampling stage, the artificial potential field method is introduced to optimize the sampling points falling within the obstacles, and the sampling points within the obstacles are converted into points in the free space, thereby improving the algorithm's performance in path length and running time.
[0051] Furthermore, this application addresses the problem of considerable resource waste caused by using a simple reciprocating mulching path when weeds in the field are low-density or locally distributed. This application proposes a path planning optimization strategy for a paddy field weeding robot. This strategy, based on the traditional reciprocating mulching path, analyzes the spatial coordinate relationship between the target operation location and the path points, identifies and removes unnecessary path points, and thus optimizes the path layout. Furthermore, the present invention incorporates an improved PRM path planning algorithm and an improved A* graph search algorithm to achieve effective obstacle avoidance and shortest obstacle avoidance path planning. Ultimately, the optimized mulching path and obstacle avoidance path are integrated and smoothed to form an efficient and optimal weeding operation path. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0053] Figure 1 Schematic diagram of the process of the path planning optimization method of the paddy field weeding robot in the embodiment of the present application;
[0054] Figure 2 This is a schematic diagram of the effect of determining the optimal weeding operation path in an embodiment of the present application;
[0055] Figure 3 This is a schematic diagram of the effect of determining a route map using the PRM algorithm using the artificial potential field method in an embodiment of the present application;
[0056] Figure 4 This is a principle block diagram of the path planning and optimization device for the paddy field weeding robot in an embodiment of the present application;
[0057] Figure 5 Schematic diagram of the structure of the computer device in the embodiment of the present application. DETAILED DESCRIPTION
[0058] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and are not to be construed as limiting the present application.
[0059] It will be understood by those skilled in the art that, unless expressly stated otherwise, the singular forms "a", "an", "said" and "the" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, "connected" or "coupled" as used herein may include wireless connections or wireless couplings. The term "and / or" used herein includes all or any units and all combinations of one or more associated listed items.
[0060] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0061] It will be understood by those skilled in the art that the terms "client," "terminal," and "terminal device" as used herein include both devices that are wireless signal receivers, i.e., devices that only have wireless signal receivers without transmission capabilities, and devices that have receiving and transmitting hardware capable of two-way communication over a two-way communication link. Such devices may include: cellular or other communication devices such as personal computers and tablet computers, which have single-line displays, multi-line displays, or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service), which may combine voice, data processing, fax, and / or data communication capabilities; PDA (Personal Digital Assistant), which may include a radio frequency receiver, a pager, Internet / Intranet access, a web browser, a notepad, a calendar, and / or a GPS (Global Positioning System) receiver; and conventional laptop and / or palmtop computers or other devices, which have and / or include a radio frequency receiver. As used herein, the terms "client," "terminal," or "terminal device" may be portable, transportable, or installed in a vehicle (air, sea, and / or land), or may be adapted and / or configured to operate locally and / or in a distributed manner at any other location on Earth and / or in space. As used herein, the terms "client," "terminal," or "terminal device" may also refer to a communication terminal, an Internet terminal, or a music / video playback terminal, such as a PDA, an MID (Mobile Internet Device), and / or a mobile phone with music / video playback capabilities, or may include a smart TV, a set-top box, or other device.
[0062] The hardware referred to by names such as "server", "client", and "service node" in this application is essentially an electronic device with capabilities equivalent to those of a personal computer. It is a hardware device that has the necessary components revealed by the von Neumann principle, such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. Computer programs are stored in its memory, and the central processing unit loads the program stored in the external memory into the internal memory for execution, executes the instructions in the program, and interacts with the input and output devices to complete specific functions.
[0063] It should be noted that the concept of "server" referred to in this application can also be extended to server clusters. Based on the network deployment principles understood by those skilled in the art, the servers described should be logically divided. In physical space, these servers can be independent of each other but callable through interfaces, or integrated into a single physical computer or a computer cluster. Those skilled in the art should understand this flexibility and should not use it to constrain the implementation of the network deployment method of this application.
[0064] Unless expressly specified, one or more technical features of the present application can be deployed on a server for implementation and accessed by a client through a remote call to obtain an online service interface provided by the server, or can be directly deployed and run on a client for implementation.
[0065] Unless expressly specified otherwise, the neural network models referenced or may be referenced in this application may be deployed on a remote server and remotely called on the client, or may be deployed and directly called on a client with sufficient device capabilities. In some embodiments, when it runs on the client, its corresponding intelligence may be obtained through transfer learning to reduce the requirements for the client's hardware operating resources and avoid excessive occupation of the client's hardware operating resources.
[0066] Unless explicitly specified, the various data involved in this application can be stored remotely on a server or on a local terminal device, as long as they are suitable for being called by the technical solution of this application.
[0067] Those skilled in the art should be aware that although the various methods of this application are described based on the same concept and thus exhibit commonality, unless otherwise specified, these methods can be independently executed. Similarly, the various embodiments disclosed in this application are all based on the same inventive concept. Therefore, concepts with the same expression, as well as concepts that are appropriately transformed for convenience despite different expression, should be understood as equivalent.
[0068] Unless expressly stated to be mutually exclusive, the various embodiments disclosed in this application may be cross-combined with the relevant technical features of the various embodiments to flexibly construct new embodiments, as long as such combination does not deviate from the creative spirit of this application and can meet the needs of the prior art or resolve certain deficiencies in the prior art. Those skilled in the art should be aware of such flexibility.
[0069] See also Figure 1 、 Figure 2 as well as Figure 3 In one embodiment, the paddy field weeding robot path planning optimization method of the present application includes:
[0070] Step S10: responding to an instruction to perform path planning optimization on the paddy field weeding robot, obtaining each grid area to be covered within the paddy field to be weeded, path points corresponding to the grid area to be covered, and a target operation position point, and sequentially sorting the path points corresponding to each grid area to be covered to construct a full coverage path point set, wherein the side length of the grid area to be covered is R;
[0071] The robot path planning system can respond to the instruction of optimizing the path planning of the paddy field weeding robot, obtain each grid area to be covered in the paddy field to be weeded, the path points corresponding to the grid area to be covered, and the target operation position point, and sequentially sort the path points corresponding to each grid area to be covered to construct a full coverage path point set, wherein the side length of the grid area to be covered is R;
[0072] In some embodiments, a reciprocating full coverage path planning algorithm can be used to generate a set of path points in a grid area to be covered with a side length of R, and each path point is sequentially sorted as W1, W2, ..., W n .
[0073] In some embodiments, Figure 2 This is a schematic diagram of the effect of determining the optimal weeding operation path in an embodiment of the present application; Figure 3 This is a schematic diagram of the effect of determining the route map using the PRM algorithm using the artificial potential field method in an embodiment of the present application.
[0074] Step S20: traverse all the path points in the full coverage path point set in sequence according to the preset direction. If the distance between two adjacent path points in the full coverage path point set is less than Then, the two adjacent path points are bundled into corresponding barrier-free path point sets to determine a plurality of barrier-free path point sets, wherein the barrier-free path point sets correspond one-to-one to barrier-free paths, and the barrier-free paths are constructed by one or more path points;
[0075] After sorting the path points corresponding to each grid area to be covered in sequence to construct a full coverage path point set, all path points in the full coverage path point set are traversed in sequence according to the preset direction. If the distance between two adjacent path points in the full coverage path point set is less than Then, the two adjacent path points are bundled into corresponding barrier-free path point sets to determine a plurality of barrier-free path point sets, wherein the barrier-free path point sets correspond one-to-one to barrier-free paths, and the barrier-free paths are constructed by one or more path points;
[0076] In some embodiments, if the distance between two adjacent path points in the full coverage path point set is less than Then the two adjacent path points are bundled into the corresponding barrier-free path point set. When the distance between the two adjacent path points in the full coverage path point set is less than When , it means there is no obstacle between the two adjacent path points, and the two adjacent path points are added to the corresponding obstacle-free path point set until the distance between the two adjacent path points is greater than , it indicates that there is an obstacle between two adjacent path points, then stop adding path points to the current obstacle-free path set to determine the current obstacle-free path set and its corresponding current obstacle-free path, and repeat the above steps to determine multiple obstacle-free path point sets.
[0077] In some embodiments, the preset direction may be from left to right or from top to bottom, etc.
[0078] Step S30: retaining path points in the obstacle-free path point set that are on the same horizontal line as the target work location point to determine the shortest obstacle-free path, so as to construct a first obstacle-free path set and its corresponding first start-end point set, wherein the first obstacle-free path set includes multiple shortest obstacle-free paths, and the first start-end point set includes the starting point of each shortest obstacle-free path and its corresponding end point;
[0079] Traverse all the path points in the full coverage path point set in sequence according to the preset direction. If the distance between two adjacent path points in the full coverage path point set is less than Then, after bundling the two adjacent path points into a corresponding obstacle-free path point set to determine multiple obstacle-free path point sets, in order to delete redundant path points, the path points in the obstacle-free path point set that are on the same horizontal line as the target work position point are retained to determine the shortest obstacle-free path, so as to construct a first obstacle-free path set and its corresponding first start-end point set, wherein the first obstacle-free path set includes multiple shortest obstacle-free paths, and the first start-end point set includes the starting point of each shortest obstacle-free path and its corresponding end point;
[0080] In some embodiments, the first obstacle-free path set is C={C1, C2, ..., C i}, the first starting and ending point set U={{S1,E1},{S2,E2},...,{S i ,E i}}, wherein the S i Represents the shortest obstacle-free path C i The starting point, E i Represents the shortest obstacle-free path C i The end point;
[0081] The second obstacle-free path set is The second starting and ending point set is U′={{S'1,E'1},{S'2,E'2},...,{S' i ,E' i}}, wherein the S' i The shortest obstacle-free path with a determined path direction The starting point, E' i The shortest obstacle-free path with a determined path direction The end point, C1, Indicates the starting point of weeding operations.
[0082] Step S40: Determine the path direction of the shortest obstacle-free path based on the first obstacle-free path set and its corresponding first starting and ending point sets based on a preset path direction determination strategy, thereby determining a second obstacle-free path set and its corresponding second starting and ending point sets, and the starting and ending points of each obstacle-avoidance path, wherein the second obstacle-free path set is constructed from multiple shortest obstacle-free paths with determined path directions;
[0083] retaining the path points in the obstacle-free path point set that are on the same horizontal line as the target work position point to determine the shortest obstacle-free path, so as to construct a first obstacle-free path set and its corresponding first starting and ending point set; and determining the path direction of the shortest obstacle-free path based on the first obstacle-free path set and its corresponding first starting and ending point set based on a preset path direction judgment strategy, so as to determine a second obstacle-free path set and its corresponding second starting and ending point set, and the starting point and end point of each obstacle avoidance path segment, wherein the second obstacle-free path set is constructed by a plurality of shortest obstacle-free paths with determined path directions;
[0084] In some embodiments, the path direction determination strategy includes:
[0085] Step S401: Determine U i as well as in, U i Indicates the new start and end point set obtained by deleting the start and end point of the current path from the previous start and end point set. express The shortest obstacle-free path, Indicates the starting point of the current path. The end point of the current path;
[0086] Step S402: traverse the U i Find the same The point S with the smallest Euclidean distance ′ , if the S ′ is the original starting point of the shortest obstacle-free path but It is a positive sequence, and the path direction is consistent with the original path direction;
[0087] Step S403: If the S ′ is the original end point of the shortest obstacle-free path but In reverse order, the path direction is opposite to the original path direction;
[0088] Step S404: The determined path sequence Add to the final path set P and repeat the above steps until U i-1 Is an empty set, get the second obstacle-free path set And its corresponding second starting and ending point set U′={{S'1,E'1},{S'2,E'2},...,{S' i ,E' i}}.
[0089] Furthermore, after the step of determining the second obstacle-free path set and its corresponding second starting and ending point set, and the starting point and ending point of each obstacle avoidance path, the following steps are included:
[0090] The preset shortest trajectory planning algorithm is used to obtain the second obstacle-free path set C * The shortest connecting trajectory A of two adjacent shortest obstacle-free paths i , wherein the shortest trajectory planning algorithm includes:
[0091]
[0092] Wherein, σ is the obstacle avoidance path planning algorithm, which includes the PRM algorithm with artificial potential field method and the improved A* graph search algorithm, d i For E' i-1 Pointing to S i ', R is the side length of the grid area to be covered.
[0093] Based on the above shortest trajectory planning algorithm, when ‖d i ‖=R or When , it means there are no obstacles between the shortest obstacle-free paths in the adjacent determined path directions. Connect the two adjacent shortest obstacle-free paths with determined path directions to determine the connection trajectory between the adjacent shortest obstacle-free paths with determined path directions; When , it means that there is an obstacle between the two adjacent shortest obstacle-free paths with determined path directions. Then, the PRM algorithm with artificial potential field method and the improved A* graph search algorithm are used to plan the obstacle avoidance path between the two adjacent shortest obstacle-free paths with determined path directions.
[0094] Step S50: Based on the PRM algorithm using the artificial potential field method, a route map is determined according to the sampling point data and the connectivity radius. An improved A* graph search algorithm is used to find the shortest obstacle avoidance path connecting the starting point and the end point of each obstacle avoidance path in the route map. The shortest obstacle-free path with the determined path direction in the second obstacle-free path set is sequentially connected with the shortest obstacle avoidance path to determine the optimal weeding operation path, thereby completing the path planning optimization of the paddy field weeding robot.
[0095] Based on the preset path direction judgment strategy, the path direction of the shortest obstacle-free path is determined according to the first obstacle-free path set and its corresponding first starting and ending point set, so as to determine the second obstacle-free path set and its corresponding second starting and ending point set, and the starting point and end point of each obstacle avoidance path. Then, based on the PRM algorithm introducing the artificial potential field method, a route map is determined according to the sampling point data and the connectivity radius. An improved A* graph search algorithm is used to search for the shortest obstacle avoidance path connecting the starting point and end point of each obstacle avoidance path in the route map. The shortest obstacle-free path with the determined path direction in the second obstacle-free path set is sequentially connected with the shortest obstacle avoidance path to determine the optimal weeding operation path. Specifically, in combination with the path set C * and the shortest obstacle avoidance trajectory A i The final path is obtained, which is expressed as
[0096] , in order to complete the path planning optimization of the paddy field weeding robot.
[0097] In some embodiments, the Probabilistic Roadmap Method (PRM) path planning algorithm was originally proposed by researchers in the fields of computer science and robotics continuing in the 1990s. Its important source is the algorithm jointly developed by LJ Guibas and SM LaValle in 1997, who first described the method in detail in their paper. PRM was proposed to address path planning problems in high-dimensional spaces, especially to provide effective obstacle avoidance paths for mobile robots in complex environments. The algorithm combines probability theory with geometric methods, aiming to simplify the path planning process by generating a graph structure that can be used for path search through random sampling. This application introduces an artificial potential field method based on the PRM algorithm to determine an improved PRM algorithm.
[0098] Based on any of the above embodiments, the steps of determining a route map according to sampling point data and a connectivity radius based on a PRM algorithm that introduces an artificial potential field method include:
[0099] when When the PRM algorithm based on the artificial potential field method randomly generates nodes n from the state space M i, get a set of valid sampling points N, where i = 1, 2, ..., N;
[0100] The state space is regarded as a virtual force field. The sampling points inside the obstacle are subject to the gravitational force of the sampling points in the free space and the repulsive force of the obstacle center, gradually moving toward the outside of the obstacle and eventually becoming valid sampling points in the free space to determine the sampling point data.
[0101] For each pair of sampling points X i and X j , when d=(X i, X j ) is less than or equal to R m When the sampling point X i and sampling point X j Establish an undirected edge between them, where d=(X i, X j ) represents the sampling point X i and X j The distance between m Represents the connectivity radius of the PRM algorithm;
[0102] Based on the above steps, we finally get a roadmap G(V,E), where V is the node set and E is the edge set.
[0103] Based on any of the above embodiments, the steps of using an improved A* graph search algorithm to find the shortest obstacle-avoiding path connecting the starting point and the end point of each obstacle-avoiding path in the roadmap, and sequentially connecting the shortest obstacle-free paths with the determined path directions in the second obstacle-free path set with the shortest obstacle-avoiding paths to determine the optimal weeding operation path include:
[0104] The heuristic function of the improved A* graph search algorithm includes:
[0105]
[0106] ω1+ω2+ω3=1,
[0107] Among them, ω i is the weight of each optimization objective, including overlap rate, path length and cumulative turning angle, f i is the converted objective function, γ1 is the overlap rate, γ2 is the path length, F(x) is the heuristic function, r is the turning radius, η is the energy coefficient of the steering control system, and i = 1, 2, 3.
[0108] Furthermore, after the step of sequentially connecting the shortest obstacle-free path with the determined path direction and the shortest obstacle-avoiding path in the second obstacle-free path set to determine the optimal weeding operation path, the method includes:
[0109] The optimal weeding operation path is smoothed using a Bezier curve to determine the optimal weeding operation path after smoothing, thereby completing the path planning optimization of the paddy field weeding robot.
[0110] As can be seen from the above embodiments, compared with the prior art, the present application addresses the problem that a simple reciprocating mulching path in the prior art will lead to considerable waste of resources when the weed growth density is low or the weeds are locally distributed. The present application includes but is not limited to the following beneficial effects:
[0111] First, compared with the traditional reciprocating operation path, the path planning optimization method of the paddy field weeding robot in this application not only retains the fast planning characteristics of the traditional reciprocating full coverage path planning algorithm, but also further optimizes the operation path length through path clipping and reorganization strategies to reduce path resource waste.
[0112] Secondly, the path planning optimization method for a paddy field weeding robot in this application takes into account the robot's kinematic characteristics and multiple key objectives, such as turning angle, path length, and overlap rate, within its path planning algorithm framework. By employing constrained multi-objective optimization techniques, the robot's path planning is modeled. The generated path is then meticulously optimized using an efficient optimization algorithm to ensure both efficiency and practicality.
[0113] Third, the path planning optimization method of the paddy field weeding robot in this application designs an improved PRM path planning algorithm. To address the problem of low algorithm efficiency caused by the sampling points falling on obstacles in the traditional PRM algorithm during the sampling stage, the artificial potential field method is introduced to optimize the sampling points falling within the obstacles, and the sampling points within the obstacles are converted into points in the free space, thereby improving the algorithm's performance in path length and running time.
[0114] Furthermore, this application addresses the problem of considerable resource waste caused by using a simple reciprocating mulching path when weeds in the field are low-density or locally distributed. This application proposes a path planning optimization strategy for a paddy field weeding robot. This strategy, based on the traditional reciprocating mulching path, analyzes the spatial coordinate relationship between the target operation location and the path points, identifies and removes unnecessary path points, and thus optimizes the path layout. Furthermore, the present invention incorporates an improved PRM path planning algorithm and an improved A* graph search algorithm to achieve effective obstacle avoidance and shortest obstacle avoidance path planning. Ultimately, the optimized mulching path and obstacle avoidance path are integrated and smoothed to form an efficient and optimal weeding operation path.
[0115] See also Figure 4, a path planning and optimization device for a paddy field weeding robot provided to meet one of the purposes of the present application, includes a grid area acquisition module 1100, an obstacle-free path point determination module 1200, a first path set determination module 1300, a second path set determination module 1400, and a path planning optimization module 1500. Among them, the grid area acquisition module 1100 is configured to respond to the instruction of path planning optimization for the paddy field weeding robot, obtain each grid area to be covered in the paddy field area to be weeded, the path points corresponding to the grid area to be covered, and the target operation position point, and sort the path points corresponding to each grid area to be covered in sequence to construct a full coverage path point set, wherein the side length of the grid area to be covered is R; the obstacle-free path point determination module 1200 is configured to traverse all the path points in the full coverage path point set in sequence according to a preset direction. If the distance between two adjacent path points in the full coverage path point set is less than Then the two adjacent path points are bundled into the corresponding barrier-free path point set to determine a plurality of barrier-free path point sets, wherein the barrier-free path point set corresponds one-to-one to the barrier-free path, and the barrier-free path is constructed by one or more path points; a first path set determination module 1300 is configured to retain the path points in the barrier-free path point set that are on the same horizontal line as the target operation position point to determine the shortest barrier-free path, so as to construct a first barrier-free path set and its corresponding first starting and ending point set, wherein the first barrier-free path set includes multiple segments of the shortest barrier-free paths, and the first starting and ending point set includes the starting point of each segment of the shortest barrier-free path and its corresponding end point; a second path set determination module 1400 is configured to determine the shortest barrier-free path based on the first barrier-free path based on a preset path direction judgment strategy. The path set and its corresponding first starting and ending point set determine the path direction of the shortest obstacle-free path to determine the second obstacle-free path set and its corresponding second starting and ending point set, the starting point and end point of each obstacle avoidance path, wherein the second obstacle-free path set is constructed by multiple shortest obstacle-free paths with determined path directions; the path planning optimization module 1500 is configured to determine a route map based on the sampling point data and the connectivity radius based on the PRM algorithm introduced by the artificial potential field method, and use the improved A* graph search algorithm to find the shortest obstacle avoidance path connecting the starting point and end point of each obstacle avoidance path in the route map, and connect the shortest obstacle-free path with the determined path direction in the second obstacle-free path set and the shortest obstacle avoidance path in sequence to determine the optimal weeding operation path to complete the path planning optimization of the paddy field weeding robot.
[0116] Based on any embodiment of this application, please refer to Figure 5 Another embodiment of the present application further provides an electronic device, which can be implemented by a computer device, such as Figure 5As shown, a schematic diagram of the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. Among them, the computer-readable storage medium of the computer device stores an operating system, a database, and computer-readable instructions, and the database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor can implement a path planning optimization method for a paddy field weeding robot. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute the path planning optimization method for a paddy field weeding robot of the present application. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art will understand that Figure 5 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.
[0117] In this embodiment, the processor is used to execute Figure 4 The memory stores the program code and various data required to execute the specific functions of each module in the device. The network interface is used to transmit data between user terminals or servers. The memory in this embodiment stores the program code and data required to execute all modules / submodules in the path planning and optimization device for the paddy field weeding robot of the present application. The server can call the server's program code and data to execute the functions of all submodules.
[0118] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the paddy field weeding robot path planning optimization method described in any embodiment of the present application.
[0119] The present application also provides a computer program product, including a computer program / instruction, which, when executed by one or more processors, implements the steps of the paddy field weeding robot path planning optimization method described in any embodiment of the present application.
[0120] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments of the present application can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments of the method. The aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0121] The above description is only part of the implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
[0122] In summary, this application addresses the problem of considerable resource waste caused by using a simple reciprocating mulching path when weeds in the field are low-density or locally distributed. This application proposes a path planning optimization strategy for a paddy field weeding robot. This strategy is based on the traditional reciprocating mulching path and optimizes the path layout by analyzing the spatial coordinate relationship between the target operation position and the path points, identifying and removing unnecessary path points. Furthermore, the present invention incorporates an improved PRM path planning algorithm and an improved A* graph search algorithm to achieve effective obstacle avoidance and shortest obstacle avoidance path planning. Ultimately, the optimized mulching path and obstacle avoidance path are integrated and smoothed to form an efficient and optimal weeding operation path.
Claims
1. A path planning optimization method for a paddy field weeding robot, characterized in that: include: In response to an instruction to perform path planning optimization on the paddy field weeding robot, each grid area to be covered within the paddy field to be weeded, path points corresponding to the grid areas to be covered, and a target operation position point are obtained, and the path points corresponding to each grid area to be covered are sequentially sorted to construct a full coverage path point set, wherein the side length of the grid area to be covered is R; Traverse all the path points in the full coverage path point set in sequence according to the preset direction. If the distance between two adjacent path points in the full coverage path point set is less than Then, the two adjacent path points are bundled into corresponding barrier-free path point sets to determine a plurality of barrier-free path point sets, wherein the barrier-free path point sets correspond one-to-one to barrier-free paths, and the barrier-free paths are constructed by one or more path points; Retaining path points in the obstacle-free path point set that are on the same horizontal line as the target work location point to determine the shortest obstacle-free path, so as to construct a first obstacle-free path set and its corresponding first start-end point set, wherein the first obstacle-free path set includes multiple shortest obstacle-free paths, and the first start-end point set includes the starting point of each shortest obstacle-free path and its corresponding end point; Based on the preset path direction judgment strategy, the path direction of the shortest obstacle-free path is determined according to the first obstacle-free path set and its corresponding first starting and ending point set, so as to determine the second obstacle-free path set and its corresponding second starting and ending point set, and the starting point and end point of each obstacle avoidance path, wherein the second obstacle-free path set is constructed by multiple shortest obstacle-free paths with determined path directions, and the first obstacle-free path set is C = {C1, C2, ..., C i }, the first starting and ending point set U={{S1,E1},{S2,E2},...,{S i ,E i }}, wherein the S i Represents the shortest obstacle-free path C i The starting point, E i Represents the shortest obstacle-free path C i The end point of the second obstacle-free path set is The second starting and ending point set is U′={{S′1,E′1},{S′2,E′2},...,{S′ i ,E′ i }}, wherein the S′ i The shortest obstacle-free path with a determined path direction The starting point, E′ i The shortest obstacle-free path with a determined path direction The end point, C1, Indicates the starting point of weeding operations; The path direction determination strategy includes: Determine U i as well as in, U i Indicates the new start and end point set obtained by deleting the start and end point of the current path from the previous start and end point set. express The shortest obstacle-free path, Indicates the starting point of the current path. Indicates the end point of the current path; Traverse the U i Find the same The point S′ with the minimum Euclidean distance, if S′ is the original starting point of the shortest obstacle-free path but It is a positive sequence, and the path direction is consistent with the original path direction; If S′ is the original end point of the shortest obstacle-free path but In reverse order, the path direction is opposite to the original path direction; The determined path sequence Add to the final path set P and repeat the above steps until U i-1 Is an empty set, get the second obstacle-free path set And its corresponding second starting and ending point set U′={{S′1,E′1},{S′2,E′2},...,{S′ i ,E′ i }}; The PRM algorithm based on the introduction of the artificial potential field method determines the route map according to the sampling point data and the connectivity radius, and uses the improved A* graph search algorithm to find the shortest obstacle-avoiding path connecting the starting point and the end point of each obstacle-avoiding path in the route map. The shortest obstacle-free path with the determined path direction in the second obstacle-free path set is connected with the shortest obstacle-avoiding path in sequence to determine the optimal weeding operation path, thereby completing the path planning optimization of the paddy field weeding robot.
2. The paddy field weeding robot path planning optimization method according to claim 1, characterized in that: After determining the second obstacle-free path set and its corresponding second starting and ending point set, and the starting point and ending point of each obstacle avoidance path, the following steps are included: The preset shortest trajectory planning algorithm is used to obtain the second obstacle-free path set C * The shortest connecting trajectory A of two adjacent shortest obstacle-free paths i , wherein the shortest trajectory planning algorithm includes: Wherein, σ is the obstacle avoidance path planning algorithm, which includes the PRM algorithm with artificial potential field method and the improved A* graph search algorithm, d i E′ i-1 Pointing to S′ i vector, R m Represents the connectivity radius of the PRM algorithm.
3. The path planning optimization method of the paddy field weeding robot according to claim 2, characterized in that: The PRM algorithm based on the artificial potential field method determines the steps of the roadmap according to the sampling point data and the connectivity radius, including: when When the PRM algorithm based on the artificial potential field method randomly generates nodes n from the state space M i , get a set of valid sampling points N, where i = 1, 2, ..., N; The state space is regarded as a virtual force field. The sampling points inside the obstacle are subject to the gravitational force of the sampling points in the free space and the repulsive force of the obstacle center, gradually moving toward the outside of the obstacle and eventually becoming valid sampling points in the free space to determine the sampling point data. For each pair of sampling points X i and X j , when d=(X i ,X j ) is less than or equal to R m When the sampling point X i and sampling point X j Establish an undirected edge between them, where d=(X i ,X j ) represents the sampling point X i and X j the distance between them; Based on the above steps, we finally get a roadmap G(V,E), where V is the node set and E is the edge set.
4. The paddy field weeding robot path planning optimization method according to claim 3, characterized in that: The steps of using an improved A* graph search algorithm to find the shortest obstacle-avoiding path connecting the starting point and the end point of each obstacle-avoiding path in the roadmap, and sequentially connecting the shortest obstacle-free paths with the determined path directions in the second obstacle-free path set with the shortest obstacle-avoiding paths to determine the optimal weeding operation path include: The heuristic function of the improved A* graph search algorithm includes: ω1+ω2+ω3=1, Among them, ω i is the weight of each optimization objective, including overlap rate, path length and cumulative turning angle, f i is the converted objective function, γ1 is the overlap rate, γ2 is the path length, F(x) is the heuristic function, r is the turning radius, η is the energy coefficient of the steering control system, and i = 1, 2, 3.
5. The paddy field weeding robot path planning optimization method according to any one of claims 1 to 4, characterized in that: After the step of sequentially connecting the shortest obstacle-free path with the determined path direction and the shortest obstacle-avoiding path in the second obstacle-free path set to determine the optimal weeding operation path, the method includes: The optimal weeding operation path is smoothed using a Bezier curve to determine the optimal weeding operation path after smoothing, thereby completing the path planning optimization of the paddy field weeding robot.
6. A path planning and optimization device for a paddy field weeding robot, characterized in that: include: a grid area acquisition module configured to respond to an instruction to perform path planning optimization on the paddy field weeding robot, acquire each grid area to be covered within the paddy field to be weeded, path points corresponding to the grid area to be covered, and a target operation position point, and sequentially sort the path points corresponding to each grid area to be covered to construct a full coverage path point set, wherein the side length of the grid area to be covered is R; The barrier-free path point determination module is configured to sequentially traverse all path points in the full coverage path point set in a preset direction. If the distance between two adjacent path points in the full coverage path point set is less than Then, the two adjacent path points are bundled into corresponding barrier-free path point sets to determine a plurality of barrier-free path point sets, wherein the barrier-free path point sets correspond one-to-one to barrier-free paths, and the barrier-free paths are constructed by one or more path points; a first path set determination module, configured to retain path points in the obstacle-free path point set that are on the same horizontal line as the target work location point to determine the shortest obstacle-free path, so as to construct a first obstacle-free path set and a corresponding first start-end point set, wherein the first obstacle-free path set includes multiple shortest obstacle-free paths, and the first start-end point set includes a start point of each shortest obstacle-free path and its corresponding end point; The second path set determination module is configured to determine the path direction of the shortest obstacle-free path according to the first obstacle-free path set and its corresponding first starting and ending point set based on a preset path direction judgment strategy, so as to determine the second obstacle-free path set and its corresponding second starting and ending point set, and the starting point and end point of each obstacle avoidance path, wherein the second obstacle-free path set is constructed by multiple shortest obstacle-free paths with determined path directions, and the first obstacle-free path set is C = {C1, C2, ..., C i }, the first starting and ending point set U={{S1,E1},{S2,E2},...,{S i ,E i }}, wherein the S i Represents the shortest obstacle-free path C i The starting point, E i Represents the shortest obstacle-free path C i The end point of the second obstacle-free path set is The second starting and ending point set is U′={{S′1,E′1},{S′2,E′2},...,{S′ i ,E′ i }}, wherein the S′ i The shortest obstacle-free path with a determined path direction The starting point, E′ i The shortest obstacle-free path with a determined path direction The end point, C1, Indicates the starting point of weeding operations; The path direction determination strategy includes: Determine U i as well as in, U i Indicates the new start and end point set obtained by deleting the start and end point of the current path from the previous start and end point set. express The shortest obstacle-free path, Indicates the starting point of the current path. Indicates the end point of the current path; Traverse the U i Find the same The point S′ with the minimum Euclidean distance, if S′ is the original starting point of the shortest obstacle-free path but It is a positive sequence, and the path direction is consistent with the original path direction; If S′ is the original end point of the shortest obstacle-free path but In reverse order, the path direction is opposite to the original path direction; The determined path sequence Add to the final path set P and repeat the above steps until U i-1 Is an empty set, get the second obstacle-free path set And its corresponding second starting and ending point set U′={{S′1,E′1},{S′2,E′2},...,{S′ i ,E′ i }}; The path planning optimization module is configured to determine a route map based on the sampling point data and the connectivity radius using a PRM algorithm based on the artificial potential field method, and to use an improved A* graph search algorithm to find the shortest obstacle avoidance path connecting the starting point and the end point of each obstacle avoidance path in the route map. The shortest obstacle-free path with the determined path direction in the second obstacle-free path set is sequentially connected with the shortest obstacle avoidance path to determine the optimal weeding operation path, thereby completing the path planning optimization of the paddy field weeding robot.
7. An electronic device comprising a central processing unit and a memory, characterized in that: The central processing unit is configured to call and run a computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that It stores a computer program implemented according to the method described in any one of claims 1 to 5 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.
Citation Information
Patent Citations
Navigation robot path planning method and device, robot and storage medium
CN110044359A
Mobile robot path planning method based on improved PRM and artificial potential field
CN114740864A