Skip to content

多旋翼配置

Multicopter configuration and calibration follows the same high level steps as other frames: selection of firmware, configuration of the frame including actuator/motor geometry and output mappings, sensor configuration and calibration, configuration of safety and other features, and finally tuning.

This topic explains how to configure a multicopter using selected topics from Standard Configuration, Advanced Configuration, and Flight Controller Peripherals, along with multicopter-specific tuning topics.

INFO

This topic is the recommended entry point when performing first-time configuration and calibration of a new multicopter frame.

Loading Firmware

The first step is to load PX4 firmware onto your flight controller. This is most easily done using QGroundControl, which will automatically select appropriate firmware for your particular controller hardware. By default QGC will install the latest stable version of PX4, but you can choose beta or custom versions instead if needed.

Relevant topics:

Frame Selection and Configuration

This section explains how to configure the vehicle type (multicopter), specific motor/flight control geometry, and motor outputs.

First select a multicopter airframe (options are listed in Airframe Reference > Copter). You should select the frame that matches your vehicle brand and model if one exists, and otherwise select the "Generic" frame type that most closely matches your geometry in terms of number of motors and their relative positions. For example, for a Quadrotor X frame you would look for the name of your frame in the list, and if it was not present select the Generic Quadrotor X frame.

Any selected multicopter frame can be modified in the next step (actuator configuration) to add/remove motors and otherwise change the geometry, and to specify what flight controller outputs are connected to particular motors and the output properties. Selecting a frame that matches your vehicle reduces the configuration work required.

Details

How does this work (details) Selecting an airframe applies a frame configuration file that contains a predefined set of parameters, such as CA_AIRFRAME=0 for the vehicle type and CA_ROTOR_COUNT for the number of rotors.

A frame configuration can define everything about a vehicle, from it's geometry and output mappings, through to its tuning and calibration values. When you're bringing up a new vehicle though, the frame will usually contain a fairly minimal configuration:

  • Frames named with "Generic" define the vehicle type, number of rotors, and "placeholder" rotor positions. After selecting the airframe you define the actual geometry and then configure outputs.
  • Frames named with model/brand will define the vehicle type, number of rotors, actual rotor positions, and motor directions. After selecting the airframe you usually still have to configure outputs.

The next step is to define your vehicle geometry (the number of motors and their relative positions) and assign those motors to the physical outputs that they are wired to on your flight controller (both of these are covered in Actuator Configuration and Testing).

If using PWM ESCs and OneShot ESCs (but not DShot and DroneCAN/Cyphal ESC) you should then perform ESC Calibration before proceeding to Motor Configuration. This ensures that all ESC provide exactly the same output for a given input (ideally we'd calibrate ESCs first, but you can't calibrate your ESCs until outputs are mapped).

The final step is Motor Configuration:

  • Reverse any motors that don't match the spin direction configured in the Geometry. For DShot ESC you can do this through the Acuator Testing UI.
  • PWM, OneShot, and CAN ESC, set the motor input limits for disarmed, low and high speed (not needed for DShot ESC)

Relevant topics:

Sensor Setup and Calibration

PX4 most commonly relies on a magnetometer (compass) for direction information, a barometer for altitude, a gyroscope for body rates, an accelerometer for attitude and a GPS/GNSS for global position. Pixhawk flight controllers (and many others) have inbuilt magnetometer, accelerometer, gyroscope, and barometer. The inbuilt compass usually isn't particularly reliable, and it is common to also add an external compass (usually combined with a GNSS receiver in the same device).

We first need to set the Sensor Orientation, informing PX4 how the autopilot (and its inbuilt sensors) and external compasses are oriented relative to the vehicle. Generally you'll orient towards the front of the vehicle and not have to set anything. Once that is done we need to calibrate the compass(es), gyroscope, and accelerometer.

The core sensor setup is covered in these topics:

PX4 can use other peripherals, such as distance sensors, optical flow sensors, traffic avoidance alarms, cameras, and so on:

Sensors that you don't need to calibrate/configure include:

  • Level Horizon calibration isn't usually needed if you have mounted the flight controller level.
  • Sensors that are not present, or that are not used by PX4 multicopter for flight control, such as Airspeed sensors.
  • Sensors that don't need calibration, including: Barometers and GNSS.

Manual Control Setup

Pilots can control a vehicle manually using either a Radio Control (RC) System or a Joystick/Gamepad controller connected via QGroundControl.

INFO

A manual control is essential in order to bring up a new vehicle safely!

Radio Control:

Joystick/GamePad:

Safety Configuration

PX4 can be configured to automatically handle conditions such as low battery, losing radio or data links, flying too far from the home location, and so on:

Tuning

Tuning is the final step, carried out only after most other setup and configuration is complete.

  • Rate and attitude controllers:

  • Autotune — Automates tuning PX4 rate and attitude controllers (recommended).

    INFO

Automatic tuning works on frames that have reasonable authority and dynamics around all the body axes. It has primarily been tested on racing quads and X500, and is expected to be less effective on tricopters with a tiltable rotor. The other two guides are only needed if there is a problem with autotune. :::

See Also