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 — robotics simulation foundation for URDF/SDF loading, joint and IK operations, collision queries, GUI rendering, and optional physics stepping
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
Note
For ROS 2 Jazzy, do not also install PyBulletFleet into a virtual environment. ROS console scripts use the system Python interpreter, so follow the ROS 2 bridge quickstart instead. It installs the core once into the system Python user site before adding the ROS packages.
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
sudo apt install python3-tk # required for the optional DataMonitor tkinter GUI
pip install -e ".[dev]"
This makes the pybullet_fleet package importable from anywhere while keeping
the source editable.
Running Your First Simulation
The examples are bundled in the PyPI wheel. List and run one without cloning the repository:
pybullet-fleet examples --list
pybullet-fleet examples --run 100robots_grid_demo.py
pybullet-fleet examples --copy ./examples # optional: copy files to edit
pybullet-fleet config --copy ./config # optional: copy YAML templates to edit
From a source checkout or after copying examples, launch the 100-robot grid demo directly:
python examples/scale/100robots_grid_demo.py
You should see a PyBullet GUI window open with 100 robots spawned in a grid
formation. This default scene contains mobile robots only; by default they use
a random kinematic movement callback. Use --movement goal to exercise the
per-agent or fleet command path instead.
For the separate Husky + Panda mixed-fleet showcase, run:
python examples/scale/100robots_mixed_demo.py --duration 10
For batch-controller and fleet-command comparisons, continue with the Multi-Robot Fleet tutorial.
YAML Configuration Basics
Simulation behaviour is controlled via YAML config files. The bundled default
is pybullet_fleet/config/config.yaml in a source checkout; APIs and bundled
examples may refer to it by the package-relative name 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:
simulation:
gui: false
target_rtf: 10
physics: true
collision_detection_method: "contact_points"
See pybullet_fleet/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 are bundled under pybullet_fleet/examples/ and are copied
to examples/ when you use pybullet-fleet examples --copy. They are 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 |
|
Simulation and per-entity EventBus subscriptions |
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 |
|
Husky + Panda mixed-fleet showcase |
|
Batch-controller scale demo; |
|
Arm robots with synchronised pick-and-drop; |
|
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 |
|
Multi-model SDF and bulk mesh loading |
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 —
pybullet_fleet/config/config.yamldocuments every YAML key with inline comments. See also the Configuration Files Guide.API reference — auto-generated from source docstrings.
ROS 2 and Open-RMF — bridge setup and integration guide.