Skip to main content

Fast, parallelizable simulations of Quadrotor drones with JAX.

Python arXiv Tests Ruff Docs

Crazyflow is a research simulator for quadrotors. It runs batched, differentiable simulations on CPU and GPU via JAX, with analytical and abstracted dynamics for the Crazyflie 2.x family.

import numpy as np
from crazyflow.sim import Sim
from crazyflow.control import Control
from scipy.spatial.transform import Rotation as R

sim = Sim(n_worlds=4096, n_drones=1, control=Control.state)
cmd = np.zeros((4096, 1, 16))
cmd[..., 9:13] = R.from_euler("z", 0.0).as_quat()
cmd[..., 2] = 0.5  # hover at 0.5 m across all worlds

for _ in range(100):
    sim.state_control(cmd)
    sim.step(sim.freq // sim.control_freq)
    sim.render()

Documentation

learnsyslab.github.io/crazyflow — installation, user guide, examples, and API reference.

Features

  • n_worlds x n_drones — batched over independent environments and multi-drone swarms simultaneously
  • GPU-accelerated — up to 914 M steps/s on an RTX 4090 (first-principles dynamics, 262 K worlds)
  • Differentiable — jax.grad works through the full dynamics and control pipeline
  • First-principles dynamics — dynamics using first-principles equations and parameters identified from real-world measurements
  • Abstracted dynamics — simplified dynamics in three flavors fitted from real Crazyflie flight data
  • Modular pipelines — step and reset are tuples of plain JAX functions; insert anything, anywhere
  • MuJoCo integration — onscreen and offscreen rendering, raycasting, and contact detection via MJX

Installation

pip install crazyflow           # CPU
pip install "crazyflow[gpu]"    # GPU (Linux x86-64, CUDA 12)

Developer install with editable install (pixi recommended):

git clone https://github.com/learnsyslab/crazyflow.git
cd crazyflow
pixi shell

Or with uv:

git clone https://github.com/learnsyslab/crazyflow.git
cd crazyflow
uv sync          # core + dev tooling (tests, docs, ruff)

Performance

First-principles dynamics, one drone. CPU: AMD Ryzen 9 7950X. GPU: NVIDIA RTX 4090.

n_worlds CPU steps/s GPU steps/s
64 3.3 M 1.2 M
1 024 9.2 M 18.7 M
16 384 11.9 M 257 M
65 536 15.6 M 678 M
262 144 12.6 M 914 M

Full benchmarks including multi-drone scaling are in the documentation.

Citation

@misc{schuck2026crazyflow,
      title={Crazyflow: An Accurate, GPU-Accelerated, Differentiable Drone Simulator in JAX}, 
      author={Martin Schuck and Marcel P. Rath and Yufei Hua and AbhisheK Goudar and SiQi Zhou and Angela P. Schoellig},
      year={2026},
      eprint={2606.01478},
      archivePrefix={arXiv},
      primaryClass={cs.RO},
      url={https://arxiv.org/abs/2606.01478}, 
}

Metadata

Release files for crazyflow 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crazyflow 0.4.0
File Size Uploaded
crazyflow-0.4.0.tar.gz 12.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for crazyflow 0.4.0
File Interpreter ABI Platform
crazyflow-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.6 MB

Release files / crazyflow-0.4.0.tar.gz

Download URL crazyflow-0.4.0.tar.gz
Size 12.3 MB
Tags Source
SHA-256 checksum
How to use checksums
31da3a7d327201cce04907735a0ed68ee1ffe83afb5311ccf11ccb7a7df85734
BLAKE2b-256 checksum
How to use checksums
213b31eb60a0aae2afd76c867414f9ba935972c0dd47d1ffbe93138a4f8e8213
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / crazyflow-0.4.0-py3-none-any.whl

Download URL crazyflow-0.4.0-py3-none-any.whl
Size 12.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
db6d604149184c25691706c432f9fe878d9fb537df34b9410b004f5c519cf0d1
BLAKE2b-256 checksum
How to use checksums
38f5e495409d8273b95091073eea16ba496eebd77cbea720094b80650aad006a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page