A cross-platform drone simulator with real aerodynamics computed in C++20, and the ability to hand the vehicle to actual flight-controller firmware — ArduPilot (JSON SITL), PX4 (MAVLink HIL), and Betaflight (MSP).
Physics runs in a Godot 4 GDExtension via _integrate_forces — zero GDScript
in the hot path. Runs on Windows, Linux, and macOS (Intel + Apple Silicon).
SkySim now spans the full stack from a fly-it-yourself sim to a browser tier and a benchmark suite. What's tested end-to-end: the Python agent interface, perception, data pipeline, benchmarks, and determinism harness; the Godot agent server, perception, and domain randomization (validated against Godot 4.3); and the web physics core (decoupled from Godot, validated natively).
What still needs the compiled C++ extension + hardware: real-flight aerodynamics,
RGB rendering, cross-machine determinism numbers, and — the one thing no code can
produce — a sim-to-real transfer result (see docs/sim_to_real.md).
The pitch, honestly stated: every simulator that lets you test drone algorithms
needs Linux, ROS, or a game engine and a GPU. SkySim's goal is to make it a URL.
See ROADMAP.md for phase-by-phase progress.
The physics core compiles to WebAssembly and runs entirely client-side. Open the
hosted page and fly with the keyboard, or drop in a JavaScript control function.
See web/ to build and host it (web/build_wasm.sh, then serve web/).
Heavy ML and firmware SITL use the native agent server; the browser tier is for
interactive flight and classical/light control.
Grab a standalone build from the Releases page:
No Godot, no compiler, no dependencies. Everything is bundled.
- Install Godot 4.3+ — one portable download, no admin rights, no installer needed.
- From Releases, download SkySim-godot-project.zipand unzip it. Prebuilt extension binaries for every OS are already inside — you don't compile anything.
- Open Godot → Import → select the unzipped folder → Play.
You only need this if you're changing the C++ physics. It's one command and godot-cpp is fetched automatically — no git submodules.
# Linux / macOS
./scripts/build.sh
# Windows
scripts\build.batPrefer raw CMake?
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel
# Output: gdextension/bin/(lib)drone_sim.<platform>.release.<arch>.(dll|so|dylib)Requirements: CMake ≥ 3.22, a C++20 compiler (MSVC 2022 / GCC 12+ / Clang 15+),
Python 3.8+. Match godot-cpp to your editor with
-DGODOTCPP_GIT_TAG=godot-4.3-stable.
Portability note: binaries are built without -march=native on purpose, so
they run on any CPU of the same architecture. Turn on -DDRONE_SIM_NATIVE=ON
only for a private single-machine build — it bakes in your CPU's instruction
set and will crash elsewhere.
How the cross-platform binaries are made: you don't make them. Pushing a
v*tag triggers GitHub Actions (.github/workflows/), which compiles the extension on Windows, Linux, and macOS (x86_64 + arm64), exports the standalone apps, and attaches everything to a Release automatically.
DroneBody (RigidBody3D subclass)
├── RotorArray → BladeElementSolver × N ← BET thrust/torque per rotor
├── Atmosphere ← ISA density/pressure + Dryden turbulence (MIL-HDBK-1797)
├── AeroEffectsBundle ← Cheeseman-Bennett ground effect + Leishman VRS
├── FlightController ← PX4-style cascade PID (attitude + rate)
├── MixerMatrix ← wrench → per-rotor throttle allocation
├── SensorSuite ← IMU / barometer / GPS with noise + bias
└── SITLManager ← ArduPilot / PX4 / Betaflight bridges
Control priority each physics tick: SITL firmware (fresh actuator frame
< 0.5 s) → set_rotor_throttles() → internal PID → motors off.
- Blade Element Theory — 24 radial annuli per rotor; induced velocity via 3
Newton iterations of Rankine-Froude momentum theory; 1st-order ESC lag
(esc_tau = 15 ms) and gyroscopic precession.
- Ground effect — Cheeseman-Bennett T_IGE/T_OGE = 1/(1 − (R/4h)²), blended out aboveh/R = 3.
- Vortex Ring State — Leishman onset envelope with hysteresis (0.5 s build-up, 1.2 s recovery), up to 30% thrust loss with ~2.3 Hz buffeting.
- ISA atmosphere — standard troposphere, Sutherland's-law viscosity.
- Dryden turbulence — per-axis 1st-order shaping filter, runtime-tunable.
- Copy the gdextension/folder into your project root (Godot 4 auto-detects it — no plugin to enable).
- Add a DroneBodynode (appears underRigidBody3D) with aCollisionShape3Dand a visualMeshInstance3Dchild.
- For firmware-in-the-loop, add a SITLManageras a child ofDroneBody.
- Set Project Settings → Physics → Physics Ticks per Second = 250–400 (400 for ArduCopter). This project already ships at 400.
# ArduPilot
cd ardupilot && sim_vehicle.py -v ArduCopter -f JSON:127.0.0.1 --console --map
# PX4
cd PX4-Autopilot && make px4_sitl none_iris
# Betaflight
cd betaflight && make TARGET=SITL && ./obj/main/betaflight_SITL.elfRun the SkySim scene first, then start the firmware. Arming, modes, and
missions come from your GCS (Mission Planner / QGroundControl). Frames are
aerospace-standard (NED world / FRD body, see include/core/frames.hpp); rotor
order follows the ArduPilot/PX4 quad-X convention.
tools/ap_json_probe.py and tools/px4_probe.py let you exercise the bridges
without a full firmware checkout.
drone.get_telemetry() returns every physics tick: altitude, ground_speed,
vertical_speed, roll/pitch/yaw_deg, roll/pitch/yaw_rate, total_thrust,
power_draw, vrs_active, vrs_severity, ground_effect_factor,
air_density, wind, sitl_active, sitl_source. Live PID tuning:
drone.set_rate_roll_pid(0.15, 0.05, 0.003)
drone.set_rate_pitch_pid(0.15, 0.05, 0.003)
drone.set_rate_yaw_pid(0.20, 0.10, 0.0)A small, stable suite of seeded tasks (hover, waypoint, gps_denied_nav)
lets algorithms be compared and cited:
python examples/run_benchmark.py --port 5557 --out scorecard.json
python examples/check_determinism.py --port 5557For reference-quality reproducible numbers, build the extension with
-DDRONE_SIM_DETERMINISTIC=ON (strict floating point). Details and how to submit
results: docs/benchmarks.md.
Issues and PRs welcome. CI builds every PR on all three platforms, so if it
compiles in the workflow it works for everyone. Physics stays in C++
(src/, include/); scene logic and dynamic-world helpers stay in GDScript
(demo/).
MIT — see LICENSE.