CN114740898B - A three-dimensional trajectory planning method based on free space and A* algorithm - Google Patents
A three-dimensional trajectory planning method based on free space and A* algorithm Download PDFInfo
- Publication number
- CN114740898B CN114740898B CN202210592913.1A CN202210592913A CN114740898B CN 114740898 B CN114740898 B CN 114740898B CN 202210592913 A CN202210592913 A CN 202210592913A CN 114740898 B CN114740898 B CN 114740898B
- Authority
- CN
- China
- Prior art keywords
- node
- obstacle
- class
- point
- track
- 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
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000007781 pre-processing Methods 0.000 claims abstract description 6
- 238000001514 detection method Methods 0.000 claims abstract description 4
- 239000013598 vector Substances 0.000 claims description 9
- 238000005457 optimization Methods 0.000 claims description 5
- 239000011159 matrix material Substances 0.000 claims description 2
- 230000004888 barrier function Effects 0.000 claims 5
- 230000011218 segmentation Effects 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 9
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
- G05D1/10—Simultaneous control of position or course in three dimensions
- G05D1/101—Simultaneous control of position or course in three dimensions specially adapted for aircraft
Landscapes
- Engineering & Computer Science (AREA)
- Aviation & Aerospace Engineering (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明公开一种基于自由空间与A*算法的三维航迹规划方法,首先根据给定的规划空间高度维度,基于平面二值地图提取出任务飞行曲面,将三维地图的路径规划问题转化为二维地图的路径规划问题,降低了路径规划的复杂程度。之后,使用二值图像连通域检测算法将任务飞行曲面中各个障碍区域识别并区分,并使用障碍物矩形分割合并方法将障碍物转化为多边形。最后,使用一种基于图形预处理的改进A*算法找到最优路径。本发明相比现有方法,具有规划效率高,规划所得航迹可飞性,可跟踪性高的优点。
The present invention discloses a three-dimensional trajectory planning method based on free space and A* algorithm. First, according to the given planning space height dimension, the mission flight surface is extracted based on the plane binary map, and the path planning problem of the three-dimensional map is converted into the path planning problem of the two-dimensional map, thereby reducing the complexity of the path planning. Afterwards, the binary image connected domain detection algorithm is used to identify and distinguish the various obstacle areas in the mission flight surface, and the obstacle rectangle segmentation and merging method is used to convert the obstacles into polygons. Finally, an improved A* algorithm based on graphic preprocessing is used to find the optimal path. Compared with the existing method, the present invention has the advantages of high planning efficiency, high flyability and high traceability of the planned trajectory.
Description
技术领域Technical Field
本发明涉及航迹规划领域,涉及一种基于图形学与启发式搜索的航迹规划方法,具体来说是一种基于自由空间与A*算法的三维航迹规划方法。The invention relates to the field of track planning, and in particular to a track planning method based on graphics and heuristic search, and in particular to a three-dimensional track planning method based on free space and A* algorithm.
背景技术Background technique
无人机以其体积小,成本低,灵活性高等优点正被大量运用与军用与民用领域,包括战场侦察、灾情监视、环境监测等。而想要实现这些功能,无人机的航迹规划功能是必不可少的。无人机的航迹规划,就是要在已知或未知的工作环境中,遵从一定的约束和准则,自主寻找出一条从起始位置到目标位置的最优的无障碍的行进路线。由于三维地图的复杂程度比二维地图要高,所以三维地图的航迹规划算法往往复杂程度更高,且更加耗时。A*算法是一种经典的航迹规划算法,可以实现较优的航迹规划,但是随着地图变得复杂,A*算法的计算量和搜索冗余度成倍增加,导致搜索航迹效率低下,且搜索出的航迹并非最优。Drones are being widely used in military and civilian fields, including battlefield reconnaissance, disaster monitoring, and environmental monitoring, due to their small size, low cost, and high flexibility. To achieve these functions, the trajectory planning function of drones is essential. The trajectory planning of drones is to follow certain constraints and criteria in a known or unknown working environment and autonomously find an optimal barrier-free route from the starting position to the target position. Since the complexity of three-dimensional maps is higher than that of two-dimensional maps, the trajectory planning algorithm of three-dimensional maps is often more complex and more time-consuming. The A* algorithm is a classic trajectory planning algorithm that can achieve better trajectory planning, but as the map becomes more complex, the computational complexity and search redundancy of the A* algorithm increase exponentially, resulting in low efficiency in searching for trajectories, and the searched trajectories are not optimal.
在A*算法的基础上,有许多对A*算法进行的改进,包括修改A*算法中的启发式函数,改变查找节点的方法,增加邻域搜索范围等等。这些方法在一定程度上避免了冗余搜索,提升了A*算法的航迹搜索效率与航迹的平滑程度。但是这些改进后的A*算法依然存在规划速度慢,航迹非最优的问题。Based on the A* algorithm, there are many improvements to the A* algorithm, including modifying the heuristic function in the A* algorithm, changing the method of finding nodes, increasing the neighborhood search range, etc. These methods avoid redundant searches to a certain extent and improve the track search efficiency and track smoothness of the A* algorithm. However, these improved A* algorithms still have problems such as slow planning speed and non-optimal tracks.
发明内容Summary of the invention
本发明为了解决三维航迹规划复杂的问题,提出一种基于自由空间与A*算法的三维航迹规划方法。In order to solve the complex problem of three-dimensional trajectory planning, the present invention proposes a three-dimensional trajectory planning method based on free space and A* algorithm.
本发明基于自由空间与A*算法的三维航迹规划方法,具体步骤设计为:The present invention is based on the three-dimensional trajectory planning method of free space and A* algorithm, and the specific steps are designed as follows:
步骤1:根据给定的规划空间高度维度,从地形高程模型中提取出相应高度的所有节点,形成任务飞行曲面。Step 1: According to the given planning space height dimension, all nodes of the corresponding height are extracted from the terrain elevation model to form the mission flight surface.
步骤2:使用二值图像连通域检测算法将任务飞行曲面中各个障碍区域识别并区分,进一步将任务飞行曲面上的障碍物转化为多边形。Step 2: Use the binary image connected domain detection algorithm to identify and distinguish the various obstacle areas in the mission flight surface, and further convert the obstacles on the mission flight surface into polygons.
步骤3:任务飞行曲面上的自由空间可以视为一个多连通的凹多边形,首先将多连通的凹多边形转化为单连通的凹多边形;随后将单连通的凹多边形分解成若干个子凸多边形。Step 3: The free space on the mission flight surface can be regarded as a multiply connected concave polygon. First, the multiply connected concave polygon is converted into a simply connected concave polygon; then the simply connected concave polygon is decomposed into several sub-convex polygons.
步骤4:使用基于图形预处理的A*算法找到最优航迹。Step 4: Use the A* algorithm based on graph preprocessing to find the optimal trajectory.
首先,将任务飞行曲面上每一个子自由空间进行处理为A*算法所用的节点;具体方法如下:First, each sub-free space on the mission flight surface is processed into a node used by the A* algorithm; the specific method is as follows:
为子自由空间加入节点序号、节点坐标、相邻节点序号、父节点序号、启发式信息。Add node number, node coordinates, adjacent node number, parent node number, and heuristic information to the child free space.
随后,使用A*算法搜索最优区域通道。Then, the A* algorithm is used to search for the optimal region channel.
在得到最优区域通道之后,在最优区域通道内生成连接起点和终点的初始可行航迹;进一步对得到的航迹进行优化;优化方法为:After obtaining the optimal regional channel, an initial feasible track connecting the starting point and the end point is generated in the optimal regional channel; the obtained track is further optimized; the optimization method is:
①令全局搜索次数i=0;① Let the number of global searches i = 0;
②令局部搜索次数j=0;② Let the number of local searches j = 0;
③取区域通道内各对相邻区域的共同分割线上的中点{M1,M2,…Mn},经由中点{M1,M2,…Mn}连接出初始可行航迹{Xcurrent}:Xstart→M1→M2...→Mn→Xend;③ Take the midpoints {M 1 ,M 2 ,…M n } on the common dividing line of each pair of adjacent areas in the regional channel, and connect the initial feasible track {X current }:X start →M 1 →M 2 ...→M n →X end through the midpoints {M 1 ,M 2 , … M n };
④随机选择一条分割线QkQk+1,调整其上的航迹节点Mk→Rk,Rk为分割线上的另一个点,重新连接后得到一条新的航迹:④ Randomly select a segmentation line Q k Q k+1 and adjust the track node M k →R k on it. R k is another point on the segmentation line. After reconnecting, a new track is obtained:
{Xnew}:Xstart→M1→M2...→Rk→...→Mn→Xend {X new }:X start →M 1 →M 2 ... →R k → ... →M n →X end
并计算其长度;and calculate its length;
⑤若新的航迹{Xnew}短于当前航迹{Xcurrent},则用新的航迹取代当前航迹:{Xcurrent}←{Xnew},令j=0;若新的航迹长于当前航迹,则令j=j+1;⑤ If the new track {X new } is shorter than the current track {X current }, replace the current track with the new track: {X current }←{X new }, let j=0; if the new track is longer than the current track, let j=j+1;
⑥重复步骤④和⑤,直至j大于局部搜索上限t,令i=i+1;⑥ Repeat steps ④ and ⑤ until j is greater than the local search upper limit t, and let i = i + 1;
⑦重复步骤③~⑥,直至i大于全局搜索上限T。⑦ Repeat steps ③ to ⑥ until i is greater than the global search upper limit T.
本发明基于自由空间与A*算法的三维航迹规划方法,相比现有技术,具有规划效率高,规划所得航迹可飞性,可跟踪性高的优点。The three-dimensional trajectory planning method based on free space and A* algorithm of the present invention has the advantages of high planning efficiency, high flyability and high trackability of the planned trajectory compared with the prior art.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本发明基于自由空间与A*算法的三维航迹规划方法流程图;FIG1 is a flow chart of a three-dimensional trajectory planning method based on free space and A* algorithm of the present invention;
图2是本发明中提取任务飞行曲面结果示意图;FIG2 is a schematic diagram of the results of extracting the mission flight surface according to the present invention;
图3是本发明中障碍物区分识别示意图;FIG3 is a schematic diagram of obstacle identification in the present invention;
图4是本发明中障碍物转化多边形示意图;FIG4 is a schematic diagram of an obstacle conversion polygon in the present invention;
图5是本发明中构造单连通多边形示意图;FIG5 is a schematic diagram of constructing a simply connected polygon in the present invention;
图6是本发明中地图分割结果示意图;FIG6 is a schematic diagram of a map segmentation result in the present invention;
图7是本发明中最优可见点示意图;FIG7 is a schematic diagram of the optimal visible point in the present invention;
图8是本发明中二维航迹规划结果示意图;FIG8 is a schematic diagram of a two-dimensional trajectory planning result in the present invention;
图9是本发明中飞行曲面航迹规划结果示意图;FIG9 is a schematic diagram of the flight surface trajectory planning result in the present invention;
图10是本发明中三维航迹规划结果示意图。FIG. 10 is a schematic diagram of the three-dimensional trajectory planning result in the present invention.
具体实施方式Detailed ways
下面将结合本附图对本发明作进一步详细说明。The present invention will be described in further detail below in conjunction with the accompanying drawings.
本发明基于自由空间与A*算法的三维航迹规划方法,如图1所示,具体步骤设计为:The three-dimensional trajectory planning method based on free space and A* algorithm of the present invention is shown in FIG1 , and the specific steps are designed as follows:
步骤1:根据给定的规划空间高度维度,从地形高程模型中提取出相应高度的所有节点,形成任务飞行曲面;Step 1: According to the given planning space height dimension, all nodes of corresponding height are extracted from the terrain elevation model to form the mission flight surface;
为了降低航迹规划的复杂程度,基于平面二值地图提取任务飞行曲面,将三维航迹规划问题降维为二维航迹规划问题。具体方法是:In order to reduce the complexity of trajectory planning, the mission flight surface is extracted based on the plane binary map, and the three-dimensional trajectory planning problem is reduced to a two-dimensional trajectory planning problem. The specific method is:
遍历地形高程模型中的所有节点,若节点A处对应的地形高度hg满足hg≤hmax-hm,则将节点A视为任务飞行曲面上的安全节点,节点A在二值地图上的对应的节点取0;否则,节点A视作障碍节点,节点A在二值地图上的对应节点取1。上述hmax表示无人机的最大飞行海高;hm表示任务规定的相对地面高度。通过上述方法提取的任务飞行曲面如图2所示。Traverse all nodes in the terrain elevation model. If the terrain height hg corresponding to node A satisfies hg ≤hmax - hm , node A is regarded as a safe node on the mission flight surface, and the corresponding node of node A on the binary map is 0; otherwise, node A is regarded as an obstacle node, and the corresponding node of node A on the binary map is 1. The above hmax represents the maximum flight sea height of the UAV; hm represents the relative ground height specified by the mission. The mission flight surface extracted by the above method is shown in Figure 2.
步骤2:将任务飞行曲面上的障碍物转化为多边形Step 2: Convert obstacles on the mission flight surface into polygons
为了在二值地图上使用基于图形预处理的A*算法,需要将任务飞行曲面上的障碍物转化为多边形。为此,首先需要使用二值图像连通域检测算法将任务飞行曲面中各个障碍区域识别并区分,如图3所示。令二值地图矩阵共m行n列,障碍区域识别具体过程为:In order to use the A* algorithm based on graphic preprocessing on the binary map, it is necessary to convert the obstacles on the mission flight surface into polygons. To this end, it is first necessary to use the binary image connected domain detection algorithm to identify and distinguish the various obstacle areas on the mission flight surface, as shown in Figure 3. Let the binary map matrix have m rows and n columns, and the specific process of obstacle area identification is:
1)访问节点x11,若其为障碍节点,则记该点的类序为1;1) Visit node x 11 . If it is an obstacle node, the class order of the node is recorded as 1.
2)遍历节点x1j(j=2,...,n),若其为障碍节点,则检测其左侧节点x1(j-1)是否为障碍节点;若是,则x1j沿用x1(j-1)的类序;否则,x1j的类序为当前总类别数(障碍节点类序的总数)加1;例如:设第一排有10个点,分别x11,x12,x13,...,x110,其中,x11,x13,x15,x16为障碍点。x11的类序为1;x12点为非障碍点,没有类序;x13为障碍点,则检测其左边点x12是否为障碍点,结果为否,因此x13的类序为1+1=2;x14为非障碍点,没有类序;x15为障碍点,其类序计算为2+1=3;x16为障碍点,检测其左边点x15,是障碍点,所以沿用x15的类序,类序为3。2) Traverse node x1j (j=2,...,n). If it is an obstacle node, check whether its left node x1 (j-1) is an obstacle node. If so, x1j uses the class sequence of x1 (j-1) . Otherwise, the class sequence of x1j is the current total number of classes (the total number of obstacle node class sequences) plus 1. For example, suppose there are 10 points in the first row, namely x11 , x12 , x13 ,..., x110 , among which x11 , x13 , x15 , and x16 are obstacle points. The class sequence of x11 is 1; point x12 is a non-obstacle point and has no class sequence; x13 is an obstacle point, so its left point x12 is detected to see if it is an obstacle point, and the result is no, so the class sequence of x13 is 1+1=2; x14 is a non-obstacle point and has no class sequence; x15 is an obstacle point, and its class sequence is calculated to be 2+1=3; x16 is an obstacle point, and its left point x15 is detected to be an obstacle point, so the class sequence of x15 is used, and the class sequence is 3.
3)对于第i行上的节点(i=2,…,m),进行如下操作:3) For the nodes on the i-th row (i=2,…,m), perform the following operations:
a)访问节点xi1,若其为障碍节点,则检测其上方节点x(i-1)1及右上方节点x(i-1)2:若x(i-1)1与x(i-1)2均未被分类,则xi1的类序为当前总类别数加1;若x(i-1)1已被分类而x(i-1)2未被分类,则xi1沿用x(i-1)1的类序;若x(i-1)2已被分类而x(i-1)1未被分类,则xi1沿用x(i-1)2的类序;若x(i-1)1与x(i-1)2均已被分类且类序相同,则xi1沿用x(i-1)1与x(i-1)2的类序;若x(i-1)1与x(i-1)2均已被分类且类序不同,则xi1沿用x(i-1)1的类序,并将x(i-1)1和x(i-1)2记为一个等价对;a) Visit node x i1 . If it is an obstacle node, check the node above it, x (i-1)1 , and the node to the upper right, x (i-1)2 : If both x (i-1)1 and x (i-1)2 have not been classified, the class order of x i1 is the current total number of classes plus 1; if x (i-1)1 has been classified and x (i-1)2 has not been classified, then x i1 follows the class order of x (i-1)1 ; if x (i-1)2 has been classified and x (i-1)1 has not been classified, then x i1 follows the class order of x (i-1)2 ; if both x (i-1)1 and x (i-1)2 have been classified and have the same class order, then x i1 follows the class order of x (i-1)1 and x (i-1)2 ; if both x (i-1)1 and x (i-1)2 have been classified and have different class orders, then x i1 follows the class order of x (i-1)1 and replaces x (i-1)2 with x (i-1)1 . (i-1)1 and x (i-1)2 are recorded as an equivalent pair;
b)访问节点xij(j=2,...,n-1),若其为障碍节点,则依次检测其左侧节点xi(j-1)、左上方节点x(i-1)(j-1)、上方节点x(i-1)j以及右上方节点x(i-1)(j+1):若该四点均非障碍节点,则xij的类序为当前总类别数加1;若该四点只有一个障碍节点,则xij沿用该障碍点的类序;若该四点中有2~4个障碍节点,则xij沿用这四点中第一个被检测出为障碍节点的点的类序,并将这四个点中类序不同的点对记为一个等价对。b) Visit node xij (j=2,...,n-1). If it is an obstacle node, then detect its left node xi(j-1) , upper left node x (i-1)(j-1) , upper node x (i-1)j and upper right node x (i-1)(j+1) in turn : if these four points are not obstacle nodes, then the class order of xij is the current total number of classes plus 1; if there is only one obstacle node among the four points, then xij uses the class order of the obstacle point; if there are 2 to 4 obstacle nodes among the four points, then xij uses the class order of the first point among the four points detected as an obstacle node, and the point pairs with different class orders among the four points are recorded as an equivalent pair.
c)访问节点xin,若其为障碍节点,则依次检测其左侧节点xi(j-1)、左上方节点x(i-1)(j-1)以及上方节点x(i-1)j:若该三点均非障碍节点,则xij的类序为当前总类别数加1;若该三点只有一个障碍节点,则xij沿用该障碍节点的类序;若该三点中有2~3个障碍节点,则xij沿用这三点中第一个被检测出为障碍节点的点的类序,并将其中类序不同的点对记为一个等价对;c) Visit node x in . If it is an obstacle node, then check its left node x i(j-1) , upper left node x (i-1)(j-1) and upper node x (i-1)j in turn : if none of the three points are obstacle nodes, then the class order of x ij is the current total number of classes plus 1; if there is only one obstacle node among the three points, then x ij uses the class order of the obstacle node; if there are 2 to 3 obstacle nodes among the three points, then x ij uses the class order of the first point detected as an obstacle node among the three points, and the point pairs with different class orders are recorded as an equivalent pair;
d)根据上述得到的等价对,将等价的类别的类序进行统一;上述所有类序相同的障碍点在二值地图上组成了一个障碍物区域。d) According to the equivalent pairs obtained above, the class order of equivalent categories is unified; all the obstacle points with the same class order above form an obstacle area on the binary map.
随后,将识别出的障碍物区域转化为多边形,如图4所示,具体方法为:Then, the identified obstacle area is converted into a polygon, as shown in Figure 4. The specific method is as follows:
找到障碍物区域上所有点的横纵坐标中的最大值和最小值:Xmax,Xmax,Ymax和Ymin,以(Xmin,Ymin),(Xmin,Ymax),(Xmax,Ymin),(Xmax,Ymax)为顶点,构造出一个覆盖整个障碍区域的矩形区域。然后,以一定的精度acc(accurate的缩写。),将该矩形区域分割成a×b个形状相同的矩形子区域,其中a≈(Ymax-Ymin)/acc,b≈(Xmax-Xmax)/acc。遍历所有的子区域,若矩形子区域上没有障碍节点,则舍弃该子区域。最后,将保留下来的子区域中的外侧顶点相连,即可得到原障碍物的近似多边形。Find the maximum and minimum values of the horizontal and vertical coordinates of all points in the obstacle area: X max , X max , Y max and Y min , and construct a rectangular area covering the entire obstacle area with (X min , Y min ), (X min , Y max ), (X max , Y min ), (X max , Y max ) as vertices. Then, with a certain accuracy acc (abbreviation for accurate), divide the rectangular area into a×b rectangular sub-areas of the same shape, where a≈(Y max -Y min )/acc, b≈(X max -X max )/acc. Traverse all sub-areas. If there is no obstacle node on the rectangular sub-area, discard the sub-area. Finally, connect the outer vertices in the retained sub-areas to obtain the approximate polygon of the original obstacle.
步骤3:将任务飞行曲面上的自由空间分解为多个凸多边形Step 3: Decompose the free space on the mission flight surface into multiple convex polygons
将任务飞行曲面中的障碍物转化为多边形之后,任务飞行曲面上的自由空间可以视为一个多连通的凹多边形。要使用基于图形预处理的A*算法,还需要将任务飞行曲面中的自由空间分解成多个凸多边形。这个过程首先需要将多连通的凹多边形转化为单连通的凹多边形,具体原理过程如下:After the obstacles in the mission flight surface are converted into polygons, the free space on the mission flight surface can be regarded as a multi-connected concave polygon. To use the A* algorithm based on graphics preprocessing, the free space in the mission flight surface needs to be decomposed into multiple convex polygons. This process first requires converting the multi-connected concave polygon into a single-connected concave polygon. The specific principle process is as follows:
如图5所示,当点M1M2…Mn围成的凹多边形区域中存在一个障碍物区域(障碍物各顶点O1O2…On围城障碍物区域)时,选择障碍物区域的一个顶点Oi与凹多边形区域的某一个顶点Mi连线,记为OiMi;其矢量可以有两个方向和/>令两个矢量/>与/>间有距离ΔD→0,将障碍物的顶点Oi与地图的顶点Mi通过两个矢量连接,则地图变成了单连通域地图M1M2…MiOiOi+1…OnO1…OiMi…Mn。若凹多边形区域还存在其它障碍物,则需要将每一个障碍物直接或间接地与地图边界顶点相连。As shown in Figure 5, when there is an obstacle area in the concave polygonal area surrounded by points M1M2 … Mn (the obstacle area is surrounded by obstacle vertices O1O2 … On ), select a vertex Oi of the obstacle area and a vertex Mi of the concave polygonal area to connect the line, denoted as OiMi ; its vector can have two directions and/> Let two vectors/> With/> There is a distance ΔD→0 between the vertex Oi of the obstacle and the vertex Mi of the map through two vectors, and the map becomes a simply connected domain map M 1 M 2 …M i O i O i+1 …O n O 1 …O i M i …M n . If there are other obstacles in the concave polygon area, each obstacle needs to be directly or indirectly connected to the vertex of the map boundary.
若存在另一个障碍物O′1O′2…O′n,直接连接是同样按照上述方法连接障碍物的一个顶点O′i与地图边界某个顶点Mj,之后的单连通区域表示为:If there is another obstacle O′ 1 O′ 2 …O′ n , the direct connection is to connect a vertex O′ i of the obstacle with a vertex M j on the map boundary in the same way as above. The subsequent simply connected region is expressed as:
M1M2…MiOiOi+1…OnO1…OiMi…MjO′iO′i+1…O′nO′1…O′iMj…Mn M 1 M 2 …M i O i O i+1 …O n O 1 …O i M i …M j O′ i O′ i+1 …O′ n O′ 1 …O′ i M j …M n
间接连接指的是障碍物可通过连接已经转化的障碍物从而连接凹多边形区域。之前已有一个障碍物连接到凹多边形区域,那么这个障碍物的边界可以视为凹多边形区域边界的一部分,那么新的障碍物可以通过连接这个转化后的障碍物的顶点,进而相当于连接到了凹多边形区域。令新障碍物的O′i点连接到第一个障碍物的Om点,则连接之后的单连通区域表示为:Indirect connection means that obstacles can be connected to concave polygonal areas by connecting to transformed obstacles. If there is an obstacle connected to the concave polygonal area before, the boundary of this obstacle can be regarded as part of the boundary of the concave polygonal area. Then the new obstacle can be connected to the concave polygonal area by connecting the vertices of the transformed obstacle. Let the O′ i point of the new obstacle be connected to the O m point of the first obstacle, then the simply connected area after the connection is expressed as:
M1M2…MiOiOi+1…OmO′iO′i+1…O′nO′1…O′iOm…OnO1…OiMi…Mn M 1 M 2 …M i O i O i+1 …O m O′ i O′ i+1 …O′ n O′ 1 …O′ i O m …O n O 1 …O i M i …M n
将多连通的凹多边形转化为单连通的凹多边形之后,需要将单连通的凹多边形分解成若干个子凸多边形,如图6所示。具体过程如下:After converting the multiply connected concave polygon into a simply connected concave polygon, it is necessary to decompose the simply connected concave polygon into several sub-convex polygons, as shown in Figure 6. The specific process is as follows:
a、判断单连通凹多边形的正负性,若为负多边形,则将其顶点集合{Pn}中的顶点重新反向排序,若为正多边形,则进入步骤b;a. Determine the positivity of the simply connected concave polygon. If it is a negative polygon, the vertices in its vertex set {P n } are reordered in reverse order. If it is a regular polygon, proceed to step b.
b、从{Pn}中选取一个凹点Pk,搜索该点的所有可见点,组成一个可见点集合{Vk};b. Select a concave point P k from {P n }, search for all visible points of this point, and form a visible point set {V k };
c、若{Vk}中有凹点,则在这些凹点中选择Pk的最优可见点,若{Vk}中没有凹点,则在{Vk}中选择Pk的最优可见点;c. If there are concave points in {V k }, then select the best visible point of P k among these concave points; if there are no concave points in {V k }, then select the best visible point of P k in {V k };
d、连接Pk与其最优可见点,将地图分解,增加一个新的子多边形;d. Connect P k to its optimal visible point, decompose the map, and add a new sub-polygon;
e、重复步骤b)~d),直至{Pn}中没有凹点,则该多边形的所有子多边形都为凸多边形。e. Repeat steps b) to d) until there are no concave points in {P n }, and all sub-polygons of the polygon are convex polygons.
上述多边形的正负性和最优可见点的定义如下:The positive and negative values and the optimal visible point of the above polygon are defined as follows:
多边形的正负性:若多边形的顶点集合{Pn}中的顶点序列按逆时针顺序排列,则该多边形为正多边形,否则,该多边形为负多边形。具体判断方法为:任取多边形上一个凸点Pi,若它与其相邻两点Pi-1和Pi+1组成的矢量和/>满足关系式:/>则该多边形为正,否则,该多边形为负。Positive and negative polygons: If the vertex sequence in the vertex set {P n } of the polygon is arranged in counterclockwise order, then the polygon is a positive polygon, otherwise, the polygon is a negative polygon. The specific judgment method is: take any convex point P i on the polygon, if it and its two adjacent points P i-1 and P i+1 form a vector and/> Satisfies the relationship:/> Then the polygon is positive, otherwise, the polygon is negative.
最优可见点:如图7所示,取凹点Mi的相邻两点Mi-1和Mi+1,引矢量和/>所构成的角的角平分线/>取Mi的可见点集合{Vk}中的一个可见点Mk,/>与矢量/>构成夹角α,计算其余弦值/>{Vk}中使得该值最大的一个可见点称为Mi的最优可见点。Optimal visible point: As shown in Figure 7, take the two adjacent points Mi -1 and Mi +1 of the concave point Mi , and introduce the vector and/> The angle bisector of the angle formed/> Take a visible point M k from the visible point set {V k } of Mi ,/> With vector /> Constitute the angle α and calculate its cosine value/> A visible point in {V k } that maximizes this value is called the optimal visible point of Mi.
步骤4:使用基于图形预处理的A*算法找到最优航迹Step 4: Use the A* algorithm based on graph preprocessing to find the optimal trajectory
首先,需要对任务飞行曲面上每一个子自由空间(使用之前处理多边形的方法处理任务飞行曲面,得到的结果中不是障碍物的子多边形叫做子自由空间)进行处理,处理成A*算法所用的节点。具体方法如下:First, it is necessary to process each sub-free space on the mission flight surface (the mission flight surface is processed using the previous method of processing polygons, and the sub-polygons that are not obstacles in the result are called sub-free spaces) and process them into nodes used by the A* algorithm. The specific method is as follows:
为子自由空间加入节点序号、节点坐标、相邻节点序号、父节点序号、启发式信息。对其中某个子自由空间来说,以上信息的含义如下:Add node numbers, node coordinates, adjacent node numbers, parent node numbers, and heuristic information to the child free space. For a child free space, the meaning of the above information is as follows:
节点序号为该子自由空间在所有子自由空间中的序号;The node number is the number of the sub-free space among all sub-free spaces;
节点坐标为该子自由空间对应凸多边形(顶点为P1,P2,...,Pn)的形心坐标;The node coordinates are the centroid coordinates of the corresponding convex polygon (with vertices P 1 , P 2 , ..., P n ) of the sub-free space;
相邻节点序号表示的是与该节点所指代区域相邻的其它子区域的对应节点序号;The adjacent node number indicates the corresponding node number of other sub-areas adjacent to the area indicated by the node;
父节点序号为与该子自由空间相邻的子自由空间中到达该子自由空间代价最小的节点的序号;The parent node serial number is the serial number of the node in the sub-free space adjacent to the sub-free space that has the lowest cost to reach the sub-free space;
启发式信息为两个子自由空间形心之间的欧氏距离,也称作航迹代价。The heuristic information is the Euclidean distance between the centroids of two sub-free spaces, also known as the track cost.
随后,使用A*算法搜索最优区域通道,方法如下:Then, the A* algorithm is used to search for the optimal regional channel as follows:
(1)将起点Xstart所在区域的节点Sstart加入待检索序列Open List;(1) Add the node S start in the region where the starting point X start is located to the Open List of the sequence to be searched;
(2)若Open List为空,则无可行航迹,算法结束;否则进行步骤(3)。(2) If the Open List is empty, there is no feasible track and the algorithm ends; otherwise, proceed to step (3).
(3)遍历Open List,查找其中F值(F值表示从起点经过当前点Scurent到终点的估计航迹代价最小的节点Scurent,将其移入Close List,移出Open List;(3) Traverse the Open List and find the node S curent with the smallest F value (F value represents the estimated path cost from the starting point through the current point S curent to the end point), move it into the Close List, and remove it from the Open List;
(4)对于节点Scurent的每一个不在Close List的相邻节点Sneighbour:若节点Sneighbour不在Open List,则将其移入Open List,并且将节点Scurent设置为节点Sneighbour的父节点,更新它的G值(G值为从起点到当前点的实际航迹代价)和F值;若节点Sneighbour在Open List,则判断经由节点Scurent到节点Sneighbour所得到的节点Sneighbour的G值是否小于其原本的G值;若是,则将节点Scurent设置为节点Sneighbour的父节点,更新它的G值和F值;(4) For each neighboring node S neighbour of the node S curent that is not in the Close List: if the node S neighbour is not in the Open List, move it to the Open List, set the node S curent as the parent node of the node S neighbour , and update its G value (the G value is the actual track cost from the starting point to the current point) and F value; if the node S neighbour is in the Open List, determine whether the G value of the node S neighbour obtained via the node S curent to the node S neighbour is less than its original G value; if so, set the node S curent as the parent node of the node S neighbour , and update its G value and F value;
(5)重复步骤(2)~(4),直至终点所在区域对应节点在Open List内;(5) Repeat steps (2) to (4) until the node corresponding to the area where the end point is located is in the Open List;
(6)从终点所在区域对应的节点开始,将每个节点Si(没有关系。这里每个节点指的是在生成航迹过程中的节点,即终点,终点的父节点,终点的父节点的父节点,…,直到起点)依次与其父节点Si_parent连接,形成区域通道{Si}。(6) Starting from the node corresponding to the area where the end point is located, each node Si (no relationship. Here, each node refers to a node in the process of generating the track, i.e., the end point, the parent node of the end point, the parent node of the parent node of the end point, ..., until the starting point) is connected in sequence with its parent node Si_parent to form a regional channel { Si }.
在得到区域通道{Si}之后,即可在{Si}内生成连接起点和终点的初始可行航迹。此时得到的航迹还不是最优的,需要进一步对航迹进行优化。优化方法具体为:After obtaining the regional channel {S i }, the initial feasible track connecting the starting point and the end point can be generated in {S i }. The track obtained at this time is not optimal yet and needs to be further optimized. The specific optimization method is:
①令全局搜索次数i=0;① Let the number of global searches i = 0;
②令局部搜索次数j=0;② Let the number of local searches j = 0;
③取区域通道内各对相邻区域的共同分割线上的中点{M1,M2,…Mn},经由这些中点连接出初始可行航迹{Xcurrent}:Xstart→M1→M2...→Mn→Xend。③ Take the midpoints {M 1 ,M 2 ,…M n } on the common dividing line of each pair of adjacent areas in the regional channel, and connect the initial feasible track {X current }:X start →M 1 →M 2 ...→M n →X end through these midpoints.
④随机选择一条分割线QkQk+1,调整其上的航迹节点Mk→Rk(Rk为分割线上的另一个点),重新连接后得到一条新的航迹④ Randomly select a segmentation line Q k Q k+1 , adjust the track node M k →R k (R k is another point on the segmentation line), and reconnect it to get a new track
{Xnew}:Xstart→M1→M2...→Rk→...→Mn→Xend {X new }:X start →M 1 →M 2 ... →R k → ... →M n →X end
并计算其长度。And calculate its length.
⑤若新的航迹{Xnew}短于当前航迹{Xcurrent},则用新的航迹取代当前航迹:{Xcurrent}←{Xnew},令j=0;若新的航迹长于当前航迹,则令j=j+1;⑤ If the new track {X new } is shorter than the current track {X current }, replace the current track with the new track: {X current }←{X new }, let j=0; if the new track is longer than the current track, let j=j+1;
⑥重复步骤④和⑤,直至j大于局部搜索上限t,令i=i+1;⑥ Repeat steps ④ and ⑤ until j is greater than the local search upper limit t, and let i = i + 1;
⑦重复步骤③~⑥,直至i大于全局搜索上限T。⑦ Repeat steps ③ to ⑥ until i is greater than the global search upper limit T.
上述局部搜索上限t与全局搜索上限T分别代表了局部优化次数与全局优化次数的最大值。The above local search upper limit t and global search upper limit T represent the maximum values of local optimization times and global optimization times respectively.
此时得到航迹如图8所示。这条航迹在原始任务飞行曲面上显示如图9所示。向所得航迹中加入高度维度信息,最终得到三维航迹如图10所示。The track obtained at this time is shown in Figure 8. This track is displayed on the original mission flight surface as shown in Figure 9. Adding the height dimension information to the obtained track, the final three-dimensional track is shown in Figure 10.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210592913.1A CN114740898B (en) | 2022-05-27 | 2022-05-27 | A three-dimensional trajectory planning method based on free space and A* algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210592913.1A CN114740898B (en) | 2022-05-27 | 2022-05-27 | A three-dimensional trajectory planning method based on free space and A* algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114740898A CN114740898A (en) | 2022-07-12 |
CN114740898B true CN114740898B (en) | 2024-06-07 |
Family
ID=82287226
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210592913.1A Active CN114740898B (en) | 2022-05-27 | 2022-05-27 | A three-dimensional trajectory planning method based on free space and A* algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114740898B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117519250B (en) * | 2023-12-07 | 2024-11-19 | 青岛云世纪信息科技有限公司 | Unmanned aerial vehicle automatic obstacle avoidance method and system and electronic equipment |
CN118034308B (en) * | 2024-03-08 | 2024-09-27 | 上海大学 | Full-coverage path planning method and system based on image processing |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2010026710A1 (en) * | 2008-09-03 | 2010-03-11 | 村田機械株式会社 | Route planning method, route planning unit, and autonomous mobile device |
CN108563243A (en) * | 2018-06-28 | 2018-09-21 | 西北工业大学 | A kind of unmanned aerial vehicle flight path planing method based on improvement RRT algorithms |
WO2020239092A1 (en) * | 2019-05-30 | 2020-12-03 | 深圳市道通智能航空技术有限公司 | Unmanned aerial vehicle and flight area planning method and device therefor and storage medium |
CN113325834A (en) * | 2021-04-12 | 2021-08-31 | 北京航空航天大学 | Path planning method of improved A-x algorithm based on graph preprocessing |
CN113671985A (en) * | 2021-07-28 | 2021-11-19 | 中国人民解放军32146部队 | Staged multi-base unmanned aerial vehicle task allocation and flight path planning method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9524647B2 (en) * | 2015-01-19 | 2016-12-20 | The Aerospace Corporation | Autonomous Nap-Of-the-Earth (ANOE) flight path planning for manned and unmanned rotorcraft |
-
2022
- 2022-05-27 CN CN202210592913.1A patent/CN114740898B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2010026710A1 (en) * | 2008-09-03 | 2010-03-11 | 村田機械株式会社 | Route planning method, route planning unit, and autonomous mobile device |
CN108563243A (en) * | 2018-06-28 | 2018-09-21 | 西北工业大学 | A kind of unmanned aerial vehicle flight path planing method based on improvement RRT algorithms |
WO2020239092A1 (en) * | 2019-05-30 | 2020-12-03 | 深圳市道通智能航空技术有限公司 | Unmanned aerial vehicle and flight area planning method and device therefor and storage medium |
CN113325834A (en) * | 2021-04-12 | 2021-08-31 | 北京航空航天大学 | Path planning method of improved A-x algorithm based on graph preprocessing |
CN113671985A (en) * | 2021-07-28 | 2021-11-19 | 中国人民解放军32146部队 | Staged multi-base unmanned aerial vehicle task allocation and flight path planning method |
Non-Patent Citations (1)
Title |
---|
基于改进A~*算法的无人机航迹规划;蒙波;皮亦鸣;曹宗杰;;计算机仿真;20100915(第09期);37-40 * |
Also Published As
Publication number | Publication date |
---|---|
CN114740898A (en) | 2022-07-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110531760B (en) | Boundary exploration autonomous mapping method based on curve fitting and target point neighborhood planning | |
CN111610786B (en) | Path Planning Method for Mobile Robot Based on Improved RRT Algorithm | |
CN108898605B (en) | Grid map segmentation method based on map | |
CN114740898B (en) | A three-dimensional trajectory planning method based on free space and A* algorithm | |
CN110909671B (en) | Grid map obstacle detection method integrating probability and height information | |
CN113744311A (en) | Twin neural network moving target tracking method based on full-connection attention module | |
CN110244733A (en) | A Path Planning Method for Mobile Robots Based on Improved Ant Colony Algorithm | |
CN111080786B (en) | BIM-based indoor map model construction method and device | |
CN113110482A (en) | Indoor environment robot exploration method and system based on priori information heuristic method | |
CN110909961B (en) | BIM-based indoor path query method and device | |
CN111444767A (en) | A Pedestrian Detection and Tracking Method Based on LiDAR | |
CN115268443A (en) | Robot obstacle avoidance path planning method | |
CN113515129B (en) | Bidirectional skip point search unmanned vehicle path planning method based on boundary search | |
CN103390169A (en) | Sorting method of vehicle-mounted laser scanning point cloud data of urban ground objects | |
CN114705196A (en) | Self-adaptive heuristic global path planning method and system for robot | |
CN110110763A (en) | A kind of grating map fusion method based on maximum public subgraph | |
CN116227771B (en) | A scene active mapping method based on constraint guidance and spatial optimization strategy | |
Fermin-Leon et al. | TIGRE: Topological graph based robotic exploration | |
Xu et al. | An efficient algorithm for environmental coverage with multiple robots | |
Li et al. | RF-LOAM: Robust and fast LiDAR odometry and mapping in urban dynamic environment | |
CN119022945A (en) | A path planning method for improving the bidirectional A* algorithm | |
CN114926637A (en) | Garden map construction method based on multi-scale distance map and point cloud semantic segmentation | |
JP5182762B2 (en) | Two-dimensional figure matching method | |
CN115220448B (en) | A robot fast path planning method based on sparse visibility graph | |
CN116560360A (en) | Method and system for planning real-time dynamic path of medical care robot facing complex dynamic scene |
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 |