CN114777785A - Improved Astar algorithm based on salient point search mechanism - Google Patents
Improved Astar algorithm based on salient point search mechanism Download PDFInfo
- Publication number
- CN114777785A CN114777785A CN202210394542.6A CN202210394542A CN114777785A CN 114777785 A CN114777785 A CN 114777785A CN 202210394542 A CN202210394542 A CN 202210394542A CN 114777785 A CN114777785 A CN 114777785A
- Authority
- CN
- China
- Prior art keywords
- point
- grid
- points
- salient
- openlist
- 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.)
- Pending
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/20—Instruments 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)
- Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)
Abstract
The invention discloses an improved Astar algorithm based on a salient point searching mechanism, which relates to the field of global path planning of a mobile robot, and specifically comprises the following steps: the target point and all lobe points are placed in the ConvexList table. And taking the node with the minimum cost evaluation value f (n) in the OpenList table as a next current point, deleting the node from the OpenList table, and adding the node into the CloseList table. And judging whether the current point is the target point, if so, searching successfully, and if not, continuing. Finding salient points in the ConvexList table, which satisfy the neighbor relation with the current point and are not in the CloseList table, adding the salient points satisfying the conditions into the OpenList table, and updating the estimated cost value f (n) and the parent node direction. And continuously and circularly updating the current point until the search is successful or the OpenList table length is 0, and exiting the search if the search is failed. The invention uses the salient point as the node and expands the node according to the neighbor relation, thereby avoiding operating unnecessary key points and achieving the effect of increasing the searching efficiency of the algorithm.
Description
Technical Field
The invention relates to the field of global path planning of mobile robots, in particular to an improved Astar algorithm based on a salient point searching mechanism.
Background
At present, two-dimensional laser radars are adopted for building maps for indoor floor sweeping robots, service robots and the like, and grid maps are generated by mainstream two-dimensional laser slam. The global path planning algorithm applied to the grid map is being actively researched. There are many global path planning algorithms applied to the grid map, such as Dijkstra algorithm, a × algorithm, JPS algorithm, and the like. The Dijkstra algorithm is a typical breadth-first algorithm, and has the advantages that an optimized path can be found at all times, and the method is simple and easy to implement. However, because the Dijkstra algorithm adopts a traversal search mode, when there are many nodes in the map, the node network becomes very large, which results in low search efficiency and is difficult to meet the requirement of fast path planning. And the finally generated path turning points are too many, which is not beneficial to the movement of the robot. The A-algorithm is combined with best-first search and Dijkstra algorithm, which ensures that heuristic search is adopted on the basis of obtaining the optimal path planning. The A-algorithm determines the searching direction through a valuation function, expands from the starting point to the periphery, obtains the cost value of each peripheral node through the valuation function calculation, selects the minimum cost node as the next expansion node, repeats the process until reaching the target point, and generates the final path. Compared with Dijkstra algorithm, the efficiency is improved, but a large number of unnecessary operation points are traversed in the searching process, so that the traditional A has some defects in the geodesic scene such as: high memory consumption and long calculation time. The JPS algorithm is an improved A algorithm combined with jumping point search, a preprocessing process is added on the basis of the A algorithm, the preprocessing process is to select a batch of representative jumping points through a jumping point search algorithm, and then the jumping points are respectively added to OpenList for calculation, so that the calculation of a large number of intermediate nodes in the A algorithm routing process is avoided. However, the jump point search needs to traverse to the boundary point of the map, and if the map has a large unobstructed area, the JPS algorithm will search for a lot of time and cannot obtain valuable jump points. Therefore, the JPS algorithm is only suitable for maps with uniform cost, and is not efficient in a scene with a large map and non-uniform obstacle distribution.
Disclosure of Invention
Aiming at the problem that in the prior art, in a scene with fewer salient points and a large map, the traditional Astar algorithm is low in searching efficiency, the technical problem to be solved by the invention is to provide an improved Astar algorithm based on a salient point searching mechanism.
The purpose of the invention is realized by the following technical scheme:
step 1: searching all salient points in the grid map;
step 2: putting the end point into a ConvexList, and simultaneously adding the starting point into an OpenList;
and step 3: judging whether the OpenList is empty or not, if the OpenList is empty, the circulation is skipped if the path finding is failed, and the next step is not executed if the OpenList is empty;
and 4, step 4: calculating a minimum estimated cost value f (n) node in the OpenList, changing the current point into the point, deleting the point from the OpenList, and adding the point into the CloseList;
and 5: it is determined whether the point is a target point. And if the target point is not the target point, continuing to perform the sixth step. If yes, starting to output a path, starting to reach a starting point along each father node from the end point, forming a complete path from the starting point to the end point, and the mode of backtracking from the current node to the father node is the same as the flow when the neighbor relation is judged in the step six;
step 6: and (2) searching all salient points which have a neighbor relation with the Current point Current and are not in the CloseList table in the ConvexList, adding the salient points meeting the requirements into the OpenList, updating the estimated cost value f (n) and the parent node direction, and returning to the step 1 after the completion.
Preferably, the method for finding the salient point in step 1 includes: the salient points in the grid map define a blank grid that is in diagonal relationship with the obstacle grid, and two grids adjacent to the grid and the obstacle grid at the same time are free of obstacles. The obstacle grid coordinates are set to (x, y). If the grids of (x-1, y), (x, y-1) and (x-1, y-1) are judged to be barrier-free grids, the grid of (x-1, y-1) can be considered to be a salient point grid, and similarly, the grids of (x-1, y), (x, y +1) and (x-1, y +1) can be considered to be barrier-free grids, and when (x, y-1), (x +1, y) and (x +1, y-1) are barrier-free grids, the grid of (x +1, y-1) can be considered to be a salient point grid, and when (x, y +1), (x +1, y) and (x +1, y +1) are non-obstacle grids, the grid of (x +1, y +1) may be considered as a salient point grid.
Preferably, the method for determining the neighbor relation in step 6 includes: two points in the grid map can be connected by at most one diagonal line and at most one horizontal or vertical straight line, and the two points satisfy the neighbor relation with each other. The specific judging steps are as follows: let the top left corner of the map be the origin of coordinates, the x-axis be the vertical downward direction, the y-axis be the horizontal right direction, the first point coordinates are (x1, y1), the second point coordinates are (x2, y 2).
Firstly, solving the x-axis coordinate difference and the y-axis coordinate difference of two points, and then respectively storing the minimum value and the maximum value of the absolute values of the two points by using min and max;
in the second step, if x1-x2 is regular signal1 is-1, otherwise it is 1. If y1-y2 is a regular signal2, the value is-1, otherwise, the value is 1;
thirdly, if min is 0, directly jumping to S4. If min is not 0, i circularly judges whether coordinates (x1+ i signal1, y1+ i signal2) are grids with obstacles (judges whether diagonal oblique lines have obstacles or not) from 1 to min, and if so, the judgment program directly exits from the neighbor relation judgment program, which means that two points do not satisfy the neighbor relation. If no barrier grid exists, the fourth step is carried out;
and fourthly, if the absolute value of x1-x2 is larger than the absolute value of y1-y2, judging whether the coordinates from 1 to max-min are circularly judged as (x1+ min signal1+ i signal1, y1+ min signal2) whether the grid with the obstacle exists or not (judging whether the vertical line has the obstacle or not, if the absolute value is smaller than the vertical line, judging whether the coordinates from 1 to max-min are circularly judged as (x1+ min signal1, y1+ min signal2+ i signal2) whether the grid with the obstacle exists or not (judging whether the horizontal line has the obstacle or not) and if the grid with the obstacle exists, judging that the neighbor relation between two points does not meet the neighbor relation, and directly exiting the neighbor relation judging program if the grid with the obstacle does not exist.
The beneficial effects of the invention are: in a geomap scene, the global path time of the mobile robot is long and cannot meet the real-time requirement, the algorithm searching efficiency in the scene with the geomap and few salient points is higher than that of the traditional A-x algorithm, and the global path planning result can be obtained in a shorter time.
Drawings
FIG. 1 is a flow chart of an improved Astar algorithm based on a salient point search mechanism.
FIG. 2 is a schematic view of a lobe point.
Fig. 3 is a schematic diagram of neighbor relations.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
Step 1: and searching all the salient points in the grid map, and traversing the whole grid map firstly. When the traversed grid represents an obstacle as shown in the gray grid of fig. 2, the coordinates are set to (x, y). If (x-1, y), (x, y-1) and (x-1, y-1) are all barrier-free grids, then the grid of (x-1, y-1) can be considered as a salient point grid, and similarly, if (x-1, y), (x, y +1) and (x-1, y +1) are barrier-free grids, then the grid of (x-1, y +1) can be considered as a salient point grid, and when (x, y-1), (x +1, y) and (x +1, y-1) are barrier-free grids, the grid of (x +1, y-1) can be considered to be a salient point grid, and when (x, y +1), (x +1, y) and (x +1, y +1) are barrier-free grids, the grid of (x +1, y +1) can be considered as a salient point grid. For code implementation, all the salient point points corresponding to one barrier grid can be found out only by four judgment sentences, for example, grids with coordinates of (x-1, y-1), (x-1, y +1), (x +1, y-1) and (x +1, y +1) in fig. 2 are salient point grids;
step 2: putting the end point and all lobe points into a ConvexList table, and simultaneously adding the starting point into an OpenList table;
and step 3: judging whether the OpenList is empty or not, if the OpenList is empty, jumping out, and not executing the next step if the OpenList is empty;
and 4, step 4: calculating the minimum node of f (n) in OpenList, changing the Current point Current to the point, deleting the point from OpenList and adding the point into CloseList;
and 5: it is determined whether the point is a target point. And if the target point is not the target point, continuing to perform the sixth step. If yes, outputting the path, starting from the end point and reaching the start point along each father node, forming a complete path from the start point to the end point, and the mode of backtracking from the current node to the father node needs to be the same as the sequence of judging the neighbor relation in the step six. Firstly judging whether the diagonal line has an obstacle or not, and then judging whether the horizontal line or the vertical line has an obstacle or not, wherein the output path needs to be output along the diagonal line from a father node and then output along the horizontal line or the vertical line;
step 6: the salient point that is in a neighbor relation to the Current point Current is found in the ConvexList. If the lobe point is not in CloseList, add it to OpenList, let the end point coordinate be (xn, yn), the lobe point coordinate be (x, y), calculate the manhattan distance g = g0+ (max-min) × 10+ min 14 from the start point to the lobe point (g0 is g of the Current node Current), manhattan distance h = | xn-x | + | yn-y |, from the lobe point to the end point, and heuristic f (n) = g + h, and the parent node pointer of the lobe point points to the Current node Current. If the Current node is in the OpenList, whether f (n) calculated by the Current node is larger than the original f (n) or not is judged, if so, f (n) and g of the salient point are updated to the values that the Current node calculates g and the father node points to the Current node, and if so, no change is made. And returning to the step 1 after the completion.
The neighbor relation in step 6 is as follows: the neighbor relation formed by two points needs to satisfy the following condition, and the two points can be connected by at most one oblique line and at most one horizontal or vertical straight line. The specific process is as follows: let the top left corner of the map be the origin of coordinates, the x-axis be the vertical downward direction, the y-axis be the horizontal right direction, the first point coordinates be (x1, y1), the second point coordinates be (x2, y 2). The following detailed steps are to determine whether two points satisfy the neighbor relation
S1: firstly, solving the x-axis coordinate difference and the y-axis coordinate difference of two points, and then respectively storing the minimum value and the maximum value of the absolute values of the two points by using min and max;
s2: if x1-x2 is regular signal1 is-1, otherwise it is 1. If y1-y2 is a regular signal2, the value is-1, otherwise, the value is 1;
s3: if min is 0, go directly to S4. If min is not 0, i circularly judges whether coordinates (x1+ i signal1, y1+ i signal2) are grids with obstacles (judges whether diagonal oblique lines have obstacles or not) from 1 to min, and if so, the judgment program directly exits from the neighbor relation judgment program, which means that two points do not satisfy the neighbor relation. If no barrier grid exists, the fourth step is carried out;
s4: if the absolute value of x1-x2 is greater than the absolute value of y1-y2, i starts to circularly judge whether the coordinates are (x1+ min signal1+ i signal1, y1+ min signal2) grids with obstacles (judge whether obstacles exist on the vertical line, if the absolute value is less than the absolute value, i starts to circularly judge whether the coordinates are (x1+ min signal1, y1+ min signal2+ i signal2) grids with obstacles (judge whether obstacles exist on the horizontal line) and if no obstacles exist, the coordinates do not meet the neighbor relation and directly exit the neighbor relation judgment program, if no obstacles exist, the two points meet the neighbor relation, and as shown in fig. 3, the grid number 1 and the grid number 2 are communicated through a diagonal line, and the requirement of the above neighbor relation is met when two points exist.
The foregoing is merely a preferred embodiment of the invention, it being understood that the embodiments described are part of the invention, and not all of it. 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. The invention is not intended to be limited to the forms disclosed herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein. And that modifications and variations may be effected by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (3)
1. An improved Astar algorithm based on a salient point searching mechanism is characterized by comprising the following steps: step 1: searching all salient points in the grid map;
step 2: putting the end point into a ConvexList, and simultaneously adding the starting point into an OpenList;
and 3, step 3: judging whether the OpenList is empty or not, if the OpenList is empty, representing that the path finding fails to jump out of the loop, and not executing the next step for the empty;
and 4, step 4: calculating a minimum estimated cost value f (n) node in an OpenList, changing a current point into the point, deleting the point from the OpenList, and adding the point into a CloseList;
and 5: it is determined whether the point is a target point. And if the target point is not the target point, continuing to perform the sixth step. If so, starting outputting the path, starting from the end point to the start point along each father node, forming a complete path from the start point to the end point, and the mode of backtracking from the current node to the father node needs to be the same as the flow when judging the neighbor relation in the step six;
and 6: and (3) searching all salient points which are in a neighbor relation with the Current point Current and are not in the CloseList table in the ConvexList, adding the salient points meeting the requirements into the OpenList, updating the estimated cost value f (n) and the parent node direction, and returning to the step 1 after the completion.
2. The improved Astar algorithm based on the salient point search mechanism of claim 1, characterized in that the salient points in step 1 are specifically: the salient points in the grid map define a blank grid that is in diagonal relationship with the barrier grid, and two grids adjacent to the grid and the barrier grid at the same time are free of the barrier. The obstacle grid coordinates are set to (x, y). If the grids of (x-1, y), (x, y-1) and (x-1, y-1) are judged to be barrier-free grids, the grid of (x-1, y-1) can be considered to be a salient point grid, and similarly, the grids of (x-1, y), (x, y +1) and (x-1, y +1) can be considered to be barrier-free grids, and when (x, y-1), (x +1, y) and (x +1, y-1) are barrier-free grids, the grid of (x +1, y-1) can be considered to be a salient point grid, and when (x, y +1), (x +1, y) and (x +1, y +1) are non-obstacle grids, the grid of (x +1, y +1) may be considered as a salient point grid.
3. The improved Astar algorithm based on the salient point search mechanism of claim 1, wherein the neighbor relation in step 6 is specifically: two points in the grid map can be connected by at most one diagonal oblique line and at most one horizontal or vertical straight line, and the two points mutually satisfy the neighbor relation. The detailed steps are as follows: let the top left corner of the map be the origin of coordinates, the x-axis be the vertical downward direction, the y-axis be the horizontal right direction, the first point coordinates be (x1, y1), the second point coordinates be (x2, y 2).
Firstly, solving the x-axis coordinate difference and the y-axis coordinate difference of two points, and then respectively storing the minimum value and the maximum value of the absolute values of the two points by using min and max;
in the second step, if x1-x2 is regular signal1 is-1, otherwise it is 1. If y1-y2 is regular signal2 is-1, otherwise, 1 is obtained;
thirdly, if min is 0, directly jumping to S4. If min is not 0, i circularly judges whether coordinates (x1+ i signal1, y1+ i signal2) are obstacle grids or not from 1 to min (judges whether an obstacle exists in diagonal oblique lines or not), if so, the judgment program directly exits the neighbor relation judgment program, which means that two points do not satisfy the neighbor relation. If no barrier grid exists, the fourth step is carried out;
and fourthly, if the absolute value of x1-x2 is larger than the absolute value of y1-y2, judging whether the coordinates of starting circulation from 1 to max-min are (x1+ min signal1+ i signal1, y1+ min signal2) whether an obstacle grid exists or not (judging whether an obstacle exists on a vertical line or not, if the absolute value of starting circulation from 1 to max-min is smaller than the absolute value, judging whether the coordinates of starting circulation from 1 to max-min are (x1+ min signal1, y1+ min signal2+ i signal2) whether the grid exists or not (judging whether the obstacle exists on a horizontal line or not) whether the coordinates of starting circulation from 1 to max-min are (judging whether the obstacle exists on the horizontal line or not) or not, judging that the neighbor relation between two points does not meet the requirement, and directly exiting the neighbor relation judging program if the obstacle grid does not exist, that the two points meet the neighbor relation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210394542.6A CN114777785A (en) | 2022-04-15 | 2022-04-15 | Improved Astar algorithm based on salient point search mechanism |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210394542.6A CN114777785A (en) | 2022-04-15 | 2022-04-15 | Improved Astar algorithm based on salient point search mechanism |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114777785A true CN114777785A (en) | 2022-07-22 |
Family
ID=82429530
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210394542.6A Pending CN114777785A (en) | 2022-04-15 | 2022-04-15 | Improved Astar algorithm based on salient point search mechanism |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114777785A (en) |
-
2022
- 2022-04-15 CN CN202210394542.6A patent/CN114777785A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111811514B (en) | Path planning method based on regular hexagon grid jump point search algorithm | |
CN111562785B (en) | Path planning method and system for collaborative coverage of cluster robots | |
CN111504325A (en) | Global path planning method based on weighted A-algorithm for expanding search neighborhood | |
CN112985408B (en) | Path planning optimization method and system | |
CN111678523B (en) | Rapid BI _ RRT obstacle avoidance trajectory planning method based on STAR algorithm optimization | |
CN110744543B (en) | Improved PRM obstacle avoidance motion planning method based on UR3 mechanical arm | |
CN113485369B (en) | Indoor mobile robot path planning and path optimizing method with improved A-algorithm | |
CN108444490B (en) | Robot path planning method based on depth fusion of visible view and A-x algorithm | |
CN112068588A (en) | Unmanned aerial vehicle trajectory generation method based on flight corridor and Bezier curve | |
CN110967015B (en) | Path planning method and system | |
CN111176286B (en) | Mobile robot path planning method and system based on improved D-lite algorithm | |
CN107607120A (en) | Based on the unmanned plane dynamic route planning method for improving the sparse A* algorithms of reparation formula Anytime | |
CN112327876B (en) | Robot path planning method based on terminal distance index | |
CN114721401A (en) | Efficient path planning method based on improved A-algorithm | |
CN113296520A (en) | Routing planning method for inspection robot by fusing A and improved Hui wolf algorithm | |
CN110975290A (en) | Path planning method and system based on pattern database | |
CN113189988A (en) | Autonomous path planning method based on Harris algorithm and RRT algorithm composition | |
CN115047880A (en) | Intelligent path planning method for robot in unknown dynamic environment | |
CN113375686A (en) | Path planning method and device and intelligent conveying system | |
CN114777785A (en) | Improved Astar algorithm based on salient point search mechanism | |
CN114995391B (en) | 4-order B spline curve path planning method for improving A-algorithm | |
CN111829526A (en) | Distance map reconstruction and jumping point path planning method based on anti-collision radius | |
CN110975291A (en) | Path extraction method and system | |
CN114779788A (en) | Path planning method for improving A-algorithm | |
CN114415668A (en) | Mobile robot path planning method based on extended-field self-adaptive ant colony algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |