# 胡萝卜追踪

**胡萝卜追踪**（亦称“追胡萝卜法”）是一种几何路径跟踪算法：车辆朝一个虚拟目标点——“胡萝卜”——转向，该点置于预设路径上距车辆最近的点前方一个固定的前视距离处。由于车辆前进时胡萝卜沿路径向前滑动，车辆便始终追随路径而永不会抵达目标，恰如谚语中悬在役畜眼前的胡萝卜。该算法因简单易实现而成为应用最广的路径跟踪算法之一，也是[纯追踪](https://www.edgepedia.org/zh/pure-pursuit)、[非线性制导律](https://www.edgepedia.org/zh/nonlinear-guidance-law)等密切相关方法的基础。<sup>[1](https://sage.cnpereading.com/doi/10.1177/14750902231200684)</sup><sup> • </sup><sup>[2](https://www.researchgate.net/publication/300016068_Efficient_Path_Following_Algorithm_for_Unmanned_Surface_Vehicle)</sup>

| 关键事实 | 详情 |
|---|---|
| 核心机制 | 在期望路径上、车辆投影点前方一个前视距离δ处放置虚拟目标点（VTP）；每个控制周期车辆朝其转向<sup>[2](https://www.researchgate.net/publication/300016068_Efficient_Path_Following_Algorithm_for_Unmanned_Surface_Vehicle)</sup> |
| 控制器形式 | 比例控制器：指令曲率为胡萝卜横向偏移量乘以增益\( 2/L^{2} \)，其中L为前视距离<sup>[3](https://static.aminer.org/pdf/PDF/000/350/753/path_following_of_a_single_wheel_robot.pdf)</sup> |
| 稳定性条件 | 前视距离须满足\( \delta \ge v \cdot \Delta t \)；以20 m/s、0.5 s时间步长运行时，δ至少须为10 m方能稳定导航<sup>[4](https://dergipark.org.tr/en/download/article-file/2857788)</sup> |
| 已知缺陷 | 固定前视参数忽略车辆位置、转向速率与稳定性条件，在工况变化时产生较大横向误差<sup>[1](https://sage.cnpereading.com/doi/10.1177/14750902231200684)</sup><sup> • </sup><sup>[4](https://dergipark.org.tr/en/download/article-file/2857788)</sup> |
| 典型改进 | 在无人水面艇仿真中，柔性或优化前视值较固定参数胡萝卜追踪可降低约20%的跟踪误差<sup>[4](https://dergipark.org.tr/en/download/article-file/2857788)</sup> |
| 应用 | 无人水面艇、空中机器人、农业自动转向、仓储机器人及学生竞速平台<sup>[5](https://www.gt-mrg.org/projects/robotx/2026/usv)</sup><sup> • </sup><sup>[6](https://grvc.us.es/downloads/papers/hector_robot19.pdf)</sup><sup> • </sup><sup>[7](https://unseel.com/engineering/pure-pursuit-path-tracking)</sup> |

## 算法原理

该算法作用于一条预设路径，通常以有序航点列表给出。在航点\( W_{i} \)与\( W_{i+1} \)之间直线段的标准形式中，将车辆位置投影到路径上，虚拟目标点置于该投影点沿路径前方一个用户设定距离δ处。期望航向角即为车辆至VTP连线的角度，比例控制器每个时间步将车辆转向该航向。<sup>[2](https://www.researchgate.net/publication/300016068_Efficient_Path_Following_Algorithm_for_Unmanned_Surface_Vehicle)</sup>

一项面向空中机器人的实现将同一思想形式化为连续执行的三步：求使机器人位置到路径距离最小的路径参数\( \lambda_{p}(t) \)，加上前视距离得到目标位姿\( p_{t}(t) = \gamma(\lambda_{p}(t) + d) \)，再发出指向目标、固定巡航速度的速度指令。该方法要求密集插值曲线而非稀疏航点，其默认值为前视距离1.0 m、巡航速度1.0 m/s。<sup>[6](https://grvc.us.es/downloads/papers/hector_robot19.pdf)</sup>

**与纯追踪的关系。** 纯追踪是同一思想针对轮式车辆的转向几何特化。在与当前航向相切的所有圆弧中，它选取经过前视点的那一条；弦几何给出指令曲率\( \kappa = 2x / L^{2} \)，其中x为胡萝卜在车体坐标系中的横向偏移，L为前视距离。横向偏移充当误差信号，\( 2/L^{2} \)充当比例增益，因此控制器从不显式计算横向误差。<sup>[7](https://unseel.com/engineering/pure-pursuit-path-tracking)</sup><sup> • </sup><sup>[3](https://static.aminer.org/pdf/PDF/000/350/753/path_following_of_a_single_wheel_robot.pdf)</sup>

## 前视参数

胡萝卜追踪唯一的设计选择是前视距离，它同时决定响应性与阻尼。短前视使车辆迅速贴回路径，但对小偏移产生大曲率指令，导致超调与极限环振荡，且随速度增加而恶化；低于临界值时闭环不稳定。长前视可平滑扰动，却使车辆忽略近处偏差，在弯道抄近路并在曲线上留下稳态偏移。<sup>[7](https://unseel.com/engineering/pure-pursuit-path-tracking)</sup><sup> • </sup><sup>[8](https://etd.ohiolink.edu/acprod/odb_etd/ws/send_file/send?accession=osu1198722243&disposition=inline)</sup>

一个稳定性条件使之定量化。车辆每时间步的位移不得超过至虚拟目标的距离，即\( \delta \ge v \cdot \Delta t \cdot \cos\alpha \)，其最坏情形\( \alpha = 0 \)简化为\( \delta \ge v \cdot \Delta t \)。在一项研究的示例中，20 m/s、0.5 s时间步长的无人水面艇要求δ至少10 m；固定δ为4 m导致导航不稳定，而δ为11 m则稳定。<sup>[4](https://dergipark.org.tr/en/download/article-file/2857788)</sup>

由于稳定区域随速度移动，实际系统常按速度调度前视距离，通常采用仿射律\( L = k \cdot v + L_{0} \)，增益k约为0.3–1.0 s，下限\( L_{0} \)为0.3–1.0 m，使车辆静止时仍能跟踪。2 m/s的仓储机器人L约为0.9 m，而同一代码在15 m/s时L约为6 m。<sup>[7](https://unseel.com/engineering/pure-pursuit-path-tracking)</sup>

## 变体与改进

**柔性前视。** 固定δ是该算法的主要缺陷：它忽略车辆机动性与当前位置，在某些情况下造成显著跟踪误差与不稳定导航。一种改进将固定值替换为\( \delta \ge v \cdot \Delta t \cdot (1 + t_{r}/t_{r\max}) \)，其中\( t_{r} \)为当前转向速率，\( t_{r\max} \)为车辆最大转向速率，使车辆急转弯时胡萝卜前移更远。在无人水面艇仿真中，该柔性值较固定参数胡萝卜追踪降低约20%的跟踪误差。<sup>[4](https://dergipark.org.tr/en/download/article-file/2857788)</sup> 2024年一篇期刊论文提出智能胡萝卜追踪制导律（SCCGL），结合模式搜索优化，依据柔性参数而非固定参数确定唯一的虚拟目标点，目标是在不同航行条件下降低横向跟踪误差。<sup>[1](https://sage.cnpereading.com/doi/10.1177/14750902231200684)</sup>

**前馈增强。** 一种直升机轨迹控制器将胡萝卜追踪反馈律与由车辆投影点处路径曲率计算的前馈项结合，预先给定指令滚转角，以便针对弯道预先转向，而非事后纠正。其中胡萝卜置于投影点前方弧长\( \Delta x = v_{I} \cdot t_{pred} \)处，即车辆速度乘以用户设定的预测时间。<sup>[9](https://elib.dlr.de/127824/1/Petit%20-%202019_ODAS_Petit_Waypoint_based_online_trajectory_generation_and_improved_following_control_for_the_ACTFHS.pdf)</sup>

**相关目标点方法。** 非线性制导律（NLGL）同样使用虚拟目标点，但取其为以车辆为圆心、给定半径的圆与路径的交点，而非固定弧长偏移。纯追踪与视线法（PLOS）及向量场法共同构成常与胡萝卜追踪比较的几何算法家族。<sup>[2](https://www.researchgate.net/publication/300016068_Efficient_Path_Following_Algorithm_for_Unmanned_Surface_Vehicle)</sup>

## 与替代方法的性能比较

仿真比较表明最优选择取决于工况。在一项针对C-Enduro无人水面艇的四种算法研究中，无风无流时δ = 10 m的胡萝卜追踪总横向误差最低（100–500 s窗口内为5.4，NLGL为31.9，PLOS为5.8，向量场法为29.2）。然而在风与流复合扰动下，胡萝卜追踪误差为四者中最大（431.9），非线性制导律最稳定（83.5）；向量场法在两种情形下控制量需求均最小。<sup>[2](https://www.researchgate.net/publication/300016068_Efficient_Path_Following_Algorithm_for_Unmanned_Surface_Vehicle)</sup>

一项三维无人机盘旋路径跟踪比较发现类似规律：NLGL平均路径误差最小（1.31 m，胡萝卜追踪为4.25 m，PLOS为2.85 m，向量场法为14.25 m），但胡萝卜追踪与PLOS控制量需求最小，俯仰角速率指令近乎为零。<sup>[10](https://www.researchgate.net/publication/329069226_Comparison_of_path-following_algorithms_for_loiter_paths_of_Unmanned_Aerial_Vehicles)</sup>

文献中普遍指出的结构性局限是抄近路：由于胡萝卜追踪与纯追踪仅使用位置信息、未显式考虑路径实际曲率，它们只是近似跟随预设路径，在急弯处倾向于抄近路。<sup>[11](https://www.researchgate.net/publication/228656778_Follow_the_Past_a_path-tracking_algorithm_for_autonomous_vehicles)</sup>

## 应用

胡萝卜追踪及其纯追踪后裔出现在一切需要以适中计算量保持路径的低中速车辆上。在风与表面流扰动下的路径跟踪中，佐治亚理工RobotX竞赛艇或直朝目标设定点转向，或通过视线胡萝卜追踪调节速度以在航点间行驶。<sup>[5](https://www.gt-mrg.org/projects/robotx/2026/usv)</sup> 基于该算法的农业自动转向系统可在田间保持亚25 mm的直线精度；纯追踪的首个应用是卡内基梅隆大学20世纪80年代初用于户外视觉实验的六轮滑移转向机器人Terragator（Coulter，1992）；同一控制器还运行于仓储自主移动机器人、ROS 2导航的调节纯追踪控制器及学生竞速平台上，因为它可装入小型微控制器。<sup>[7](https://unseel.com/engineering/pure-pursuit-path-tracking)</sup> 自主机器人车辆路径跟踪控制的综述将这一族目标点方法与控制理论方法并列为标准选项，并在欠驱动与全驱动海上车辆上进行了现场试验。<sup>[12](https://arxiv.org/abs/2204.07319)</sup>

## References

1. [Osman Ünal, Nuri Akkaş, Sinan Serdar Özkan, et al. (2024). Smart carrot chasing guidance law for path following of unmanned surface vehicles. Proc. IMechE Part M: Journal of Engineering for the Maritime Environment, 238(3).](https://sage.cnpereading.com/doi/10.1177/14750902231200684)
2. [Hanlin Niu, Yu Lu, Al Savvaris, Antonios Tsourdos (2016). Efficient Path Following Algorithm for Unmanned Surface Vehicle.](https://www.researchgate.net/publication/300016068_Efficient_Path_Following_Algorithm_for_Unmanned_Surface_Vehicle)
3. [Path Following of a Single Wheel Robot (pure pursuit as a proportional controller).](https://static.aminer.org/pdf/PDF/000/350/753/path_following_of_a_single_wheel_robot.pdf)
4. [A Stable Path Following Algorithm Based on Adaptive Target Points for Unmanned Surface Vehicles. Karadeniz Fen Bilimleri Dergisi 13(2), 493–503, 2023.](https://dergipark.org.tr/en/download/article-file/2857788)
5. [Georgia Tech Marine Robotics Group, RobotX 2026 Surface Vehicle.](https://www.gt-mrg.org/projects/robotx/2026/usv)
6. [Hector Perez-Leon et al. An aerial robot path follower based on the 'Carrot chasing' algorithm.](https://grvc.us.es/downloads/papers/hector_robot19.pdf)
7. [Pure Pursuit — The Geometry That Lets a Robot Chase a Path. Unseel Engineering.](https://unseel.com/engineering/pure-pursuit-path-tracking)
8. [Dissertation on path following (follow-the-carrot and pure pursuit lookahead trade-offs), OhioLINK ETD.](https://etd.ohiolink.edu/acprod/odb_etd/ws/send_file/send?accession=osu1198722243&disposition=inline)
9. [S. Petit et al. (2019). Waypoint based online trajectory generation and improved following control for the ACT/FHS. DLR.](https://elib.dlr.de/127824/1/Petit%20-%202019_ODAS_Petit_Waypoint_based_online_trajectory_generation_and_improved_following_control_for_the_ACTFHS.pdf)
10. [Comparison of path-following algorithms for loiter paths of Unmanned Aerial Vehicles.](https://www.researchgate.net/publication/329069226_Comparison_of_path-following_algorithms_for_loiter_paths_of_Unmanned_Aerial_Vehicles)
11. [Thomas Hellström, Ola Ringdahl (2006). Follow the Past: a path-tracking algorithm for autonomous vehicles. International Journal of Vehicle Autonomous Systems 4(2/3/4).](https://www.researchgate.net/publication/228656778_Follow_the_Past_a_path-tracking_algorithm_for_autonomous_vehicles)
12. [Nguyen Hung et al. (2022). A review of path following control strategies for autonomous robotic vehicles. arXiv:2204.07319.](https://arxiv.org/abs/2204.07319)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 工程与制造 › 机器人技术与自动化 › Robot software, AI, and methods › Optimal control, model predictive control, and safe control

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/carrot-chasing

English original: https://www.edgepedia.org/carrot-chasing
