CN110967015B - Path planning method and system - Google Patents

Path planning method and system Download PDF

Info

Publication number
CN110967015B
CN110967015B CN201911138928.5A CN201911138928A CN110967015B CN 110967015 B CN110967015 B CN 110967015B CN 201911138928 A CN201911138928 A CN 201911138928A CN 110967015 B CN110967015 B CN 110967015B
Authority
CN
China
Prior art keywords
point
jumping
path
jump
search
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
Application number
CN201911138928.5A
Other languages
Chinese (zh)
Other versions
CN110967015A (en
Inventor
尹全军
焦鹏
谢旭
胡越
秦龙
彭勇
杨妹
王鹏
曾云秀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National University of Defense Technology
Original Assignee
National University of Defense Technology
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by National University of Defense Technology filed Critical National University of Defense Technology
Priority to CN201911138928.5A priority Critical patent/CN110967015B/en
Publication of CN110967015A publication Critical patent/CN110967015A/en
Application granted granted Critical
Publication of CN110967015B publication Critical patent/CN110967015B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/20Instruments for performing navigational calculations

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a path planning method and a system, wherein the method comprises the steps of preprocessing the positions of grid points of collapse jumping points in a uniform grid map; acquiring a starting point position and an end point position; when an optimal composite main sequence path needs to be searched between a starting point and an end point, a connect-search is adopted to search the optimal path, and pruning is carried out when a starting child node is generated in a connection process and/or when a jumping point is expanded in a search process; and combining the pruning process with the optimal priority search of the A-algorithm to construct and store an optimal path between the starting point and the end point. The problems of information loss, limited speed and the like in the prior art are solved, and the search speed is improved.

Description

Path planning method and system
Technical Field
The invention relates to the technical field of artificial intelligence path planning, in particular to a path planning method and system based on a geometric container.
Background
In the field of artificial intelligence, robotics and computer game intelligence are seen as a comprehensive field of modeling human perception, planning, decision-making and action abilities in complex environments. In recent years, various types of robots are widely used in production and life, and the attention of the academic and industrial communities to the intelligence of computer games is gradually increased, and typical examples include StarCraft game AI developed by deep gid team and Dota game AI developed by OpenAI company. As a basis of various aspects of technologies of robots and game Non-Player Characters (NPC), shortest Path Planning technology based on uniform Grid maps (uniform grids) has made remarkable progress in the last decade as a GPPC (Grid-based Path Planning composites) competition takes place and an industry boundary opens a typical map test set. As a basic service, in the technical fields of classical heuristic search problem solving technology and map space topological structure extraction in artificial intelligence, limited computing resources in many scenes need to simultaneously respond to path planning requests of a large number of intelligent agents, so that the quick response capability of the planning technology is most concerned.
One of the most well-known algorithms is known as Jump Point Search (JPS, Jump Point Search), and was proposed mainly by doctor Daniel Harabor, university of Monnash, Australia (Harabor D, Grastinen A. Online Graph learning for Pathofin on Grid Maps [ C ]// National Conference on architectural Intelligent interest.2011: 1114-1119. Harabor D, Grastinen A. improving Jump Point Search [ C ]// National Conference on Automated searching and scheduling.2014.). When the agent moves on the grid map, the JPS determines the diagonal direction movement priority path as a main partial order (direct-first conditional ordering) in symmetrical paths with the same starting point and end point and the same length, and eliminates all other paths which do not meet the principle out of a search space. It is theorized that there is at least one shortest path between any two locations that can be traveled that satisfies the rule. As shown in FIG. 1, child nodes (shown in gray) that are culled by the partial ordering rule may typically be reached by the parent node of the current node from a shorter path or a path of the same length but with an earlier occurrence of a diagonal shift. In general, such pruning recursive use may leave only 1 or 0 child nodes of a node, which not only reduces the branching factor of the node being expanded, but also reduces the branching factor of the child nodes.
In addition, when the JPS applies the a-star algorithm, intermediate nodes are not added to the Open table, and unless a node in fig. 1(c) is encountered, which needs to expand the forwarding direction to other branches, such a node is added to the Open table to be expanded. Intermediate nodes will all be skipped and so the particular node in fig. 1(c) is referred to as a "hop".
The JPS algorithm only needs on-line processing and does not relate to map preprocessing, and compared with a simple A-algorithm, the speed is improved by one order of magnitude. But one major disadvantage is that extensive row-by-row and column-by-column scanning and judgment of intermediate nodes is required when expanding the nodes. Based on this, JPS + calculates and stores, in the offline phase, for each passable direction of each passable node, the distance to the first jump point or obstacle reachable through that direction. This pre-stored information further increases the search speed. Furthermore, JPS + (P) adopts a transit pruning (intermediate pruning) technology during searching, diagonal jump points are regarded as transition nodes, and an Open table is not added for processing, so that the operation times of the Open table are reduced to a certain extent compared with JPS +.
The performance of the JPS is further greatly improved by combining the pruning technology of the Geometric Containers (Geometric Containers). Geometric container technology is a class of target-directed acceleration techniques used to prune edges that are unlikely to be the current node to reach the target location via the shortest path in the search phase, where the simplest and most efficient version becomes Bounding Boxes (Bounding Boxes). The method incorporating this technology is therefore called JPS + BB (Rabin S, Sturtevant N R. combining Bounding Boxes and JPS to round Grid Pathofining [ C ]// AAAI reference on Artificial Intelligence analysis.2016: 746-.
In general, the offline stage JPS + BB first initializes a blank rectangular box for each edge in the graph, and then runs the Dijkstra algorithm with diagonalfirst skewness from each passable node to cover all other nodes passing through it. When the Dijkstra algorithm is extended to a certain node, it is added to the rectangular box of the corresponding edge of the source node. When all the node preprocessing is completed, a rectangular area surrounding all the nodes reachable through the optimal diagonalfirst path is formed for each edge, although there may be redundant nodes for shape reasons.
The path search process of JPS + BB is shown in fig. 2. This example starts and ends with a0 and B5, respectively. When node B0 is extended, three edges meet the order rule because only the edge in the lower-right direction corresponds to the target location contained in the rectangular bounding box, and therefore the other two edges are safely pruned. It should be noted that the rectangular bounding box in the lower right direction includes some extra nodes besides the nodes in the shaded portion are optimally reachable from B0 by moving in the lower right direction. Similarly, the next step of expanding node D2 requires only exploring the downward edge. The pruning technology based on offline pre-calculation improves the performance improvement of about one order of magnitude for the JPS + algorithm, so that the average searching speed of tens of microseconds can be obtained under a classical test set. However, this significant improvement comes at the cost of having to invest a significant amount of CPU time and memory space in the preprocessing stage. If the cost needs to be reduced, only the jumping point position needs to be preprocessed.
This processing will cause the loss of the algorithm preprocessing information to a certain extent, mainly in that if the starting point is a common node rather than a jumping point, the algorithm cannot be pruned from the starting point, so that the number of nodes initially added to the Open table is increased, and thus the search speed will be affected if the original search idea is followed. In addition, when performing the a-algorithm best first search, JPS + BB also performs the operations of adding and removing the Open table at a diagonal jump (defined below) similar to the node D2 in fig. 2 (b). Because the Open table is generally represented by a data structure of a binary heap priority queue, the operations cause the reordering of the heap structure, and the increase of the search speed is limited to a certain extent.
Disclosure of Invention
The invention provides a path planning method and a path planning system, which are used for overcoming the defects of information loss or slow search speed after preprocessing and the like in the prior art, and realizing the great increase of the search speed under the condition of ensuring the great compression of information after preprocessing.
In order to achieve the above object, the present invention provides a path planning method, which comprises the following steps:
preprocessing the positions of grid points of collapse jumping points in the uniform grid map;
acquiring a starting point position and an end point position;
when an optimal composite main sequence path needs to be searched between a starting point and an end point, searching for the optimal path in a connect-search mode, and pruning when a starting child node is generated in a connection process and/or when a jumping point is expanded in a search process;
and finding the optimal path between the starting point and the end point by applying the pruning process to the optimal priority search frame of the A-star algorithm and storing the optimal path.
In order to achieve the above object, the present invention further provides a path planning system, which includes a memory and a processor, wherein a path planning program is stored in the memory, and the processor executes the steps of the path planning method when running the path planning program.
The path planning method and the system provided by the invention have the advantages that when a connect-search is adopted to search an optimal path at a grid point of a collapse jumping point, an optimal composite main sequence path is required to be searched when no simple main sequence path is connected between a starting point and an end point, all axial jumping points which accord with a diagonal priority principle with the starting point are searched in a connection process, starting sub-nodes are generated, the number of the axial jumping points is usually large, the number of the nodes which are initially added into an Open table is reduced by pruning the axial jumping points of the end point which cannot be reached, and therefore, the searching speed is improved according to the original searching thought; or in the searching process, when a certain hop is expanded, a middle hop is searched in the diagonal direction, and the middle hop is not put into an Open table as a child node, for example: searching for child nodes only in the axial direction containing the target position in the intermediate jump point main sequence extension direction bounding box, generating and adding the child nodes into an Open table; if the bounding box in the diagonal direction contains the target position, the above process is performed recursively. The axial child nodes that do not meet the condition and all diagonal hops are not added to the Open table. In the operation process of adding child nodes generated in the search process into an Open table and taking child nodes out of the Open table, the Open table is generally represented by a data structure of a binary heap priority queue, and the operations avoid reordering of a heap structure, so that the aim of accelerating the search is fulfilled.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
FIG. 1(a) is a schematic diagram of pruning during diagonal movement under a non-jumping point scenario in the prior art JPS;
FIG. 1(b) is a schematic diagram of pruning during axial movement under a non-jumping point scenario in the conventional JPS technique;
FIG. 1(c) is a schematic diagram of pruning at a jumping-point position in the prior art JPS technique;
FIG. 2(a) is a schematic diagram of a node B0 bounding box during JPS + BB operation in the prior art;
FIG. 2(b) is a schematic diagram of a node D2 bounding box during JPS + BB operation in the prior art;
fig. 3(a) is a schematic diagram of an axial jump point in the path planning method according to an embodiment of the present invention;
fig. 3(b) is a schematic diagram of diagonal jumping points in the path planning method according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a classification of a main sequence path according to an embodiment;
FIG. 5 is a flowchart of a main algorithm for path planning by JPS + BB +;
FIG. 6 is a flowchart illustrating a pruning algorithm for performing a postponement using existing bounding box information according to an embodiment;
FIG. 7 is a flowchart of an algorithm for expanding nodes currently at the leading edge of a search according to a first embodiment;
FIG. 8 is a diagram illustrating a connect in the first embodiment;
FIG. 9 is a diagram illustrating an example of a search extension process in the first embodiment.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that all the directional indicators (such as up, down, left, right, front, and rear … …) in the embodiment of the present invention are only used to explain the relative position relationship between the components, the movement situation, etc. in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indicator is changed accordingly.
In addition, the descriptions related to "first", "second", etc. in the present invention are only for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "connected," "secured," and the like are to be construed broadly, and for example, "secured" may be a fixed connection, a removable connection, or an integral part; the connection can be mechanical connection, electrical connection, physical connection or wireless communication connection; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In addition, the technical solutions in the embodiments of the present invention may be combined with each other, but it must be based on the realization of those skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination of technical solutions should not be considered to exist, and is not within the protection scope of the present invention.
Example one
As shown in fig. 1 to 9, an embodiment of the present invention provides a path planning method, which is characterized by including the following steps:
s1, preprocessing the positions of grid points of collapse jumping points in the uniform grid map;
the axial jump point is: the passable points of the barriers in the diagonal direction in the uniform grid map; can move at least in the horizontal direction and the vertical direction; an axial jump point (straight jump point) can be regarded as a triplet
Figure BDA0002280336330000061
Which contains one grid position n and two axial directions of movement. They satisfy: (1)
Figure BDA0002280336330000062
and
Figure BDA0002280336330000063
are two moves that can be moved in a row; (2)
Figure BDA0002280336330000064
(3)
Figure BDA0002280336330000065
is not accessible.
Intuitively, the grid position n in definition 1 is the corner of the obstacle, and the direction
Figure BDA0002280336330000066
The parent direction, called the hop point, is the direction of the search. Taking fig. 3(a) as an example, the position and direction are respectively represented by a solid circle and an arrow, all the axial jumping points and the corresponding parent directions are marked in the figure, and it can be seen that n meeting the condition is generally attached with more than two axial jumping points. In addition, will
Figure BDA0002280336330000067
And
Figure BDA0002280336330000068
referred to as the trip pointThe main order extension direction of (1).
A diagonal jump point (diagonaljump point) can be represented as a two-tuple
Figure BDA0002280336330000069
Comprising a grid position n and a diagonal direction
Figure BDA00022803363300000610
Position n is derived from
Figure BDA00022803363300000611
The direction of movement reaches and can pass
Figure BDA00022803363300000612
Or
Figure BDA00022803363300000613
To arrive at a certain position
Figure BDA00022803363300000614
Or
Figure BDA00022803363300000615
Is an axial jump point in the paternal direction, or reaches a target point.
Fig. 3(b) shows the positional relationship between the diagonal skip point and the axial skip point. The open circles and gray arrows represent the positions and directions, respectively, and it should be noted that the same axial jump point can be reached by a plurality of diagonal jump points at the same time, and even the same position can reach the positions of different diagonal jump points of a certain axial jump point at the same time, such as (D1/D2/D3, SW/SE).
The meaning of grid points of collapsed hops here refers to: at the same grid point location there are at least parent nodes from two directions: any two of upper, lower, left, right, upper right, lower right, upper left and lower left, wherein the jumping point can be an axial jumping point, a diagonal jumping point, or both an axial jumping point and a diagonal jumping point; if the same grid point collapses and jumps in multiple directions, the position is searched and calculated once, and repeated calculation is not carried out;
as described above, the positions of the axial jump points can be quickly identified all by one scan of all the grid points simply from their relative positional relationship with the obstacle. However, we do not need to identify all diagonal hops and perform bounding box calculations on them. Here, two types of diagonal skip points are distinguished.
An active diagonal jump point
Figure BDA0002280336330000071
(active diagonaljump point) is a point with an axial jump point
Figure BDA0002280336330000072
As its parent node, wherein
Figure BDA0002280336330000073
Is the extension direction of the diagonal main sequence of the axial jump point, n can have s to pass through without obstacle
Figure BDA0002280336330000074
The movement arrives. The remaining locations that do not satisfy this condition are passive diagonal skip points. For example, (H5, SE) in fig. 3(b) is an active diagonal hop because it has (D3, E, S) as parent node, and can reach another axial hop (I5, E, N) by moving eastward. And (E5, SE) is a passive diagonal jump point.
All paths that comply with the diagonalfirst rule can be categorized into two categories, as shown in FIG. 4. The first category, which we call Simple Canonical Path, does not involve a search direction transition at a jumping point location, where the transition refers to a shift in at least one decomposition direction of the parent node direction and in the opposite direction, as shown in the figure<s1,t1>As shown, the path searching can be judged by one-time depth-first searching. The second type is called Compound Canonical Path (Compound Canonical Path), which can be represented as<s,(ds),s1,(d1)x1,s2,(d2)x2,s3,…,sn,(dt),t>As in the figure<s2,t2>As shown. Such paths can be divided into three parts: (1) the initial part is as follows: from the starting point s to the first axial jump point s1Possibly including a passive diagonal jump ds(ii) a (2) The middle part: jumping from the first axial direction s1To the last axial jump point snWith x between two adjacentiActive diagonal skip points; (3) ending part: from snTo the end point t, a passive jump point may be included.
It should be noted that some grid points are attached with both axial jumping points and diagonal jumping points;
the method for acquiring the axial jump point and the diagonal condition can be implemented by a program according to the above definition, and the specific method is not limited. In an embodiment of the present invention, for example: obtaining an axial jumping point by identifying an inflection point of an obstacle, namely obtaining the axial jumping point by identifying a position relation with the obstacle; the diagonal jumping points can be obtained by identifying the position relation with the axial jumping points;
if the cost of investing a large amount of CPU time and storage space in the background art of the preprocessing stage needs to be reduced, only the jumping point position needs to be preprocessed, see step S1. This processing will cause the loss of the algorithm preprocessing information to a certain extent, mainly in that if the starting point is a common node rather than a jumping point, the algorithm cannot be pruned from the starting point, so that the number of nodes initially added to the Open table is increased, and thus the search speed will be affected if the original search idea is followed. In addition, when performing the a-algorithm best first search, referring to fig. 2(a), for the start child node B0 of the start point s and the end point t, s, there are two bounding boxes of three main sequence expansion directions including an axial direction and a diagonal direction, where the two bounding boxes in the axial direction are respectively represented by dashed rectangle boxes, and the bounding box in the diagonal direction is represented by an area covered by 135-degree cross hatching; the operations of adding and removing an Open table are also performed on a diagonal jump (defined below) similar to the node D2 in fig. 2 (b). Because the Open table is generally represented by a data structure of a binary heap priority queue, the operations cause the reordering of the heap structure, and the increase of the search speed is limited to a certain extent. In view of this, the present invention adopts the following scheme for pruning to optimize the search speed.
S2, acquiring the starting point and the end point;
in one embodiment of the invention, the grid point position where the intelligent robot is located or the grid point position where the movable object is located in the intelligent game forms a starting point, and the specified grid point position input by the operator or the player forms an end point.
Preferably, S2 is followed by:
s21, judging whether the starting point and the end point are obstacles or not;
s22, when the starting point and the end point are not obstacles, judging whether the positions of the starting point and the end point are overlapped;
s23, when the positions of the starting point and the end point do not coincide, judging whether a simple main sequence path connecting the starting point and the end point exists;
s24, when a simple main sequence path exists, the simple main sequence path is taken as an optimal path and stored; and when the simple main-sequence path does not exist, searching the composite main-sequence path by using a connect-search mode.
Based on the above observation, in a preferred embodiment of the present invention, a main process of the present invention, JPS + BB +, for path planning, is provided. As shown by Algorithm 1. With the start point s and the target point t as inputs, the algorithm first determines whether the start point end point is an obstacle or whether the two coincide (lines 2-3). If not, then determine whether two points can be connected through a simple main sequence path, if yes, then directly return to the path (lines 4-5). If not, the optimal composite main sequence path connecting the two points needs to be found, and a connection-search path searching process is adopted, wherein the connection refers to all legal axial jump point sub-nodes (corresponding to s in the definition of the composite main sequence path) generating the starting point1) And adds them to the Open table to be extended (line 6). The algorithm was then run according to the a algorithm best first search flow (lines 7-12), see fig. 5.
S3, when an optimal composite main sequence path needs to be searched between a starting point and an end point, searching for the optimal path in a connect-search mode, and pruning when a starting child node is generated in a connection process and/or when a jumping point is expanded in a search process;
in one embodiment of the invention, branches which cannot reach the target through the optimal main sequence path are pruned in the searching process by detecting the geometric container.
In another embodiment of the present invention, paths that cannot reach the end point are pruned by reading the compressed mode database. When the initial child node is generated in the connection process, the initial child node is compared with the optimal direction stored in the mode database, the axial jumping point pruning with no intersection exists in the direction, and the pruning is carried out through local expansion when the jumping point is expanded in the searching process.
The process of generating the starting child node is a connect program, a connection relation between a given starting point and a collapse jumping point is established, the meaning of the starting child node refers to searching all axial jumping points of the starting point according with a diagonal priority principle according to a jumping distance table and generating the starting child node, when a certain jumping point is expanded by the meaning of the expanding jumping point, a middle jumping point is searched in the diagonal direction, and the middle jumping point is not used as a child node and is put into an Open table; more than one axial node simultaneously exists in the process of generating the starting child node to meet the requirement of the starting child node, and a plurality of intermediate jumping points also exist in the process of expanding the jumping points; if the Open tables are put into the Open tables for searching calculation, the number of the nodes of the Open tables is increased, so that the searching speed is influenced according to the original searching thought, and pruning is the process of reducing the number of the nodes of the Open tables; therefore pruning is performed in at least one of the two processes; in a preferred embodiment of the present invention, only the starting child nodes that may reach the target node (end point) are retained, and the remaining starting child nodes that may not reach the target node are deleted, thereby completing pruning of the starting child nodes; finally, only one expansion node which can directly reach the target node or reach the target node through a simple path is reserved, and pruning of the expansion sub-nodes is completed; and finally, the reserved initial child nodes and the reserved expansion child nodes are placed in an open table for searching calculation, so that the searching speed can be greatly improved.
S4, combining the pruning process with the optimal priority search of the A-star algorithm, constructing and storing the optimal path between the starting point and the end point;
the data can be obtained by sequentially expanding the starting sub-node and/or the expanding sub-node in the main sequence expanding direction; in step S3, the path calculation may be performed during the route search process, i.e., during the process of searching for the expanded child node, and the path is saved and may be directly extracted from the stored database.
The invention solves the two problems that the search speed is limited by the reordering of the heap structure caused by the loss of the preprocessing information to a certain degree and the Open table in the prior art from the perspective of fully utilizing the sparse preprocessing data, and improves the search speed.
Preferably, in step S1, the preprocessing step performed by using the grid positions of the collapse skip points in the uniform grid map employs a geometric container algorithm, which includes:
s01, performing structural analysis on the uniform grid map, and identifying all axial jump points according to the position relationship between the passable points and the obstacle points;
s02, calculating a jump distance table for all passable directions of all passable nodes on the uniform grid map;
s03, identifying all diagonal jumping points according to the jumping distance table of the axial jumping points in the diagonal direction;
s04, performing Dijkstra search facing the whole map and subjected to diagonal priority correction by taking each jumping point collapse position as a source node, and acquiring a rectangular bounding box which can surround all nodes which can optimally reach through each passable direction;
s05, recording the initial edge of the path from the source jumping point to the node when generating a node in the searching process, and pressing the node into an Open table;
s06, when the optimal path from the source jumping point to the target node is found, the target node is taken out from the Open table for expansion, and the target node is added into the bounding box of the corresponding edge of the source jumping point;
and S07, when the Open table is empty, ending the search of the current skip point, and entering the search of the next skip point. And repeating all jumping point searches to complete the preprocessing.
Preferably, in step S3, when the optimal composite main sequence path needs to be found between the starting point and the end point, the step of searching for the optimal path in the collapsed mesh point in a connect-search manner, and performing pruning when the starting child node is generated in the connection process includes:
s301, all legal axial skip point sub-nodes which accord with the diagonal priority principle with the starting point are obtained by reading the skip distance table;
s302, when all bounding boxes in the extension direction of the main sequence of the legal axial skip point sub-node do not contain the end point position, deleting the legal axial skip point sub-node;
s303, traversing all the legal axial jump point sub-nodes to obtain an initial sub-node.
It should be noted that: in the connection process, according to a specified starting point, establishing a connection relation with the collapsed grid points, forming a jump distance table of the grid position where each jump point is located after preprocessing, and obtaining axial jump points in the diagonal direction of the starting point as legal axial jump point sub-nodes; the method comprises the steps of reading bounding boxes of legal axial jump points in all main sequence extension directions, then judging the position relation between each bounding box and an end point, if one bounding box of the main sequence extension direction contains the position relation, adding the legal axial jump points into an open table as a starting child node, and if all bounding boxes of the main sequence extension direction do not contain the end point, deleting the legal axial jump points, not generating the legal axial jump points as the starting child node, wherein one or more starting child nodes can be generated in the process and are all put into the open table to be expanded and utilized in the subsequent searching process.
Although sparse preprocessing means that pruning with bounding boxes from the beginning is difficult, thereby reducing the number of children nodes of the beginning, when all legal children are found, since they are axial jumping points, delayed pruning can be performed with the existing bounding box information. The Algorithm flow is shown as Algorithm2, see FIG. 6.
The algorithm inputs are a starting point s, an end point T and a jump distance table T, and symbols
Figure BDA0002280336330000111
Indicating node n is in the direction
Figure BDA0002280336330000112
The distance value of (a). The algorithm traverses all eight directions and quickly obtains all possible child nodes by distance values (lines 3, 13), where diagonal directions require an iterative process (line 9). For nodes that do not prune through the bounding box of the starting point, pruning can be performed to some extent through the own bounding box and the main sequence extension direction (lines 4-6, 14-16). If the bounding boxes in all the main sequence directions of the nodes do not contain the target positions, the target positions can be safely removed from the search space without being added into the Open table; conversely, the node should be considered when any bounding box contains the target location. Through the pruning process, only 1-2 sub nodes can be reserved, the search burden is greatly reduced, and the method is closer to JPS + BB with complete information.
Preferably, in step S3, when the optimal composite main sequence path needs to be found between the starting point and the end point, the step of searching for the optimal path in a connect-search manner includes:
s30, respectively performing partial expansion by taking all the starting child nodes as axial jumping points to be expanded;
s31, expanding the axial jump point to be expanded along the diagonal direction to generate a transit jump point;
s32, when the bounding box in the diagonal direction contains the terminal position, determining whether the terminal can be reached immediately after the transfer jump point is reached according to the comparison result of the jump distance and the coordinate difference between the current terminal and the terminal;
and S33, directly adding the end point into the open table as a child node when the end point can be reached immediately before the transit jump point is reached, and ending the pruning process.
The fact that the target node (i.e., the destination) cannot be reached immediately means that the target node cannot be reached directly in the main sequence direction, for example, when an obstacle is encountered, the target node cannot be reached directly;
preferably, S32 is followed by: when the transit jump point cannot reach the end point immediately, acquiring all main sequence expansion directions containing the end point in the transit jump point bounding box; and S32a, when the main sequence extends in the axial direction, acquiring the axial jump point in the direction according to the jump distance, generating the axial jump point as a child node, and adding the child node into an Open table.
And S32b, when the main sequence expansion direction comprises a diagonal direction, acquiring the next diagonal jump point in the direction, and recursively repeating the expansion step of the transit jump point.
S32b and S32a are two specific cases mentioned above when the transit point cannot reach the end point immediately, and belong to a parallel relationship.
It should be noted that in this process, any diagonal jumping point is not added to the Open table as a child node, and is only used as a position where pruning can be performed by using the detection bounding box. The original method JPS + BB does not have the above procedure of recursion in the diagonal direction, and it stays at each diagonal jump point that is not pruned and adds it to the Open table for later extraction of the extension. Compared with the prior art, the invention adopts the partial extension strategy, so that the pruning utility of the bounding box is utilized to the maximum extent, and the operation on the Open table is reduced as much as possible. The Open table is generally represented by a data structure of a binary heap, and each time a node is added and taken out, reordering of priority is caused, which is a time-consuming operation in the search process.
In the node expansion process, the invention uses the thought of intermediate pruning (JPS + (P) for reference, and the diagonal jumping point is only used as the intermediate position for pruning without adding the diagonal jumping point into an Open table to cause more operations. The JPS + BB + of the invention only generates and expands axial jumping points, and recursively prunes diagonal jumping points. The flow of expanding the node currently at the leading edge of the search is shown as Algorithm 3, which corresponds to line 12 in Algorithm 1. Whether it is an axial or diagonal branch, the algorithm first queries the bounding box identifier corresponding to the branch by the canPruneEdge function ( lines 3, 9 and 13). If the target point can not be pruned, checking whether the target point is in the coverage range of the branch, and if so, directly adding the target point into the Open table and returning. It should be noted that, when the axial branch is expanded, the child node detected by the bounding box is added to the Open table (row 6); while in expanding the diagonal direction, diagonal hops are not processed, but are added until a hop in the axial extension direction is encountered (row 15), without over-considering node n in row 11. See fig. 7.
Referring to fig. 8, an example of pruning of the connection process implemented by the present invention is shown. The starting and ending points are F2 and J1, respectively. By extracting the valid distance values (shown in bold), all the non-pruned child nodes B0, F5, and H5 are quickly found. Their respective main order extension directions and corresponding bounding boxes are indicated in the figure. It can be seen that only the right-facing bounding box of H5 contains the target node, so both B0 and F5 are culled, and only one node, i.e., H5, is added to the Open table.
Fig. 9 shows an example of an expansion process, where the starting and ending points are a0 and J1, respectively. Through the join process, a unique starting child node B0 is generated. When expanding it, first read the first diagonal jump point D2 and find that the end point is also in the corresponding direction. However, as can be seen from the comparison of the coordinate difference and the jump distance value, the branch does not reach the target immediately (because an obstacle is touched). The algorithm does not add D2 to the Open table, but directly detects its corresponding axial skip point. However, since D2 contains the target point only in the diagonally oriented bounding box, diagonal movement continues while the downward child node D5 is not considered. In this process, B0 finds the unique child node I5 and reaches the end point through target detection when I5 is extended.
The number of the two types of jumping point collapse positions in the general grid map is far less than the total number of all passable nodes. The invention will thus provide a significant saving in the required pre-processing time and space. Com, the general test set taken from https:// movingai.com, the basic information of which is shown in table 1. Which contains both typical game maps and artificially synthesized rooms and labyrinths. Each map also contains a number of path planning test questions.
The results of the experiment are shown in table 2. The JPS + BB is an original algorithm, the JPS + BB + is the invention, the JPS + BB + WSSP/WPE is a deformation which has no starting point sub-node pruning and no partial expansion, the JPS + BB + WPE is a deformation which has the starting point sub-node pruning and no partial expansion, and the JPS + BB + WSSP is opposite. The experimental results showing several variations clearly show the respective increasing effects of the two techniques of the present invention on the search speed. The result shows that under the condition that the preprocessing information is relatively sparse, the search speed of the JPS + BB + algorithm is improved by a plurality of times compared with that of the original algorithm through the starting point sub-node pruning and partial expansion technology provided by the invention. For example, on the most complex Starcraft map, JPS + BB + relative to JPS + BB reduces the search time consumption by about half, i.e., achieves a two-fold speed increase.
TABLE 1 map used in the experiment
Map categories Number of maps Minimum size Maximum size Number of questions
Starcraft game 75 384*384 1024*1024 198230
Dragon Age Origins Game (DAO) 156 30*21 1104*1260 159465
Baldur’s Gate II Game (BG) 75 512*512 512*512 93160
Warcraft III Game 36 512*512 512*512 45101
Room map (Rooms) 4 512*512 512*512 8430
Maze map (Mazes) 5 512*512 512*512 57020
Table 2 comparison of path search time-consuming results.
StarCraft DAO BG Warcraft Rooms Mazes
JPS+BB 23.5 10.4 2.8 4.8 82.6 92.7
JPS+BB+WSSP/WPE 37.8 16.5 4.6 8.5 68.0 113.2
JPS+BB+WPE 25.9 12.1 3.4 5.7 62.4 91.7
JPS+BB+WSSP 17.7 7.5 2.7 4.7 38.0 73.8
JPS+BB+ 12.5 5.7 2.2 3.1 35.0 73.5
The index is average search time in microseconds, and the smaller the number of results, the faster the speed. The vertical axis is the algorithm name and the horizontal axis is the map set.
Example two
On the basis of the first embodiment, the embodiment of the present invention further provides a path planning system, which includes a memory and a processor, where a path planning program is stored in the memory, and the processor executes the steps of the arbitrary path optimization method when running the path planning program.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (7)

1. A method of path planning, comprising the steps of:
preprocessing the positions of grid points of collapse jumping points in the uniform grid map;
acquiring a starting point position and an end point position;
when an optimal composite main sequence path needs to be searched between a starting point and an end point, a connect-search mode is adopted to search the optimal path, and pruning is carried out when a starting child node is generated in a connection process and/or when a jumping point is expanded in a search process;
combining the pruning process with the optimal priority search of the A-algorithm, constructing and storing an optimal path between a starting point and an end point;
the step of preprocessing the grid position of the collapse jumping point in the uniform grid map adopts a geometric container algorithm, which comprises the following steps:
carrying out structural analysis on the uniform grid map, and identifying all axial jumping points according to the position relation between the passable points and the obstacle points;
calculating a jump distance table for all passable directions of all passable nodes on the uniform grid map;
identifying all diagonal jumping points according to the jumping distance of the axial jumping points in the diagonal direction;
carrying out Dijkstra search facing to the whole map and subjected to diagonal priority correction by taking each jumping point collapse position as a source node, and acquiring a rectangular bounding box which can surround all nodes which can optimally reach through each passable direction;
recording the initial edge of a path from a source jumping point to a node every time a node is generated in the searching process, and pressing the node into an Open table;
when the optimal path from the source jumping point to the target node is found, taking the target node out of the Open table for expansion, and adding the target node into the bounding box of the corresponding edge of the source jumping point;
when the Open table is empty, ending the search of the current hop point, and entering the search of the next hop point;
the diagonal jumping-points comprise: the active diagonal jumping point is provided with an axial jumping point as a father node, and the diagonal direction is the diagonal main sequence expansion direction of the axial jumping point; passive diagonal skip points are not satisfied with the active diagonal skip points;
carrying out Dijkstra search which is oriented to the whole map and subjected to diagonal priority correction by taking the collapse position of each jumping point as a source node, wherein the Dijkstra search comprises the following steps:
carrying out Dijkstra search which is oriented to the whole map and subjected to diagonal priority correction by taking the collapse position of each jumping point as a source node to obtain a simple main sequence path or a composite main sequence path;
the simple main sequence path does not relate to search direction conversion of the jumping point position, and the conversion refers to movement in at least one decomposition direction of a father node direction and the opposite direction; the composite main sequence path comprises: a beginning portion, a middle portion, and an end portion; the starting part represents from a starting point to an axial jump point, the starting part can comprise a passive diagonal jump point, the middle part represents from one axial jump point to another axial jump point, a plurality of passive diagonal jump points are included between one axial jump point and another axial jump point, the ending part represents from another axial jump point to an end point, and a passive node is included between another axial jump point and the end point;
the step of obtaining the starting point and the end point position further comprises the following steps:
judging whether the starting point and the end point are obstacles or not;
when the starting point and the end point are not obstacles, judging whether the positions of the starting point and the end point are coincident;
when the positions of the starting point and the end point are not coincident, judging whether a simple main sequence path connecting the starting point and the end point exists or not;
when a simple main sequence path exists, taking the simple main sequence path as an optimal path and storing the optimal path; and when the simple main-sequence path does not exist, searching the composite main-sequence path by using a connect-search mode.
2. The path planning method according to claim 1, wherein when the optimal composite main sequence path needs to be found between the starting point and the end point, a connect-search method is used to search for the optimal path, and in the step of pruning when the starting child node is generated in the connection process and/or when the jumping point is expanded in the search process:
and pruning branches which cannot reach the target through the optimal main sequence path in the searching process by detecting the geometric container.
3. The path planning method according to claim 2, wherein the step of searching for the optimal path in all hops in a connect-search manner when the optimal composite main sequence path needs to be found between the starting point and the end point, and performing pruning when the starting child node is generated in the connection process includes:
all legal axial skip point sub-nodes which accord with the diagonal priority principle with the starting point are obtained by reading the skip distance table;
deleting the legal axial skip point sub-node when all bounding boxes of the legal axial skip point sub-node in the main sequence extension direction do not contain the end point position;
and traversing all the legal axial jump point sub-nodes to obtain an initial sub-node.
4. The path planning method according to claim 2, wherein when the optimal composite main sequence path needs to be found between the starting point and the end point, the optimal path is searched for in all the jumping points in a connect-search manner, and the step of pruning when the jumping points are expanded in the search process includes:
respectively performing partial expansion by taking all the starting sub-nodes as axial jumping points to be expanded;
expanding the axial jump point to be expanded along the diagonal direction to generate a transit jump point;
when the bounding box of the main sequence extension direction of the transit jump point contains the terminal point position, determining whether the transit jump point can reach the terminal point immediately according to the comparison result of the jump distance and the coordinate difference between the transit jump point and the terminal point;
and when the transit jump point can reach the end point immediately, adding the transit jump point serving as an expansion child node into an open table, and ending the pruning process.
5. The path planning method according to claim 4, wherein the step of determining whether the intermediate jump point can reach the end point immediately according to the comparison result between the jump distance and the coordinate difference between the intermediate jump point and the end point when the bounding box of the main sequence expansion direction of the intermediate jump point includes the end point position further comprises:
when the transit jump point cannot reach the end point immediately, acquiring all main sequence expansion directions containing the end point in the transit jump point bounding box;
and when the main sequence expansion direction contains an axial direction, acquiring an axial jump point in the direction according to the jump distance, generating the axial jump point as a child node, and adding the child node into an Open table.
6. The path planning method according to claim 5, wherein the step of obtaining all main sequence expansion directions including the end point in the transit point bounding box further comprises:
when the main sequence expansion direction comprises a diagonal direction, acquiring the next diagonal jumping point in the direction, and recursively repeating the expansion step of the transit jumping points;
and when the main sequence expansion direction simultaneously comprises an axial direction and a diagonal direction, respectively executing the steps.
7. A path planning system comprising a memory and a processor, wherein a path planning program is stored in the memory, and the steps of the method according to any one of claims 1 to 6 are performed when the processor runs the path planning program.
CN201911138928.5A 2019-11-20 2019-11-20 Path planning method and system Active CN110967015B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911138928.5A CN110967015B (en) 2019-11-20 2019-11-20 Path planning method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911138928.5A CN110967015B (en) 2019-11-20 2019-11-20 Path planning method and system

Publications (2)

Publication Number Publication Date
CN110967015A CN110967015A (en) 2020-04-07
CN110967015B true CN110967015B (en) 2021-11-12

Family

ID=70030896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911138928.5A Active CN110967015B (en) 2019-11-20 2019-11-20 Path planning method and system

Country Status (1)

Country Link
CN (1) CN110967015B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111723981B (en) * 2020-06-09 2024-06-07 安歌智慧科技(上海)有限公司 Multi-condition constraint-based forklift type AGV optimal path planning method
CN111829526B (en) * 2020-07-23 2022-05-10 中国人民解放军国防科技大学 Distance map reconstruction and jumping point path planning method based on anti-collision radius
CN114239192A (en) * 2020-09-09 2022-03-25 中兴通讯股份有限公司 Path searching method, electronic device and storage medium
CN113607181A (en) * 2021-08-05 2021-11-05 国网上海市电力公司 Optimization method of jumping point search algorithm
CN115223389B (en) * 2022-07-15 2023-11-21 西南交通大学 Parking guidance path planning method based on dynamic road section cost
CN115845381B (en) * 2023-02-07 2023-06-16 广州三七极耀网络科技有限公司 Quick path finding method, device, equipment and medium based on bounding box

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107065865A (en) * 2017-03-21 2017-08-18 北京航空航天大学 A kind of paths planning method based on the quick random search tree algorithm of beta pruning
CN108268971A (en) * 2017-12-06 2018-07-10 腾讯科技(深圳)有限公司 Searching method, device, processor and the electronic device in path
CN110006429A (en) * 2019-03-20 2019-07-12 智慧航海(青岛)科技有限公司 A kind of unmanned boat path planning method based on depth optimization

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7280481B2 (en) * 2002-10-10 2007-10-09 Guangyi David Rong Shortest path search method “Midway”
KR101633889B1 (en) * 2009-02-18 2016-06-28 삼성전자주식회사 Apparatus and method for generating route using grid map
CN105955280A (en) * 2016-07-19 2016-09-21 Tcl集团股份有限公司 Mobile robot path planning and obstacle avoidance method and system
US10809078B2 (en) * 2018-04-05 2020-10-20 Symbol Technologies, Llc Method, system and apparatus for dynamic path generation
CN109115226B (en) * 2018-09-01 2021-11-19 哈尔滨工程大学 Route planning method for avoiding multi-robot conflict based on jumping point search
CN110319837A (en) * 2019-07-09 2019-10-11 北方工业大学 Indoor complex condition path planning method for service robot

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107065865A (en) * 2017-03-21 2017-08-18 北京航空航天大学 A kind of paths planning method based on the quick random search tree algorithm of beta pruning
CN108268971A (en) * 2017-12-06 2018-07-10 腾讯科技(深圳)有限公司 Searching method, device, processor and the electronic device in path
CN110006429A (en) * 2019-03-20 2019-07-12 智慧航海(青岛)科技有限公司 A kind of unmanned boat path planning method based on depth optimization

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Improving the Combination of JPS and Geometric Containers;Yue Hu等;《Proceedings of the International Conference on Automated Planning and Scheduling》;20190705;第29卷;介绍部分的第1段,预处理网格部分,在线搜索部分的第1段,实验设置部分的第1段,图2(a)、(b) *

Also Published As

Publication number Publication date
CN110967015A (en) 2020-04-07

Similar Documents

Publication Publication Date Title
CN110967015B (en) Path planning method and system
CN110975290B (en) Path planning method and system based on pattern database
CN109115226B (en) Route planning method for avoiding multi-robot conflict based on jumping point search
CN109947120B (en) Path planning method in warehousing system
CN111504325A (en) Global path planning method based on weighted A-algorithm for expanding search neighborhood
US20170219353A1 (en) Method and system for determining a path of an object for moving from a starting state to an end state set avoiding one or more obstacles
US20030223373A1 (en) Dual Dijkstra search for planning multipe paths
JP6711949B2 (en) Method and system for avoiding one or more obstacles and determining the path of an object moving from a starting state to a final state set
CN111104471B (en) Mode database information compression method and system based on jumping point path search
CN114721402B (en) Parking path planning method and system based on improved ant colony algorithm
CN109341698B (en) Path selection method and device for mobile robot
CN110975291B (en) Path extraction method and system
CN115167474A (en) Mobile robot path planning optimization method
CN110487295A (en) A kind of time-optimized smooth A* algorithm
CN114859909A (en) Path planning method and device for forklift type AGV
CN110975288B (en) Geometric container data compression method and system based on jump point path search
CN111829526B (en) Distance map reconstruction and jumping point path planning method based on anti-collision radius
CN113375686A (en) Path planning method and device and intelligent conveying system
CN114577217B (en) Route planning method, device, equipment and storage medium based on Von Lonouh graph
CN116449826A (en) Mobile robot path planning method based on path smoothing and bidirectional jump point search
CN116560360A (en) Method and system for planning real-time dynamic path of medical care robot facing complex dynamic scene
CN114386138B (en) Building division method, electronic device and computer storage medium
CN114564023B (en) Jumping point search path planning method under dynamic scene
CN114777785A (en) Improved Astar algorithm based on salient point search mechanism
Ulloa et al. Multipath Adaptive A*: Factors That Influence Performance in Goal-Directed Navigation in Unknown Terrain

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