Skip to main content

Documentation 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.

Multicopters are the most common vehicle type running PX4. The platform has accumulated years of production use across quadcopters, hexarotors, octocopters, and more exotic geometries such as tricopters and coaxial frames. This guide walks you through selecting the right airframe, understanding motor numbering and spin direction conventions, calibrating your ESCs, and tuning the rate and attitude controllers for stable flight.

Supported frame types

PX4 supports a broad range of multirotor geometries, from simple quad X frames to large coaxial dodecarotors. The table below lists the most commonly used generic airframe types:
Airframe IDNameMotorsGeometry
4001Generic Quadrotor X4X
5001Generic Quadrotor +4Plus
6001Generic Hexarotor X6X
7001Generic Hexarotor +6Plus
8001Generic Octocopter X8X
9001Generic Octocopter +8Plus
11001Generic Hexarotor CoaXial6 arms, 12 motorsCoaxial
12001Generic Octocopter CoaXial8 arms, 16 motorsCoaxial
24001Generic Dodecarotor CoaXial12 arms, 24 motorsCoaxial
If your vehicle matches a named frame — such as Holybro S500 (4014) or NXP HoverGames (4017) — use it. Named airframes ship with pre-tuned PID gains that give you a much better starting point than a pure Generic entry.

Frame types explained

The quadrotor X is the most widely used multicopter configuration. Four motors are arranged in an X pattern, providing a good balance of stability, agility, and mechanical simplicity. It is the standard choice for general photography, development platforms, and racing (with aggressive tuning).Generic airframe: 4001_quad_x. Select Quadrotor X > Generic Quadcopter in QGroundControl.

Motor numbering and spin direction

PX4 uses a consistent motor numbering and spin direction scheme. For a quadrotor X, motors are numbered starting from the front-right and proceeding counter-clockwise when viewed from above:
        Front
    3       1
      ╲   ╱
      ╱   ╲
    2       4
        Back
MotorPositionDefault spin direction
1Front-rightCCW (counter-clockwise)
2Back-leftCCW
3Front-leftCW (clockwise)
4Back-rightCW
In PX4’s control allocation system, motors with a negative CA_ROTORx_KM value spin clockwise; positive values are counter-clockwise. You can verify and override spin directions in QGroundControl > Vehicle Setup > Actuators.
Motor spin direction directly affects yaw authority. If you reverse a motor’s physical direction, update the corresponding CA_ROTORx_KM sign in the actuator configuration. Running incorrect spin directions produces uncontrollable yaw or an immediate flip on takeoff.

Setup workflow

1

Install firmware

Flash the latest stable PX4 release to your flight controller via QGroundControl (Q icon > Vehicle Setup > Firmware). Connect the flight controller over USB and confirm the firmware version shown after flashing.
2

Select your airframe

Go to Vehicle Setup > Airframe. Find your vehicle group (for example, Quadrotor X) and select the matching entry. Click Apply and Restart to load the ROMFS defaults and reboot.
3

Configure actuator geometry

After reboot, go to Vehicle Setup > Actuators. Verify that motor positions and spin directions match your physical frame. Drag rotors to the correct positions if needed and flip the spin direction sign for any motor wired in reverse.
4

Calibrate sensors

Complete the calibration wizard under Vehicle Setup > Sensors: accelerometer, gyroscope, compass, and level horizon. Do this with the vehicle stationary on a flat surface.
5

Calibrate ESCs

If you are using PWM or OneShot ESCs, run Vehicle Setup > Power > ESC Calibration to synchronize the throttle range across all ESCs. DShot ESCs communicate digitally and do not require this step.
6

Set up radio control

Go to Vehicle Setup > Radio and complete transmitter calibration. Assign a flight mode switch with at minimum Stabilized and Position modes on a three-position switch.
7

Perform an initial hover test

Arm the vehicle outdoors in a clear area with propellers installed. Hover briefly in Stabilized mode a few centimeters off the ground and check for excessive oscillations or unexpected yaw before switching to Position mode.
8

Tune PID gains

If you observe oscillations or sluggish response, use the Autotune feature (Vehicle Setup > Tuning > Autotune) or manually adjust MC_ROLLRATE_P, MC_PITCHRATE_P, and associated I/D gains. See the PID tuning section below.

ESC calibration

ESC calibration teaches your ESCs the throttle range from the flight controller so all motors respond consistently to the same command:
1

Remove all propellers

Always remove propellers before starting ESC calibration. ESCs may spin motors to full throttle during the calibration sequence.
2

Open the ESC calibration wizard

In QGroundControl, go to Vehicle Setup > Power and click Calibrate in the ESC section.
3

Follow the on-screen prompts

QGroundControl guides you through setting maximum and minimum throttle positions. Keep the vehicle powered and stationary throughout.
4

Verify motor response

After calibration, use the motor test sliders in Vehicle Setup > Actuators to confirm all motors spin up smoothly and respond at consistent speeds to the same throttle command.
DShot ESCs (DShot150, DShot300, DShot600) use a digital protocol and do not require throttle-range calibration. Use DShot when your ESCs support it — it also enables bidirectional RPM telemetry, which powers advanced features like motor failure detection and dynamic notch filtering.

PID tuning

PX4’s multicopter controller has two main layers: the rate controller and the attitude controller. Rate controller — controls roll rate, pitch rate, and yaw rate directly. This is the inner loop and has the most impact on handling feel:
ParameterDescription
MC_ROLLRATE_PRoll rate proportional gain
MC_ROLLRATE_IRoll rate integral gain
MC_ROLLRATE_DRoll rate derivative gain
MC_PITCHRATE_PPitch rate proportional gain
MC_YAWRATE_PYaw rate proportional gain
Attitude controller — controls roll, pitch, and yaw angles using the rate controller as an inner loop:
ParameterDescription
MC_ROLL_PRoll angle proportional gain
MC_PITCH_PPitch angle proportional gain
MC_YAW_PYaw angle proportional gain
The fastest way to start tuning is Autotune, available from PX4 v1.12 onward:
  1. Arm the vehicle and switch to Altitude Hold or Position mode.
  2. Enable Autotune from the QGroundControl Tuning tab or by setting MC_AT_EN to 1.
  3. PX4 performs small automated maneuvers and fits rate gains automatically.
  4. Disable Autotune and save parameters when the result feels stable.
Tune the rate controller before touching attitude gains. Most oscillation and handling issues originate in the rate loop. Once the rate loop is tight and stable, attitude gains rarely need large adjustments.

Build docs developers (and LLMs) love