CN113819919B - Robot optimal path planning method based on Boolean constraint - Google Patents
Robot optimal path planning method based on Boolean constraint Download PDFInfo
- Publication number
- CN113819919B CN113819919B CN202111128776.8A CN202111128776A CN113819919B CN 113819919 B CN113819919 B CN 113819919B CN 202111128776 A CN202111128776 A CN 202111128776A CN 113819919 B CN113819919 B CN 113819919B
- Authority
- CN
- China
- Prior art keywords
- task
- tasks
- sequence
- robot
- boolean
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
- G01C21/26—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
- G01C21/34—Route searching; Route guidance
- G01C21/3446—Details of route searching algorithms, e.g. Dijkstra, A*, arc-flags, using precalculated routes
Landscapes
- Engineering & Computer Science (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Automation & Control Theory (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)
- Numerical Control (AREA)
- Manipulator (AREA)
Abstract
A robot optimal path planning method based on Boolean constraint comprises the steps of dividing the global environment of a robot, and writing a space set and an adjacent matrix thereof; then, inputting the Boolean constraint task requirement of the robot, and updating the adjacency matrix according to the task requirement; then calculating and storing the shortest distance between tasks and the corresponding path; randomly generating an initial task sequence meeting the requirement of Boolean constraint task, and calculating the shortest moving distance and the corresponding path thereof; then, optimizing the initial task sequence by a simulated annealing algorithm; finally, outputting the optimal task sequence, the shortest moving distance and the corresponding path; the invention ensures that the robot has the shortest moving distance on the premise of meeting the task requirements, greatly reduces the moving cost and time cost of the robot, improves the efficiency and has good application prospect.
Description
Technical Field
The invention relates to the technical field of robots, in particular to a robot optimal path planning method based on Boolean constraint.
Technical Field
With the progress of science and technology and the development of society, the application of the mobile robot is more and more extensive, and the mobile robot relates to the fields of military affairs, industry, agriculture, families and the like. Three major core problems in the field of robot path planning research are robot positioning, task allocation and path planning techniques, where path planning is a prerequisite for a mobile robot to avoid obstacles to reach a task target and complete task content. For example: the household service type cleaning robot needs to carry out reasonable path planning on the indoor environment to complete the cleaning task; the agricultural picking robot needs path planning to pass through the crops to complete picking tasks; industrial robots also require path planning to accomplish a given task in a shared workspace.
The robot is widely applied to the aspects of home service, agricultural assistance, industrial environment, military assistance and the like. In these applications, robot path planning is particularly important, and the optimal robot path planning refers to: and finding a path which can complete the task requirement from the initial state to the target state and avoid all obstacles in the working environment, wherein the moving path is shortest.
After years of research, the optimal path planning method for general task requirements is relatively mature, however, with the increasing complexity of tasks, such as the optimal path planning of a robot with boolean constraints (boolean constraints mainly include and or non-three descriptions, and the task requirement with boolean constraints means that a path from an initial state to a target state of the robot meets the optimal path planning of the robot which must pass through some points to complete a task, select a part from some points to complete a task, and must avoid some points), the optimal path planning method for general task requirements cannot meet actual requirements.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention aims to provide a robot optimal path planning method based on Boolean constraint, so that the robot has the shortest moving distance on the premise of meeting task requirements, the moving cost and the time cost of the robot are reduced to a greater extent, the efficiency is improved, and the method has a good application prospect.
In order to achieve the purpose, the invention adopts the following technical scheme:
a robot optimal path planning method based on Boolean constraint comprises the following steps:
the method comprises the following steps: dividing the global environment of the robot, and writing a space set and an adjacent matrix thereof;
step two: inputting Boolean constraint task requirements of the robot;
step three: updating the adjacency matrix according to task requirements;
step four: calculating and storing the shortest distance and the corresponding path among the tasks;
step five: randomly generating an initial task sequence meeting the requirement of Boolean constraint task, and calculating the shortest moving distance and the corresponding path thereof;
step six: optimizing the initial task sequence by a simulated annealing algorithm;
step seven: and outputting the optimal task sequence, the shortest moving distance and the corresponding path.
The first step is specifically as follows:
the global environment is divided into m spaces, and the set R is set to { R ═ R1,R2,...,RmRepresents;
an adjacency matrix W ofAn m by m symmetric matrix if space RiAnd a space RjAre connected with each other and the distance between the two spaces is omegai,jIf W (i, j) ═ ωi,jOtherwise, W (i, j) ∞, and W (i, i) ∞, i 1, 2.
The second step is specifically as follows:
tasks are divided into five categories:
the first type: starting task, using set Ts={RsWherein s is more than or equal to 1 and less than or equal to m, and represents that the robot moves from the space RsStarting;
the second type: end point tasks, using set Te={ReWherein, e is more than or equal to 1 and less than or equal to m, which indicates that the robot finally stops in the space Re;
In the third category: boolean constrained AND tasks, using setsWherein v isaThe number of tasks that the robot must complete in the path is shown, and the Boolean constraint language is used to describe the 'AND' tasks as follows:
Wherein v isoIndicating the number of tasks to be selected and completed by the robot in the path, wherein the 1 st 'or' task is collectedIn which one space is selected to complete the task, the 2 nd OR task from the setTo select a space to complete the task, …, voFrom a set of OR tasksOne space is selected to complete the task, and the ith 'or' task is described by using a Boolean constraint language as follows:using all OR tasks as a set ToIs shown, i.e.
The fifth type: boolean constrained 'not' tasks, using setsWherein v ismRepresenting the space in the path that the robot must avoid passing, the language describing the "not" task in boolean constraints is:
then all tasks are described with boolean constraints as:
the third step is specifically as follows:
setting the rows and columns of all Boolean constrained 'not' tasks in the adjacency matrix to ∞, namely:
the fourth step is specifically as follows:
calculating the shortest moving distance between two spaces and the corresponding path by utilizing Dijkstra algorithm according to the adjacency matrix W, and calculating the secondary source point RiTo the target point RjThe flow of the shortest moving distance and path is as follows:
1) two sets S, U are created and a 1 xm all 0 matrix P is created, where S is the vertex for which the shortest path has been found, U is the vertex yet to be computed, let S Ri,U=U/(Ri∪Tm);
2) The vertex R with the minimum distance in the set U is divided intokAdding to the set S and adding RkAnd the space in which the "not" task of the Boolean constraint is located is taken out of the set U, i.e. S ═ U.Rk,U=U/Rk;
3) Updating the distance of the vertex in the set U if the vertex is from the source point RiTo the vertex RhIs greater than the source point RiTo the vertex RkPlus the vertex RkTo the vertex RhA distance of (d), i.e. di,h>di,k+dk,hThen update di,h=di,k+dk,hAnd recording the vertex RhLast vertex R ofkI.e., p (h) ═ k;
4) if the target point R isjC, returning to the step 2) for continuing if the target point R belongs to the UjE S, output from source point RiTo the target point RjShortest moving distance di,j;
5) Solving path l by backtracking method according to matrix Pi,j:
Respectively calculating sets T by utilizing the Dijkstra algorithmsInnerhouse sum set (T)a∪To) Shortest moving distance between inner libraries and corresponding path, set (T)a∪To) Shortest moving distance between each of the libraries and corresponding path and set (T)a∪To) Innerhouse and collectionsTShortest travel distance and corresponding path between e-repositories, i.e. RsAndin the middle of the above-mentioned period,between the two groups of the two groups,and the shortest moving distance and corresponding path between Re, and mixing them with { Ri,Rj,di,j,li,jStore it in the form of.
The fifth step is specifically as follows:
according to the task requirements of Boolean constraints, all 'AND' tasks are selected and one task in each 'OR' task is selected to form a midway task sequence, namely:wherein V is required to be completeda+voA midway task and randomly sequencing the selected tasksAnd inserting starting point tasks R at the head and the tail respectivelySAnd end point task ReGenerating an initial sequence of tasksReading the stored data to obtain the shortest moving distance of the current task sequence The shortest moving distance corresponds to a path of And the following operations are carried out:
and (3) optimal task sequence: mbest=M;
Shortest moving distance of optimal task sequence: dbest=D;
The path corresponding to the shortest moving distance of the optimal task sequence is as follows: l isbest=L。
The sixth step is specifically as follows:
performing simulated annealing operation on the initial task sequence from the initial temperatureStart and orderAfter sufficient search at each temperature the temperature is reduced to the next temperature by the attenuation coefficient alpha,until the temperature is reduced to a termination temperatureIn the following, the following steps were carried out,the sequence of tasks at each temperature may result in three operations:
first operation, two-point swap operation:
in a task sequenceIn randomly selecting two midway tasksAndinterchanging positions generates a new sequence of tasks, assuming i < j, i.e.: it is to be noted that as a note,
the second operation, the reverse operation:
in a task sequenceIn randomly selecting two midway tasksAndand for tasks included in the middleAndthe sequence in the method carries out reverse operation, and if i is less than j, a new task sequence is generated, namely: it is to be noted that as a note,
third, reinsertion:
randomly selecting a task set in an OR task1≤k≤voAnd from task collectionsRandomly selecting a taskFinding a set of tasks belonging to a task sequence MIntermediate task of (2)If it is notAndsame, re-slave task setRandomly selecting a taskUp toAnddifferent after useInstead of in task sequence MNamely:it is to be noted that as a note,
after obtaining a new task sequence M*The shortest moving distance D of the task sequence is calculated*And its corresponding path L*And the following operations are carried out:
if a new task sequence M*Better than the task sequence M, i.e. D*If < D, let: m is M*,D=D*,L=L*;
In addition, e.g. new task sequences M*Than optimal task sequence MbestMore preferably, i.e. D*<DbestThen, order:
Mbest=M*,Dbest=D*,Lbest=L*;
if a new task sequence M*Not better than the task sequence M, i.e. D*> D, then by probabilityAccepting this new sequence of tasks, then let:
M=M*,D=D*,L=L*。
the seventh step specifically comprises:
when the temperature is lowered to the termination temperatureWhen the following time isOutputting the optimal task sequence MbestShortest moving distance DbestAnd its corresponding path Lbest。
The invention has the beneficial effects that:
for a given global environment and task requirements based on Boolean constraints, the combination of task selection and the arrangement of task sequences have multiple possibilities, and for different task selections and task sequences, the corresponding movement distances of the robot can have great differences, so how to select tasks from the Boolean constrained tasks, how to sequence the tasks, and how to select an optimal path avoiding all obstacles among various task points are necessary. The method comprises the steps of solving and storing the shortest moving distance and the corresponding path among all possible associated task points by using a Dijkstra algorithm and an intelligent algorithm of a simulated annealing algorithm, randomly selecting tasks meeting Boolean constraints to generate an initial task sequence, carrying out simulated annealing operation on the initial task sequence, and finally finding out the optimal task sequence, the shortest moving distance and the corresponding path; the invention has good universality, can quickly find the optimal task sequence, the shortest moving distance and the corresponding path thereof, greatly reduces the moving cost and the time cost, enlarges the application field of the robot, replaces people to complete complex work tasks, improves the automation level of production and life, and has good application prospect.
The invention has universality, not only can plan and complete the optimal path meeting the requirement of Boolean constraint task, but also can make the sum of the moving distances of the robot shortest, thereby achieving the purpose of reducing the moving cost and time consumption; and the method is also combined with an intelligent algorithm to improve the efficiency of calculation.
Drawings
FIG. 1 is a block flow diagram of the method of the present invention.
FIG. 2 is a diagram of the global environment of an embodiment robot.
Fig. 3 is a spatial ensemble diagram of an embodiment robot.
Fig. 4 is a block flow diagram of a step five simulated annealing operation.
FIG. 5 is an optimal path planning diagram for an embodiment robot.
Detailed Description
The invention is further illustrated below with reference to examples and figures.
Referring to fig. 1, a robot optimal path planning method based on boolean constraints includes the following steps:
the method comprises the following steps: dividing the global environment of the robot, and writing a space set and an adjacent matrix thereof;
as shown in fig. 2, the robot global environment of the present embodiment is divided into 28 spaces, and the sets R ═ R are used respectively1,R2,...,R28Denotes, as shown in fig. 3;
the adjacency matrix W is a 28X 8 symmetric matrix if the space RiAnd a space RjAre connected with each other and the distance between the two spaces is omegai,jWhen W (i, j) is ωi,jOtherwise, W (i, j) ∞, and W (i, i) ∞, 0,1, 2. In this embodiment, if the distance between all adjacent spaces is 1, an adjacency matrix W may be written according to fig. 4, where W (1, 1) is 0, W (1, 3) is 1, W (2, 2) is 0, W (2, 3) is 1, W (3, 1) is 1, W (3, 2) is 1, W (3, 3) is 0, W (3, 4) is 1, W (3, 10) is 1, W (4, 3) is 1, W (4, 4) is 0, W (4, 6) is 1, W (4, 9) is 1, W (5, 5) is 0, W (5, 6) is 1, W (6, 4) is 1, W (6, 5) is 1, W (6) is 0, W (6, 7), W (6), W (7) is 1, W (7), W (8) is 8, W (8) is 0, 9) w (1, 3) is 1, W (9, 4) is 1, W (9, 8) is 1, W (9, 9) is 0, W (9, 10) is 1, W (10, 3) is 1, W (10, 9) is 1, W (10, 10) is 0, W (10, 11) is 1, W (10, 31) is 1, W (11, 10) is 1, W (11, 11) is 0, W (11, 12) is 1, W (12, 11) is 1, W (12, 12) is 0, W (12, 13) is 1, W (13, 10) is 1, W (13, 12) is 1, W (13, 13) is 0, W (13, 14) is 1, W (13, 18) is 1, W (13, 13), W (13, 16) is 1, W (15, 16) is 15, 16, W (15, 16) is 1, W (15, 16), w (16, 17) is 1, W (17, 17) is 0, W (17, 18) is 1, W (17, 24) is 1, W (18, 13) is 1, W (18, 17) is 1, W (18, 18) is 0, W (18, 20) is 1, W (18, 22) is 1, W (19, 13) is 1, W (19, 19) is 0, W (19, 20) is 1, W (20,18) is 1, W (20, 19) 1, W (20,20) is 0, W (20, 21) is 1, W (21,20) is 1, W (21,21) is 0, W (21,22) is 1, W (22, 18) is 1, W (22,22) is 1, W (21,22) is 1, W (22) is 1, W (23) is 1, 23) is 1, W (23, 23) is 1, w (24,17) is 1, W (24,22) is 1, W (24,24) is 0, and W (25,23) is 01,W(25,25)=0,W(25,28)=1,W(26,22)=1,W(26,26)=0,W(26,27)=1,W(27,26)=1,W(27,27)=0,W(28,25)=1,W(28,28)=0;
Step two: inputting Boolean constraint task requirements of the robot; as shown in fig. 3, the tasks are mainly divided into five types, and the five types of tasks in this embodiment are as follows:
the first type: starting task, using set Ts={R1Represents the robot from space R1Starting;
the second type: end point task, using set Te={R27Wherein, e is more than or equal to 1 and less than or equal to m, which indicates that the robot finally stops in the space R27;
In the third category: boolean constrained AND task, with set Ta={R4,R8,R19And the number of tasks which the robot must complete in the path is 3, and the and task is described by using a Boolean constraint language: r4∧R8∧R19;
The fourth type: boolean constrained OR tasks, using sets respectively The robot has to choose to complete 3 tasks in the path, where the 1 st "or" task is from the setIn which one task is selected to be completed, the 2 nd "or" task is selected from the setIn which one task is selected to be completed, the 3 rd 'or' task is selected from the setOne task is selected to be completed, and the 1 st 'or' task is described by using the language of Boolean constraint as follows: r7∨R17∨R20Cloth for use in sportsThe language of the Er constraint describes that the 2 nd "OR" task is: r13∨R16∨R24The language of boolean constraints describes the 3 rd "or" task as: r11∨R22Using all OR tasks as a set ToIs shown, i.e.
The fifth type: boolean constrained 'NOT' tasks, using the set Tm={R12,R15,R21And 3 space robots in the path must avoid passing through, and the Boolean constraint language describes the 'not' task as:
then all tasks are described with boolean constraints as:
step three: updating the adjacency matrix according to task requirements;
setting the rows and columns of all Boolean constrained 'not' tasks in the adjacency matrix to ∞, namely:
W(12,:)=∞,W(:,12)=∞,W(15,:)=∞,W(:,15)=
infinity, W (21: ∞), W (: 21 ∞); namely, updating W (12, 11) ∞,
W(12,12)=∞,W(12,13)=∞,W(11,12)=∞,W(13,12)=∞,
W(15,15)=∞,W(15,16)=∞,W(16,15)=∞,W(21,20)=∞,
W(21,21)=∞,W(21,22)=∞,W(20,21)=∞,W(22,21)=∞;
step four: calculating and storing the shortest distance and the corresponding path among the tasks;
calculating the shortest moving distance between two spaces and the corresponding path by utilizing Dijkstra algorithm according to the adjacency matrix W, and calculating the secondary source point RiTo the target point RjThe flow of the shortest moving distance and path is as follows:
1) two sets S, U are created and a 1 xm all 0 matrix P is created, where S is the vertex for which the shortest path has been found, U is the vertex yet to be computed, let S Ri,U=U/(Ri∪Tm);
2) The vertex R with the minimum distance in the set UkAdding to the set S and adding RkAnd the space in which the Boolean constraint "not" task is located is taken out of the set U, i.e. S ═ R-k,U=U/Rk;
3) Updating the distance of the vertex in the set U if the vertex is from the source point RiTo the vertex RhIs greater than the source point RiTo the vertex RkPlus the vertex RkTo the vertex RhA distance of, i.e. di,h>di,k+dk,hThen update di,h=di,k+dk,hAnd recording the vertex RhLast vertex R ofkI.e., p (h) ═ k;
4) if the target point R isjC, returning to the step 2) for continuing if the target point R belongs to the UjE S, output from source point RiTo the target point RjShortest moving distance di,j;
5) Solving path l by backtracking method according to matrix Pi,j:
Respectively calculating sets T by utilizing the Dijkstra algorithmsInnerhouse sum set (T)a∪To) Shortest moving distance between inner libraries and corresponding path, set (T)a∪To) Shortest moving distance between each of the libraries and corresponding path and set (T)a∪To) Internal library and set TeShortest moving distance between internal stores and corresponding path, R1And
R4,R7,R8,R11,R13,R16,R17,R19,R20,R22,R24in the above-mentioned manner,
R4,R7,R8,R11,R13,R16,R17,R19,R20,R22,R24between the two groups of the two groups,
R4,R7,R8,R11,R13,R16,R17,R19,R20,R22,R24and R27The shortest moving distance between them and the corresponding path, and set it as { R }i,Rj,di,j,li,jStoring in the form of';
calculating d of the present embodiment1,4=1,l1,4={p1,p3,p4};
d1,8=4,l1,8={p1,p3,p4,p6,p8};…;
d11,27=6,l11,27={p11,p10,p13,p18,p22,p26,p27};
d22,27=2,l22,27={p22,p26,p27As shown in table 1, the following components,
TABLE 1
It is essential that from the source point RiTo the target point RjAnd a source point RjTo the target point RiThe shortest moving distances are the same, and the paths are in a reverse order relation, so that only one path needs to be stored;
step five: randomly generating an initial task sequence meeting the requirement of Boolean constraint task, and calculating the shortest moving distance and the corresponding path thereof;
referring to fig. 4, according to the task requirements of the boolean constraint, selecting all and tasks and selecting one task in each or task constitutes a midway task sequence, such as:
R4,R8,R19,R17,R13,R22wherein 6 intermediate tasks are required to be completed in total and the selected tasks are randomly ordered (e.g. R)19,R22,R13,R4,R17,R8) And inserting starting point tasks R at the head and the tail respectively1And end point task R27Generating an initial task sequence M ═ R1,R19,R22,R13,R4,R17,R8,R27D, the shortest moving distance D of the current task sequence M can be obtained by reading the stored data1,19+d19,22+d22,13+d13,4+d4,17+d17,8+d8,27The shortest moving distance corresponds to a path L of 29 ═ L1,19,l19,22,l22,13,l13,4,l4,17,l17,8,l8,27}; namely:
L={R1,R3,R10,R13,R19,R13,R18,R22,R20,R13,R10,R3,R4,R3,R10,R13,R18,R17,R18,R13,R10,R9,R8,R9,R10,R13,R18,R22,R26,R27}
and the following operations are carried out:
and (3) an optimal task sequence: mbest=M;
Shortest moving distance of optimal task sequence: dbest=D;
The path corresponding to the shortest moving distance of the optimal task sequence is as follows: l is a radical of an alcoholbest=L;
Step six: optimizing the initial task sequence by a simulated annealing algorithm;
performing simulated annealing operation on the initial task sequence from the initial temperatureStart and orderAfter sufficient search at each temperature, the temperature is reduced to the next temperature by the attenuation coefficient alpha,until the temperature is reduced to a termination temperatureUp to the followingIn this example, the initial temperature is takenAttenuation coefficient α is 0.9, end temperature The sequence of tasks at each temperature may result in three operations:
first operation, two-point swap operation:
in task sequence M ═ R1,R19,R22,R13,R4,R17,R8,R27Randomly selecting two midway tasksAnd(assuming i < j) interchanging positions to generate a new sequence of tasks, assuming two midway tasks R are selected22And R17And then: m*={R1,R19,R17,R13,R4,R22,R8,R27};
The second operation, the reverse operation:
in task sequence M ═ { R ═ R1,R19,R22,R13,R4,R17,R8,R27Randomly selecting two midway tasksAnd(assume i < j) and include in-flight tasksAndthe sequence within the sequence is inverted to generate a new sequence of tasks, assuming that two intermediate tasks R are selected22And R17Then: m*={R,R19,R17,R4,R13,R22,R8,R27};
Third, reinsertion:
randomly in the OR task, k is more than or equal to 1 and less than or equal to 3, and the task set is selectedRandomly selecting a taskAssuming k is 2, the task set is followedRandomly selecting a task R22In task sequence M ═ { R ═ R1,R19,R22,R13,R4,R17,R8,R27Find belonging to task setIntermediate task R of22Task identity, assuming a new slave set from the task setRandomly selecting a task as R16With R16Replacing R in task sequence M22Namely: m is a group of*={R1,R19,R16,R13,R4,R17,R8,R27};
Obtaining a new task sequence M*The shortest moving distance D of the task sequence is calculated*And its corresponding path L*And the following operations are carried out:
if a new task sequence M*Better than the task sequence M, i.e. D*If < D, let: m is M*,D=D*,L=L*;
In addition, as new task sequences M*Than optimal task sequence MbestMore preferably, i.e. D*<DbestThen, order:
Mbest=M*,Dbest=D*,Lbest=L*;
if a new task sequence M*Not better than the task sequence M, i.e. D*If > D, then with a certain probabilityAccepting this new sequence of tasks, then let:
M=M*,D=D*,L=L*;
in this example, 10 searches at each temperature are considered to have been adequately searched at that temperature, and the search is performed with the temperature decaying to the next temperature;
step seven: outputting an optimal task sequence, a shortest moving distance and a corresponding path;
in this embodiment, when the temperature is lowered to the termination temperatureWhen the following are performed Transporting an optimal task sequence M through an MATLAB programbest={R1,R4,R8,R13,R19,R20,R22,R27The shortest moving distance Dbest13, and its corresponding path Lbest={R1,R3,R4,R9,R8,R9,R10,R13,R19,R20,R18,R22,R26,R27As shown in fig. 5.
In this embodiment, for a given global context and boolean constraint-based task requirements, there are a total of 3 x 2 "or" task selection cases, and for the arrangement of "and" tasks and selected "or" tasks (6 tasks in total)Therefore, a commonAnd (4) possibility. The method of enumeration or linear programming is used for solving the problems, which needs to consume a large amount of time cost, so that how to select tasks from Boolean constrained tasks, how to sequence the tasks, and how to select the optimal path avoiding all obstacles among all task points are necessary. In the embodiment, the Dijkstra algorithm is combined with an intelligent algorithm of a simulated annealing algorithm, the shortest moving distance and the corresponding path between all task points are solved and stored through the Dijkstra algorithm, tasks meeting Boolean constraints are randomly selected to generate an initial task sequence, simulated annealing operation is performed on the initial task sequence, and finally the optimal task sequence, the shortest moving distance and the corresponding path are found. In the embodiment, the optimal task sequence, the shortest moving distance and the corresponding path can be found only by taking about 4 seconds, so that the moving cost and the time cost are reduced to a greater extent. Aiming at the problems of larger scale, the method provided by the invention can still solve the problems rapidly and efficiently by using an intelligent algorithm, and has good universality.
Claims (6)
1. A robot optimal path planning method based on Boolean constraint is characterized by comprising the following steps:
the method comprises the following steps: dividing the global environment of the robot, and writing a space set and an adjacent matrix thereof;
step two: inputting Boolean constraint task requirements of the robot;
step three: updating the adjacency matrix according to task requirements;
step four: calculating and storing the shortest distance and the corresponding path among the tasks;
step five: randomly generating an initial task sequence meeting the requirement of Boolean constraint task, and calculating the shortest moving distance and the corresponding path thereof;
step six: optimizing the initial task sequence by a simulated annealing algorithm;
step seven: outputting an optimal task sequence, a shortest moving distance and a corresponding path;
the first step is specifically as follows:
the global environment is divided into m spaces, and the set R is set to { R ═ R1,R2,...,RmRepresents;
the adjacency matrix W is an m × m symmetric matrix if the space RiAnd a space RjAre connected with each other and the distance between the two spaces is omegai,jWhen W (i, j) is ωi,jOtherwise W (i, j) ∞, and W (i, i) ∞, i ∞ 1, 2.
The second step is specifically as follows:
tasks are divided into five categories:
the first type: starting task, using set Ts={RsWhere 1. ltoreq. s.ltoreq.m, indicating that the robot is moving from space RsStarting;
the second type: end point tasks, using set Te={ReWherein, e is more than or equal to 1 and less than or equal to m, which indicates that the robot finally stops in the space Re;
In the third category: boolean constrained AND tasks, using setsWherein v isaThe number of tasks that the robot must complete in the path is shown, and the Boolean constraint language is used to describe the 'AND' tasks as follows:
the fourth type: boolean constrained OR tasks, using sets respectively Wherein v isoIndicating the number of tasks to be selected and completed by the robot in the path, wherein the 1 st 'or' task is collected from the setIn which one space is selected to complete the task, the 2 nd OR task from the setWherein one space is selected to complete the taskoFrom a set of OR tasksOne space is selected to complete the task, and the ith 'or' task is described by using a Boolean constraint language as follows:using all OR tasks as a set ToIs shown, i.e.
The fifth type: boolean constrained 'not' tasks, using setsWherein v ismRepresenting the space in the path that the robot must avoid passing, the language describing the "not" task in boolean constraints is:
then all tasks are described with boolean constraints as:
3. the Boolean constraint-based optimal path planning method for the robot according to claim 2, wherein the fourth step specifically comprises:
calculating the shortest moving distance between two spaces and the corresponding path by utilizing Dijkstra algorithm according to the adjacency matrix W, and calculating the secondary source point RiTo the target point RjThe flow of the shortest moving distance and path is as follows:
1) two sets S, U are created and a 1 xm all 0 matrix P is created, where S is the vertex for which the shortest path has been found, U is the vertex yet to be computed, let S Ri,U=U/(Ri∪Tm);
2) The vertex R with the minimum distance in the set U is divided intokAdding to the set S and adding RkAnd the space in which the "not" task of the Boolean constraint is located is taken out of the set U, i.e. S ═ U.Rk,U=U/Rk;
3) Updating the distance of the vertex in the set U if the vertex is from the source point RiTo the vertex RhIs greater than the source point RiTo the vertex RkPlus the vertex RkTo the vertex RhA distance of, i.e. di,h>di,k+dk,hThen update di,h=di,k+dk,hAnd recording the vertex RhLast vertex R ofkI.e., p (h) ═ k;
4) if the target point R isjC, returning to the step 2) for continuing if the target point R belongs to the UjE S, output from source point RiTo the target point RjShortest moving distance di,j;
5) Solving path l by backtracking method according to matrix Pi,j:
Separately computing sets using the Djjkstra algorithm described aboveTsInternal pool (T)a∪To) Shortest moving distance between inner libraries and corresponding path, set (T)a∪To) Shortest moving distance between the libraries and corresponding route and set (T)a∪To) Internal library and set TeShortest travel distance between repositories and corresponding path, RsAndin the above-mentioned manner,between the two groups of the two groups,and ReThe shortest moving distance between them and the corresponding path, and set it as { R }i,Rj,di,j,li,jStore it in the form of.
4. The Boolean constraint-based optimal path planning method for the robot according to claim 3, wherein the fifth step specifically comprises:
according to the task requirements of Boolean constraints, all 'AND' tasks are selected and one task in each 'OR' task is selected to form a midway task sequence, namely:
wherein V is required to be completeda+voA midway task and randomly sequencing the selected tasksAnd inserting starting point tasks R at the head and the tail respectivelysAnd end point task ReGenerating an initial sequence of tasksReading the stored data to obtain the shortest moving distance of the current task sequence The shortest moving distance corresponds to a path ofAnd the following operations are carried out:
and (3) optimal task sequence: m is a group ofbest=M;
Shortest moving distance of optimal task sequence: dbest=D;
The path corresponding to the shortest moving distance of the optimal task sequence is as follows: l isbest=L。
5. The Boolean constraint-based optimal path planning method for the robot according to claim 4, wherein the sixth step specifically comprises:
performing simulated annealing operation on the initial task sequence from the initial temperatureStart and orderAfter sufficient search at each temperature, the temperature is reduced to the next temperature by the attenuation coefficient alpha,until the temperature dropsLow to end temperatureIn the following, the following steps were carried out,the sequence of tasks at each temperature may result in three operations:
first operation, two-point swap operation:
in task sequenceIn randomly selecting two midway tasksAndinterchanging positions generates a new sequence of tasks, assuming i < j, i.e.:it is to be noted that as a note,
the second operation, the reverse operation:
in a task sequenceIn randomly selecting two midway tasksAndand for tasks included in the middleAndthe sequence in the method carries out reverse order operation, and if i is less than j, a new task sequence is generated, namely:it is to be noted that as a note,
third, reinsertion:
randomly selecting a task set in an OR task1≤k≤voAnd from task collectionsRandomly selecting a taskFinding a set of tasks belonging to a task sequence MIntermediate task of (2)If it is notAndsame, re-slave task setRandomly selecting a taskUp toAndafter different useInstead of in task sequence MNamely:it is to be noted that, as noted,
after obtaining a new task sequence M*The shortest moving distance D of the task sequence is calculated*And its corresponding path L*And the following operations are carried out:
if a new task sequence M*Better than the task sequence M, i.e. D*If < D, let: m is M*,D=D*,L=L*;
In addition, e.g. new task sequences M*Than optimal task sequence MbestMore preferably, i.e. D*<DbestThen, order:
Mbest=M*,Dbest=D*,Lbest=L*;
if a new task sequence M*Not better than the task sequence M, i.e. D*> D, then by probabilityAccepting this new sequence of tasks, then let:
M=M*,D=D*,L=L*。
6. the Boolean constraint-based optimal path planning method for the robot according to claim 5, wherein the seventh step specifically comprises:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111128776.8A CN113819919B (en) | 2021-09-26 | 2021-09-26 | Robot optimal path planning method based on Boolean constraint |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111128776.8A CN113819919B (en) | 2021-09-26 | 2021-09-26 | Robot optimal path planning method based on Boolean constraint |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113819919A CN113819919A (en) | 2021-12-21 |
CN113819919B true CN113819919B (en) | 2022-07-01 |
Family
ID=78921372
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111128776.8A Active CN113819919B (en) | 2021-09-26 | 2021-09-26 | Robot optimal path planning method based on Boolean constraint |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113819919B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117075596B (en) * | 2023-05-24 | 2024-04-26 | 陕西科技大学 | Method and system for planning complex task path of robot under uncertain environment and motion |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109141430A (en) * | 2018-09-04 | 2019-01-04 | 南京理工大学 | Electric inspection process robot path planning method based on simulated annealing ant group algorithm |
LU102400A1 (en) * | 2019-08-06 | 2021-02-09 | Nanjing Seawolf Ocean Tech Co Ltd | Path planning method and system for unmanned surface vehicle based on improved genetic algorithm |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
IT201700056428A1 (en) * | 2017-05-24 | 2018-11-24 | Telespazio Spa | INNOVATIVE SATELLITE SCHEDULING METHOD BASED ON GENETIC ALGORITHMS AND SIMULATED ANNEALING AND RELATIVE MISSION PLANNER |
CN107196858B (en) * | 2017-07-04 | 2020-06-23 | 西安理工大学 | K shortest path solving method considering multi-type constraints |
CN112965500B (en) * | 2021-03-27 | 2022-07-05 | 同济大学 | Path planning method and device with must-pass point set and additional hard constraints |
CN112951399A (en) * | 2021-03-31 | 2021-06-11 | 广东医通软件有限公司 | Intelligent scheduling method and scheduling system |
-
2021
- 2021-09-26 CN CN202111128776.8A patent/CN113819919B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109141430A (en) * | 2018-09-04 | 2019-01-04 | 南京理工大学 | Electric inspection process robot path planning method based on simulated annealing ant group algorithm |
LU102400A1 (en) * | 2019-08-06 | 2021-02-09 | Nanjing Seawolf Ocean Tech Co Ltd | Path planning method and system for unmanned surface vehicle based on improved genetic algorithm |
Non-Patent Citations (1)
Title |
---|
基于遗传模拟退火算法的移动机器人路径规划;方惠蓉;《漳州职业技术学院学报》;20080415(第02期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113819919A (en) | 2021-12-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109542103B (en) | Robot welding path planning method based on firework particle swarm algorithm | |
CN110632907B (en) | Scheduling optimization method and system for distributed assembly type replacement flow shop | |
Svestka et al. | Coordinated motion planning for multiple car-like robots using probabilistic roadmaps | |
CN111611274A (en) | Database query optimization method and system | |
CN110802601B (en) | Robot path planning method based on fruit fly optimization algorithm | |
Rossi et al. | Integration of hybrid additive/subtractive manufacturing planning and scheduling by metaheuristics | |
CN113819919B (en) | Robot optimal path planning method based on Boolean constraint | |
Mansour et al. | Particle swarm optimization approach for protein structure prediction in the 3D HP model | |
Tseng | Guided genetic algorithms for solving a larger constraint assembly problem | |
CN115132270A (en) | Drug screening method and system | |
Zhang et al. | Robot path planning based on genetic algorithm with hybrid initialization method | |
Tseng et al. | A particle swarm optimisation algorithm for multi-plant assembly sequence planning with integrated assembly sequence planning and plant assignment | |
CN109991950A (en) | The balance ameliorative way of cooperation robotic asssembly production line based on genetic algorithm | |
Huang et al. | Obstacle-avoiding octagonal Steiner tree construction based on particle swarm optimization | |
CN112462704A (en) | Mixed flow batch scheduling optimization method for sensor workshop production | |
Jiang et al. | A control system of rail-guided vehicle assisted by transdifferentiation strategy of lower organisms | |
CN113792494B (en) | Multi-target flexible job shop scheduling method based on migration bird swarm algorithm and cross fusion | |
Bahubalendruni | Computer aided optimal robotic assembly sequence generation | |
Martinez | Computational tools for genomic studies in plants | |
CN114742593A (en) | Logistics storage center optimal site selection method and system | |
CN115700647A (en) | Workshop flexible operation scheduling method based on tabu search genetic algorithm | |
CN117215275B (en) | Large-scale dynamic double-effect scheduling method for flexible workshop based on genetic programming | |
Zhang et al. | A Robot Spraying Path Planning Method for the Digital Camouflage Pattern | |
Li et al. | Mobile robot path planning based on Q-learning algorithm | |
CN114610034B (en) | Mobile robot path planning method |
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 |