当前位置:网站首页>【路径规划】使用垂距限值法与贝塞尔优化A星路径
【路径规划】使用垂距限值法与贝塞尔优化A星路径
2022-07-07 21:52:00 【龙猫略略略】
在之前使用通用的A*算法来规划出路径之后,可以发现路径上其实是有许多的冗余点的,如下图所示:

上图中可以明显看出有一些折弯点是冗余的,因此本节内容就介绍使用垂距限值法来优化冗余点。
垂距限值法
垂距限值法的思想也是比较简单的,概括一下就是:计算当前节点到上节点与下节点连线的距离,超过一定的阈值就从总集合中删除当前点。总体思想就如它的名字一样。

这里我写成了一个函数Vertical_distance_limit:

当然,此函数中我又封装了一个函数,即计算垂距的函数compute_vertical_distance
垂距计算
关于垂距计算,我们可以使用向量法,如下图所示:

使用向量法计算垂距的步骤可以按照如下来进行:
1) 先计算向量last_to_next的单位向量u_last_to_next
2) 计算向量last_to_pos,之后计算last_to_pos与向量u_last_to_next的点乘,即为last_to_pos到向量u_last_to_next上的投影长度L
3) 使用向量u_last_to_next乘以L即为向量last_to_closest
4) 使用last的坐标加上last_to_closest即可求出closest的坐标
5) 之后就可以求出pos与closest的距离
使用垂距限值法的效果
在增加了垂距优化后就可以得到如下的效果:

上图中红色连线点为初始的A*算法路径点,绿色连线点为优化后的路径点
使用五阶贝塞尔优化路径
在优化了路径后,我们可以进一步使用贝塞尔曲线规划出一条更平滑的曲线:

增加运动轨迹模型
之后我们可以按照之前做RRT那样,增加速度S曲线的运动轨迹模型,最后的效果就是这样的:
A*算法+垂距限值法+贝塞尔+运动模型轨迹
边栏推荐
- redis缓存工具类,值得拥有~
- MySQL Index Optimization Practice I
- Possible SQL for Oracle table lookup information
- [compilation principle] lexical analysis design and Implementation
- USB (XVII) 2022-04-15
- SRM supplier cloud collaborative management platform solution for building materials industry to realize business application scalability and configuration
- Pycharm essential plug-in, change the background (self use, continuous update) | CSDN creation punch in
- Explain
- Installing gradle
- 平衡二叉樹【AVL樹】——插入、删除
猜你喜欢

MySQL Index Optimization Practice I

First week of July

UE4_ Use of ue5 blueprint command node (turn on / off screen response log publish full screen display)

Get started with mongodb

One week learning summary of STL Standard Template Library

Anxinco EC series modules are connected to the multi protocol access products of onenet Internet of things open platform

USB (XV) 2022-04-14

2021icpc Shanghai h.life is a game Kruskal reconstruction tree

B_QuRT_User_Guide(38)

UE4_ Ue5 panoramic camera
随机推荐
FPGA basics catalog
2022 Season 6 perfect children's model Shaanxi finals came to a successful conclusion
C # exchange number, judge to pass the exam
[untitled]
Markdown
Map operation execution process
ASP. Net query implementation
高效的S2B2C电商系统,是这样帮助电子材料企业提升应变能力的
B_ QuRT_ User_ Guide(38)
MongoDB快速入门
Given an array, such as [7864, 284, 347, 7732, 8498], now you need to splice the numbers in the array to return the "largest possible number."
【实验分享】通过Console口登录到Cisco设备
UE4_ Use of ue5 blueprint command node (turn on / off screen response log publish full screen display)
POJ2392 SpaceElevator [DP]
Matlab SEIR infectious disease model prediction
【汇总】看过的一些Panel与视频
Windows set redis to start automatically
[experiment sharing] log in to Cisco devices through the console port
Anxinco EC series modules are connected to the multi protocol access products of onenet Internet of things open platform
Display the server hard disk image to the browser through Servlet