CN115857516A - Method and device for planning full-coverage path by combining cattle-ploughing type movement and genetic algorithm - Google Patents
Method and device for planning full-coverage path by combining cattle-ploughing type movement and genetic algorithm Download PDFInfo
- Publication number
- CN115857516A CN115857516A CN202310191246.0A CN202310191246A CN115857516A CN 115857516 A CN115857516 A CN 115857516A CN 202310191246 A CN202310191246 A CN 202310191246A CN 115857516 A CN115857516 A CN 115857516A
- Authority
- CN
- China
- Prior art keywords
- grid
- chromosome
- robot
- current
- cattle
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)
Abstract
The invention discloses a method and a device for planning a full-coverage path by combining cattle tillage type motion and a genetic algorithm, wherein the method comprises the following steps: firstly, performing obstacle expansion processing on an environment map to generate a grid map; after determining the task target area of the robot in the environment map, encoding the grid map; thirdly, moving by adopting a traditional cattle ploughing type movement mode to generate a plurality of initial chromosomes representing the moving path of the robot, and taking the initial chromosomes as an initial population of a genetic algorithm; selecting a plurality of generated initial chromosomes, and generating a next generation population by adopting a roulette mode; and step five, performing cross and variation operation on the generated next generation population, then repeating the step four to the step five, performing population algebra optimization, and obtaining a final planning path after the population algebra reaches the maximum value. The invention can effectively solve the problem of multiple task scenes such as flaw detection and rust removal of the robot on the storage tank and the bridge.
Description
Technical Field
The invention belongs to the field of single-robot full-coverage path planning, and relates to a full-coverage path planning method and device combining cattle-ploughing type movement and a genetic algorithm.
Background
The full coverage path planning is generally applied to scenes such as robot flaw detection, cleaning and rust removal which need to traverse a target area, and aims to plan a motion path for the robot so that the robot can complete tasks under the control of a computer and the like.
The prior patents related to the full coverage path planning include: a traversal path planning method for a mowing robot facing an urban green space (CN 202111386248.2), a full traversal path planning method for a sweeping robot based on a grid method (CN 201910654234.0) and the like are disclosed. However, these methods can only be applied to plane environments such as offices, parking lots, warehouses, etc., and cannot better solve the planning problem in the cylindrical curved surface scene such as storage tanks, etc. The reason is that the cylindrical curved surface is generally flattened into a two-dimensional plane along a certain generatrix, and the grids on two sides of the generatrix are different from each other by a distance of a circle on the plane, but are actually adjacent on the cylindrical curved surface. If the existing method is adopted, when the robot moves from one side area of the bus to the other side, the robot can bypass the whole cylindrical curved surface, and the obtained planned path is not optimal. Meanwhile, the algorithms are also difficult to constrain the turning times, energy consumption and other aspects of the planned path, so that the time and energy cost for the robot to complete the task may be large.
Therefore, a path planning method applied to a cylindrical curved scene such as a tank and capable of constraining the number of turns and the energy cost of the path needs to be researched.
Disclosure of Invention
In order to solve the technical problems in the prior art, the invention provides a method and a device for planning a full-coverage path by combining cattle-farming movement with a genetic algorithm, which are used for generating a traversal path when a single robot carries out full-coverage movement in a cylindrical curved surface scene such as a storage tank, and the like, and the specific technical scheme is as follows:
a full coverage path planning method combining cattle plowing type movement and genetic algorithm comprises the following steps:
firstly, performing obstacle expansion processing on an environment map to generate a grid map;
after determining the task target area of the robot in the environment map, coding the grid map;
thirdly, on the encoded grid map, the robot moves in a traditional cattle-ploughing type movement mode to generate a plurality of initial chromosomes representing the movement path of the robot and serving as initial populations of the genetic algorithm;
selecting a plurality of generated initial chromosomes, namely calculating the fitness value of each initial chromosome according to the constraint requirement, and generating a next generation population by adopting a roulette mode;
and step five, performing cross and variation operation on the generated next generation population, then repeating the step four to the step five, performing population algebra optimization, and obtaining a final planning path after the population algebra reaches the maximum value.
Further, the first step specifically comprises: if the map environment is a cylindrical curved surface environment, a cylindrical curved surface scene map is expanded along a bus to generate a plane grid map, if any obstacle exists in the grid, the grid is an obstacle grid, the leftmost grid and the rightmost grid of the plane grid map are actually adjacent, and if the robot moves leftwards from the leftmost grid, the robot can directly reach the rightmost grid in the same row, and vice versa.
Further, the second step is specifically as follows: and traversing each grid from left to right and from top to bottom from the position of the upper left corner of the grid map, numbering if the current grid belongs to the task target area of the robot, and otherwise, not processing.
Further, the third step specifically comprises: the robot starts from an initial position, carries out cattle-ploughing type movement, and if a grid which is not traversed exists in a current task target area, whether a left grid and a right grid which are adjacent to each other at the current position of the robot are obstacles is judged, and the judgment is divided into three conditions: (1) If no obstacle exists, one grid is randomly selected from the left grid and the right grid to serve as the next navigation point of the robot; (2) If one of the grids is an obstacle, selecting a grid without the obstacle as a next navigation point; (3) If the two grids are both obstacles, the processing mode after judgment is the same as that of the left grid and the right grid, and if the upper grid, the lower grid, the left grid and the right grid at the current position of the robot are both obstacles, the nearest non-traversed grid is selected as the next navigation point of the robot by adopting an A-line algorithm; after the navigation point is determined, marking the navigation point grid as an obstacle; repeating the operation until the robot completely traverses the task target area; starting from the initial position of the robot, sequentially determining the digital arrangement formed by the grid codes of each navigation point in the traversing of the whole task target area, namely a primary chromosome; wherein the number of grids of the barrier-free grid in the target area of the robot task is K max Then the chromosome length is at most K max 。
Further, the fourth step is specifically: for each generated chromosome, obtaining the actual motion path F represented by the chromosome by using an A-x algorithm 0 And counting the path F 0 Length L of 0 Number of turns M 0 Upward movement distance L 1 And a downward movement distance L 2 The specific expression is as follows:
wherein the path length L 0 And the number of turns M 0 For constraining the time spent by the robot to complete a task, the upward movement distance L 1 And a downward movement distance L 2 Related to the robot overcoming the gravity work, used for restraining the energy cost of the robot; a, b, c, d are lengths L respectively 0 And the number of times of turning M 0 Upward movement distance L 1 And a downward movement distance L 2 The correction coefficients of the four physical quantities are determined by the performance parameters of the robot, and N F current generations are recorded simultaneously 0 Middle smallest F 0 N is more than or equal to 1.
For N F 0 Carrying out normalization processing, wherein the expression is as follows:
wherein F 0max And F 0min Are respectively N F 0 Maximum and minimum values of (1), resulting in F 0 ' As fitness value of corresponding chromosome, then obtaining N chromosomes of next generation, namely next generation population by roulette.
Further, the step five includes performing a crossover operation on the generated next generation population, specifically: for the next generation of N strips obtained by the selection operation, the length of the N strips is K max Starting from the first chromosome, a random number Rand E [0,1 ] is generated first]Cross probability P of Rand with initial setting c For comparison, if Rand > P c Skipping the crossover operation of the current chromosome, otherwise randomly selecting one chromosome from other N-1 chromosomes as the crossover operation object of the current chromosome;
then, the A-star algorithm respectively calculates the actual distance between the current chromosome and two navigation points which are arranged in the selected chromosome in a front-back adjacent mode to obtain 2 x (K) max -1) data;
judging the generation number of the current chromosome, if the generation number Gen is odd number, then from K of the current chromosome max -finding the maximum of 1 actual distance and setting the starting navigation point of the distance maximum as the intersection point of the current chromosome; if the generation Gen is even, K of the current chromosome max Randomly selecting one of the 1 actual distances to be greater than the length of one grid, and setting a starting navigation point of the distance as the intersection point of the current chromosome;
after the intersection point of the current chromosome is determined, searching a position in the selected chromosome, which is the same as the intersection point code, and adding the navigation point into the chromosome intersection segment from the position if the actual distance between the front and rear adjacent navigation points is a grid length until the actual distance between the front and rear adjacent navigation points is greater than a grid length;
inserting the obtained chromosome crossover fragment into the crossover of the current chromosomeAfter spotting, the codes of the original current chromosome which are repeated with the chromosome cross segment are deleted to ensure that the chromosome length is still K max 。
Further, the mutation operation is performed on the generated next generation population in the step five, specifically: for N pieces of length K which finish the cross operation max Chromosomes, starting from the first chromosome, a random number Rand E [0,1 ] is generated]Comparing Rand with the initially set mutation probability P m For comparison, if Rand > P m Skipping the current chromosome, otherwise, performing mutation operation on the current chromosome;
then, calculating the actual distance between two adjacent navigation points before and after the current chromosome to obtain K max -1 data, cutting off the current chromosome generation, if the generation Gen is odd, from K max -finding the maximum value among the 1 data and setting the starting navigation point corresponding to the value as a variation point; if the algebraic Gen is even, then from K max Randomly selecting a distance of the length of a grid from 1 datum, and setting a starting navigation point of the distance as a variation point of the current chromosome;
after the variation point of the current chromosome is determined, starting from the variation point position, if the actual distance between two adjacent navigation points is a grid distance, adding the navigation point into the chromosome variation segment until the actual distance between the two adjacent navigation points is greater than one grid length;
and checking the obstacle conditions of four adjacent grids of the variation point grid, namely, the upper grid, the lower grid, the left grid and the right grid in the map, randomly selecting a non-obstacle grid from the four grids as a splicing point, and splicing the chromosome variation segment at the splicing point.
Further, in the step five, repeating the step four to the step five, performing population algebra optimization, and obtaining a final planned path after the population algebra reaches a maximum value, specifically:
repeating the operations of selection, intersection and variation to perform algebraic optimization on the obtained population until the population evolution algebraic reaches the maximum value GenMax, and recording GenMax F numbers recorded by the GenMax generation 0 Comparing the sizes, and selecting the minimum F 0 And the corresponding chromosome is used as the optimal chromosome, and the chromosome generates an actual movement path according to an A-star algorithm to obtain a final planning path.
A full-coverage path planning device combining cattle plowing type movement and a genetic algorithm comprises one or more processors and is used for realizing the full-coverage path planning method combining cattle plowing type movement and the genetic algorithm.
A computer readable storage medium having stored thereon a program which, when executed by a processor, implements a method of full-coverage path planning incorporating cattle-tilling motion and genetic algorithms as described.
The invention has the beneficial effects that:
1. the method is suitable for the cylindrical curved surface environment, and can effectively solve a plurality of task scenes such as flaw detection and rust removal of the robot on a storage tank and a bridge.
2. The invention integrates genetic algorithm, and can restrict the obtained path according to specific requirements of less time and energy cost.
Drawings
FIG. 1 is a schematic flow chart of a method for planning a full coverage path by combining a cattle plowing type movement and a genetic algorithm according to the present invention;
FIG. 2 is a schematic flow chart of the specific algorithm of the present invention;
FIG. 3 is a schematic diagram of a storage tank cylindrical curved scene unfolded into a two-dimensional planar map according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a grid map generated after expansion of the obstacles of the plan map of FIG. 3;
FIG. 5 is a flow chart of primary chromosome generation from cattle plowing;
FIG. 6 is a schematic diagram of a chromosome;
FIG. 7 is a flow chart of chromosome crossing operations;
FIG. 8 is a schematic diagram of a chromosome undergoing crossover operations;
FIG. 9 is a schematic diagram of the crossover object of chromosome selection of FIG. 8;
FIG. 10 is a schematic representation of the results after the crossover operation of FIG. 8;
FIG. 11 is a flowchart of a chromosome mutation operation;
FIG. 12 is a schematic diagram of a chromosome undergoing mutation operations;
FIG. 13 is a graphical representation of the results of the chromosomal mutation procedure of FIG. 12;
FIG. 14 is a diagram of a robot path planning result;
fig. 15 is a schematic structural diagram of a full coverage path planning apparatus combining cattle plowing movement and a genetic algorithm according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and technical effects of the present invention more clearly apparent, the present invention is further described in detail below with reference to the accompanying drawings and examples.
The invention relates to a full-coverage path planning method combining cattle tillage type movement and a genetic algorithm, which is characterized in that a grid to be covered is numbered, a plurality of primary chromosomes representing paths are generated by the cattle tillage type movement, and the obtained paths are optimized by setting fitness functions comprising time and energy cost parameters through crossing, variation and selection operations, so that planned paths with less time and energy cost are finally obtained; specifically, as shown in fig. 1 and fig. 2, the specific technical solution is as follows:
step one, carrying out obstacle expansion processing on an environment map to generate a grid map.
If the map environment is a cylindrical curved surface environment, the cylindrical curved surface scene map is expanded along a bus to generate a plane grid map, and if any obstacle exists in the grid, the grid is an obstacle grid.
Fig. 3 is a schematic view illustrating the flattening of a cylindrical curved scene of a tank, fig. 4 is a grid map generated from the map of fig. 3, and grids in the leftmost column and grids in the rightmost column are actually adjacent, and if the robot moves from the grids in the leftmost column to the left, the robot can directly reach the grids in the rightmost column in the same row, and vice versa.
And step two, after the task target area of the robot on the environment map is determined, encoding the grid map.
Specifically, each grid is traversed from left to right and from top to bottom from the position of the upper left corner of the grid map, if the current grid belongs to the task target area of the robot, numbering is performed, and otherwise, no processing is performed.
And thirdly, on the encoded grid map, the robot moves in a traditional cattle ploughing type movement mode to generate a plurality of initial chromosomes representing the movement path of the robot, and the initial chromosomes serve as the initial population of the genetic algorithm.
The generation mode of each primary chromosome is specifically as follows: the robot starts from an initial position, carries out cattle-ploughing type movement, and if a grid which is not traversed exists in a current task target area, whether a left grid and a right grid which are adjacent to each other at the current position of the robot are obstacles is judged, and the judgment is divided into three conditions: (1) If no obstacle exists, one grid is randomly selected from the left grid and the right grid to serve as the next navigation point of the robot; (2) If one of the grids is an obstacle, selecting a grid without the obstacle as a next navigation point; (3) If the two grids are both obstacles, the processing mode after judgment is the same as that of the left grid and the right grid, and if the upper grid, the lower grid, the left grid and the right grid at the current position of the robot are both obstacles, the nearest non-traversed grid is selected as the next navigation point of the robot by adopting an A-line algorithm; after a navigation point is determined, marking the navigation point grid as an obstacle; repeating the operation until the robot completely traverses the task target area; starting from the initial position of the robot, in the process of traversing the whole task target area, the digital arrangement formed by the grid codes of all the navigation points is sequentially determined, and the digital arrangement is a primary chromosome.
FIG. 5 is a flowchart of the above operations, where K is the number of grids in the target area of the robot task, K max For the maximum grid number, without obstacles, FIG. 6 is a schematic diagram of a chromosome, where X is the code of the grid where the initial position of the robot is located, from left to right for each navigation point recorded during traversal of the robot, and the longest length of the chromosome is K max 。
And step four, selecting the generated plurality of initial chromosomes, namely calculating the fitness value of each initial chromosome according to the constraint requirement, and generating the next generation population by adopting a roulette mode.
Specifically, for each chromosome, the actual motion path F represented by the chromosome is obtained by the a-x algorithm according to the recorded navigation points 0 And counting the path F 0 Length L of 0 Number of turns M 0 Upward movement distance L 1 And a downward movement distance L 2 The specific expression is as follows:
wherein the path length L 0 And the number of turns M 0 For constraining the time spent by the robot to complete a task, the upward movement distance L 1 And a downward movement distance L 2 Related to the robot overcoming the gravity work, used for restraining the energy cost of the robot; a, b, c, d are lengths L respectively 0 Number of turns M 0 Upward movement distance L 1 And a downward movement distance L 2 The correction coefficients of the four physical quantities are determined by the performance parameters of the robot, and N F current generations are recorded simultaneously 0 Middle smallest F 0 N is more than or equal to 1.
For N F 0 Carrying out normalization processing, wherein the expression is as follows:
wherein F 0max And F 0min Are respectively N F 0 Maximum and minimum of (3), resulting in F 0 ' As fitness value of corresponding chromosome, then obtaining N chromosomes of next generation, namely next generation population by roulette.
And step five, performing cross and variation operation on the generated next generation population, then repeating the step four to the step five, performing population algebra optimization, and obtaining a final planning path after the population algebra reaches the maximum value.
Specifically, the length of the next generation N pieces obtained by the selection operation is K max The crossover operation is performed on the chromosomes as follows: as shown in FIG. 7, starting with the first chromosome, a random number Rand ∈ [0,1 ] is first generated]Cross probability P of Rand with initial setting c For comparison, if Rand > P c And skipping the crossover operation of the current chromosome, otherwise randomly selecting one from the other N-1 chromosomes as the crossover operation object of the current chromosome.
Then, the A-star algorithm respectively calculates the actual distance between the current chromosome and two navigation points which are arranged in the selected chromosome in a front-back adjacent mode to obtain 2 x (K) max -1) data. Judging the generation number of the current chromosome, if the generation number Gen is odd number, then from the K of the current chromosome max -finding the maximum of 1 actual distance and setting the starting navigation point of the distance maximum as the intersection point of the current chromosome; if the generation Gen is even, K from the current chromosome max Randomly selecting one of the 1 actual distances to be greater than the length of one grid, and setting the starting navigation point of the distance as the intersection point of the current chromosome.
After the intersection point of the current chromosome is determined, the position which is the same as the intersection point code in the selected chromosome is searched, and from the position, if the actual distance between the front and the back adjacent navigation points is one grid length, the navigation point is added into the chromosome intersection segment until the actual distance between the front and the back adjacent navigation points is more than one grid length.
Inserting the obtained chromosome cross segment into the cross point of the current chromosome, and deleting the repeated codes of the chromosome cross segment in the original current chromosome so as to ensure that the chromosome length is still K max 。
Fig. 8 is a current chromosome example, where code 4 represents the determined intersection point and the lower number represents the actual grid distance between the front and back adjacent navigation points. FIG. 9 is an example of a selected chromosome, and codes 4, 5 and 6 are chromosome cross segments. FIG. 10 shows the result of the crossover operation on the chromosome of FIG. 8.
To completionN pieces of length K of the crossover operation max Carrying out mutation operation on chromosomes, specifically as follows: as shown in the flow chart of FIG. 11, starting with the first chromosome, a random number Rand ∈ [0,1 ] is first generated]Comparing Rand with the initially set mutation probability P m For comparison, if Rand > P m Skipping the current chromosome, otherwise performing mutation operation on the current chromosome.
Similar to the crossover operation, the actual distance between two adjacent navigation points before and after the current chromosome is calculated to obtain K max -1 data. Then, the current chromosome generation is judged, if the generation Gen is odd, then K is selected max -finding the maximum value among the 1 data and setting the starting navigation point corresponding to the value as a variation point; if the algebraic Gen is even, then from K max Randomly selecting a grid-length distance from the 1 datum, and setting the starting navigation point of the distance as the variation point of the current chromosome.
After the variation point of the current chromosome is determined, starting from the variation point position, if the actual distance between two adjacent navigation points is a grid distance, adding the navigation point into the chromosome variation segment until the actual distance between the two adjacent navigation points is greater than one grid length.
And checking the obstacle conditions of four adjacent grids of the variation point grid, namely, the upper grid, the lower grid, the left grid and the right grid in the map, randomly selecting a non-obstacle grid from the variation point grid as a splicing point, and splicing the chromosome variation segment at the splicing point.
FIG. 12 is an example of a chromosome for mutation, where the code 7 is a mutation point, the codes 7 and 8 together constitute a chromosome mutation segment, and the lower number represents the actual grid distance between the adjacent navigation points. FIG. 13 shows the result of variation of the chromosome of FIG. 12.
And repeating the operations of selection, intersection and variation to perform algebraic optimization on the obtained population until the population evolution algebraic reaches the maximum value GenMax, and recording GenMax F numbers recorded by the GenMax generation 0 Comparing the sizes, and selecting the minimum F 0 Taking the corresponding chromosome as the optimal chromosome, generating an actual movement path by the chromosome according to an A-x algorithm, and finallyA planned path is obtained that costs less time and energy.
Fig. 14 is the planned path of a robot under the present algorithm for traversing the blue grid area, wherein the black grid represents the obstacle and the black triangle represents the initial position of the robot.
Corresponding to the embodiment of the full coverage path planning method combining the cattle plowing type movement and the genetic algorithm, the invention also provides an embodiment of a full coverage path planning device combining the cattle plowing type movement and the genetic algorithm.
Referring to fig. 15, the full coverage path planning apparatus combining cattle plowing movement and a genetic algorithm provided by the embodiment of the invention includes one or more processors, and is configured to implement the full coverage path planning method combining cattle plowing movement and a genetic algorithm in the above embodiment.
The embodiment of the full coverage path planning apparatus combining cattle plowing movement and genetic algorithm of the invention can be applied to any data processing-capable device, such as a computer or other devices or apparatuses. The apparatus embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and as a logical device, the device is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for running through the processor of any device with data processing capability. From a hardware aspect, as shown in fig. 15, the present invention is a hardware structure diagram of any device with data processing capability where a full coverage path planning apparatus combining cattle-farming movement and genetic algorithm is located, except for the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 15, in an embodiment, any device with data processing capability where the apparatus is located may also include other hardware according to the actual function of the any device with data processing capability, which is not described again.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
An embodiment of the present invention further provides a computer-readable storage medium, on which a program is stored, and when the program is executed by a processor, the method for planning a full coverage path combining cattle farming movement and genetic algorithm in the above embodiments is implemented.
The computer readable storage medium may be an internal storage unit, such as a hard disk or a memory, of any data processing capability device described in any of the foregoing embodiments. The computer readable storage medium may also be an external storage device such as a plug-in hard disk, a Smart Media Card (SMC), an SD Card, a Flash memory Card (Flash Card), etc. provided on the device. Further, the computer readable storage medium may include both an internal storage unit and an external storage device of any data processing capable device. The computer-readable storage medium is used for storing the computer program and other programs and data required by the arbitrary data processing-capable device, and may also be used for temporarily storing data that has been output or is to be output.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention in any way. Although the foregoing has described the practice of the present invention in detail, it will be apparent to those skilled in the art that modifications may be made to the practice of the invention as described in the foregoing examples, or that certain features may be substituted in the practice of the invention. All changes, equivalents and modifications which come within the spirit and scope of the invention are desired to be protected.
Claims (10)
1. A full-coverage path planning method combining cattle tillage type movement and a genetic algorithm is characterized by comprising the following steps:
firstly, performing obstacle expansion processing on an environment map to generate a grid map;
after determining the task target area of the robot in the environment map, encoding the grid map;
thirdly, on the encoded grid map, the robot moves in a traditional cattle-ploughing type movement mode to generate a plurality of initial chromosomes representing the movement path of the robot and serving as initial populations of the genetic algorithm;
selecting a plurality of generated initial chromosomes, namely calculating the fitness value of each initial chromosome according to the constraint requirement, and generating a next generation population by adopting a roulette mode;
and step five, performing cross and variation operation on the generated next generation population, then repeating the step four to the step five, performing population algebra optimization, and obtaining a final planning path after the population algebra reaches the maximum value.
2. The method for planning a full coverage path by combining cattle plowing type movement and genetic algorithm according to claim 1, wherein the first step is specifically as follows: if the map environment is a cylindrical curved surface environment, a cylindrical curved surface scene map is expanded along a bus to generate a plane grid map, if any obstacle exists in the grid, the grid is an obstacle grid, the leftmost grid and the rightmost grid of the plane grid map are actually adjacent, and if the robot moves leftwards from the leftmost grid, the robot can directly reach the rightmost grid in the same row, and vice versa.
3. The method for planning a full coverage path by combining cattle plowing type movement and a genetic algorithm according to claim 1, wherein the second step is specifically as follows: and traversing each grid from left to right and from top to bottom from the position of the upper left corner of the grid map, numbering if the current grid belongs to the task target area of the robot, and otherwise, not processing.
4. The method for planning a full coverage path by combining cattle plowing movement with a genetic algorithm according to claim 1, wherein the third step is: the robot starts from an initial position, carries out cattle-ploughing type movement, and if a grid which is not traversed exists in a current task target area, whether left and right adjacent grids at the current position of the robot are obstacles is judged, and the judgment is divided into three conditions: (1) If no obstacle exists, one grid is randomly selected from the left grid and the right grid to serve as the next navigation point of the robot; (2) If one of the grids is an obstacle, selecting a grid without the obstacle as a next navigation point; (3) If the two grids are both obstacles, the processing mode after judgment is the same as that of the left grid and the right grid, and if the upper grid, the lower grid, the left grid and the right grid at the current position of the robot are both obstacles, the nearest non-traversed grid is selected as the next navigation point of the robot by adopting an A-line algorithm; after a navigation point is determined, marking the navigation point grid as an obstacle; repeating the operation until the robot completely traverses the task target area; starting from the initial position of the robot, sequentially determining the digital arrangement formed by the grid codes of each navigation point in the traversing of the whole task target area, namely a primary chromosome; wherein the number of grids of the barrier-free grid in the target area of the robot task is K max Then the chromosome length is at most K max 。
5. The method for planning a full coverage path by combining cattle plowing type movement and genetic algorithm according to claim 4, wherein the fourth step is specifically as follows: for each generated chromosome, obtaining the actual motion path F represented by the chromosome by using an A-x algorithm 0 And make statistics ofThe path F 0 Length L of 0 Number of turns M 0 Upward movement distance L 1 And a downward movement distance L 2 The specific expression is as follows:
wherein the path length L 0 And the number of turns M 0 Upward movement distance L for restricting the time spent by the robot in completing the task 1 And a downward movement distance L 2 Related to the robot overcoming the gravity work, used for restraining the energy cost of the robot; a, b, c, d are lengths L respectively 0 Number of turns M 0 Upward movement distance L 1 And a downward movement distance L 2 The correction coefficients of the four physical quantities are determined by the performance parameters of the robot, and N F current generations are recorded simultaneously 0 Middle smallest F 0 N is more than or equal to 1;
for N F 0 Carrying out normalization processing, wherein the expression is as follows:
wherein F 0max And F 0min Are respectively N F 0 Maximum and minimum of (3), resulting in F 0 ' As fitness value of corresponding chromosome, then obtaining N chromosomes of next generation, namely next generation population by roulette.
6. The method for planning a full coverage path by combining cattle plowing movement and genetic algorithm according to claim 5, wherein the step five is to perform a crossover operation on the generated next generation population, specifically: for the next generation of N strips obtained by the selection operation, the length of the N strips is K max Starting from the first chromosome, a random number Rand E [0,1 ] is generated first]Cross probability P of Rand with initial setting c For comparison, if Rand > P c Then skip the current dyePerforming cross operation on the chromosomes, otherwise randomly selecting one chromosome from other N-1 chromosomes as a cross operation object of the current chromosome;
then, the A-star algorithm respectively calculates the actual distance between the two navigation points which are arranged in the front and back adjacent arrangement in the current chromosome and the selected chromosome, and 2 x (K) is obtained max -1) data;
judging the generation number of the current chromosome, if the generation number Gen is odd number, then from K of the current chromosome max -finding the maximum of 1 actual distance and setting the starting navigation point of the distance maximum as the intersection point of the current chromosome; if the generation Gen is even, K from the current chromosome max Randomly selecting one of the 1 actual distances to be greater than the length of one grid, and setting a starting navigation point of the distance as the intersection point of the current chromosome;
after the intersection point of the current chromosome is determined, searching a position in the selected chromosome, which is the same as the intersection point code, and adding the navigation point into the chromosome intersection segment from the position if the actual distance between the front and the back adjacent navigation points is a grid length until the actual distance between the front and the back adjacent navigation points is more than a grid length;
inserting the obtained chromosome cross segment into the cross point of the current chromosome, and deleting the repeated codes of the chromosome cross segment in the original current chromosome so as to ensure that the chromosome length is still K max 。
7. The method for planning a full coverage path by combining cattle plowing movement and genetic algorithm according to claim 6, wherein the mutation operation is performed on the next generation population generated in the fifth step, specifically: for N pieces of length K which finish the cross operation max Chromosomes, starting from the first chromosome, a random number Rand E [0,1 ] is generated]Comparing Rand with the initially set mutation probability P m For comparison, if Rand > P m Skipping the current chromosome, otherwise, performing mutation operation on the current chromosome;
then, calculating the distance between two adjacent navigation points in front of and behind the current chromosomeTo obtain K max -1 data, cutting off the current chromosome generation, if the generation Gen is odd, from K max -finding the maximum value among the 1 data and setting the starting navigation point corresponding to the value as a variation point; if the algebraic Gen is even, then K is the integer max Randomly selecting a distance of the length of a grid from 1 datum, and setting a starting navigation point of the distance as a variation point of the current chromosome;
after the variation point of the current chromosome is determined, starting from the variation point position, if the actual distance between two adjacent navigation points is a grid distance, adding the navigation point into the chromosome variation segment until the actual distance between the two adjacent navigation points is greater than one grid length;
and checking the obstacle conditions of four adjacent grids of the variation point grid, namely, the upper grid, the lower grid, the left grid and the right grid in the map, randomly selecting a non-obstacle grid from the variation point grid as a splicing point, and splicing the chromosome variation segment at the splicing point.
8. The method for planning a full coverage path by combining cattle farming movement and genetic algorithm according to claim 6, wherein the step five is repeated from step four to step five, population algebra optimization is performed, and when the population algebra reaches a maximum value, a final planned path is obtained, specifically:
repeating the operations of selection, intersection and variation to perform algebraic optimization on the obtained population until the population evolution algebraic reaches the maximum value GenMax, and recording GenMax F numbers recorded by the GenMax generation 0 Comparing the sizes, and selecting the minimum F 0 And the corresponding chromosome is used as the optimal chromosome, and the chromosome generates an actual movement path according to an A-star algorithm to obtain a final planning path.
9. A total coverage path planning apparatus combining cattle tilling motion and genetic algorithm, comprising one or more processors for implementing a total coverage path planning method combining cattle tilling motion and genetic algorithm according to any one of claims 1 to 8.
10. A computer-readable storage medium, having stored thereon a program which, when executed by a processor, implements a method of full-coverage path planning combining cattle-plowing motion and a genetic algorithm as claimed in any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310191246.0A CN115857516B (en) | 2023-03-02 | 2023-03-02 | Full-coverage path planning method and device combining cow ploughing type movement and genetic algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310191246.0A CN115857516B (en) | 2023-03-02 | 2023-03-02 | Full-coverage path planning method and device combining cow ploughing type movement and genetic algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115857516A true CN115857516A (en) | 2023-03-28 |
CN115857516B CN115857516B (en) | 2023-07-14 |
Family
ID=85659708
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310191246.0A Active CN115857516B (en) | 2023-03-02 | 2023-03-02 | Full-coverage path planning method and device combining cow ploughing type movement and genetic algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115857516B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116804556A (en) * | 2023-05-11 | 2023-09-26 | 之江实验室 | Probability maximization path planning method for arbitrary convex polygon robot |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109459052A (en) * | 2018-12-28 | 2019-03-12 | 上海大学 | A kind of sweeper complete coverage path planning method |
CN111664852A (en) * | 2020-06-15 | 2020-09-15 | 天津大学 | Unmanned aerial vehicle path planning method and device |
CN111667124A (en) * | 2020-06-30 | 2020-09-15 | 中国人民解放军军事科学院国防科技创新研究院 | Unmanned aerial vehicle path planning method and device |
CN112327862A (en) * | 2020-11-16 | 2021-02-05 | 北京理工大学 | Path planning method for multi-robot collaborative search in uncertain environment |
WO2021022637A1 (en) * | 2019-08-06 | 2021-02-11 | 南京赛沃夫海洋科技有限公司 | Unmanned surface vehicle path planning method and system based on improved genetic algorithm |
WO2021035911A1 (en) * | 2019-08-28 | 2021-03-04 | 青岛蓝海未来海洋科技有限责任公司 | Method and system for planning path of unmanned surface vehicle based on forward/reverse data-driven linear parameter-varying genetic algorithm |
CN113219984A (en) * | 2021-05-18 | 2021-08-06 | 大连海事大学 | Method for planning whole-area coverage path of unmanned surface vehicle |
CN114089765A (en) * | 2021-11-22 | 2022-02-25 | 江苏科技大学 | Urban green land-oriented traversing path planning method for mowing robot |
WO2022141737A1 (en) * | 2020-12-30 | 2022-07-07 | 东南大学 | Geometric folding type robot full-coverage path and generation method therefor |
CN115014362A (en) * | 2022-08-09 | 2022-09-06 | 之江实验室 | Cattle-farming full-coverage path planning method and device based on synthesis unit |
-
2023
- 2023-03-02 CN CN202310191246.0A patent/CN115857516B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109459052A (en) * | 2018-12-28 | 2019-03-12 | 上海大学 | A kind of sweeper complete coverage path planning method |
WO2021022637A1 (en) * | 2019-08-06 | 2021-02-11 | 南京赛沃夫海洋科技有限公司 | Unmanned surface vehicle path planning method and system based on improved genetic algorithm |
WO2021035911A1 (en) * | 2019-08-28 | 2021-03-04 | 青岛蓝海未来海洋科技有限责任公司 | Method and system for planning path of unmanned surface vehicle based on forward/reverse data-driven linear parameter-varying genetic algorithm |
CN111664852A (en) * | 2020-06-15 | 2020-09-15 | 天津大学 | Unmanned aerial vehicle path planning method and device |
CN111667124A (en) * | 2020-06-30 | 2020-09-15 | 中国人民解放军军事科学院国防科技创新研究院 | Unmanned aerial vehicle path planning method and device |
CN112327862A (en) * | 2020-11-16 | 2021-02-05 | 北京理工大学 | Path planning method for multi-robot collaborative search in uncertain environment |
WO2022141737A1 (en) * | 2020-12-30 | 2022-07-07 | 东南大学 | Geometric folding type robot full-coverage path and generation method therefor |
CN113219984A (en) * | 2021-05-18 | 2021-08-06 | 大连海事大学 | Method for planning whole-area coverage path of unmanned surface vehicle |
CN114089765A (en) * | 2021-11-22 | 2022-02-25 | 江苏科技大学 | Urban green land-oriented traversing path planning method for mowing robot |
CN115014362A (en) * | 2022-08-09 | 2022-09-06 | 之江实验室 | Cattle-farming full-coverage path planning method and device based on synthesis unit |
Non-Patent Citations (2)
Title |
---|
周巍;李元宗;: "基于改进遗传算法的煤矿探测机器人路径规划", 太原理工大学学报 * |
闫雪超;童东兵;陈巧玉;: "一种改进的机器人路径优化算法" * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116804556A (en) * | 2023-05-11 | 2023-09-26 | 之江实验室 | Probability maximization path planning method for arbitrary convex polygon robot |
Also Published As
Publication number | Publication date |
---|---|
CN115857516B (en) | 2023-07-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112017134B (en) | Path planning method, device, equipment and storage medium | |
Kallmann | Dynamic and robust local clearance triangulations | |
CN110361017B (en) | Grid method based full-traversal path planning method for sweeping robot | |
TWI718612B (en) | Method of operating route generator and computing system | |
CN115014362B (en) | Cattle-ploughing type full-coverage path planning method and device based on synthesis unit | |
CN107092978B (en) | Shortest path layered planning method for virtual earth | |
CN115857516A (en) | Method and device for planning full-coverage path by combining cattle-ploughing type movement and genetic algorithm | |
CN111080786A (en) | BIM-based indoor map model construction method and device | |
CN112237403B (en) | Covering path generation method for cleaning device and cleaning device | |
CN113673922A (en) | Fishbone type warehouse layout-based multi-vehicle picking path problem optimization method and system | |
CN110909961A (en) | BIM-based indoor path query method and device | |
CN113706715B (en) | Random controllable city generation method | |
CN108509532B (en) | Point gathering method and device applied to map | |
CN116764225A (en) | Efficient path-finding processing method, device, equipment and medium | |
CN116186571B (en) | Vehicle clustering method, device, computer equipment and storage medium | |
CN114442642B (en) | Path planning method, path planning device, computer equipment and storage medium | |
CN117007031A (en) | Map processing method, map processing device, medium and electronic equipment | |
CN115957505A (en) | Path finding method and device in game, computer equipment and readable storage medium | |
CN115049688B (en) | Grid map region division method and device based on reinforcement learning thought | |
CN115444311B (en) | Cleaning method for cleaning robot, storage medium, and cleaning robot | |
CN116820110B (en) | Ecological environment monitoring task planning method and device based on intelligent optimization algorithm | |
CN115630203B (en) | Method for generating n-ary tree and method and device for determining intersection relationship | |
CN114970927A (en) | Path confirmation method, path confirmation device, electronic equipment and storage medium | |
CN116105741A (en) | Multi-target three-dimensional dynamic path planning method and device | |
Künzli et al. | A memory search algorithm for path finding problems compared with a genetic algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |