From-scratch Python implementations of algorithms for autonomous UAVs: multirotor, VTOL, and fixed-wing. Every algorithm comes with a runnable simulation, academic references, and a GIF preview.
uav_sim/
├── vehicles/ # Quadrotor (6DOF), Fixed-Wing, VTOL + vehicle presets
│ └── footprint.py # Circular/Rectangular footprints, swarm envelopes
├── control/ # Rate → Attitude → Velocity → Position (cascaded PID)
│ └── state_machine.py # ARM → TAKEOFF → HOVER → TRACKING → LAND
├── sensors/ # GPS, IMU, Lidar2D/3D, Camera, Gimbal, RangeFinder
│ └── gimbal_controller.py # PointTracker, BBoxTracker
├── estimation/ # EKF, UKF, Complementary, Particle Filter
├── perception/ # Occupancy mapping, obstacle detection, visual servoing
├── path_planning/ # A*, RRT*, PRM, Potential Field, Coverage Planning
├── path_tracking/ # PID, LQR, MPC, Pure Pursuit, Geometric SO(3)
├── trajectory_planning/ # Min-Snap, Polynomial, Quintic, Frenet Optimal
├── trajectory_tracking/ # Feedback Lin., MPPI, NMPC
├── costmap/ # Occupancy grid, Inflation, Social, Footprint layers
├── environment/ # World, obstacles, buildings, env presets (city/indoor/field)
├── swarm/ # Reynolds, Consensus, Virtual Structure, Leader-Follower
├── visualization/ # 3-panel viz, data panels, vehicle artists, sensor viz
└── simulations/ # 40 runnable demos (python -m uav_sim.simulations.*)
git clone https://github.com/guilyx/autonomous-uav-guide.git
cd autonomous-uav-guide
uv sync --all-groups
# Run any simulation as a module
python -m uav_sim.simulations.path_tracking.pid_hover
# Run tests
uv run pytest
# Pre-commit
pre-commit install && pre-commit install --hook-type commit-msg
pre-commit run --all-filesfrom uav_sim.vehicles import VehiclePreset, create_quadrotor
quad = create_quadrotor(VehiclePreset.CRAZYFLIE)
quad = create_quadrotor(VehiclePreset.DJI_MINI)
quad = create_quadrotor(VehiclePreset.RACING_250)
quad = create_quadrotor(VehiclePreset.DJI_MATRICE)from uav_sim.environment import create_environment, EnvironmentPreset
world, obs = create_environment(EnvironmentPreset.CITY) # 50m urban
world, obs = create_environment(EnvironmentPreset.INDOOR) # 10m room
world, obs = create_environment(EnvironmentPreset.OPEN_FIELD) # 60m clear| Model | Preview |
|---|---|
| Quadrotor (6DOF + motor dynamics) | |
| Fixed-Wing (aerodynamic) | ![]() |
| Tilt-Rotor VTOL (hover to cruise) | ![]() |
| Algorithm | Preview |
|---|---|
| Cascaded PID Hover | |
| LQR Hover | |
| Pure Pursuit 3D | |
| Geometric SO(3) | |
| LQR Path Tracking | |
| MPC Tracking | |
| Path Smoothing Demo | |
| Flight Ops Demo |
| Algorithm | Preview |
|---|---|
| Feedback Linearisation | |
| MPPI | |
| NMPC |
| Algorithm | Preview |
|---|---|
| 3D A* | ![]() |
| RRT* | ![]() |
| PRM 3D | ![]() |
| Potential Field | ![]() |
| Coverage Planning | ![]() |
| Algorithm | Preview |
|---|---|
| Minimum-Snap | ![]() |
| Polynomial Trajectory | ![]() |
| Quintic Polynomial | ![]() |
| Frenet Optimal | ![]() |
| Algorithm | Preview |
|---|---|
| EKF | ![]() |
| UKF | ![]() |
| Particle Filter | ![]() |
| Complementary Filter | ![]() |
| GPS/IMU Fusion | ![]() |
| Feature | Preview |
|---|---|
| EKF-SLAM | ![]() |
| Occupancy Mapping | ![]() |
| Sensor Suite Demo | ![]() |
| Visual Servoing | ![]() |
| Feature | Preview |
|---|---|
| Gimbal FOV Tracking | |
| Gimbal BBox Tracking |
| Feature | Preview |
|---|---|
| Dynamic Costmap Navigation | ![]() |
| Algorithm | Preview |
|---|---|
| Reynolds Flocking | ![]() |
| Consensus Formation | ![]() |
| Virtual Structure | ![]() |
| Leader-Follower | ![]() |
| Potential Swarm | ![]() |
| Voronoi Coverage | ![]() |
See CONTRIBUTING.md. All contributions must pass pre-commit run --all-files and uv run pytest.
MIT — see LICENSE.


























