视频讲解
路径跟随-stanley control原理、代码实现、调优技巧、不同跟随方法对比 · 语雀
见笔记运动规划;
见笔记开源项目总结-bilibili课程-;
【video】自动驾驶汽车预测-决策-规划-控制实战入门-b站-轨迹跟踪方法对比
1. 背景
轮速跟随中加速响应滞后减速迅速的特点;
不满足理论上的状态方程;
2. 原理/目的-如何减小和消除横向偏差和航向偏差
调节器减小误差的数学推理;调节器计算的出来的输出能够让误差趋近于零;
参考视频
路径规划与轨迹跟踪系列算法学习_第11讲_Stanley法_哔哩哔哩_bilibili
3. 代码实现
开源项目:
D:\[opencv_source_navigation]\hybrid_astar-master\PathFollower
D:\[openFromGit]\PythonRobotics-master(lateset)\PathTracking\stanley_controller
def stanley_control(state, cx, cy, cyaw, last_target_idx):
"""
Stanley steering control.
:param state: (State object)
:param cx: ([float])
:param cy: ([float])
:param cyaw: ([float])
:param last_target_idx: (int)
:return: (float, int)
"""
current_target_idx, error_front_axle = calc_target_index(state, cx, cy)
if last_target_idx >= current_target_idx:
current_target_idx = last_target_idx
# theta_e corrects the heading error
theta_e = normalize_angle(cyaw[current_target_idx] - state.yaw)
# theta_d corrects the cross track error
theta_d = np.arctan2(k * error_front_axle, state.v)
# Steering control
delta = theta_e + theta_d
return delta, current_target_idx
4. 路径跟随-曲线跟随改进/调优技巧
5. 其他方法及对比
5.1. ribbon跟踪,对stanley改进
6. 四类跟踪算法和比较
结论:
stanley和mpc跟随的横向偏差小;
MPC可以考虑到速度规划;
对于简单的路径跟随/定位误差较大(空旷场景,可以增加预瞄距离)的时候,使用stanley;