Quick Start
This guide walks you through installing PyBulletFleet, running your first simulation, and understanding the key configuration options.
Prerequisites
Make sure you have the following installed:
Python 3.10+
PyBullet — physics engine backend
NumPy — numerical operations
PyYAML — configuration file parsing
All dependencies are installed automatically during the package install step below.
Installation
From PyPI (recommended)
pip install pybullet-fleet
From source (for development)
Clone the repository and install in editable mode with development dependencies:
git clone https://github.com/yuokamoto/PyBulletFleet.git
cd PyBulletFleet
pip install -e ".[dev]"
This makes the pybullet_fleet package importable from anywhere while keeping
the source editable.
Running Your First Simulation
Launch the 100-robot grid demo:
python examples/scale/100robots_grid_demo.py
You should see a PyBullet GUI window open with 100 robots spawned in a grid formation. Each robot navigates toward a randomly assigned goal using kinematic teleportation.
YAML Configuration Basics
Simulation behaviour is controlled via YAML config files.
The default configuration lives at config/config.yaml.
Key settings you will want to tweak:
Setting |
Type |
Default |
Description |
|---|---|---|---|
|
bool |
|
Open the PyBullet GUI window |
|
float |
|
Target Real-Time Factor (1.0 = real time, 0 = max speed) |
|
float |
|
Seconds per simulation step |
|
bool |
|
Enable PyBullet physics engine (off for pure kinematic mode) |
|
string |
|
|
|
float |
|
Safety buffer in metres for near-miss detection |
|
bool |
|
Enable the real-time data monitor |
|
bool |
|
Print step-timing reports |
|
bool |
|
Load the default ground plane ( |
Example — run headless at 10× real-time with physics enabled:
gui: false
target_rtf: 10
physics: true
collision_detection_method: "contact_points"
See config/config.yaml for the full list of parameters — every key is documented with inline comments.
Keyboard Controls
When running with gui: true, the following shortcuts are available:
Key |
Action |
Description |
|---|---|---|
|
Pause / Resume |
Toggle simulation pause |
|
Visual shapes |
Toggle visual shapes ON/OFF |
|
Collision shapes |
Toggle collision wireframes ON/OFF |
|
Transparency |
Toggle structure transparency ON/OFF |
Note
The t key toggles transparency one object at a time.
For scenes with hundreds of objects this can be slow — prefer setting
enable_structure_transparency in the config file instead.
Examples
All example scripts live in the examples/ directory, organised by category.
For step-by-step walkthroughs, see the Tutorials page.
Basics (examples/basics/)
Script |
Description |
|---|---|
|
Basic robot creation with |
|
High-level action system (MoveTo, Pick, Drop, Wait) |
|
Spatial-hash collision detection features and visualisation |
|
Memory usage tracking and profiling utilities |
Arm (examples/arm/)
Script |
Description |
|---|---|
|
Single arm robot performing pick-and-drop operations |
|
Arm robot using the action system for pick-and-drop |
|
Arm end-effector control via IK (low-level callback) |
|
Arm EE control using PoseAction (action queue) |
|
Rail arm (prismatic + revolute) pick-and-drop with EE control |
|
Kinematic mobile manipulator — IK-based pick/drop with arm + base movement |
Mobile (examples/mobile/)
Script |
Description |
|---|---|
|
Compares omnidirectional and differential-drive motion modes |
Scale (examples/scale/)
Script |
Description |
|---|---|
|
Grid-based multi-agent demo — best starting point |
|
100 agents patrolling between cubes |
|
100 arm robots with synchronised pick-and-drop |
|
100 mobile robots picking and dropping objects |
Models (examples/models/)
Script |
Description |
|---|---|
|
URDF resolution patterns — by name, by path, and listing all models |
|
Visual grid catalog of all registered models from |
|
Using Tier 3 models from the |
Run any example with:
python examples/<category>/<script_name>.py
Next Steps
Architecture overview — Architecture Overview explains the core abstractions (simulation core, agents, actions, collision).
How-to guides — see the
docs/directory for topic-specific guides (collision tuning, memory profiling, performance optimisation).Configuration reference —
config/config.yamldocuments every YAML key with inline comments. See also the Configuration Files Guide.API reference — auto-generated from docstrings (coming soon).