explaingit

px4/px4-autopilot

11,720C++Audience · developerComplexity · 5/5LicenseSetup · hard

TLDR

Open-source autopilot software for drones and unmanned vehicles that reads GPS, altitude, and orientation sensors and sends motor commands to keep aircraft flying, supporting multirotors, fixed-wing planes, rovers, boats, and more.

Mindmap

mindmap
  root((PX4 Autopilot))
    What it does
      Drone flight control
      Sensor fusion
      Motor commands output
    Vehicle types
      Multirotors
      Fixed wing planes
      VTOL rovers and boats
    Tech stack
      C++ firmware
      uORB pub-sub system
      MAVLink protocol
      ROS 2 via DDS
    Development
      Docker simulation
      QGroundControl
      Pixhawk hardware
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a custom GPS-navigated multirotor drone using PX4 firmware on Pixhawk autopilot hardware

USE CASE 2

Test autonomous flight missions in a simulated environment with Docker and QGroundControl before touching real hardware

USE CASE 3

Connect PX4-powered drones into a ROS 2 robotics system for automated mission planning and sensor fusion

USE CASE 4

Extend PX4 with support for a new vehicle type or sensor by writing a modular uORB component

Tech stack

C++CMakeDockerROS 2MAVLinkDDS

Getting it running

Difficulty · hard Time to first run · 1h+

Requires Pixhawk hardware boards for real flight, simulation mode works via Docker but still involves configuring build toolchains, ROS 2 integration adds significant dependency complexity.

Use freely for any purpose including commercial products, keep the copyright notice and BSD license text, no warranty provided.

In plain English

PX4 is the open-source autopilot software that runs inside drones and other unmanned vehicles. It is the code that takes sensor readings, like GPS position, altitude, and orientation, and sends commands to the motors and control surfaces to keep the vehicle flying where you want it to go. A wide range of vehicles use it: multirotors (the common quadcopter style), fixed-wing planes, VTOL aircraft that take off vertically and fly horizontally, ground rovers, boats, submarines, and more experimental platforms. The software runs on dedicated autopilot hardware boards, particularly those in the Pixhawk family, which are small computers designed to mount inside a drone frame and connect to sensors and motors. It can also run on Linux-based companion computers. For developers who want to test without physical hardware, a simulation mode can be started with a single Docker command, and a ground control application called QGroundControl connects to it so you can practice flying in a simulated environment. PX4 communicates with ground stations and companion computers using MAVLink, a widely used drone communication protocol. It also supports ROS 2 integration through DDS, a real-time messaging standard, which is popular in robotics research and automated mission planning. The architecture is modular: functionality is split into independent components that pass data between each other through a publish-subscribe system called uORB. This design makes it possible to add or remove features, port the software to new hardware, or replace individual pieces without rewriting everything. The project is governed by the Dronecode Foundation, which is part of the Linux Foundation. No single company controls it. The license is BSD 3-Clause, which allows commercial use. Academic users can cite it via a Zenodo DOI that the project maintains.

Copy-paste prompts

Prompt 1
Start a PX4 software-in-the-loop simulation using Docker and connect QGroundControl to it, give me the exact commands
Prompt 2
How do I write a new uORB publisher module in PX4 that reads a custom sensor and broadcasts its data to the rest of the flight controller?
Prompt 3
Set up PX4 to communicate with a ROS 2 node via DDS, what packages do I need and how do I configure the bridge?
Prompt 4
I want to add a new quadrotor airframe to PX4, walk me through which config files to create and what mixer and parameter values to set
Prompt 5
Explain the MAVLink messages PX4 sends to QGroundControl for position, attitude, and battery telemetry, and how to decode them
Open on GitHub → Explain another repo

← px4 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.