PX4 Autopilot Software
Setting Up a PX4 SITL Loop with Gazebo
Build a local PX4 software-in-the-loop environment with Gazebo and QGroundControl.
how to Reviewed 8/7/2026
Problem definition
I want a local PX4 development loop where firmware changes can be tested in simulation before touching hardware.
Steps
- Prepare the PX4 toolchain
Clone the PX4 repository and follow its official toolchain setup for your host operating system.
- Build the SITL target
Build the software-in-the-loop target using the commands in the official PX4 build instructions.
- Launch the simulator
Start the Gazebo simulation target so a simulated vehicle appears.
- Connect the ground station
Start QGroundControl and connect it to the SITL instance; verify telemetry and parameter access.
- Verify MAVLink flow
Confirm that messages flow between firmware, simulator and ground station before development work.
Guide
Setup
Use the official PX4 toolchain; this guide links the repositories, it does not replace the official setup instructions.
Judgment criteria
- The loop is working when the ground station shows live telemetry from the simulated vehicle.
- Version-specific steps always come from the official PX4 docs.
Common risks
- Using an outdated simulator pairing that the current firmware no longer supports.
- Skipping the official toolchain and getting build errors unrelated to your change.
Checklist
Related technical resources
Open source robotics simulator. The latest version of Gazebo.
Show 16 more keywords
Cross-platform ground control station for drones (Android, iOS, Mac OS, Linux, Windows)
Show 7 more keywords
Marshalling / communication library for drones.