gitmyhub

bullet3

C++ ★ 15k updated 8mo ago

Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.

Bullet Physics is an open-source C++ library for 3D collision detection and rigid body simulation used in games, robotics, VR, and machine learning, with an easy Python interface called PyBullet.

C++PythonOpenCLCMakesetup: moderatecomplexity 3/5

Bullet Physics SDK is an open-source library written in C++ that handles two core tasks: figuring out when objects in a 3D scene collide with each other, and simulating how those objects respond physically when they do. Developers use it to add realistic physical behavior to games, virtual reality experiences, robotics projects, computer animation, and machine learning research.

The library has been around for a long time and has been tested on Windows, Linux, Mac, iOS, and Android. Its collision detection and rigid body dynamics can also be offloaded to a graphics card using a technology called OpenCL, which allows the physics calculations to run much faster on high-end desktop GPUs.

The most accessible way to use Bullet Physics today is through PyBullet, a Python interface built on top of the C++ core. PyBullet installs with a single pip command and is specifically designed for robotics and reinforcement learning work. Reinforcement learning is a technique where software agents learn to perform tasks by trial and error inside simulations, and PyBullet provides a fast, scriptable physics environment for those kinds of experiments.

For developers who want to build the C++ library directly, the README provides instructions for several approaches: a dependency manager called vcpkg for Windows, CMake scripts for Linux and Mac, and a Visual Studio project file for Windows. There is also a virtual reality sandbox that lets you connect a Python script to a physics simulation running in a headset like the HTC Vive or Oculus Rift.

Once built, an example browser application ships with the library so you can explore various physics demonstrations interactively. The project is released under the zlib license, a permissive open-source license that places very few restrictions on how you use the code.

Where it fits