# 铰接体算法

铰接体算法（ABA）是刚体动力学中的一种递归方法，用于计算铰接系统的正向动力学：给定关节位置、速度和施加的力矩，它以与关节数成线性关系的时间返回由此产生的关节加速度，而无需形成或求逆关节空间惯量矩阵。<sup>[1](https://github.com/softmata/featherstone/blob/main/docs/algorithms.md)</sup> 该算法由当时在[爱丁堡大学](https://www.edgepedia.org/zh/university-of-edinburgh)（University of Edinburgh）的机器人学研究者罗伊·费瑟斯通（Roy Featherstone）在1983年发表于《国际机器人研究杂志》（*The International Journal of Robotics Research*）的一篇论文中提出，建立在他称为铰接体惯量的量之上。<sup>[2](https://oamonitor.ireland.openaire.eu/national/search/publication?pid=10.1177%2F027836498300200102)</sup>

| 关键事实 | 详情 |
|---|---|
| 目的 | 正向动力学：给定构型 \( q \)、速度 \( \dot{q} \) 和力矩 \( \tau \)，计算加速度 \( \ddot{q} \)<sup>[1](https://github.com/softmata/featherstone/blob/main/docs/algorithms.md)</sup> |
| 复杂度 | 在关节数上为 \( O(n) \)，而直接形成并求逆质量矩阵为 \( O(n^3) \)<sup>[1](https://github.com/softmata/featherstone/blob/main/docs/algorithms.md)</sup><sup> • </sup><sup>[3](https://simple-robotics.github.io/publications/lcaba/static/paper/LCABA.pdf)</sup> |
| 结构 | 三趟递归遍历：从基座到末端、从末端到基座、从基座到末端<sup>[1](https://github.com/softmata/featherstone/blob/main/docs/algorithms.md)</sup> |
| 起源 | 罗伊·费瑟斯通，《利用铰接体惯量计算机器人动力学》，《IJRR》2(1): 13–30，1983<sup>[2](https://oamonitor.ireland.openaire.eu/national/search/publication?pid=10.1177%2F027836498300200102)</sup> |
| 关键量 | 铰接体惯量：一个物体及其所有后代的表观惯量，计入关节自由度<sup>[1](https://github.com/softmata/featherstone/blob/main/docs/algorithms.md)</sup> |
| 并行变体 | 分治 ABA 在 \( O(n) \) 个处理器上达到 \( O(\log n) \) 时间（费瑟斯通，1999）<sup>[4](https://journals.sagepub.com/doi/pdf/10.1177/02783649922066619)</sup> |
| 实现 | Pinocchio、RBDL 及其他机器人学库将 ABA 作为其正向动力学例程<sup>[5](https://github.com/stack-of-tasks/pinocchio)</sup><sup> • </sup><sup>[6](https://rbdl.github.io/d6/d63/group__dynamics__group.html)</sup> |

## 所解决的问题

运动学树（由关节连接的分支刚体链）的刚体运动方程具有以下形式

\[ H(q) \cdot \ddot{q} + C(q, \dot{q}) = \tau, \]

其中 \( H \) 是关节空间惯量矩阵，\( C \) 汇集科里奥利项、离心项和重力项。直接方法用[复合刚体算法](https://www.edgepedia.org/zh/composite-rigid-body-algorithm)计算 \( H \)，然后求解线性系统得到 \( \ddot{q} \)。形成并分解 \( H \) 一般需要 \( O(n^3) \) 次运算，不过利用 \( H \) 由分支引起的稀疏性并用 \( L^T L \) 分解，可将分解成本降至 \( O(n d^2) \)，其中 \( d \) 衡量分支深度。<sup>[3](https://simple-robotics.github.io/publications/lcaba/static/paper/LCABA.pdf)</sup>

ABA 完全避开了该矩阵。它求解 \( \ddot{q} \) 而不形成 \( H \)，否则求逆需要 \( O(n^3) \) 的工作量。<sup>[1](https://github.com/softmata/featherstone/blob/main/docs/algorithms.md)</sup> 1983 年的原始论文已经陈述了其基本性质：算法的计算需求随关节数线性变化，并且适用于包含旋转关节和移动关节的开链运动学链。<sup>[2](https://oamonitor.ireland.openaire.eu/national/search/publication?pid=10.1177%2F027836498300200102)</sup>

## 三趟遍历

该算法在运动学树上以三趟递归扫描运行。<sup>[1](https://github.com/softmata/featherstone/blob/main/docs/algorithms.md)</sup>

1. **第 1 趟，从基座到末端。** 根据已知状态计算每个物体的速度和偏置力，即科里奥利项和离心项。
2. **第 2 趟，从末端到基座。** 计算每个物体的铰接体惯量：该物体连同其所有后代的表观惯量，计入关节所允许的自由度。这是该方法的核心思想。每个关节“吸收”一部分惯量，因此父物体看到的惯量小于其子树的全部质量。<sup>[1](https://github.com/softmata/featherstone/blob/main/docs/algorithms.md)</sup> 在费瑟斯通的表述中，铰接体惯量将施加在连杆构件上的力与该构件所经历的加速度联系起来，并计入其余连杆如何影响它。<sup>[7](https://era.ed.ac.uk/items/0d04b6b5-94cd-4480-97fc-e6007a0458d3)</sup>
3. **第 3 趟，从基座到末端。** 使用前两趟计算出的铰接体惯量和力，将加速度向外传播。

重力通过一种约定进入，而不是作为每个物体上的力：它被建模为基座的虚拟向上加速度，因此同一递归无需对每个物体做额外工作即可处理它。<sup>[1](https://github.com/softmata/featherstone/blob/main/docs/algorithms.md)</sup>

## 与其他核心算法的关系

费瑟斯通 2008 年的著作《刚体动力学算法》（*Rigid Body Dynamics Algorithms*）中出现了三种基本算法：用于逆向动力学的递归牛顿-欧拉方法，以及用于正向动力学的复合刚体方法和铰接体方法。<sup>[7](https://era.ed.ac.uk/items/0d04b6b5-94cd-4480-97fc-e6007a0458d3)</sup> 它们回答互补的问题。RNEA 将期望运动 \( (q, \dot{q}, \ddot{q}) \) 映射为产生该运动的力矩 \( \tau \)，用于计算力矩和重力补偿等控制任务；ABA 将力矩映射为加速度，是每个仿真时间步都会调用的例程。<sup>[1](https://github.com/softmata/featherstone/blob/main/docs/algorithms.md)</sup> CRBA 计算关节空间惯量矩阵 \( H \) 本身，接触求解器和其他约束方法需要显式地用到它；例如，MuJoCo 用复合刚体算法计算 \( M \)，并在求解前将其分解为 \( L^T D L \)。<sup>[8](https://mujoco.readthedocs.io/en/stable/computation.html)</sup>

递归特性是共有的。在 [Pinocchio](https://www.edgepedia.org/zh/pinocchio) 中，基本动力学算法的实现是递归的，使软件能够避免重复计算并利用运动学树引起的稀疏性，其动力学算法主要取自费瑟斯通的工作并略有改进。<sup>[9](https://gepettoweb.laas.fr/doc/stack-of-tasks/pinocchio/master/doxygen-html/md_doc_a_features_intro.html)</sup>

## 扩展

**并行计算。** 费瑟斯通 1999 年的分治变体从互不连接的刚体开始，递归地将两个独立子装配体的运动方程组合成连接后装配体的运动方程。它在 \( O(n) \) 个处理器上达到 \( O(\log n) \) 时间，是精确且非迭代的，适用于任何关节类型和任何拓扑结构，包括分支和运动学闭环。<sup>[4](https://journals.sagepub.com/doi/pdf/10.1177/02783649922066619)</sup>

**约束与闭环。** 普通算法处理无约束的运动学树。具有内部闭环的机构，如四杆机构或闭链人形机器人，需要约束力，而将递归 \( O(n) \) 方法扩展到这种情况比树形情况更困难。近期工作引入了闭环约束铰接体算法（LCABA）和 proxBBO，它们通过对约束动力学的近端形式应用动态规划推导而来；两者都在 Pinocchio 库中实现，并报告称，对于具有内部闭环的高自由度系统（如近期的人形机器人），相比现有的非递归算法实现了超过 6 倍的加速。<sup>[10](https://simple-robotics.github.io/publications/lcaba/)</sup>

**导数。** 由于仿真器和控制器越来越需要动力学的梯度，现代库会对算法本身进行微分。Pinocchio 提供主要刚体算法（包括 ABA）的解析导数，从而支持在仿真和真实机器人上进行基于梯度的优化、控制和学习。<sup>[5](https://github.com/stack-of-tasks/pinocchio)</sup>

## 软件实现

ABA 是机器人动力学库的标准组件。RBDL 暴露一个 `ForwardDynamics` 函数，它用递归铰接体算法在 \( O(n_{dof}) \) 时间内计算 \( \ddot{q} = M(q)^{-1}(-N(q, \dot{q}) + \tau) \)，并且还使用该算法的简化版本在线性时间内计算 \( M(q)^{-1} \tau \)，而不形成 \( M \)。<sup>[6](https://rbdl.github.io/d6/d63/group__dynamics__group.html)</sup> Pinocchio 在给定构型、速度、力矩和外力的情况下用 ABA 计算无约束正向动力学，并在其上支持闭环机构、摩擦接触求解器和低复杂度约束铰接体算法。<sup>[9](https://gepettoweb.laas.fr/doc/stack-of-tasks/pinocchio/master/doxygen-html/md_doc_a_features_intro.html)</sup><sup> • </sup><sup>[5](https://github.com/stack-of-tasks/pinocchio)</sup> 较小的教学与研究实现，例如 Rust 的 `featherstone` 库，直接根据 2008 年的书复现三趟结构。<sup>[1](https://github.com/softmata/featherstone/blob/main/docs/algorithms.md)</sup>

ABA 与关节空间路线之间的实际选择取决于渐近复杂度：递归算法的 \( O(n) \) 成本比 \( O(n d^2) \) 的关节空间方法更适合扩展到腿式机器人等高自由度系统，但当需要质量矩阵本身时，例如需要显式分解的接触求解器，关节空间路线仍然是必要的。<sup>[3](https://simple-robotics.github.io/publications/lcaba/static/paper/LCABA.pdf)</sup>

## References

1. [Algorithms Guide, featherstone library documentation](https://github.com/softmata/featherstone/blob/main/docs/algorithms.md)
2. [R. Featherstone (1983). The Calculation of Robot Dynamics Using Articulated-Body Inertias. The International Journal of Robotics Research 2(1): 13–30.](https://oamonitor.ireland.openaire.eu/national/search/publication?pid=10.1177%2F027836498300200102)
3. [Sathya, A. S., Carpentier, J. Constrained Articulated Body Algorithms for Closed-Loop Mechanisms (preprint PDF)](https://simple-robotics.github.io/publications/lcaba/static/paper/LCABA.pdf)
4. [R. Featherstone (1999). A Divide-and-Conquer Articulated-Body Algorithm for Parallel O(log(n)) Calculation of Rigid-Body Dynamics. Part 1: Basic Algorithm. The International Journal of Robotics Research 18(9).](https://journals.sagepub.com/doi/pdf/10.1177/02783649922066619)
5. [Pinocchio: A fast and flexible implementation of Rigid Body Dynamics algorithms, GitHub repository](https://github.com/stack-of-tasks/pinocchio)
6. [RBDL: Rigid Body Dynamics Library, Dynamics API documentation](https://rbdl.github.io/d6/d63/group__dynamics__group.html)
7. [Robot Dynamics Algorithms, R. Featherstone, University of Edinburgh research collection](https://era.ed.ac.uk/items/0d04b6b5-94cd-4480-97fc-e6007a0458d3)
8. [MuJoCo Documentation, Computation chapter](https://mujoco.readthedocs.io/en/stable/computation.html)
9. [Pinocchio: Main features, doxygen documentation](https://gepettoweb.laas.fr/doc/stack-of-tasks/pinocchio/master/doxygen-html/md_doc_a_features_intro.html)
10. [Sathya, A. S., Carpentier, J. Constrained Articulated Body Algorithms for Closed-Loop Mechanisms, project page](https://simple-robotics.github.io/publications/lcaba/)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 工程与制造 › 机器人技术与自动化 › Mechanical foundations of robotics › Robot dynamics, flexible structures, and system identification

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/articulated-body-algorithm

English original: https://www.edgepedia.org/articulated-body-algorithm
