explaingit

bulletphysics/bullet3

14,473C++Audience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

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.

Mindmap

mindmap
  root((Bullet Physics))
    Core Features
      Collision detection
      Rigid body sim
      OpenCL GPU
    Interfaces
      PyBullet Python
      C++ direct
      VR sandbox
    Use Cases
      Games
      Robotics RL
      Animation
    Platforms
      Windows Linux
      Mac iOS Android
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Simulate robot arm or locomotion movements in PyBullet for reinforcement learning training.

USE CASE 2

Add realistic collision detection and physics responses to a 3D game or virtual reality experience.

USE CASE 3

Connect a Python reinforcement learning script to a physics simulation running inside a VR headset.

Tech stack

C++PythonOpenCLCMake

Getting it running

Difficulty · moderate Time to first run · 30min

PyBullet installs with pip and works immediately, building the C++ library requires CMake and a compiler toolchain.

Use freely for any purpose including commercial projects, just keep the copyright notice and do not misrepresent the original software.

In plain English

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.

Copy-paste prompts

Prompt 1
Write a PyBullet script that loads a URDF robot arm, applies joint torques, and logs the end-effector position at each timestep.
Prompt 2
How do I set up a PyBullet simulation environment for training a reinforcement learning agent to balance a cartpole?
Prompt 3
Show me how to build Bullet Physics from source on Ubuntu using CMake and run the example browser to verify the installation.
Prompt 4
Write a PyBullet script that creates a flat ground plane, drops 10 rigid spheres of different sizes, and logs their positions after they settle.
Open on GitHub → Explain another repo

← bulletphysics on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.