What the video shows, left to right:
- PILS: the unmodified PX4 v1.17.0 build for the Pixhawk 6X, running on an emulated STM32H753 (Athrill, instruction by instruction). The IMU chips are modelled down to registers, FIFO and internal filters, and PX4's real drivers read them over emulated SPI/DMA/interrupts. Physics run in lockstep at 125 µs, with rotor vibration identified from the log (per rotor order, per axis, per rotor phase).
- Gazebo: PX4 v1.17.0 SITL with the stock gz_x500 (Gazebo Harmonic).
- Real: a public flight log from PX4 Flight Review (Holybro X500 V2, Pixhawk 6X Pro, log 75ac4a47, CC BY 4.0): the estimated position and attitude.
All three get the same inputs: the 163 s of offboard position setpoints in the real log. For PILS, a model on the emulated TELEM1 UART sends them as MAVLink in lockstep, so no host program is in the loop. With a fixed seed, two runs give bit-identical logs. The strip under each view is the raw gyro x (last 60 ms).
Results (mean of 3 runs; ratios to the real flight, except the path error in cm):
| PILS | Gazebo |
|---|
| Path error vs real (RMS) | 2-4 cm | 1-4 cm |
| Roll / pitch / yaw rate RMS | 0.77 / 0.87 / 0.98 | 0.73 / 0.48 / 1.02 |
| Gyro vibration metric (PX4's own) | 0.97 | 0.008 |
| Accel vibration metric | 0.94 | 0.001 |
| Coning metric | 0.84 | ~0 |
The vibration numbers are PX4's own vehicle_imu_status metrics, computed by the same PX4 code on both sides (median over the flight).
My takeaway: if you only care about path following, Gazebo is enough, and that is the honest result. Where they differ is the sensor side: the rotor harmonics (93 Hz and its multiples) that dominate the real IMU signal never reach PX4 in stock SITL.
Why SITL can't show these frequencies: in the stock setup the Gazebo world steps the physics every 4 ms (max_step_size 0.004) and the x500's IMU publishes at 250 Hz (update_rate 250), one sample per message. PX4 takes that as the IMU's sample rate, so anything above 125 Hz (the Nyquist frequency) is either lost or folds down to a lower frequency, and the gyro notch filters can't be placed above it. On the real board the IMU chips sample at 2-8 kHz with an anti-aliasing filter inside the chip, and PX4 reads them through the FIFO, so the rotor harmonics up to ~1.3 kHz reach the filters as they are. You could raise the IMU rate in Gazebo, but you'd have to shrink the physics step with it, and the stock model has no rotor vibration source to begin with.
Next question: do the two still agree when things go wrong? I plan to scale the vibration ×1…×30 and see where the attitude and height estimates break in each.
Limits: one airframe, one flight, quad. The real flight used external vision for position; the simulations use their own estimators.
Open source: Athrill and the STM32 board models (github.com/hakoniwalab/athrill-device, athrill-target-stm32), and the vibration identification method and tool (github.com/hakoniwalab/hakoniwa-sensor-adapter).
Disclosure: I work on Hakoniwa, and the vibration and sensor models used here are part of our commercial Hakoniwa Drone/Sensor PRO.
Happy to answer questions or try your own logs.