The ardupilot_gazebo plugin is the umbilical between ArduPilot SITL and the simulated airframe in Gazebo. Conceptually: ArduPilot wants to know what its IMU, baro, GPS, and sensors are reading; it wants to send servo/motor commands; Gazebo has all that information and can apply those commands to the physical model. The plugin shuttles that data back and forth, in lockstep with the physics step, over a JSON-over-UDP channel.
Two ports, in lockstep:
- UDP 9002 — Gazebo plugin → ArduPilot. Sensor data (timestamp, IMU, position, quaternion, velocity) every physics tick.
- UDP 9003 — ArduPilot → Gazebo plugin. Servo PWM commands every flight-controller scheduler tick.
The protocol is lockstep: ArduPilot won’t step forward until it has received the next sensor packet; Gazebo won’t step its physics forward until it has applied the servo commands. This keeps simulation deterministic regardless of wall-clock speed — and it’s also why a corrupted or lost packet stalls the whole stack (see SITL “Waiting for heartbeat” for the canonical failure mode).
The hands-on install walkthrough is in the Aleks notes version of this page — building the plugin, gstreamer dependency, environment variables.
Where to go next
- ardupilot_gazebo bridge install (Aleks) — the practical build steps
- SITL “Waiting for heartbeat” — what happens when this plugin breaks
- Parallel SITL instances — the FDM-port hardcode that becomes a problem at scale