Research demo highlighting the differentiable crazyflow simulator for Crazyflie drones. It optimizes an open-loop policy to fly a racing track, then exports and visualizes the resulting trajectory.
Requirements: Python 3.11+, uv (recommended), and the crazyflow dependency (included in this repo).
Checkoout the repo and initialize the submodules
git submodule update --init --recursiveInstall uv and the projct in editable mode:
uv sync
uv pip install -e .All entrypoints live under crazyplan/cli/. Run them in module mode so imports resolve cleanly.
-
Optimize a trajectory (reads
configs/train/default.tomlby default):uv run python -m crazyplan.cli.train --train-config configs/train/default.toml --plot --render
Outputs checkpoints to the path in the train config (
train.policy_output/train.checkpoint_dir), optional plots/renders. -
Export a trajectory from a trained checkpoint (uses
train.policy_outputby default):uv run python -m crazyplan.cli.export --train-config configs/train/default.toml --visualize none # or pick a specific checkpoint uv run python -m crazyplan.cli.export --train-config configs/train/default.toml --checkpoint outputs/checkpoints_window/trained_policy_step_000100.eqxWrites YAML/CSV under
outputs/export(default), with optional plot/render (--visualize plot|render|both). -
Plot track geometry:
uv run python -m crazyplan.cli.plot_track --track-config configs/tracks/drone_racing.toml
Train configs live in configs/train/*.toml. Track configs live in configs/tracks/*.toml.


