Skip to content

多旋翼配置

多旋翼的配置和校准遵循与其他框架相同的高级步骤:选择固件,配置框架,包括执行器/电机几何和输出映射,传感器配置和校准,安全和其他功能的配置,最后进行调整。

本章节介绍了如何使用标准配置高级配置飞行控制器外设以及多旋翼特定的调参章节。

INFO

本节是首次配置和校准新的多旋翼机架时的推荐入口点。

加载固件

第一步是 加载 PX4 固件 到您的飞控上。 这一步最容易通过使用 QGroundControl 完成,它会自动选择适合您特定控制器硬件的固件。 默认情况下,QGC 会安装最新的稳定版本的 PX4,但如果需要,您可以选择测试版或自定义版本。

相关章节:

机架选择和配置

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:

传感器设置和校准

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.

手动控制设置

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:

安全配置

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

    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.

    Manual tuning using these guides are only needed if there is a problem with autotune:

:::

另见