# PyBullet

PyBullet 是 Bullet 实时物理仿真引擎的一个免费、开源的 Python 接口，在机器人学研究中被用作强化学习、操作、运动与控制实验的仿真器。它在单个可安装模块中内置了物理、碰撞检测、可视化和逆运动学，这使得它成为需要无需大量配置即可获得可用仿真基线的研究人员的常见选择。<sup>[1](https://www.theseus.fi/bitstream/handle/10024/902714/Yang_Yuanyuan.pdf?sequence=2)</sup>

| 关键事实 | 详情 |
|---|---|
| 它是什么 | 一个封装 Bullet 物理引擎的 Python 模块，在一个包中提供仿真、碰撞检测、渲染和逆运动学<sup>[1](https://www.theseus.fi/bitstream/handle/10024/902714/Yang_Yuanyuan.pdf?sequence=2)</sup> |
| 机器人模型支持 | 与以通用机器人描述格式（URDF）定义的机器人模型集成，并支持正向和逆向动力学、正向和逆向运动学，以及专用的碰撞检测框架<sup>[2](https://publications.ri.cmu.edu/storage/publications/2025/08/sihengt_ms_r_2025-1.pdf)</sup> |
| 安装特点 | 基于 CPU，被描述为极易安装和使用，通过 pybullet-gym 历来在强化学习领域得到广泛使用<sup>[3](https://github.com/Fabricio-Giusti/BSRA-Documentation/blob/main/research/05-reinforcement-learning-simulation.md)</sup> |
| 接触精度 | 在一项针对 ODE、DART、MuJoCo 和 RaiSim 的基准测试中，PyBullet 在模拟滚动摩擦接触方面表现出最高的精度<sup>[2](https://publications.ri.cmu.edu/storage/publications/2025/08/sihengt_ms_r_2025-1.pdf)</sup> |
| 已知局限 | 关节阻尼以显式而非隐式方式实现，这会在高阻尼值下导致不稳定<sup>[4](https://pmc.ncbi.nlm.nih.gov/articles/PMC10827226.1/)</sup> |
| 并行性 | 与 Isaac 等 GPU 并行仿真器不同，Bullet 不会在 GPU 上并行化训练，这会影响大规模下的迭代速度<sup>[3](https://github.com/Fabricio-Giusti/BSRA-Documentation/blob/main/research/05-reinforcement-learning-simulation.md)</sup> |

## 在强化学习研究中的角色

PyBullet 提供了可直接接入标准强化学习工作流的 Gym 风格环境；在比较用于机器人策略训练的仿真器时，AntBulletEnv-v0 等环境名称被用作基线。<sup>[5](https://www.johal.in/pybullet-robotics-gym-python-environments-for-autonomous-system-training-2025)</sup> 一项 NeurIPS 2023 基准研究从 Safety Gym、PyBullet 和 MuJoCo 套件中选取评估环境，反映了该仿真器作为标准强化学习测试平台的地位。<sup>[6](https://proceedings.neurips.cc/paper_files/paper/2023/file/dca63f2650fe9e88956c1b68440b8ee9-Paper-Conference.pdf)</sup>

**操作环境。** 多个研究团队在 PyBullet 之上构建了操作基准。意大利技术研究院的 pybullet-robot-envs 包收集了用于仿真抓取和操作的机器人环境，包括 iCub 推物和 Panda 到达任务，可使用 Stable Baselines 中的 DDPG 进行训练。<sup>[7](https://github.com/hsp-iit/pybullet-robot-envs)</sup> BulletArm 是一个专门面向机器人操作研究的、基于 PyBullet 的基准和学习环境。<sup>[8](https://colinkohler.github.io/BulletArm/index.html)</sup> 一篇 2021 年的 arXiv 论文将最初构建在商业 MuJoCo 引擎上的 [OpenAI Gym](https://www.edgepedia.org/zh/openai-gym) 多目标机器人操作环境重新实现到开源 PyBullet 引擎上；通过在两个版本上比较使用 hindsight experience replay 辅助的 DDPG 智能体，作者证明了重新实现是成功的，并增加了关节控制模式、图像观测和可定制相机的 API。<sup>[9](https://arxiv.org/abs/2105.05985)</sup>

**空中与运动任务。** PyBullet 物理还支持操作之外的领域。Learning to Fly 是一个基于 PyBullet 物理构建的 Gym 环境，用于多智能体四旋翼控制的强化学习，并在 PID 控制轨迹跟踪、带下洗的多机器人飞行以及单智能体和多智能体稳定任务上进行了演示。<sup>[10](https://arxiv.org/abs/2103.02142)</sup> 基于 PyBullet 的 CartPole 及类似基准环境已被用于学习运动控制器的机器人学论文基准设计。<sup>[11](https://www.dynsyslab.org/wp-content/papercite-data/theses/MASc-Yuan-2022.pdf)</sup>

## 物理保真度

Bullet 引擎的接触建模是研究人员选择它的一个反复出现的原因。卡内基梅隆大学的一篇机器人学论文报告称，PyBullet 被选为主要仿真器而非包括 MuJoCo 在内的替代方案，原因在于它的两个优势：它对滚动摩擦接触的精确建模，以及它与 URDF 定义的机器人模型的集成；在包括 ODE、DART、MuJoCo 和 RaiSim 在内的引擎中，PyBullet 在所研究的接触场景中被基准测试为具有最高精度。<sup>[2](https://publications.ri.cmu.edu/storage/publications/2025/08/sihengt_ms_r_2025-1.pdf)</sup>

针对物理实验的验证也对 Bullet 进行了考察。一项研究将机器人仿真器与真实世界数据进行比较，针对具有高速碰撞事件的动态运动，识别了 Drake、MuJoCo 和 Bullet 的系统特定接触参数，分析了围绕这些参数的建模选择如何影响精度；对于 Cassie 双足机器人从跳跃中落地的情况，仿真器很好地捕捉了整体运动，精度受限于真实机器人与仿真器之间的模型差异。<sup>[12](https://arxiv.org/abs/2110.00541)</sup>

该引擎存在已有文献记录的数值局限。FARMS 神经力学仿真框架发现，PyBullet 以显式而非隐式方式实现关节阻尼，在高阻尼值下产生不稳定；因此 FARMS 作者集成了 MuJoCo，其隐式关节阻尼允许对肌肉控制实验进行稳定仿真，同时最初选择 Bullet 和 MuJoCo 仍是因为它们易于安装、易于模型设置、能够在约化坐标中仿真刚性多体，以及运动仿真的计算速度。<sup>[4](https://pmc.ncbi.nlm.nih.gov/articles/PMC10827226.1/)</sup>

## 在机器人仿真器中的位置

PyBullet 出现在大多数机器人仿真工具的比较调查中。一篇针对强化学习研究的九种物理引擎综述，从流行度、功能范围、质量、可用性和强化学习能力方面评估了 PyBullet 以及 Brax、Chrono、Gazebo、MuJoCo、ODE、PhysX、Webots 和 Unity，并呼吁改善仿真引擎的可用性、性能、透明度和可复现性。<sup>[13](https://arxiv.org/abs/2407.08590)</sup> 一个用于自动化和控制任务的机器人仿真器选择决策框架，将 PyBullet 与 Gazebo、MATLAB/Simulink、NVIDIA Isaac Sim、CoppeliaSim、Webots、MuJoCo、RoboDK 和 ABB RobotStudio 一起列为所分析的代表性平台。<sup>[14](https://www.mdpi.com/2673-4591/145/1/8)</sup>

**实际权衡。** 从业者的比较将 PyBullet 描述为通往可用基线的快速路径：基于 CPU、安装简单，并通过 pybullet-gym 在历史上对强化学习机器人学至关重要，而 Isaac Lab 等 GPU 并行替代方案在克服更大的学习难度后能更快地训练大型策略。<sup>[3](https://github.com/Fabricio-Giusti/BSRA-Documentation/blob/main/research/05-reinforcement-learning-simulation.md)</sup> 在一项 NVIDIA Omniverse 平台综述中报告的 PPO 基准里，PyBullet 环境在 29,000 个训练步达到 90% 成功率，而在同一任务族中 MuJoCo 在 320,000 步达到 88%，Gazebo 在 40,000 步达到 94%，这说明仿真器选择同时改变了样本效率和最终性能。<sup>[15](https://www.frontiersin.org/journals/computer-science/articles/10.3389/fcomp.2024.1423129/full)</sup> 关于实时强化学习的基准工作也使用 PyBullet 作为提议的参考环境，并据此运行基于 MuJoCo 的基准。<sup>[16](https://proceedings.mlr.press/v181/thodoroff22a/thodoroff22a.pdf)</sup>

对于收集机器人训练数据的团队，包括 PyBullet 在内的仿真器现在充当合成演示、标注感知数据、域随机化和失败回放的来源，不过所得数据的实用性取决于物理保真度、机器人模型细节、传感器真实感和资产许可。<sup>[17](https://www.humanoidsdata.com/articles/simulation-environments-robot-training-data)</sup>

## References

1. [Yang, Yuanyuan. Master's thesis, Theseus repository](https://www.theseus.fi/bitstream/handle/10024/902714/Yang_Yuanyuan.pdf?sequence=2)
2. [CMU Robotics Institute: Sihengt MS Report 2025](https://publications.ri.cmu.edu/storage/publications/2025/08/sihengt_ms_r_2025-1.pdf)
3. [BSRA Documentation: Reinforcement Learning Simulation (GitHub)](https://github.com/Fabricio-Giusti/BSRA-Documentation/blob/main/research/05-reinforcement-learning-simulation.md)
4. [FARMS: Framework for Animal and Robot Modeling and Simulation, PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC10827226.1/)
5. [PyBullet Robotics Gym: Python Environments for Autonomous System Training, johal.in](https://www.johal.in/pybullet-robotics-gym-python-environments-for-autonomous-system-training-2025)
6. [D.2 Benchmarks, NeurIPS 2023 proceedings](https://proceedings.neurips.cc/paper_files/paper/2023/file/dca63f2650fe9e88956c1b68440b8ee9-Paper-Conference.pdf)
7. [hsp-iit/pybullet-robot-envs, GitHub](https://github.com/hsp-iit/pybullet-robot-envs)
8. [BulletArm 1.0.0 documentation](https://colinkohler.github.io/BulletArm/index.html)
9. [Yang, X., Ji, Z., Wu, J., Lai, Y.-K. (2021). An Open-Source Multi-Goal Reinforcement Learning Environment for Robotic Manipulation with Pybullet. arXiv:2105.05985](https://arxiv.org/abs/2105.05985)
10. [Learning to Fly -- a Gym Environment with PyBullet Physics for Reinforcement Learning of Multi-agent Quadcopter Control. arXiv:2103.02142](https://arxiv.org/abs/2103.02142)
11. [MASc Thesis, Yuan 2022, Dynamic Systems Lab benchmark design](https://www.dynsyslab.org/wp-content/papercite-data/theses/MASc-Yuan-2022.pdf)
12. [Validating Robotics Simulators on Real-World Impacts. arXiv:2110.00541](https://arxiv.org/abs/2110.00541)
13. [A Review of Nine Physics Engines for Reinforcement Learning Research. arXiv:2407.08590](https://arxiv.org/abs/2407.08590)
14. [A Decision Framework to Select Robotics Simulators for Automation and Control Tasks, MDPI Engineering Proceedings](https://www.mdpi.com/2673-4591/145/1/8)
15. [A systemic survey of the Omniverse platform and its applications in data generation, simulation and metaverse, Frontiers in Computer Science](https://www.frontiersin.org/journals/computer-science/articles/10.3389/fcomp.2024.1423129/full)
16. [Benchmarking Real-Time Reinforcement Learning, PMLR v181](https://proceedings.mlr.press/v181/thodoroff22a/thodoroff22a.pdf)
17. [Simulation Environments for Robot Training Data: What to Compare, Humanoids Data](https://www.humanoidsdata.com/articles/simulation-environments-robot-training-data)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 工程与制造 › 机器人技术与自动化 › Robot software, AI, and methods › Simulation, physics engines, and digital twins

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/pybullet

English original: https://www.edgepedia.org/pybullet
