PteroSim: UE5 + JSBSim simulator for PX4 SITL, looking for feedback

Hi all,

I have been building PteroSim, a UE5 based simulator that runs JSBSim 6-DOF dynamics and connects to PX4 SITL. It is at open beta now and I am after feedback from people who work in PX4 SITL daily :slight_smile:

License upfront so nobody wastes time: PteroSim is proprietary, free for personal, academic and non-commercial use, paid for commercial use. PX4 is not bundled, you point it at your own build.

Connecting it: spawn an aircraft in PteroSim, select PX4 as the control source, then run

PX4_SIM_HOSTNAME=<ip> PX4_LOCKSTEP=1 PX4_SIM_SPEED_FACTOR=1 make px4_sitl none_iris

Lockstep engages once PX4 connects, so a run is repeatable instead of depending on how loaded the machine is. Here is what that looks like running:

What I built it for is work where the rendered world matters: camera, terrain following, visual navigation. Aircraft types the engine handles are multirotor, fixed wing, VTOL, helicopter and tailsitter, though the free build ships one of them, an F450 quad.

The sensor side covers the non-GPU set PX4 needs to fly, IMU, magnetometer, barometer and GPS, plus camera. There is a Python API over gRPC for scripted and headless runs.

Honest limitations at this stage: generic radar and lidar models are still being worked on, so if your loop depends on either, this is not ready for you yet. Free sessions are also capped at two hours with a cooldown after. That is enough to tell whether the bridge and the dynamics behave on your machine, and not enough to run a regression suite. If you want to hammer it in CI, say so and we will sort something out. Builds are Linux and Windows only, no macOS.

Repo: GitHub - PteroLabsAI/PteroSim-UAV-Simulator: UAV simulation platform for development, testing, and research. Β· GitHub

Docs, including the PX4 SITL page: SITL simulation with PX4 β€” PteroSim documentation

What would help me most: run the F450 against your own PX4 build and tell me where the bridge breaks. And if you want to see your own airframe in there instead of a stock quad, tell me what you are flying.

This looks very relevant for validation work because the lockstep setup gives you something that is hard to get from real flight data: a known and repeatable ground truth.

One experiment I’d be interested in is using PteroSim to inject a controlled disturbance or sensor fault at a known simulation timestamp, then comparing:

injected event β†’ simulated sensor response β†’ PX4 estimator/control response β†’ ULog timeline

The key question would be whether the post-flight analysis can recover the same first relevant divergence that we already know from the simulator ground truth.

A small validation matrix could start with:

  • nominal repeated run;
  • delayed or degraded GPS;
  • IMU bias/noise step;
  • barometer offset;
  • actuator effectiveness loss;
  • temporary sensor dropout.

For each case I’d preserve both the simulator event timestamp and the PX4-side observation timestamp. That would let us separate:

event time β€” when the fault was injected
observation time β€” when PX4 first became measurably affected

If the run is truly deterministic under lockstep, repeating the same scenario several times should also tell us whether the first-divergence point is stable across runs.

Do you currently expose scripted fault injection through the Python/gRPC API, or only vehicle/environment control? If fault injection is available, I’d be interested in testing a small PX4 incident-reconstruction case against it.

Thanks for the detailed plan. PteroSim talks to PX4 over the standard MAVLink HIL interface, so PX4’s own failure injection works with it. Set SYS_FAILURE_EN=1 and send faults with the MAVSDK Failure plugin or the failure command in the PX4 shell. That gives you GPS, accel, gyro, mag, baro and airspeed failures and a stopped motor at any moment in flight, and the command is logged in the ULog with its timestamp. Under lockstep, PX4’s clock is the simulation clock.

The PteroSim Python/gRPC API adds sensor noise and parameters per run, plus wind and turbulence changes mid-flight. Neither side has partial actuator loss, bias steps or GPS delay yet.

Thanks Aleksandr that is actually a very useful validation setup.

The fact that the injected failure is timestamped in the ULog, combined with lockstep where PX4 time is simulation time, gives us something that is difficult to obtain from real incident logs: a known ground-truth event time.

I’d start with a deliberately small experiment:

P-01 Nominal β€” identical mission, no injected failure
P-02 GPS failure β€” inject at a known simulation time
P-03 Gyro failure β€” same approach
P-04 Motor stopped β€” inject at a controlled point in flight

For each run I’d compare:

known injected event β†’ first observable change in PX4 data β†’ estimator/control propagation β†’ failsafe/mode response

The key metric I’m interested in is the delta between the known injection timestamp and the first relevant divergence reconstructed from the ULog.

Repeating the same scenario several times under lockstep would also let us test whether that reconstructed divergence is deterministic.

I agree there is no need to add bias steps, GPS delay or partial actuator loss yet. The existing failure modes are enough for a clean first validation.

If you’re interested, I’d be happy to define the minimal run matrix and expected evidence fields so we can make the first dataset reproducible.