# 时间最优轨迹规划

时间最优轨迹规划所研究的问题，是在机器人或机械的速度、加速度与力矩限制之下，寻找沿给定几何路径行进的最快方式。几何路径事先固定；任务是为其赋予一条时间律，使路径上的每一点都在物理约束允许的范围内尽快被执行。在机器人学中，该问题通常称为[时间最优路径参数化](https://www.edgepedia.org/zh/time-optimal-path-parameterization)（TOPP），而在制造文献中则称为时间最优轨迹规划（TOTP）。<sup>[1](https://personal.ntu.edu.sg/cuong/docs/overactuated.pdf)</sup><sup> • </sup><sup>[2](https://www.sciencedirect.com/science/article/pii/S0890695525001105)</sup>

| 关键事实 | 详情 |
|---|---|
| 问题输入 | 一条光滑几何路径 \( \mathbf{p}(s) \)，\( s \in [0, s_{\mathrm{end}}] \)，外加对关节速度、加速度、力矩或工具速度的约束；输出是最快可行的时间律 \( s(t) \)<sup>[3](https://github.com/hungpham2511/toppra/blob/develop/README.md)</sup> |
| 奠基性结果 | Bobrow、Dubowsky 与 Gibson 在已知执行器力矩限制下，解决了机械臂沿指定路径的最短时间控制问题，*International Journal of Robotics Research* 4(3):3–17，1985 年 9 月<sup>[4](https://journals.sagepub.com/doi/10.1177/027836498500400301)</sup> |
| 解法族系 | 数值积分（快但脆弱）、凸优化（稳健但较慢）以及动态规划<sup>[5](https://arxiv.org/abs/1707.07239)</sup><sup> • </sup><sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC10138148/)</sup> |
| TOPP-RA | 一种可达性分析方法，在离散化的路径位置上求解小型线性规划；比数值积分更快，稳健性与凸优化相当，在大量数值评估中成功率达 100%（IEEE T-RO 34(3):645–659，2018）<sup>[5](https://arxiv.org/abs/1707.07239)</sup> |
| 三阶限制 | 带加加速度或力矩变化率约束的 TOPP 受到的关注要少得多，且在很大程度上仍属未决问题；TOPP3 算法处理了速度剖面连接与奇异性问题<sup>[7](https://arxiv.org/abs/1609.05307)</sup> |
| 软件默认 | 截至 2023 年 1 月，MoveIt 推荐 TimeOptimalTrajectoryGeneration（TOTG），默认时间步长为 0.1 秒，并要求机器人从静止开始、到静止结束<sup>[8](https://moveit.picknik.ai/main/doc/concepts/trajectory_processing.html)</sup> |
| 能量权衡 | 对现有时间最优机器人轨迹进行后优化，在真实工业机器人上使能耗最多降低 30%，峰值功率最多降低 60%<sup>[9](https://research.chalmers.se/en/publication/245759)</sup> |

## 问题表述

输入是机器人位形空间中的一条路径，写为以标量 \( s \) 参数化的轨迹 \( \mathbf{q}(s) \)，外加机器人的动力学模型。对于具有 \( n \) 个关节的串联机械臂，动力学形式为

\[ M(\mathbf{q})\ddot{\mathbf{q}} + \dot{\mathbf{q}}^{\top} C(\mathbf{q}) \dot{\mathbf{q}} + \mathbf{g}(\mathbf{q}) = \boldsymbol{\tau}, \]

其中 \( M \) 为惯性矩阵，\( C \) 为科里奥利张量，\( \mathbf{g} \) 为重力项，\( \boldsymbol{\tau} \) 为执行器力矩，各自限定在固定界限之间。<sup>[1](https://personal.ntu.edu.sg/cuong/docs/overactuated.pdf)</sup> 对 \( \mathbf{q}(s(t)) \) 关于时间求导可知，关节速度与加速度仅依赖于路径速度 \( \dot{s} \) 与路径加速度 \( \ddot{s} \)。代入动力学后，每个力矩界限都化为如下形式的不等式

\[ \alpha(s, \dot{s}) \le \ddot{s} \le \beta(s, \dot{s}). \]

于是问题落在 \( (s, \dot{s}) \) 相平面上。有效的速度剖面必须保持在最大速度曲线（MVC）之下——该曲线是容许加速度区间收缩为一点的边界——而时间最小剖面由 bang-bang 控制（在最大与最小加速度之间切换）得到：剖面交替跟随最大加速度场 \( \beta \) 与最小加速度场 \( \alpha \)，同时绝不越过 MVC。<sup>[1](https://personal.ntu.edu.sg/cuong/docs/overactuated.pdf)</sup> 由于最小化总时间 \( J = \int_0^{s_{\mathrm{end}}} \frac{1}{\dot{s}} \, ds \) 意味着让 \( \dot{s} \) 在约束允许的范围内尽可能大，最优剖面会紧贴可行域的边界。<sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC10138148/)</sup>

## 历史

这一经典问题在 20 世纪 80 年代中期得到解决。加州大学欧文分校的 J.E. Bobrow、[麻省理工学院](https://www.edgepedia.org/zh/massachusetts-institute-of-technology)的 S. Dubowsky 与加州大学洛杉矶分校的 J.S. Gibson 于 1985 年发表了一种算法，用于在已知执行器力矩限制下，为沿指定路径运动的机械臂寻找最优开环力矩，并允许力矩界限是关节角度与角速度的任意函数。<sup>[4](https://journals.sagepub.com/doi/10.1177/027836498500400301)</sup> 针对串联、常规驱动机械臂的高效算法最早于 20 世纪 80 年代提出，此后不断得到改进。<sup>[1](https://personal.ntu.edu.sg/cuong/docs/overactuated.pdf)</sup>

## 求解方法

**数值积分。** 基于庞特里亚金最大值原理，NI 方法在相平面中积分最大与最小加速度，以追踪 bang-bang 剖面。其速度快，因为每一点的最优加速度是解析计算而非搜索得到的，但必须找出加速段与减速段之间的切换点，而这正是失败与稳健性问题的主要来源。<sup>[1](https://personal.ntu.edu.sg/cuong/docs/overactuated.pdf)</sup><sup> • </sup><sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC10138148/)</sup>

**凸优化。** CO 方法将路径离散为 \( N \) 段，并把问题转化为具有 \( O(N) \) 个变量与约束的凸优化问题。它们通用性强，可以在时间与能量或力矩变化率等目标之间权衡，且稳健，但问题规模庞大使其显著慢于数值积分。<sup>[1](https://personal.ntu.edu.sg/cuong/docs/overactuated.pdf)</sup>

**动态规划。** DP 方法在离散化相平面上搜索，能处理包括加加速度与力矩变化率在内的多种约束，且不存在局部极小问题；Kaserer 及其同事使用相平面插值来保证关节加速度与力矩连续。代价是巨大的状态空间，使实现比凸优化慢一个或数个数量级，且网格精度使其无法获得真正的全局最优。<sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC10138148/)</sup>

**可达性分析。** 由 Hung Pham 与 Quang-Cuong Pham 提出的 TOPP-RA，通过在路径离散位置上求解小型线性规划，递归计算可达集与可控集。所得算法比基于 NI 的方法更快，稳健性与基于 CO 的方法相当，在大量数值评估中成功率达 100%，并天然支持容许速度传播以及对参数不确定性的稳健性。该工作发表于 2018 年 *IEEE Transactions on Robotics* 第 34 卷第 3 期第 645–659 页。<sup>[5](https://arxiv.org/abs/1707.07239)</sup> 与数值积分相比，它无需搜索动力学奇异点，一篇综述认为这带来了计算效率上一个数量级的提升。<sup>[10](https://pmc.ncbi.nlm.nih.gov/articles/PMC11965277/)</sup>

## 加加速度与三阶约束

加速度、力矩与接触稳定性等二阶约束已有充分研究，但受加加速度与力矩变化率等三阶约束的 TOPP 受到的关注要少得多，且在很大程度上仍属未决问题。难点在于如何平滑连接最优剖面，以及如何处理使剖面积分过早终止的奇异性；Pham 与 Pham 的 TOPP3 算法同时处理了这两者。<sup>[7](https://arxiv.org/abs/1609.05307)</sup> 加加速度限制在实践中很重要，因为大的加加速度会导致运动抖动，并可能损坏硬件。<sup>[11](https://moveit.github.io/moveit_tutorials/doc/time_parameterization/time_parameterization_tutorial.html)</sup>

近期工作从多个方向攻克该问题。一种基于采样的方法（S-TOPP）生成加加速度有界的时间最优轨迹，并采用惰性策略跳过对大多数不可能位于最优轨迹上的节点的约束检查。<sup>[12](https://www.sciencedirect.com/science/article/pii/S0921889023001690)</sup> 一种序列线性规划方法构造保守不等式约束以保持三阶限制得到满足，并在真实机器人上就峰值功率、力矩效率与跟踪性能进行了评估。<sup>[13](https://arxiv.org/abs/2404.07889)</sup> 一种笛卡尔空间迭代优化方法在测试系统上相对于 TOPP-RA 将最大绝对加加速度降低 60% 以上，平均绝对位置误差降低约 29%。<sup>[6](https://pmc.ncbi.nlm.nih.gov/articles/PMC10138148/)</sup>

## 软件实现

在 MoveIt 运动规划框架中，规划器生成不含时间信息的几何路径，随后轨迹处理算法根据从 `joint_limits.yaml` 文件读取的各关节限制，添加时间戳以及速度与加速度值。截至 2023 年 1 月，推荐的算法是 TimeOptimalTrajectoryGeneration（TOTG），它通过将路径段拟合到原始轨迹并采样新路点来生成平滑连续的速度剖面；由于所得路点可能在容差范围内偏离原始路径，可能需要额外的碰撞检查。TOTG 要求机器人从静止开始、到静止结束，并使用 0.1 秒的默认时间步长。<sup>[8](https://moveit.picknik.ai/main/doc/concepts/trajectory_processing.html)</sup> MoveIt 的时间参数化算法均不支持加加速度限制，因此 Ruckig 加加速度限制平滑算法被作为进一步的后处理步骤应用。<sup>[11](https://moveit.github.io/moveit_tutorials/doc/time_parameterization/time_parameterization_tutorial.html)</sup> Ruckig 本身在速度、加速度与加加速度约束下，计算到达由位置、速度与加速度定义的任意目标状态的时间最优轨迹。<sup>[14](https://arxiv.org/abs/2105.04830)</sup>

由 Hung Pham 与 Phạm Quang Cường 开发、并有 Joseph Mirabel 贡献 C++ API 等内容的开源 `toppra` 库，接收一条几何路径以及一组对关节速度、关节加速度或工具笛卡尔速度的约束，返回时间最优参数化 \( \dot{s}(s) \)，由此可得最快可行轨迹 \( \mathbf{q}(t) \)。<sup>[3](https://github.com/hungpham2511/toppra/blob/develop/README.md)</sup> MATLAB 的 Robotics System Toolbox 通过其 `contopptraj` 函数暴露了同样的可达性分析方法。<sup>[15](https://www.mathworks.com/help/releases/r2023a/pdf_doc/robotics/robotics_ug.pdf)</sup>

## 应用与权衡

时间最优规划用于一切节拍时间重要的场合：机器人拾放、焊接、喷涂、机加工与 CNC 刀具路径，在这些场合中它在速度、加速度与加加速度约束下最小化沿几何刀具路径的加工时间。<sup>[2](https://www.sciencedirect.com/science/article/pii/S0890695525001105)</sup> 它也出现在不那么显眼的场景中，包括人形机器人行走与多接触轨迹规划；将数值积分方法扩展到冗余驱动系统，使一台 30 自由度人形机器人能够走下 30 厘米高的台阶，其最优参数化持续 0.65 秒，在测试计算机上计算耗时 0.005 秒，比可比的凸优化实现快约 500 倍。<sup>[1](https://personal.ntu.edu.sg/cuong/docs/overactuated.pdf)</sup>

纯粹的时间最优性是有代价的。在时间最优轨迹的任一时刻，至少有一个约束处于饱和状态，因此模型不确定性会使按精确计算速度执行变得有风险；在人形机器人实验中，机器人以计算最大速度的 90% 运行以确保安全，作者建议在模型不确定时使用比实际更紧的约束。<sup>[1](https://personal.ntu.edu.sg/cuong/docs/overactuated.pdf)</sup> 能量是第二个维度：一种优化流程应用于真实工业机器人上现有的时间最优轨迹，使能耗最多降低 30%，峰值功率最多降低 60%，表明最快的轨迹并不是运行成本最低的轨迹。<sup>[9](https://research.chalmers.se/en/publication/245759)</sup> 实际实现也会以微小的约束违反换取速度；一种近时间最优的在线方法在每个路径段仅计算四个点的机器人动力学，在仿真中显示最大约束违反为 3%，这是可接受的，因为工业中的时间最优轨迹通常将限制设在最大允许力矩的 80% 以应对模型不确定性。<sup>[16](https://www.sciencedirect.com/science/article/pii/S073658451830245X)</sup>

## References

1. [Quang-Cuong Pham and Olivier Stasse. Time-Optimal Path Parameterization for Redundantly-Actuated Robots (Numerical Integration Approach).](https://personal.ntu.edu.sg/cuong/docs/overactuated.pdf)
2. [Online time-optimal trajectory planning along parametric toolpaths with strict constraint satisfaction and certifiable feasibility guarantee. International Journal of Machine Tools and Manufacture, 2026.](https://www.sciencedirect.com/science/article/pii/S0890695525001105)
3. [toppra: Time-Optimal Path Parameterization, GitHub README.](https://github.com/hungpham2511/toppra/blob/develop/README.md)
4. [J.E. Bobrow, S. Dubowsky, and J.S. Gibson (1985). Time-Optimal Control of Robotic Manipulators Along Specified Paths. International Journal of Robotics Research 4(3):3–17.](https://journals.sagepub.com/doi/10.1177/027836498500400301)
5. [Hung Pham and Quang-Cuong Pham (2018). A New Approach to Time-Optimal Path Parameterization Based on Reachability Analysis. arXiv:1707.07239; IEEE Transactions on Robotics 34(3):645–659.](https://arxiv.org/abs/1707.07239)
6. [A Cartesian-Based Trajectory Optimization with Jerk Constraints for a Robot. Sensors (MDPI), PMC10138148.](https://pmc.ncbi.nlm.nih.gov/articles/PMC10138148/)
7. [Hung Pham and Quang-Cuong Pham (2016). On the Structure of the Time-Optimal Path Parameterization Problem with Third-Order Constraints. arXiv:1609.05307.](https://arxiv.org/abs/1609.05307)
8. [Trajectory Processing, MoveIt Documentation: Rolling.](https://moveit.picknik.ai/main/doc/concepts/trajectory_processing.html)
9. [Energy and peak-power optimization of existing time-optimal robot trajectories (EU project AREUS), Chalmers research portal.](https://research.chalmers.se/en/publication/245759)
10. [Time-optimal path parameterization planning for automatic fiber placement based on reachability quadratic analysis. PMC11965277.](https://pmc.ncbi.nlm.nih.gov/articles/PMC11965277/)
11. [Time Parameterization, MoveIt Tutorials (Noetic).](https://moveit.github.io/moveit_tutorials/doc/time_parameterization/time_parameterization_tutorial.html)
12. [Huanhuan Huang and colleagues (2023). Sampling-based time-optimal path parameterization with jerk constraints for robotic manipulation. Robotics and Autonomous Systems 170:104530.](https://www.sciencedirect.com/science/article/pii/S0921889023001690)
13. [Jee-eun Lee, Andrew Bylard, Robert Sun, and Luis Sentis (2024). On the Performance of Jerk-Constrained Time-Optimal Trajectory Planning for Industrial Manipulators. arXiv:2404.07889; ICRA 2024.](https://arxiv.org/abs/2404.07889)
14. [Ruckig: Jerk-limited Real-time Trajectory Generation with Arbitrary Target States. arXiv:2105.04830.](https://arxiv.org/abs/2105.04830)
15. [Robotics System Toolbox User's Guide, MathWorks R2023a.](https://www.mathworks.com/help/releases/r2023a/pdf_doc/robotics/robotics_ug.pdf)
16. [Online near time-optimal trajectory planning for industrial robots. Robotics and Computer-Integrated Manufacturing.](https://www.sciencedirect.com/science/article/pii/S073658451830245X)

---
*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/time-optimal-trajectory-planning

English original: https://www.edgepedia.org/time-optimal-trajectory-planning
