Examples
Nine tutorials and runnable companion examples that walk through the core
PyBulletFleet APIs.
Each tutorial is based on a runnable script in pybullet_fleet/examples/ — you
can run it from the installed package or copy it to examples/ before editing.
Tip
Tutorials are numbered for reference, not as a required reading order. Jump directly to the topic you need — each tutorial lists its prerequisites at the top so you can backtrack only when necessary.
Tutorials
# |
Tutorial |
Script |
What you’ll learn |
|---|---|---|---|
1 |
|
Create sim, spawn agents & objects, |
|
2 |
|
MoveAction, PickAction, DropAction lifecycle |
|
3 |
|
AgentManager, grid spawn, 100+ robots |
|
4 |
|
Joint-space IK, JointAction, tolerance tuning |
|
5 |
|
End-effector IK, PoseAction, mobile manipulators |
|
6 |
|
|
|
7 |
|
Multi-model SDF and bulk mesh loading |
|
8 |
|
EventBus, lifecycle and custom events |
|
9 |
|
SimPlugin lifecycle and AgentPlugin configuration |
|
10 |
|
Local USD/USDZ static environments |
Run bundled examples
Examples are included in the PyPI wheel. After pip install pybullet-fleet,
you can run a demo without cloning the repository:
pybullet-fleet examples --list
pybullet-fleet examples --run batch_controller_scale_demo.py -- --no-gui --duration 10
pybullet-fleet examples --copy ./examples
pybullet-fleet config --list
pybullet-fleet config --copy ./config
Use --copy before editing a demo. The source-checkout commands below remain
useful once examples have been copied or when developing the repository.
Use pybullet-fleet config --copy ./config to copy the bundled YAML templates;
the copied config/config.yaml is preferred when running from that directory.
Switching Robot Models with --robot
Most demo scripts accept a --robot argument to swap the robot model at runtime.
Pass a model name (resolved via resolve_model()) or a direct URDF path.
The model should be compatible with the demo category — arm models for arm demos,
mobile models for mobile demos:
# Arm demos — pass arm models (default: panda)
python examples/arm/pick_drop_arm_demo.py --robot kuka_iiwa
# Mobile demos — pass mobile models (default: husky)
python examples/mobile/path_following_demo.py --robot racecar
# Scale demos
python examples/scale/100robots_cube_patrol_demo.py --robot mobile_robot
python examples/scale/pick_drop_arm_100robots_demo.py --robot kuka_iiwa
# The grid demo is mobile-only. Override its model or select another scene.
python examples/scale/100robots_grid_demo.py --robot racecar
python examples/scale/100robots_grid_demo.py --config config/100robots_config.yaml
python examples/scale/100robots_mixed_demo.py --mobile-robot racecar --arm-robot kuka_iiwa
Category |
Scripts |
Argument |
Default |
Alternatives |
|---|---|---|---|---|
Arm demos |
|
|
|
|
Mobile demos |
|
|
|
|
Scale (mobile) |
|
|
|
|
Scale (arm) |
|
|
|
|
Grid demo |
|
|
|
|
Mixed grid demo |
|
|
Husky + Panda |
|
Model demos |
|
|
|
any registered model |
Model demos |
|
|
|
any |
Model names are resolved by resolve_model() — see Tutorial 6 — Robot Models
for the full resolution system and python examples/models/resolve_model_demo.py --list
for all available names.
API Quick-Reference
API |
Covered in |
|---|---|
|
Tutorial 1 |
|
Tutorials 1, 4, 6 |
|
Tutorial 6 |
|
Tutorial 6 |
|
Tutorials 1–4 |
|
Tutorial 1 |
|
Tutorial 1 |
|
Tutorial 3 |
|
Tutorial 3 |
|
Tutorial 3 |
|
Tutorials 1–3 |
|
Tutorials 2, 4 |
|
Tutorial 4 |
|
Tutorial 4 |
|
Tutorial 5 |
|
Tutorial 5 |
|
Tutorial 5 |
|
Tutorial 5 |
|
Tutorials 2, 5 |
|
Tutorial 5 |
|
Tutorials 2, 4, 5 |
|
Tutorial 4 |
|
Tutorials 1, 4 |
|
Tutorial 4 |
|
Tutorial 3 |
|
Tutorial 3 |
|
Tutorial 1 |
|
Tutorial 7 |
|
Tutorial 8 |
|
Tutorial 9 |