Gazebo (formerly Gazebo Ignition) is the recommended 3D simulator for PX4 on Ubuntu 22.04 and later. It supersedes Gazebo Classic with more advanced rendering, a broader sensor library, and a larger model ecosystem. PX4 communicates with Gazebo directly via Gazebo Transport — no MAVLink bridge is required. A singleDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/PX4/PX4-Autopilot/llms.txt
Use this file to discover all available pages before exploring further.
make command builds PX4, launches the Gazebo client, and connects everything automatically.
Gazebo Classic is being downgraded to community-supported status. Start new projects with Gazebo (the commands below all use the
gz_ prefix). If you have existing Gazebo Classic workflows, they continue to work but will not receive core team maintenance going forward.Installation
Gazebo Harmonic is installed automatically on Ubuntu 22.04 as part of the standard PX4 development environment setup. On Ubuntu 24.04, Harmonic, Ionic, and Jetty are all supported; the latest installed release is used by default.Launching a simulation
Run PX4 SITL with Gazebo using amake target. All Gazebo targets use the gz_ prefix:
Available vehicles
| Vehicle | Make command | Autostart ID |
|---|---|---|
| Quadrotor (x500) | make px4_sitl gz_x500 | 4001 |
| x500 with depth camera (front) | make px4_sitl gz_x500_depth | 4002 |
| x500 with visual odometry | make px4_sitl gz_x500_vision | 4005 |
| x500 with 1D LiDAR (down) | make px4_sitl gz_x500_lidar_down | 4016 |
| x500 with 2D LiDAR | make px4_sitl gz_x500_lidar_2d | 4013 |
| x500 with gimbal (front) | make px4_sitl gz_x500_gimbal | 4019 |
| Standard VTOL | make px4_sitl gz_standard_vtol | 4004 |
| Plane (RC Cessna) | make px4_sitl gz_rc_cessna | 4003 |
| Advanced plane | make px4_sitl gz_advanced_plane | 4008 |
| Quad tailsitter VTOL | make px4_sitl gz_quadtailsitter | 4018 |
| Tiltrotor VTOL | make px4_sitl gz_tiltrotor | 4020 |
| Differential rover | make px4_sitl gz_rover_differential | 50000 |
| Ackermann rover | make px4_sitl gz_rover_ackermann | 51000 |
| Mecanum rover | make px4_sitl gz_rover_mecanum | 52000 |
Specifying a world
By default, Gazebo launches with the default empty world. Pass a world name via thePX4_GZ_WORLD environment variable:
default, baylands, lawn, walls, windy, and others located in the Gazebo models repository. You can also point to a custom SDF world file by providing its full path.
Standalone mode
You can launch PX4 SITL and Gazebo in separate terminals. This is useful when Gazebo is running on a different host or when you need to restart PX4 without restarting the simulator.Multi-vehicle simulation
Gazebo supports spawning multiple PX4 instances in the same world. Each instance gets its own MAVLink port, allocated sequentially from 14540 for offboard APIs and 14550 for QGroundControl. Use the provided helper script to launch multiple vehicles:PX4_SIM_MODEL and running separate make calls with distinct px4_instance values:
ROS 2 integration
Gazebo SITL integrates with ROS 2 through the uXRCE-DDS bridge, which maps PX4 uORB topics to ROS 2 topics bidirectionally. No MAVLink-to-ROS bridge (like MAVROS) is required.The uXRCE-DDS bridge is enabled by default in PX4 SITL builds. On real hardware you must set
UXRCE_DDS_CFG to configure the transport.Running faster than real time
SetPX4_SIM_SPEED_FACTOR to run the simulation at a multiple of real time. PX4 and Gazebo run in lockstep, so any speed factor is safe:
Overriding PX4 parameters at launch
Any PX4 parameter can be overridden via environment variables prefixed withPX4_PARAM_: