# 机器人学库（软件）

RL，即机器人学库（Robotics Library），是一个独立的 C++ 软件包，专注于刚体的运动学与动力学，以及运动规划与控制；其范围涵盖空间向量代数、多体系统、硬件抽象、路径规划、碰撞检测和可视化。<sup>[1](https://github.com/roboticslibrary/rl/blob/master/README.md)</sup> 该库以开源方式开发，服务于科研与教学，并得益于其 BSD 许可证，可免费用于商业用途。<sup>[2](https://www.uni-bamberg.de/en/mii/software/robotics-library/)</sup>

| 关键事实 | 详情 |
|---|---|
| 性质 | 用于机器人运动学、动力学、运动规划与控制的独立 C++ 库<sup>[1](https://github.com/roboticslibrary/rl/blob/master/README.md)</sup> |
| 许可证 | BSD 2 条款，宽松许可，可免费商用<sup>[1](https://github.com/roboticslibrary/rl/blob/master/README.md)</sup> |
| 平台 | Linux、macOS 和 Windows；CMake 构建系统；可使用 GCC、Clang 和 Visual Studio 编译<sup>[1](https://github.com/roboticslibrary/rl/blob/master/README.md)</sup> |
| 起源 | 开发始于 2004 年；设计在 Markus Rickert 与 Andre Gaschler 的 IROS 2017 论文中描述<sup>[3](https://www.fortiss.org/forschung/ergebnisse/publikationen/details/robotics-library-an-object-oriented-approach-to-robot-applications)</sup> |
| 最新版本 | 版本 0.7.0，发布于 2018 年 1 月 1 日<sup>[4](https://cpp.libhunt.com/robotics-library-%28rl%29-latest-version)</sup> |
| 模块 | rl::math、rl::hal、rl::mdl、rl::sg 和 rl::plan<sup>[5](https://doc.roboticslibrary.org/0.7.0/)</sup> |
| 社区 | GitHub 仓库，约 1.2k 星标、244 次复刻<sup>[6](https://github.com/roboticslibrary/rl)</sup> |

## 目的与设计

RL 采用平台无关的纯库方案，而非框架或软件包集合。其作者——项目的创建者、班贝格大学教授 Markus Rickert，以及 Andre Gaschler——描述了来自机器人系统、研究项目、工业应用和教育领域的设计需求：实时控制、功能丰富的几何算法、强大的机器人运动学，以及对多种平台的支持。<sup>[3](https://www.fortiss.org/forschung/ergebnisse/publikationen/details/robotics-library-an-object-oriented-approach-to-robot-applications)</sup> 这篇 2017 年的 IROS 论文发表于项目自 2004 年启动、历经十余年开发之后，讨论了当前版本中库组件的架构与设计选择。<sup>[3](https://www.fortiss.org/forschung/ergebnisse/publikationen/details/robotics-library-an-object-oriented-approach-to-robot-applications)</sup>

由于它是库而非中间件，RL 既可集成到定制的桌面应用中，也可用于分布式机器人系统，用例从底层控制与硬件抽象一直到规划与仿真。<sup>[2](https://www.uni-bamberg.de/en/mii/software/robotics-library/)</sup> 它可运行在从打了实时补丁的 Linux 系统到标准 Windows 桌面的各类环境中。<sup>[2](https://www.uni-bamberg.de/en/mii/software/robotics-library/)</sup>

## 软件模块

API 组织为五个主要命名空间。<sup>[5](https://doc.roboticslibrary.org/0.7.0/)</sup>

- **rl::math** 提供通用数学数据结构与算法：向量、矩阵、变换和四元数等线性代数类型；包括运动向量、力向量以及刚体和铰接体惯量的空间向量代数；分段多项式样条函数；最近邻搜索结构；以及通用的 PID 控制器、卡尔曼滤波器和低通滤波器。<sup>[5](https://doc.roboticslibrary.org/0.7.0/)</sup>
- **rl::hal** 是面向传感器、执行器和机器人的硬件抽象层，提供抽象设备接口、跨平台的套接字与串口通信，以及针对机器人（包括通过 RTDE 接入的 [Universal Robots](https://www.edgepedia.org/zh/universal-robots)）、Weiss WSG 50 等夹爪、Leuze、Schmersal、Sick 和 Schunk 的激光扫描仪与测距传感器、相机，以及 ATI、JR3 和 Weiss 的力/力矩传感器的具体驱动。<sup>[5](https://doc.roboticslibrary.org/0.7.0/)</sup>
- **rl::mdl** 使用空间向量代数进行运动学与动力学计算，支持转动、移动、圆柱、螺旋和球面关节类型以及分支运动学。它提供正向与逆向动力学、基于雅可比方法和基于 NLopt 的逆运动学求解器，以及用于其自有 XML 格式和 URDF 文件的加载器。<sup>[5](https://doc.roboticslibrary.org/0.7.0/)</sup>
- **rl::sg** 是用于碰撞检查、距离查询、射线投射和可视化的场景图抽象。一个场景包含模型，模型包含刚体，碰撞查询通过抽象接口发出，并以透明封装的方式对接多个碰撞检测库：Bullet Physics、FCL、Open Dynamics Engine、[邻近查询包](https://www.edgepedia.org/zh/proximity-query-package)（PQP）和 SOLID。<sup>[5](https://doc.roboticslibrary.org/0.7.0/)</sup>
- **rl::plan** 实现机器人路径规划算法，包括构型空间采样技术、路径验证器、构型空间与工作空间度量、与快速扩展随机树相关的规划器（多种 RRT 变体）、与概率路线图相关的规划器（PRM 及带效用引导的 PRM）、探索/利用树规划器，以及路径优化算法。<sup>[5](https://doc.roboticslibrary.org/0.7.0/)</sup>

## 运动规划研究

该库的规划组件与已发表的基于采样的运动规划研究相关联。Rickert、Arne Sieverling 以及领导一个机器人实验室的 Oliver Brock 于 2014 年在《IEEE Transactions on Robotics》上提出了探索/利用树（EET）算法。<sup>[7](https://www.fortiss.org/ergebnisse/publikationen/details/balancing-exploration-and-exploitation-in-sampling-based-motion-planning)</sup> EET 规划器有意以概率完备性换取计算效率，利用工作空间信息持续调整其采样行为：当可用信息能够刻画问题结构时，采样器变得越来越倾向于利用；当信息不够准确时，规划器则通过增加局部构型空间的探索来补偿。作者报告称，这种权衡使 EET 在多种具有挑战性的实际运动规划问题上，性能超过最先进的基于采样的规划器最多三个数量级。<sup>[7](https://www.fortiss.org/ergebnisse/publikationen/details/balancing-exploration-and-exploitation-in-sampling-based-motion-planning)</sup> Rickert、Oliver Brock 和 Alois Knoll 在 2008 年 ICRA 的早期论文中，也探讨了运动规划中同样的探索—利用平衡问题。<sup>[2](https://www.uni-bamberg.de/en/mii/software/robotics-library/)</sup>

## 演示应用

RL 附带演示应用和示例模型，展示典型用法。<sup>[1](https://github.com/roboticslibrary/rl/blob/master/README.md)</sup> 其中包括：在旋转矩阵、轴角表示、四元数和[欧拉角](https://www.edgepedia.org/zh/euler-angles)之间进行转换的工具；碰撞检测查询的可视化，突出显示相交、最小距离和穿透深度；可通过 TCP 端口接收关节位置更新的运动学仿真器；监听关节力矩更新的动力学仿真器；使用概率路线图或快速扩展随机树计算无碰撞路径；使用递归牛顿-欧拉法和铰接体算法方法进行正向与逆向动力学计算；计算质量矩阵、离心力与科里奥利力、[重力补偿](https://www.edgepedia.org/zh/gravity-compensation)等动力学属性；以及基于三次或五次多项式计算轨迹并将其发送至机器人控制器。<sup>[1](https://github.com/roboticslibrary/rl/blob/master/README.md)</sup>

## 获取与使用

源代码托管在 GitHub 上，并为主要平台提供预编译发行版：一个捆绑依赖项的一体化 Windows 安装程序（版本 0.7.0，MSVC 14.1 64 位，42 MB）；通过 Launchpad 个人软件包档案提供的 Ubuntu 软件包，安装为 `librl-dev`；以及面向 macOS 的 Homebrew 软件仓库。<sup>[8](https://www.roboticslibrary.org/download)</sup> 源码归档本身很小，压缩后为 0.5 MB，而单独的 76.9 MB 示例包提供了用于试验常见机器人模型的运动学与几何文件。<sup>[8](https://www.roboticslibrary.org/download)</sup> 项目网站上的教程涵盖在 Ubuntu、Windows 和 macOS 上的安装，Linux 和 Windows 上的第一个程序，使用运动学与几何定义创建机器人模型，以及指定路径规划场景。<sup>[9](https://www.roboticslibrary.org/tutorials/)</sup>

该库已被用于包括 JAHIR、JAST、JAMES 和 SMErobotics 在内的研究项目以及教学。<sup>[10](https://www.roboticslibrary.org/)</sup> 与以框架为中心的替代方案（如 ROS 配合 MoveIt，或 Orocos 运动学与动力学库）相比，RL 的独特选择是保持为一个同质、自包含、支持实时的库，而非分布式中间件或软件包集合。<sup>[3](https://www.fortiss.org/forschung/ergebnisse/publikationen/details/robotics-library-an-object-oriented-approach-to-robot-applications)</sup>

## References

1. [Robotics Library README, roboticslibrary/rl on GitHub](https://github.com/roboticslibrary/rl/blob/master/README.md)
2. [Robotics Library, Multimodal Intelligent Interaction group, University of Bamberg](https://www.uni-bamberg.de/en/mii/software/robotics-library/)
3. [Markus Rickert and Andre Gaschler (2017). Robotics Library: An Object-Oriented Approach to Robot Applications. IROS 2017, fortiss publication page](https://www.fortiss.org/forschung/ergebnisse/publikationen/details/robotics-library-an-object-oriented-approach-to-robot-applications)
4. [Robotics Library (RL) latest version, release notes for v0.7.0](https://cpp.libhunt.com/robotics-library-%28rl%29-latest-version)
5. [Robotics Library 0.7.0 API documentation](https://doc.roboticslibrary.org/0.7.0/)
6. [roboticslibrary/rl repository page, GitHub](https://github.com/roboticslibrary/rl)
7. [Markus Rickert, Arne Sieverling, and Oliver Brock (2014). Balancing Exploration and Exploitation in Sampling-Based Motion Planning. IEEE Transactions on Robotics 30(6):1305-1317, fortiss publication page](https://www.fortiss.org/ergebnisse/publikationen/details/balancing-exploration-and-exploitation-in-sampling-based-motion-planning)
8. [Download, Robotics Library website](https://www.roboticslibrary.org/download)
9. [Tutorials, Robotics Library website](https://www.roboticslibrary.org/tutorials/)
10. [Robotics Library, project website](https://www.roboticslibrary.org/)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 工程与制造 › 机器人技术与自动化 › Robot software, AI, and methods › Robot middleware, frameworks, and behavior architectures

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/robotics-library-software

English original: https://www.edgepedia.org/robotics-library-software
