mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 16:33:34 +08:00
Move PX4 Guide source into /docs (#24490)
* Add vitepress tree * Update existing workflows so they dont trigger on changes in the docs path * Add nojekyll, package.json, LICENCE etc * Add crowdin docs upload/download scripts * Add docs flaw checker workflows * Used docs prefix for docs workflows * Crowdin obvious fixes * ci: docs move to self hosted runner runs on a beefy server for faster builds Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci: don't run build action for docs or ci changes Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci: update runners Signed-off-by: Ramon Roche <mrpollo@gmail.com> * Add docs/en * Add docs assets and scripts * Fix up editlinks to point to PX4 sources * Download just the translations that are supported * Add translation sources for zh, uk, ko * Update latest tranlsation and uorb graphs * update vitepress to latest --------- Signed-off-by: Ramon Roche <mrpollo@gmail.com> Co-authored-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
co-authored by
Ramon Roche
parent
8e6d2ebe4a
commit
88d623bedb
@@ -0,0 +1,315 @@
|
||||
<!-- This is the single-source for autotuning docs used in the autotune_mc.md and autotune_fy.md
|
||||
At time of writing, only FW, MC, and VTOL, support autotuning.
|
||||
VTOL has its own doc that references the other two
|
||||
-->
|
||||
|
||||
<div v-if="$frontmatter.frame === 'Multicopter'">
|
||||
|
||||
# Auto-tuning (Multicopter)
|
||||
|
||||
</div>
|
||||
<div v-else-if="$frontmatter.frame === 'Plane'">
|
||||
|
||||
# Auto-tuning (Fixed-Wing)
|
||||
|
||||
</div>
|
||||
|
||||
Auto-tuning automates the process of tuning the PX4 rate and attitude controllers, which are the most important controllers for stable and responsive flight (other tuning is more "optional").
|
||||
|
||||
Tuning only needs to be done once, and is recommended unless you're using a vehicle that has already been tuned by the manufacturer (and not modified since).
|
||||
|
||||
:::warning
|
||||
Auto-tuning is performed while flying.
|
||||
The airframe must fly well enough to handle moderate disturbances, and should be closely attended:
|
||||
|
||||
- Test that your vehicle is [stable enough for autotuning](#pre-tuning-test).
|
||||
- Be ready to abort the autotuning process.
|
||||
You can do this by changing flight modes<div style="display: inline;" v-if="$frontmatter.frame === 'Plane'"> or using an auto-tune enable/disable switch ([if configured](#enable-disable-autotune-switch))</div>.
|
||||
- Verify that the vehicle flies well after tuning.
|
||||
|
||||
:::
|
||||
|
||||
<lite-youtube videoid="5xswOhhqrIQ" title="QGroundControl Autotune Feature Breakdown for PX4 Autopilot"/>
|
||||
|
||||
## Pre-tuning Test
|
||||
|
||||
The vehicle must be able to fly and adequately stabilize itself before running auto-tune.
|
||||
This test ensures that the vehicle can fly safely in position controlled modes.
|
||||
|
||||
To make sure the vehicle is stable enough for auto-tuning:
|
||||
|
||||
1. Perform a normal preflight safety checklist to ensure the flight zone is clear and has enough space.
|
||||
|
||||
2. Take off and <div style="display: inline;" v-if="$frontmatter.frame === 'Multicopter'">hover at 1m above ground in [Altitude mode](../flight_modes_mc/altitude.md) or [Stabilized mode](../flight_modes_mc/manual_stabilized.md)</div><div style="display: inline;" v-else-if="$frontmatter.frame === 'Plane'">fly at cruise speed in [Position mode](../flight_modes_fw/position.md) or [Altitude mode](../flight_modes_fw/altitude.md)</div>.
|
||||
|
||||
3. Use the RC transmitter roll stick to perform the following maneuver, tilting the vehicle just a few degrees: _roll left > roll right > center_ (The whole maneuver should take about 3 seconds).
|
||||
The vehicle should stabilise itself within 2 oscillations.
|
||||
|
||||
4. Repeat the maneuver, tilting with larger amplitudes at each attempt.
|
||||
If the vehicle can stabilise itself within 2 oscillations at ~20 degrees move to the next step.
|
||||
|
||||
5. Repeat the same maneuvers but on the pitch axis.
|
||||
As above, start with small angles and confirm that the vehicle can stabilise itself within 2 oscillations before increasing the tilt.
|
||||
|
||||
If the drone can stabilize itself within 2 oscillations it is ready for the [auto-tuning procedure](#auto-tuning-procedure).
|
||||
|
||||
:::warning
|
||||
If the drone cannot stabilize itself sufficiently, follow the instructions in the [troubleshooting](#troubleshooting) section.
|
||||
These explain the minimal manual tuning to prepare the vehicle for auto-tuning.
|
||||
:::
|
||||
|
||||
## Auto-tuning Procedure
|
||||
|
||||
The auto-tuning sequence must be performed in a **safe flight zone, with enough space**.
|
||||
It takes about 40 seconds ([between 19 and 68 seconds](#how-long-does-autotuning-take)).
|
||||
For best results, we recommend running the test in calm weather conditions.
|
||||
|
||||
The recommended mode for autotuning is <div style="display: inline;" v-if="$frontmatter.frame === 'Multicopter'">[Altitude mode](../flight_modes_mc/altitude.md)</div><div style="display: inline;" v-else-if="$frontmatter.frame === 'Plane'">[Hold mode](../flight_modes_fw/hold.md)</div>, but any other flight mode can be used.
|
||||
The RC sticks cannot be used during autotuning (moving the sticks will stop the autotune operation).
|
||||
|
||||
The test steps are:
|
||||
|
||||
1. Perform the [pre-tuning test](#pre-tuning-test).
|
||||
|
||||
2. Takeoff using RC control <div style="display: inline;" v-if="$frontmatter.frame === 'Multicopter'">in [Altitude mode](../flight_modes_mc/altitude.md).
|
||||
Hover the vehicle at a safe distance and at a few meters above ground (between 4 and 20m).</div><div v-else-if="$frontmatter.frame === 'Plane'">
|
||||
Once flying at cruise speed, activate [Hold mode](../flight_modes_fw/hold.md).
|
||||
This will guide the plane to fly in circle at constant altitude and speed.</div>
|
||||
|
||||
3. Enable autotune.
|
||||
|
||||
<div v-if="$frontmatter.frame === 'Plane'">
|
||||
<div class="tip custom-block"><p class="custom-block-title">TIP</p>
|
||||
|
||||
If an [Enable/Disable Autotune Switch](#enable-disable-autotune-switch) is configured you can just toggle the switch to the "enabled" position.
|
||||
|
||||
</div></div>
|
||||
|
||||
1. In QGroundControl, open the menu **Vehicle setup > PID Tuning**:
|
||||
|
||||

|
||||
|
||||
2. Select either the _Rate Controller_ or _Attitude Controller_ tabs.
|
||||
|
||||
3. Ensure that the **Autotune enabled** button is enabled (this will display the **Autotune** button and remove the manual tuning selectors).
|
||||
|
||||
4. Read the warning popup and click on **OK** to start tuning.
|
||||
|
||||
4. The drone will first start to perform quick roll motions followed by pitch and yaw motions.
|
||||
The progress is shown in the progress bar, next to the _Autotune_ button.
|
||||
|
||||
5. <div style="display: inline;" v-if="$frontmatter.frame === 'Multicopter'">Manually land and disarm to apply the new tuning parameters.
|
||||
Takeoff carefully and manually test that the vehicle is stable.</div><div v-else-if="$frontmatter.frame === 'Plane'">The tuning will be immediately/automatically be applied and tested in flight (by default).
|
||||
PX4 will then run a 4 second test and revert the new tuning if a problem is detected.</div>
|
||||
|
||||
:::warning
|
||||
If any strong oscillations occur, land immediately and follow the instructions in the [Troubleshooting](#troubleshooting) section below.
|
||||
:::
|
||||
|
||||
Additional notes:
|
||||
|
||||
<div v-if="$frontmatter.frame === 'Multicopter'">
|
||||
|
||||
- The instructions above tune the vehicle in [Altitude mode](../flight_modes_mc/altitude.md).
|
||||
You can instead takeoff in [Takeoff mode](../flight_modes_mc/takeoff.md) and tune in [Position mode](../flight_modes_mc/position.md) if the vehicle is is _known_ to be stable in these modes.
|
||||
|
||||
</div>
|
||||
<div v-else-if="$frontmatter.frame === 'Plane'">
|
||||
|
||||
- Autotuning can also be run in [Altitude mode](../flight_modes_fw/altitude.md) or [Position mode](../flight_modes_fw/position.md).
|
||||
However running the test while flying straight requires a larger safe area for tuning, and does not give a significantly better tuning result.
|
||||
|
||||
</div>
|
||||
|
||||
- Whether tuning is applied while flying or after landing can be [configured using parameters](#apply-tuning-when-in-air-landed).
|
||||
|
||||
## 故障处理
|
||||
|
||||
### Drone oscillates when performing the pre-tuning test
|
||||
|
||||
<div v-if="$frontmatter.frame === 'Multicopter'">
|
||||
|
||||
Slow oscillations (1 oscillation per second or slower): this often occurs on large platforms and means that the attitude loop is too fast compared to the rate loop:
|
||||
|
||||
- Decrease [MC_ROLL_P](../advanced_config/parameter_reference.md#MC_ROLL_P) and [MC_PITCH_P](../advanced_config/parameter_reference.md#MC_PITCH_P) by steps of 1.0.
|
||||
|
||||
Fast oscillations (more than 1 oscillation per second): this is because the gain of the rate loop is too high.
|
||||
|
||||
- Decrease `MC_[ROLL|PITCH|YAW]RATE_K` by steps of 0.02
|
||||
|
||||
</div>
|
||||
<div v-else-if="$frontmatter.frame === 'Plane'">
|
||||
|
||||
Slow oscillations (1 oscillation per second or slower): this often occurs on large platforms and means that the attitude loop is too fast compared to the rate loop.
|
||||
|
||||
- Increase [FW_R_TC](../advanced_config/parameter_reference.md#FW_R_TC) and [FW_P_TC](../advanced_config/parameter_reference.md#FW_P_TC) by steps of 0.1.
|
||||
|
||||
Fast oscillations (more than 1 oscillation per second): this is because the gain of the rate loop is too high.
|
||||
|
||||
- Decrease [FW_RR_P](../advanced_config/parameter_reference.md#FW_RR_P), [FW_PR_P](../advanced_config/parameter_reference.md#FW_PR_P), [FW_YR_P](../advanced_config/parameter_reference.md#FW_YR_P) by steps of 0.01.
|
||||
|
||||
</div>
|
||||
|
||||
### The auto-tuning sequence fails
|
||||
|
||||
If the drone was not moving enough during auto-tuning, the system identification algorithm might have issues to find the correct coefficients.
|
||||
|
||||
Increase the <div style="display: inline;" v-if="$frontmatter.frame === 'Multicopter'">[MC_AT_SYSID_AMP](../advanced_config/parameter_reference.md#MC_AT_SYSID_AMP)</div><div style="display: inline;" v-else-if="$frontmatter.frame === 'Plane'">[FW_AT_SYSID_AMP](../advanced_config/parameter_reference.md#FW_AT_SYSID_AMP)</div> parameter by steps of 1 and trigger the auto-tune again.
|
||||
|
||||
### The drone oscillates after auto-tuning
|
||||
|
||||
Due to effects not included in the mathematical model such as delays, saturation, slew-rate, airframe flexibility, the loop gain can be too high.
|
||||
To fix this, follow the same steps described [when the drone oscillates in the pre-tuning test](#drone-oscillates-when-performing-the-pre-tuning-test).
|
||||
|
||||
### I still can't get it to work
|
||||
|
||||
Attempt manual tuning using the guides listed in [See also](#see-also) below.
|
||||
|
||||
## Optional Configuration
|
||||
|
||||
### Apply Tuning when In-Air/Landed
|
||||
|
||||
<div v-if="$frontmatter.frame === 'Multicopter'">
|
||||
|
||||
By multicopters land before parameters are applied.
|
||||
This behaviour can be configured using the [MC_AT_APPLY](../advanced_config/parameter_reference.md#MC_AT_APPLY) parameter:
|
||||
|
||||
</div>
|
||||
<div v-else-if="$frontmatter.frame === 'Plane'">
|
||||
|
||||
By default fixed wing tuning the parameters are applied while flying, and then PX4 runs a test to confirm that the controllers work properly.
|
||||
This behaviour can be configured using the [FW_AT_APPLY](../advanced_config/parameter_reference.md#FW_AT_APPLY) parameter:
|
||||
|
||||
</div>
|
||||
|
||||
- `0`: the gains are not applied.
|
||||
This is used for testing purposes if the user wants to inspect results of the auto-tuning algorithm without using them directly.
|
||||
- `1`: apply the gains after disarm (default for multirotors).
|
||||
The operator can then test the new tuning while taking-off carefully.
|
||||
- `2`: apply immediately (default for fixed-wings).
|
||||
The new tuning is applied, disturbances are sent to the controller and the stability is monitored during the next 4 seconds.
|
||||
If the control loop is unstable, the control gains are immediately reverted back to their previous value.
|
||||
If the test passes, the pilot can then use the new tuning.
|
||||
|
||||
<div v-if="$frontmatter.frame === 'Plane'">
|
||||
|
||||
### Enable/Disable Autotune Switch
|
||||
|
||||
A remote control switch can be configured to enable/disable autotune (in any mode) using an RC AUX channel (note, this is only supported on fixed-wing vehicles).
|
||||
|
||||
To map a switch:
|
||||
|
||||
1. Select an RC channel on your controller to use for the autotune enable/disable switch.
|
||||
2. Set [RC_MAP_AUX1](../advanced_config/parameter_reference.md#RC_MAP_AUX1) to match the RC channel for your switch (you can use any of `RC_MAP_AUX1` to `RC_MAP_AUX6`).
|
||||
3. Set [FW_AT_MAN_AUX](../advanced_config/parameter_reference.md#FW_AT_MAN_AUX) to the selected channel (i.e. `1: Aux 1` if you mapped `RC_MAP_AUX1`).
|
||||
|
||||
The auto tuner will be disabled when the switch is below `0.5` (on the manual control setpoint range of of `[-1, 1]`) and enabled when the switch channel is above `0.5`.
|
||||
|
||||
If using an RC AUX switch to enable autotuning, make sure to [select the tuning axes](#select-tuning-axis) before flight.
|
||||
|
||||
### Select Tuning Axis
|
||||
|
||||
Fixed-wing vehicles (only) can select which axes are tuned using the [FW_AT_AXES](../advanced_config/parameter_reference.md#FW_AT_AXES) bitmask parameter:
|
||||
|
||||
- bit `0`: roll (default)
|
||||
- bit `1`: pitch (default)
|
||||
- bit `2`: yaw
|
||||
|
||||
</div>
|
||||
|
||||
## Developers/SDKs
|
||||
|
||||
Autotuning is started using [MAV_CMD_DO_AUTOTUNE_ENABLE](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_AUTOTUNE_ENABLE) MAVLink command.
|
||||
|
||||
At time of writing the message is resent at regular intervals to poll PX4 for progress: the `COMMAND_ACK` includes result that the operation is in progress, and also the progress as a percentage.
|
||||
The operation completes when the progress is 100% or the vehicle lands and disarms.
|
||||
|
||||
:::info
|
||||
This is not a MAVLink-compliant implementation of a [command protocol long running command](https://mavlink.io/en/services/command.html#long_running_commands).
|
||||
PX4 should stream progress as the protocol does not allow polling.
|
||||
:::
|
||||
|
||||
The feature is not yet supported by MAVSDK.
|
||||
|
||||
## Background/Detail
|
||||
|
||||
PX4 uses [PID controllers](../flight_stack/controller_diagrams.md) (rate, attitude, velocity, and position) to calculate the outputs required to move a vehicle from its current estimated state to match a desired setpoint.
|
||||
The controllers must be well tuned in order to get the best performance out of a vehicle.
|
||||
In particular, a poorly tuned rate controller results in less stable flight in all modes, and takes longer to recover from disturbances.
|
||||
|
||||
Generally if you use a [frame configuration](../config/airframe.md) that is similar to your vehicle then the vehicle will be able to fly.
|
||||
However unless the configuration precisely matches your hardware you should tune the rate and attitude controllers.
|
||||
Tuning the velocity and position controllers is less important because they are less affected by vehicle dynamics, and the default tuning configuration for a similar airframe is often sufficient.
|
||||
|
||||
Autotuning provides an automatic mechanism to tune the rate and attitude controllers.
|
||||
It can be used to tune fixed-wing and multicopter vehicles, and VTOL vehicles when flying as a multicopter or as a fixed-wing (transition between modes must be manually tuned).
|
||||
In theory it should work for other vehicle types that have a rate controller, but currently only the above types are supported.
|
||||
|
||||
Automatic tuning works well for the multicopter and fixed-wing vehicle configurations supported by PX4, provided the frame is not too flexible
|
||||
(see [below for more information](#does-autotuning-work-for-all-supported-airframes)).
|
||||
|
||||
The vehicle must be flying in an altitude-stabilized mode (such as [Altitude mode](../flight_modes_mc/altitude.md), [Hold mode](../flight_modes_mc/hold.md), or [Position mode](../flight_modes_mc/position.md)).
|
||||
The flight stack will apply a small disturbance to the vehicle in each axis and then attempt to calculate the new tuning parameters.
|
||||
For fixed-wing vehicles the new tuning is applied in-air by default, after which the vehicle tests the new settings and reverts the tuning if the controllers are not stable.
|
||||
For multicopter, the vehicle lands and applies the new tuning parameters after disarming; the pilot is expected to then take off carefully and test the tuning.
|
||||
|
||||
The tuning process takes about 40 seconds ([between 19 and 70 seconds](#how-long-does-autotuning-take)).
|
||||
The default behaviour can be configured using [parameters](#optional-configuration).
|
||||
|
||||
### 常见问题
|
||||
|
||||
#### What frames types are supported?
|
||||
|
||||
Autotuning is enabled for multicopter, fixed-wing, and hybrid VTOL fixed-wing vehicles.
|
||||
|
||||
While it is not yet enabled for other frame types, in theory it an be used with any frame that uses a rate controller.
|
||||
|
||||
#### Does autotuning work for all supported airframes?
|
||||
|
||||
The mathematical model used by autotuning to estimate the dynamics of the drone assumes this it is a linear system with no coupling between the axes (SISO), and with a limited complexity (2 poles and 2 zeros).
|
||||
If the real drone is too far from those conditions, the model will not be able to represent the real dynamics of the drone.
|
||||
|
||||
In practise, autotuning generally works well for fixed-wing and multicopter, provided the frame is not too flexible.
|
||||
|
||||
#### How long does autotuning take?
|
||||
|
||||
Tuning takes 5s-20s per axis (aborted if tuning could not be established in 20s) + 2s pause between each axis + 4s of testing if the new gains are applied in air.
|
||||
|
||||
A multicopter must tune all three axes, and by default does not test the new gains in-air.
|
||||
Tuning will therefore take between 19s (`5 + 2 + 5 + 2 + 5`) and 64s (`20x3 + 2x2`).
|
||||
|
||||
By default a fixed-wing vehicle tunes all three axes and then tests the new gains in-air.
|
||||
The range is therefore between 25s (`5 + 2 + 5 + 2 + 5 + 2 + 4`) and 70s (`20x3 + 3x2 + 4`).
|
||||
|
||||
Note however that the above settings are defaults.
|
||||
A multicopter can choose to run the tests in air, and a fixed-wing can choose not to.
|
||||
Further, a fixed-wing can choose to tune fewer axes.
|
||||
|
||||
Anecdotally, it usually takes around 40s for either vehicle.
|
||||
|
||||
<!--
|
||||
#### How vigorous is the disturbance applied by tuning
|
||||
|
||||
This might be added later. I'd like to just point to a video.
|
||||
|
||||
If not, perhaps say "not very" but you should expect that the vehicle might deflect by as much as 20degrees and so should be able to cope with that deflection with default tuning.
|
||||
|
||||
-->
|
||||
|
||||
<div v-if="$frontmatter.frame === 'Multicopter'">
|
||||
|
||||
## See also
|
||||
|
||||
- [Multicopter PID Tuning Guide](../config_mc/pid_tuning_guide_multicopter_basic.md) (Manual/Simple)
|
||||
- [Multicopter PID Tuning Guide](../config_mc/pid_tuning_guide_multicopter.md) (Advanced/Detailed)
|
||||
- [Parameters > Autotuning](../advanced_config/parameter_reference.md#autotune) (prefixed with `MC_AT_`).
|
||||
|
||||
</div>
|
||||
<div v-else-if="$frontmatter.frame === 'Plane'">
|
||||
|
||||
## See also
|
||||
|
||||
- [Fixed-Wing PID Tuning Guide](../config_fw/pid_tuning_guide_fixedwing.md)
|
||||
- [Parameters > Autotuning](../advanced_config/parameter_reference.md#autotune) (prefixed with `FW_AT_`).
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,56 @@
|
||||
# 加速度计校准
|
||||
|
||||
您需要在首次使用时,或者如果飞行控制器方向改变时,校准您的加速计。
|
||||
Otherwise it should not need to recalibrated (except perhaps in winter, if the flight controller was not [thermally calibrated](../advanced_config/sensor_thermal_calibration.md) in the factory).
|
||||
|
||||
:::info
|
||||
Poor accelerometer calibration is generally caught by preflight checks and arming-denied messages (QGC warnings typically refer to "high accelerometer bias" and "consistency check failures").
|
||||
:::
|
||||
|
||||
:::tip
|
||||
This is similar to [compass calibration](../config/compass.md) except that you hold the vehicle still (rather than rotate it) in each orientation.
|
||||
:::
|
||||
|
||||
## 执行校准
|
||||
|
||||
_QGroundControl_ will guide you to place and hold your vehicle in a number of orientations (you will be prompted when to move between positions).
|
||||
|
||||
The calibration steps are:
|
||||
|
||||
1. Start _QGroundControl_ and connect the vehicle.
|
||||
|
||||
2. Select **"Q" icon > Vehicle Setup > Sensors** (sidebar) to open _Sensor Setup_.
|
||||
|
||||
3. Click the **Accelerometer** sensor button.
|
||||
|
||||

|
||||
|
||||
::: info
|
||||
You should already have set the [Autopilot Orientation](../config/flight_controller_orientation.md).
|
||||
If not, you can also set it here.
|
||||
|
||||
:::
|
||||
|
||||
4. Click **OK** to start the calibration.
|
||||
|
||||
5. Position the vehicle as guided by the _images_ on the screen.
|
||||
Once prompted (the orientation-image turns yellow) hold the vehicle still.
|
||||
该位置标定完成后,屏幕上的相应图示将变成绿色。
|
||||
|
||||
::: info
|
||||
The calibration uses a least squares 'fit' algorithm that doesn't require you to have "perfect" 90 degree orientations.
|
||||
Provided each axis is pointed mostly up and down at some time in the calibration sequence, and the vehicle is held stationary, the precise orientation doesn't matter.
|
||||
|
||||
:::
|
||||
|
||||

|
||||
|
||||
6. 在机体的所有方向上重复校准步骤。
|
||||
|
||||
Once you've calibrated the vehicle in all the positions _QGroundControl_ will display _Calibration complete_ (all orientation images will be displayed in green and the progress bar will fill completely).
|
||||
You can then proceed to the next sensor.
|
||||
|
||||
## 更多信息
|
||||
|
||||
- [QGroundControl User Guide > Sensors](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/sensors_px4.html#accelerometer)
|
||||
- [PX4 Setup Video - @1m46s](https://youtu.be/91VGmdSlbo4?t=1m46s) (Youtube)
|
||||
@@ -0,0 +1,669 @@
|
||||
# 作动器配置和测试
|
||||
|
||||
<Badge type="tip" text="PX4 v1.14" />
|
||||
|
||||
The _Actuators Setup_ view is used to customize the specific geometry of the vehicle, assign actuators and motors to flight controller outputs, and test the actuator and motor response.
|
||||
|
||||
## 综述
|
||||
|
||||
Open the view in _QGroundControl_ here: **"Q" (app menu) > Vehicle Setup > Actuators** (tab).
|
||||
The displayed elements depend on the [selected frame](../config/airframe.md), with outputs mapped by default as shown in the [Airframe Reference](../airframes/airframe_reference.md).
|
||||
|
||||
The view has three sections:
|
||||
|
||||
- [Geometry](#geometry): Configure the geometry for the [selected airframe](../config/airframe.md).
|
||||
This includes number, position and properties of [motors](#motor-geometry) and also the number and properties of [control surfaces](#control-surfaces-geometry) and [motor tilt servos](#motor-tilt-servo-geometry).
|
||||
- [Actuator Outputs](#actuator-outputs): Assign motors, control surfaces, and other actuators to specific output.
|
||||
- [Actuator Testing](#actuator-testing): Test that motors and actuators move in the direction / speed as expected.
|
||||
|
||||
A quadcopter might have an setup screen similar to the one shown below.
|
||||
This defines a 4-rotor copter with X-geometry.
|
||||
It maps the 4 motors to the AUX1 to AUX4 outputs, and specifies that the connect to DShot1200 ESC.
|
||||
It also maps PWM400 AUX outputs for controlling a parachute and landing gear.
|
||||
|
||||

|
||||
|
||||
:::info
|
||||
Only the most common settings are displayed by default.
|
||||
Select the **Advanced** checkbox in the top right corner to display all settings.
|
||||
:::
|
||||
|
||||
## 几何
|
||||
|
||||
The geometry section is used to set any configurable geometry-related parameters for the selected [airframe](../config/airframe.md).
|
||||
This includes the number and position of [motors](#motor-geometry), and the number, function, and properties of [control surfaces](#control-surfaces-geometry).
|
||||
For VTOL tiltrotor vehicles, it will also include the number and properties of [tilt servos](#motor-tilt-servo-geometry)
|
||||
|
||||
:::info
|
||||
The UI is customised for the selected airframe:
|
||||
|
||||
- Only _configurable_ fields for the selected airframe type are displayed; fields that aren't configurable for the airframe are hidden.
|
||||
- 电机位置图仅对多旋翼类型机架显示。
|
||||
|
||||
:::
|
||||
|
||||
### Motor Geometry
|
||||
|
||||
The motor geometry section lets you set the number of motors, the relative position, and other properties of each motor.
|
||||
|
||||
多旋翼机架几何设置提供了一个图显示每一个电机的x,y相对位置。
|
||||
参见 <a href="../airframes/airframe_reference.md">机架构型参考</a>以更广泛的了解其他机架构型的电机位置。
|
||||
For example, `Tilted-by` and `axis` are only relevant for [Tiltrotor VTOL](#motor-geometry-vtol-tiltrotor) and [Standard VTOL](#motor-geometry-standard-vtol) vehicles, respectively.
|
||||
|
||||
The geometry configuration for multicopter airframes provides a diagram showing the relative x,y positions for each of the motors.
|
||||
See the [Airframe Reference](../airframes/airframe_reference.md) for an broad understanding of the motor positions for other frames.
|
||||
|
||||
下图显示了含和不包含高级设置的四旋翼多旋翼机架构型几何设置。
|
||||
|
||||
#### 电机几何形状: 多旋翼
|
||||
|
||||
The image below shows the geometry setup for a quadrotor multicopter frame with and without advanced settings.
|
||||
|
||||

|
||||
|
||||
First, the **Motors** drop-down setting lets you choose the number of motors (4 for the example above).
|
||||
|
||||
For each motor you can then set:
|
||||
|
||||
- `Position X`: [X-position](#motor-position-coordinate-system), in metres.
|
||||
- `Position Y`: [Y-position](#motor-position-coordinate-system), in metres.
|
||||
- `Position Z`: [Z-position](#motor-position-coordinate-system), in metres.
|
||||
- (Advanced) `Direction CCW`: Checkbox to indicate motor spins counter-clockwise (uncheck for clockwise).
|
||||
- (Advanced) `Bidirectional`: Checkbox to indicate motor is [bidirectional](#bidirectional-motors)
|
||||
- (Advanced) `Slew Rate`: Sets minimum time that the motor output can take to reach its maximum value.
|
||||
Refer to the [Control Surfaces Geometry](#control-surfaces-geometry) section for more information
|
||||
|
||||
:::info
|
||||
The `X`, `Y`, `Z` positions are in [FRD coordinate frame, relative to the _centre of gravity_](#motor-position-coordinate-system).
|
||||
Note, this may not be the same as the position of the flight controller!
|
||||
:::
|
||||
|
||||
#### 电机几何形状: 尾座式四旋翼VTOL
|
||||
|
||||
The motor geometry for a [VTOL Quad Tailsitter](../airframes/airframe_reference.md#vtol-tailsitter) is shown below (the approach for configuring other tailsitter VTOL vehicles will be similar).
|
||||
|
||||
Motors have the same configuration fields as for the [multicopter geometry](#motor-geometry-multicopter).
|
||||
|
||||

|
||||
|
||||
#### 电机几何形状: 倾转旋翼VTOL
|
||||
|
||||
The motor geometry for a [Generic Quadplane VTOL Tiltrotor](../airframes/airframe_reference.md#vtol_vtol_tiltrotor_generic_quadplane_vtol_tiltrotor) is shown below (the approach for configuring other [VTOL tiltrotors](../airframes/airframe_reference.md#vtol_vtol_tiltrotor_generic_quadplane_vtol_tiltrotor) will be similar).
|
||||
|
||||

|
||||
|
||||
- `Tilted by`: The associated servo used for tilting the motor.
|
||||
The properties of this servo are defined in the [Motor Tilt Servo Geometry](#motor-tilt-servo-geometry).
|
||||
|
||||
#### 电机几何参数:标准VTOL
|
||||
|
||||
The motor geometry for a [Generic Standard VTOL](../airframes/airframe_reference.md#vtol_standard_vtol_generic_standard_vtol) is shown below (the approach for configuring other "Standard VTOL" will be similar).
|
||||
|
||||

|
||||
|
||||
Motors have most of the same configuration fields as for the [multicopter geometry](#motor-geometry-multicopter).
|
||||
There is an additional field to indicate the direction in which the motor moves the vehicle (for a standard VTOL, the hover motors are usually set "upwards" and the pusher motor is set to "forwards").
|
||||
|
||||
- `Axis`: One of `Upwards`, `Downwards`, `Forwards`, `Backwards`, `Leftwards`, `Rightwards`, `Custom`
|
||||
- If `Custom` is selected, then the UI displays three additional fields for setting the motor orientation.
|
||||
|
||||
#### Motor Geometry: Other Vehicles
|
||||
|
||||
Other vehicle types will define an appropriate motor geometry for their frame type.
|
||||
Once again these motors will generally have the same kinds of properties as shown above.
|
||||
|
||||
For example, a fixed-wing vehicle may just have a single pusher moter, while a rover with differential steering will have a motor for throttle and for steering.
|
||||
|
||||
#### Motor Position Coordinate System
|
||||
|
||||
The coordinate system for motor positions is FRD (in body frame), where the X axis points forward, the Y axis to the right and the Z axis down.
|
||||
|
||||
The origin is the vehicle's **centre-of-gravity (COG)**.
|
||||
This may **NOT** be the same position as the location of the autopilot.
|
||||
|
||||

|
||||
|
||||
#### Bidirectional Motors
|
||||
|
||||
Some vehicles may use bidirectional motors (i.e. motors that support spinning in both directions).
|
||||
For example, ground vehicles that want to move forwards and backwards, or VTOL vehicles that have pusher motors that can turn in either direction.
|
||||
|
||||
If bidiectional motors are used, make sure to select the **Reversible** checkbox for those motors (the checkbox is displayed as an "advanced" option).
|
||||
|
||||

|
||||
|
||||
Note that you will need to also ensure that the ESC associated with bidirectional motors is configured appropriately (e.g. 3D mode enabled for DShot ESCs, which can be achieved via [DShot commands](../peripherals/dshot.md#commands)).
|
||||
|
||||
### Control Surfaces Geometry
|
||||
|
||||
The control surfaces section of the geometry panel lets you set the number and types of control surfaces that are present on the vehicle.
|
||||
You may also need to set trim and slew rate values in some cases.
|
||||
More advanced users can also configure the roll scale, yaw scale, and pitch scale (generally the defaults are acceptable, and this is not needed).
|
||||
An "example" control surface section for a vehicle with two ailerons is shown below.
|
||||
Note that ailerons only affect roll, so the pitch and yaw fields are disabled.
|
||||
|
||||

|
||||
|
||||
:::info
|
||||
Only the most common settings are displayed by default.
|
||||
Select the **Advanced** checkbox in the top right corner of the view to display all settings.
|
||||
:::
|
||||
|
||||
The fields are:
|
||||
|
||||
- `Control Surfaces`: The number of control surfaces (set this first!)
|
||||
- `Type`: The type of each control surface: `LeftAileron`, `RightAileron`, `Elevator`, `Rudder`, `Left Elevon`, `Right Elevon`, `Left V-Tail`, `Right V-Tail`, `Left Flap`, `Right Flap`, `Airbrakes`, `Custom`.
|
||||
- `Roll Torque`: Effectiveness of actuator around roll axis (normalised: -1 to 1).
|
||||
[Generally you should use the default actuator value](#actuator-roll-pitch-and-yaw-scaling).
|
||||
- `Pitch Torque`: Effectiveness of actuator around pitch axis (normalised: -1 to 1).
|
||||
[Generally you should use the default actuator value](#actuator-roll-pitch-and-yaw-scaling).
|
||||
- `Yaw Torque`: Effectiveness of actuator around yaw axis (normalised: -1 to 1).
|
||||
[Generally you should use the default actuator value](#actuator-roll-pitch-and-yaw-scaling).
|
||||
- `Trim`: An offset added to the actuator so that it is centered without input.
|
||||
This might be determined by trial and error.
|
||||
- <a id="slew_rate"></a>(Advanced) `Slew Rate`: Limits the minimum time in which the motor/servo signal is allowed to pass through its full output range, in seconds.
|
||||
- The setting limits the rate of change of an actuator (if not specified then no rate limit is applied).
|
||||
It is intended for actuators that may be damaged or cause flight disturbance if they move too fast — such as the tilting actuators on a tiltrotor VTOL vehicle, or fast moving flaps, respectively.
|
||||
- For example, a setting of 2.0 means that the motor/servo will not be commanded to move from 0 to 1 at a rate that completes the operation in less than 2 seconds (in case of reversible motors, the range is -1 to 1).
|
||||
- (Advanced) `Flap Scale`: How much this actuator is deflected at the "full flaps configuration" [0, 1] (see [Flap Scale and Spoiler Scale Configuration](#flap-scale-and-spoiler-scale-configuration) below).
|
||||
Can be used to configure aerodynamic surface as flap or to compensate for generated torque through main flaps.
|
||||
- (Advanced) `Spoiler Scale`: How much this actuator is deflected at the "full spoiler configuration" [0, 1] (see [Flap Scale and Spoiler Scale Configuration](#flap-scale-and-spoiler-scale-configuration) below).
|
||||
Can be used to configure aerodynamic surface as spoiler or to compensate for generated torque through main spoiler.
|
||||
- (VTOL only) `Lock control surfaces in hover`:
|
||||
- `Enabled`: Most vehicles do not use control surfaces in hover. Use this setting to lock them so that they don't affect vehicle dynamics.
|
||||
- `Disabled`: Set this for vehicles that use control surfaces in hover, such as the duo tailsitter (which uses elevons for pitch and yaw control). It should also be set for vehicles that use control surfaces to provide additional stabilization in hover mode when moving at speed or in high winds.
|
||||
|
||||
#### Flap Scale and Spoiler Scale Configuration
|
||||
|
||||
"Flap-control" and "Spoiler-control" are aerodynamic configurations that can either be commanded manually by the pilot (using RC, say), or are set automatically by the controller.
|
||||
For example, a pilot or the landing system might engage "Spoiler-control" in order to reduce the airspeed before landing.
|
||||
|
||||
The configurations are an _abstract_ way for the controller to tell the allocator how much it should adjust the aerodynamic properties of the wings relative to the "full flaps" or "full spoiler" configuration (between `[0,1]`, where "1" indicates the full range).
|
||||
The allocator then uses any of the available control surfaces it wants in order to achieve the requested configuration: usually flaps, ailerons, and elevator.
|
||||
|
||||
The `flap scale` and `spoiler scale` settings in the actuator UI inform the allocator how much ailerons, elevators, flaps, spoilers, and other control surfaces, contribute to a requested "Flap-control" and/or "Spoiler-control" value.
|
||||
Specifically, they indicate how much each control surface should be deflected when the controller is demanding "full flaps" or "full spoiler".
|
||||
|
||||
In the following example, the vehicle has two ailerons, one elevator, one rudder and two flaps as control surfaces:
|
||||
|
||||

|
||||
|
||||
- The flaps have both `Flap Scale` set to 1, meaning that they will be fully deflected with the flap-control at 1.
|
||||
They also have a [slew rate](#slew_rate) of 0.5/s, meaning that it will take 2s to fully deflect them (a slew rate on the flaps is generally recommended to reduce the disturbances their movement creates).
|
||||
- The ailerons are primarily tasked to provide the commanded roll torque.
|
||||
They also have `Spoiler Scale` set to 0.5, and will additionally be deflected upwards 50% if the controller demands full spoiler configuration.
|
||||
The aileron deflection is thus the sum of the (asymmetrical) deflection for the roll torque, plus the (symmetrical) deflection for the spoiler setpoint.
|
||||
- The elevator is primarily tasked to provide pitch torque.
|
||||
It also has non-zero entries in the `Flap Scale` and `Spoiler Scale` fields.
|
||||
These are the elevator deflections added to compensate for the pitching moments generated by the flaps and spoiler actuators.
|
||||
In the case here the elevator would be deflected 0.3 up when the flaps are fully deployed to counteract the pitching down moment caused by the flaps.
|
||||
|
||||
#### Actuator Roll, Pitch, and Yaw Scaling
|
||||
|
||||
:::info
|
||||
For the majority of airframe setups the default values for each control surface types should not be changed.
|
||||
:::
|
||||
|
||||
The `Roll scale`, `Pitch scale` and `Yaw scale` values indicate the normalized effectiveness of the actuator around the corresponding axis.
|
||||
|
||||
Tuning the values is a low/level/advanced topic, and is generally only needed when tuning coupled control surfaces (like an elevon, that controls both pitch and roll).
|
||||
In this case the things you need to know are:
|
||||
|
||||
- The numbers that are entered are directly put into the allocation matrix, that is then inverted to get from desired moments (normalized) to control signals.
|
||||
- Increasing the scale will _reduce_ the deflection of the control surfaces (as it gets inverted).
|
||||
|
||||
<!-- For more information see: []() (PX4 Dev Summit, 2022) -->
|
||||
|
||||
#### Control Surface Deflection Convention
|
||||
|
||||
Control surfaces that move in either direction from neutral include: Ailerons, Elevons, V-Tails, A-Tails, Rudder.
|
||||
|
||||
In order to ensure that these control surfaces always move as expected for positive or negative inputs from the controllers, there needs to be a definition of the deflection directions that is independent of the physical servo setup.
|
||||
|
||||
Positive input causes positive deflection.
|
||||
The diagram below shows the direction of movement for positive input:
|
||||
|
||||

|
||||
|
||||
In summary, positive inputs result in:
|
||||
|
||||
- **Horizontal Control Surfaces:** Upwards movement.
|
||||
Includes ailerons and elevons.
|
||||
- **Vertical Control Surfaces:** Rightwards movement.
|
||||
Includes rudders.
|
||||
- **Mixed Control Surfaces:** Upwards/rightwards movement.
|
||||
Includes V-Tail. A-Tail
|
||||
|
||||
:::tip
|
||||
Control surfaces that can only deflect in one direction from the neutral point include: Airbrakes, Spoiler, and Flaps.
|
||||
|
||||
For these controls a positive input is always deflection from the neutral (0: no effect, 1: full effect), irrespective of the direction that the control itself moves.
|
||||
They do not respond to negative input.
|
||||
:::
|
||||
|
||||
<!-- Also see this comment: https://github.com/PX4/PX4-Autopilot/blob/96b03040491e727752751c0e0beed87f0966e6d4/src/modules/control_allocator/module.yaml#L492 -->
|
||||
|
||||
### Motor Tilt Servo Geometry
|
||||
|
||||
[VTOL tiltrotor vehicles](../frames_vtol/tiltrotor.md) can tilt their motors to transition between hover and forward flight.
|
||||
This section defines the properties of the tilting servos.
|
||||
These are mapped to specific motors in the motor geometry for a tiltrotor.
|
||||
|
||||
The example below shows the tilt servo setup for the [tiltrotor motor geometry shown above](../config/actuators.md#motor-geometry-vtol-tiltrotor).
|
||||
|
||||

|
||||
|
||||
The values that can be set are:
|
||||
|
||||
- `Tilt servos`: The number of servos (tiltable motors).
|
||||
- `Angle at min tilt`: [Maximum tilt angle](#tilt-servo-coordinate-system) in degrees, relative to the z axis.
|
||||
- `Angle at max tilt`: [Minimum tilt angle](#tilt-servo-coordinate-system) in degrees, relative to the z-axis.
|
||||
- `Tilt direction`: `Towards front` (positive x direction) or `Towards right` (positive y direction).
|
||||
- `Use for control`: [Tilt servo used for yaw/pitch](#tilt-servos-for-yaw-pitch-control)
|
||||
- `None`: Torque control is not used.
|
||||
- `Yaw`: Tilt servos used to control yaw.
|
||||
- `Pitch`: Tilt servos used to control pitch.
|
||||
- `Both Yaw and Pitch`: Tilt servos are used to control both yaw and pitch.
|
||||
|
||||
#### Tilt Servo Coordinate System
|
||||
|
||||
The coordinate system for tilt rotor angles is shown below.
|
||||
The reference direction for tilt angles is straight upwards (0 degrees).
|
||||
Tilt angles towards the front or right of the vehicle are positive, and towards the back or to the left are negative.
|
||||
|
||||

|
||||
|
||||
The `Angle at min tilt` and `Angle at max tilt` indicate the range of movement for the tilt servo.
|
||||
The minimum tilt is the smaller _numerical value_ (not absolute) of the two angles.
|
||||
|
||||
If the max/min tilt vectors are **P<sub>0</sub>** and **P<sub>1</sub>** as shown above, both tilt angles are positive but **θ<sub>0</sub>** is smaller:
|
||||
|
||||
- `Angle at min tilt` = **θ<sub>0</sub>**
|
||||
- `Angle at max tilt` = **θ<sub>1</sub>**
|
||||
|
||||
:::info
|
||||
If the diagram was mirrored so that **P<sub>0</sub>** and **P<sub>1</sub>** were tilting into the -x, -y quadrant, then both the tilt angles would be negative.
|
||||
Because **θ<sub>1</sub>** would more negative (smaller) than **θ<sub>0</sub>**, it would be the `Angle at min tilt`.
|
||||
|
||||
Similarly, a servo that moves:
|
||||
|
||||
- between the upright and forward positions would have `min=0` and `max=90`.
|
||||
- symmetrically 45 degrees around the upright position would have `min=-45` and `max=45`
|
||||
- between the upright and backward positions would have `min=-90` and `max=0`.
|
||||
|
||||
:::
|
||||
|
||||
The `Tilt direction` indicates whether the servo tilts in the plane towards the `Front` or `Right` of the vehicle.
|
||||
On the diagram this would be represented by **α** that can only take values of 0 (front) or 90 (right).
|
||||
|
||||
#### Tilt Servos for Yaw/Pitch Control
|
||||
|
||||
Tilt servos can provide torque on one or more axes, which may be used to yaw or pitch the vehicle:
|
||||
|
||||
- Yaw is commonly set in this way, though motors are often used instead on vehicles with four or more motors.
|
||||
- Pitch is more commonly controlled using differential motors thrust.
|
||||
Control using tilt servos is useful on airframes that can't use differential thrust, such as a [Bicopter](https://www.youtube.com/watch?v=hfss7nCN40A).
|
||||
|
||||
Whether this feature is used is configured in the `Use for control` setting.
|
||||
|
||||
## 制动器输出
|
||||
|
||||
The _Actuator Outputs_ section is used to assign motors, control surface servos, and other actuators used by the particular frame to the physical outputs on the flight controller, and to set parameters for those outputs.
|
||||
|
||||

|
||||
|
||||
Separate tabs are displayed for each output bus supported by the connected flight controller: PWM MAIN (I/O Board output), PWM AUX (FMU Board output), UAVCAN.
|
||||
|
||||
Motors and actuators (which are referred to as "[functions](#output-functions)") can be assigned to any physical output on any of the available buses.
|
||||
|
||||
:::info
|
||||
PWM AUX outputs are preferred over the PWM MAIN outputs for controlling motors (they have lower latency).
|
||||
:::
|
||||
|
||||
PWM outputs are grouped based on the hardware timer groups.
|
||||
Meaning all the outputs in one group must operate under the same protocol at the same rate (e.g. PWM signal at 400Hz for all the outputs in one group).
|
||||
Therefore it is not possible to map Servo and a Motor in the same output group, as they usually operate at a different rate.
|
||||
|
||||
The PWM AUX tab has CAP outputs that are generally used as the [camera capture/trigger input](../camera/fc_connected_camera.md#trigger-configuration).
|
||||
However you can map the CAP outputs to other output functions, and other AUX outputs can be used as camera capture/triggering input.
|
||||
|
||||
:::info
|
||||
Configuring the Camera Capture / Trigger input requires a reboot to take effect
|
||||
:::
|
||||
|
||||
You should assign functions to the outputs that match your physical wiring of motors and servos, and use the [Actuator Testing](#actuator-testing) section described below to determine appropriate output parameter values.
|
||||
These steps are covered in [Output Assignment and Configuration](#output-assignment-and-configuration).
|
||||
|
||||
### Output Functions
|
||||
|
||||
Output functions are used to map the "logical functions" of an airframe, such as `Motor 1` or `Landing gear`, to physical outputs like FMU output pin 2.
|
||||
This makes it easy to use a particular output pin for almost any purpose.
|
||||
|
||||
Some functions are only relevant to particular frames or output types, and will not be offered on others.
|
||||
|
||||
Functions include:
|
||||
|
||||
- `Disabled`: Output has no assigned function.
|
||||
- `Constant_Min`: Output set to constant minimum value (-1).
|
||||
- `Constant_Max`: Output is set to constant maximum value (+1).
|
||||
- `Motor 1` to `Motor 12`: Output is indicated motor.
|
||||
Only motors allowed for airframe are displayed.
|
||||
- `Servo 1` to `Servo 8`: Servo output.
|
||||
These are further assigned a specific meaning based on airframe, such as "tilt servo", "left aileron".
|
||||
- `Peripheral via Acutator Set 1` to `Peripheral via Acutator Set 6`: [Generic Actuator Control with MAVLink](../payloads/generic_actuator_control.md#generic-actuator-control-with-mavlink).
|
||||
- `Landing Gear`: Output is landing gear.
|
||||
- `Parachute`: Output is parachute.
|
||||
The minimum value is sent in normal use and the maximum value is emitted when a failsafe is triggered.
|
||||
- `RC Roll`: Output is passthrough roll from RC ([RC_MAP_ROLL](../advanced_config/parameter_reference.md#RC_MAP_ROLL) maps an RC channel to this output).
|
||||
- `RC Pitch`: Output is passthrough pitch from RC ([RC_MAP_PITCH](../advanced_config/parameter_reference.md#RC_MAP_PITCH) maps an RC channel to this output).
|
||||
- `RC Throttle`: Output is passthrough throttle from RC ([RC_MAP_THROTTLE](../advanced_config/parameter_reference.md#RC_MAP_THROTTLE) maps an RC channel to this output).
|
||||
- `RC Yaw`: Output is yaw from RC ([RC_MAP_YAW](../advanced_config/parameter_reference.md#RC_MAP_YAW) maps an RC channel to this output).
|
||||
- `RC Flaps`: Output is flaps from RC ([RC_MAP_FLAPS](../advanced_config/parameter_reference.md#RC_MAP_FLAPS) maps an RC channel to this output).
|
||||
- `RC AUXn` to `RC AUX1`: Outputs used for [arbitrary payloads triggered by RC passthrough](../payloads/generic_actuator_control.md#generic-actuator-control-with-rc).
|
||||
- `Gimbal Roll`: Output controls gimbal roll.
|
||||
- `Gimbal Pitch`: Output controls Gimbal pitch.
|
||||
- `Gimbal Yaw`: Output controls Gimbal yaw.
|
||||
- `Gripper`<Badge type="tip" text="PX4 v1.14" />: Output controls gripper open/close.
|
||||
- `Landing_Gear_Wheel`<Badge type="tip" text="PX4 v1.14" />: Output controls deployment of landing gear wheel
|
||||
|
||||
The following functions can only be applied to FMU outputs:
|
||||
|
||||
- `Camera_Trigger`: Output to trigger camera.
|
||||
Enabled when [`TRIG_MODE==0`](../advanced_config/parameter_reference.md#TRIG_MODE).
|
||||
Configured via `TRIG_*` parameters.
|
||||
- `Camera_Capture`: Input to get image capture notification.
|
||||
Enabled when [CAM_CAP_FBACK==0](../advanced_config/parameter_reference.md#CAM_CAP_FBACK).
|
||||
Configured via `CAM_CAP_*` parameters.
|
||||
- `PPS_Input`: Pulse-per-second input capture.
|
||||
Used for GPS synchronisation.
|
||||
Enabled when [`PPS_CAP_ENABLE==0`](../advanced_config/parameter_reference.md#PPS_CAP_ENABLE)
|
||||
|
||||
:::info
|
||||
The functions are defined in source at [/src/lib/mixer_module/output_functions.yaml](https://github.com/PX4/PX4-Autopilot/blob/main/src/lib/mixer_module/output_functions.yaml).
|
||||
This list is correct at PX4 v1.15.
|
||||
:::
|
||||
|
||||
## Actuator Testing
|
||||
|
||||
The _Actuator Testing_ section in lower-right corner provides sliders that can be used to test (and determine) actuator and motor settings.
|
||||
A slider is provided for each output defined in the [Actuator Outputs](#actuator-outputs) section.
|
||||
The slider example below shows the section for a typical VTOL Tiltrotor airframe.
|
||||
|
||||

|
||||
|
||||
The section has an **Enable Sliders** switch that must be toggled before sliders can be used.
|
||||
The sliders can power the motors/servos across their full range of motion, and "snap" to the disarmed and minimum positions.
|
||||
|
||||
:::info
|
||||
After you toggle the **Enable sliders** switch, actuators/motors won't do anything until the corresponding slider is _moved_.
|
||||
This is a safety feature to prevent sudden motor movements after switch is enabled.
|
||||
:::
|
||||
|
||||
Sliders can be used to verify the following:
|
||||
|
||||
1. Actuators (Motors, Control surfaces, etc.) are assigned to the expected output.
|
||||
2. Motors don't spin when at the `disarmed` PWM output value
|
||||
3. Motors barely spin at the `minimum` PWM output value.
|
||||
4. Motors give **positive thrust** in the expected direction
|
||||
5. Control Surfaces are in the correct idle position for `disarmed` output value
|
||||
6. Control Surfaces move in the direction as defined in the [Control Surface Convention](#control-surface-deflection-convention)
|
||||
7. Motor Tilt Servos are in the correct idle position for `disarmed` output value
|
||||
8. Motor Tilt Servos move in the direction as defined in the [Tilt Servo Convention](#tilt-servo-coordinate-system)
|
||||
|
||||
## Output Assignment and Configuration
|
||||
|
||||
Outputs are assigned to functions and configured in the [Actuator Outputs](#actuator-outputs) section, while the [Actuator Testing](#actuator-testing) sliders are commonly used to determine appropriate configuration values to enter:
|
||||
|
||||
- MC vehicles that have connected motors to PWM outputs can use the [Identify & Assign Motors](#multicopter-pwm-motor-assignment) button to perform motor assignment "semi-automatically".
|
||||
- Output assignment of both motors and actuators can be done/checked using sliders (see [Output Assignment (Manual)](#output-assignment-manual)).
|
||||
- Disarmed, minimum, and maximum settings, for all outputs can also be also determined using sliders.
|
||||
This is shown as part of [Motor Configuration](#motor-configuration), [Control Surface Setup](#control-surface-setup), [Tilt servo setup](#tilt-servo-setup)
|
||||
|
||||
### Multicopter PWM: Motor Assignment
|
||||
|
||||
You can use the **Identify & Assign Motors** button to assign motors to PWM outputs using a semi-automated process.
|
||||
|
||||
:::info
|
||||
This is the easiest way to assign motors, but is currently only supported for motors on **multicopter vehicles** that are connected to PWM outputs (UAVCAN outputs and other frame types do not support this feature).
|
||||
On other frames you can follow the instructions in [Output Assignment (Manual)](#output-assignment-manual).
|
||||
:::
|
||||
|
||||
:::warning
|
||||
Remove the propellers from motors before assigning outputs or any testing.
|
||||
:::
|
||||
|
||||

|
||||
|
||||
When you click the button, QGC sends a command to a motor, causing it to spin.
|
||||
To assign that motor to an output you simply select the corresponding motor displayed in the screen.
|
||||
QGC will then spin the next motor for you to assign, and so on.
|
||||
|
||||
Instructions:
|
||||
|
||||
1. Setup the motor geometry to match the motors on your frame.
|
||||
|
||||
2. Select the PWM tab where you want to assign the motors.
|
||||
|
||||
3. Click the **Identify & Assign Motors** button.
|
||||
|
||||
4. One motor will start spinning (click **Spin Motor Again** if it stops spinning too quickly to note.)
|
||||
|
||||
Select the corresponding motor in the geometry section.
|
||||
|
||||

|
||||
|
||||
5. After assigning all motors, the tool will set the correct motor mapping for the outputs and then exit.
|
||||
|
||||
### Output Assignment (Manual)
|
||||
|
||||
:::warning
|
||||
Remove the propellers from motors before assigning outputs or any testing.
|
||||
:::
|
||||
|
||||
Actuator outputs for both motors and servos can be _manually_ assigned using sliders in the [Actuator Testing](#actuator-testing) section.
|
||||
|
||||
To assign an actuator:
|
||||
|
||||
1. First assign functions to the outputs that you think are _likely_ to be correct in the _Actuator Outputs_ section.
|
||||
2. Toggle the **Enable sliders** switch in _Actuator Testing_ section.
|
||||
3. Move the slider for the actuator you want to test:
|
||||
- Motors should be moved to the minimum thrust position.
|
||||
- Servos should be moved near the middle position.
|
||||
4. Check which actuator moves on the vehicle.
|
||||
This should match the actuator positions for your geometry (the [airframe reference](../airframes/airframe_reference.md) shows motor positions for a number of standard airframes).
|
||||
- If the correct actuator moves, then proceed to the next step.
|
||||
- If a wrong actuator moves, swap the output assignment over.
|
||||
- If nothing moves then increase the slider mid-way though the range, then higher if needed.
|
||||
If nothing moves after that the output might not be connected, the motor might not be powered, or the output might be misconfigured.
|
||||
You will need to troubleshoot (perhaps try other actuator outputs to see if "anything" moves).
|
||||
5. Return the slider to the "disarmed" position (bottom of slider for motors, centre of slider for servos).
|
||||
6. Repeat for all actuators
|
||||
|
||||
### Motor Configuration
|
||||
|
||||
:::info
|
||||
If using PWM or OneShot ESCs, you should first perform [ESC Calibration](../advanced_config/esc_calibration.md) (this topic also covers PWM specific motor configuration).
|
||||
|
||||
[DShot](../peripherals/dshot.md) ESCs do not require configuration of the command limits but only rotation direction.
|
||||
:::
|
||||
|
||||
:::warning
|
||||
Remove propellers!
|
||||
:::
|
||||
|
||||
The motor configuration sets output values such that motors:
|
||||
|
||||
- don't spin when disarmed (at the `disarmed` PWM output value).
|
||||
- barely but reliably spin up at the `minimum` PWM output value.
|
||||
- have the _lowest_ `maximum` PWM output value that spins the motor at its _highest_ rate.
|
||||
- give **positive thrust** in the expected direction.
|
||||
|
||||
For each motor:
|
||||
|
||||
1. Pull the motor slider down so that it snaps to the bottom.
|
||||
In this position the motor is set to the outputs `disarmed` value.
|
||||
- Verify that the motor doesn't spin in this position.
|
||||
- If the motor spins, reduce the corresponding PWM `disarmed` value in the [Actuator Outputs](#actuator-outputs) section to below the level at which it still spins.
|
||||
|
||||
2. Slowly move the slider up until it snaps to the _minimum_ position.
|
||||
In this position the motor is set to the outputs `minimum` value.
|
||||
|
||||
- Verify that the motor is spinning very slowly in this position.
|
||||
- If the motor is not spinning, or spinning too fast you will need to adjust the corresponding PWM `minimum` value in the [Actuator Outputs](#actuator-outputs) such that the motors barely spin.
|
||||
|
||||

|
||||
::: info
|
||||
For DShot output, this is not required.
|
||||
|
||||
:::
|
||||
|
||||
3. Increase the slider value to a level where you can verify that the motor is spinning in the correct direction and that it would give a positive thrust in the expected direction.
|
||||
|
||||
- The expected thrust direction can vary by vehicle type.
|
||||
For example in multicopters the thrust should always point upwards, while in a fixed-wing vehicle the thrust will push the vehicle forwards.
|
||||
- For VTOL, thrust should point upwards when the Tilt Servo is at 0 degrees as defined the [Tilt Servo Convention](#tilt-servo-coordinate-system).
|
||||
Testing of the [Tilt Servo](#tilt-servo-setup) is covered below as well.
|
||||
- If thrust is in the wrong direction, you may need to [reverse the motors](#reversing-motors).
|
||||
|
||||
4. Increase the slider value to the maximum value, so the motor is spinning quickly.
|
||||
Reduce the value of the PWM output's `maximum` value just below the default.
|
||||
Listen to the tone of the motors as you increase the value in small (25us) increments.
|
||||
The "optimal" maximum value is the value at which you last hear a change in the tone.
|
||||
|
||||
### Control Surface Setup
|
||||
|
||||
First set the _frame rate_ for the servos used in each group of outputs.
|
||||
This would normally be set to the maximum value supported by your servo.
|
||||
Below we show how you would set it to PWM50 (the most common value).
|
||||
|
||||

|
||||
|
||||
:::info
|
||||
You will almost certainly need to change the pulse rate from the default of 400Hz because support is rare (if not supported the servo will usually make an "odd" noise).
|
||||
If you're using PWM servos, PWM50 is far more common.
|
||||
If a high rate servo is _really_ needed, DShot offers better value.
|
||||
:::
|
||||
|
||||
#### Control surfaces that move both directions about a neutral point
|
||||
|
||||
Control surfaces that move either direction around a neutral point include: ailerons, elevons, V-tails, A-tails, and rudders.
|
||||
|
||||
To set these up:
|
||||
|
||||
1. Set the `Disarmed` value so that the surfaces will stay at neutral position when disarmed.
|
||||
This is usually around `1500` for PWM servos (near the centre of the servo range).
|
||||
|
||||

|
||||
|
||||
2. Move the slider for the surface upwards (positive command) and verify that it moves in the direction defined in the [Control Surface Convention](#control-surface-deflection-convention).
|
||||
|
||||
- Ailerons, elevons, V-Tails, A-Tails, and other horizontal surfaces should move up.
|
||||
- Rudders and other "purely vertical" surfaces should move right.
|
||||
|
||||
::: tip
|
||||
It is important that the slider movement matches the control surface convention, in order to normalize control for different servo mountings (moving the slider up may actually decrease the output value sent to the servo).
|
||||
|
||||
:::
|
||||
|
||||
If the control surface moves in the opposite direction, click on the `Rev Range` checkbox to reverse the range.
|
||||
|
||||
3. Move the slider again to the middle and check if the Control Surfaces are aligned in the neutral position of the wing.
|
||||
|
||||
- If it is not aligned, you can set the **Trim** value for the control surface.
|
||||
|
||||
::: info
|
||||
This is done in the `Trim` setting of the Geometry panel, usually by "trial and error".
|
||||

|
||||
|
||||
:::
|
||||
|
||||
- After setting the trim for a control surface, move its slider away from the centre, release, and then back into disarmed (middle) position.
|
||||
Confirm that surface is in the neutral position.
|
||||
|
||||
:::info
|
||||
Another way to test without using the sliders would be to set the [`COM_PREARM_MODE`](../advanced_config/parameter_reference.md#COM_PREARM_MODE) parameter to `Always`:
|
||||
|
||||
- This will enable the control of servos even when the vehicle is disarmed, and will constantly be applying the Trim setting to the Control Surfaces
|
||||
- You can try setting different values for the Trim and check the alignment, and then settle on the value you are happy with.
|
||||
|
||||
:::
|
||||
|
||||
#### Control surfaces that move from neutral to full deflection
|
||||
|
||||
Control surfaces that move only one direction from neutral include: airbrakes, spoilers, and flaps.
|
||||
|
||||
For these controls you should set the minimum and maximum PWM values according to the full range of the control.
|
||||
The `Disarmed` value should then match the value (of maximum or minimum) that corresponds to control being in the "neutral" position.
|
||||
For a flap, that is when the flap is fully retracted and flush with the wing.
|
||||
|
||||
One approach for setting these up is:
|
||||
|
||||
1. Set values `Disarmed` to `1500`, `Min` to `1200`, `Max` to `1700` so that the values are around the centre of the servo range.
|
||||
2. Move the corresponding slider up and check the control moves and that it is extending (moving away from the disarmed position).
|
||||
If not, click on the `Rev Range` checkbox to reverse the range.
|
||||
3. Enable slider in the disarmed position, them change the value of the `Disarmed` signal until the control is retracted/flush with wing.
|
||||
This may require that the `Disarmed` value is increased or decreased:
|
||||
- If the value was decreased towards `Min`, then set `Min` to match `Disarmed`.
|
||||
- If the value was increased towards `Max`, then set `Max` to match `Disarmed`.
|
||||
4. The value that you did _not_ set to match `Disarmed` controls the maximum amount that the control surface can extend.
|
||||
Set the slider to the top of the control, then change the value (`Max` or `Min`) so that the control surface is fully extended when the slider is at top.
|
||||
|
||||
:::info Special note for flaps
|
||||
In some vehicle builds, flaps may be configured such that both flaps are controlled from a single output.
|
||||
In this case, you need to ensure that both flaps extend/deploy when raising the corresponding slider.
|
||||
If this is not the case and one servo deploys correctly and one does not, you need to change the servo direction with a third party servo programmer.
|
||||
Alternatively, you might move the servo that is not deflecting in the correct orientation to its own servo output channel and then reverse its direction via the `Rev range` check box.
|
||||
:::
|
||||
|
||||
### Tilt Servo Setup
|
||||
|
||||
First set the _frame rate_ for the servos used in each group of outputs.
|
||||
This would normally be set to the maximum value supported by your servo.
|
||||
Below it is set to PWM50 (the most common value).
|
||||
Note, this part of the setup is the same as for control surfaces above.
|
||||
|
||||

|
||||
|
||||
For each of the tilt servos:
|
||||
|
||||
1. Set the `Disarmed` value (e.g. `1000` or `2000` for PWM Servos) so that the servo will be positioned in expected direction when _disarmed_.
|
||||
|
||||
2. Position the slider for the servo in the lowest position, and verify that a positive value increase will point towards the `Angle at Min Tilt` (defined in the Geometry section).
|
||||
|
||||

|
||||
|
||||
3. Position the slider for the servo in the highest position, and verify that positive motor thrust will point towards the `Angle at Max Tilt` (as defined in the Geometry section).
|
||||
|
||||
### Other Notes
|
||||
|
||||
- If a safety button is used, it must be pressed before actuator testing is allowed.
|
||||
- The kill-switch can still be used to stop motors immediately.
|
||||
- Servos do not actually move until the corresponding slider is changed.
|
||||
- The parameter [COM_MOT_TEST_EN](../advanced_config/parameter_reference.md#COM_MOT_TEST_EN) can be used to completely disable actuator testing.
|
||||
- On the shell, [actuator_test](../modules/modules_command.md#actuator-test) can be used as well for actuator testing.
|
||||
- VTOLs will automatically turn off motors pointing upwards during **fixed-wing flight**:
|
||||
- Standard VTOL : Motors defined as multicopter motors will be turned off
|
||||
- Tiltrotors : Motors that have no associated tilt servo will turn off
|
||||
- Tailsitters do not turn off any motors in fixed-wing flight
|
||||
|
||||
### Reversing Motors
|
||||
|
||||
The motors must turn in the direction defined in configured geometry ("**Direction CCW**" checkboxes).
|
||||
If any motors do not turn in the correct direction they must be reversed.
|
||||
|
||||
There are several options:
|
||||
|
||||
- If the ESCs are configured as [DShot](../peripherals/dshot.md) you can permanently reverse the direction via UI.
|
||||
The **Set Spin Direction** buttons are displayed below the Actuator sliders (if DShot motors are used).
|
||||
These popup a dialog in which you select the motor for which you want to apply the direction.
|
||||
|
||||

|
||||
|
||||
Note that the current direction cannot be queried, so you may need to try both options.
|
||||
|
||||
- Swap 2 of the 3 motor cables (it does not matter which ones).
|
||||
|
||||
::: info
|
||||
If motors are not connected via bullet-connectors, re-soldering is required (this is a reason, among others, to prefer DShot ESCs).
|
||||
|
||||
:::
|
||||
@@ -0,0 +1,38 @@
|
||||
# Vehicle (Frame) Selection
|
||||
|
||||
After installing firmware you need to select a [vehicle type and frame configuration](../airframes/airframe_reference.md).
|
||||
This applies appropriate initial parameter values for the selected frame, such as the vehicle type, number of motors, relative motor position, and so on.
|
||||
These can later be customised for your vehicle in [Actuator Configuration & Testing](../config/actuators.md).
|
||||
|
||||
:::tip
|
||||
Choose the frame that matches your vehicle brand and model if one exists, and otherwise select the closest "Generic" frame option matching your vehicle.
|
||||
:::
|
||||
|
||||
## Set the Frame
|
||||
|
||||
To set the airframe:
|
||||
|
||||
1. Start _QGroundControl_ and connect the vehicle.
|
||||
|
||||
2. Select **"Q" icon > Vehicle Setup > Airframe** (sidebar) to open _Airframe Setup_.
|
||||
|
||||
3. 先选择你的机架符合的大致分类,然后在下拉菜单中选择最匹配的机架类型。
|
||||
|
||||

|
||||
|
||||
The example above shows _Generic Hexarotor X geometry_ selected from the _Hexarotor X_ group.
|
||||
|
||||
4. Click **Apply and Restart**.
|
||||
Click **Apply** in the following prompt to save the settings and restart the vehicle.
|
||||
|
||||
<img src="../../assets/qgc/setup/airframe/airframe_px4_apply_prompt.jpg" width="300px" title="Apply airframe selection prompt" />
|
||||
|
||||
## Gazebo dependencies
|
||||
|
||||
[Actuator Configuration & Testing](../config/actuators.md) shows how to set the precise geometry of the vehicle motors and actuators, and their mapping to flight controller outputs.
|
||||
After mapping actuators to outputs you should perform [ESC Calibration](../advanced_config/esc_calibration.md) if using PWM or OneShot ESCs.
|
||||
|
||||
## 更多信息
|
||||
|
||||
- [QGroundControl User Guide > Airframe](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/airframe.html)
|
||||
- [PX4 Setup Video - @37s](https://youtu.be/91VGmdSlbo4?t=35s) (Youtube)
|
||||
@@ -0,0 +1,49 @@
|
||||
# Airspeed Calibration
|
||||
|
||||
:::info
|
||||
[Airspeed sensors](../sensor/airspeed.md) are highly recommended for Fixed-wing and VTOL vehicles.
|
||||
:::
|
||||
|
||||
:::warning
|
||||
Unlike most other sensor drivers, the airspeed sensor drivers are not automatically started.
|
||||
Before calibration they must be [enabled via the corresponding parameter](../advanced_config/parameters.md):
|
||||
|
||||
- Sensirion SDP3X ([SENS_EN_SDP3X](../advanced_config/parameter_reference.md#SENS_EN_SDP3X))
|
||||
- TE MS4525 ([SENS_EN_MS4525DO](../advanced_config/parameter_reference.md#SENS_EN_MS4525DO))
|
||||
- TE MS5525 ([SENS_EN_MS5525DS](../advanced_config/parameter_reference.md#SENS_EN_MS5525DS))
|
||||
- Eagle Tree airspeed sensor ([SENS_EN_ETSASPD](../advanced_config/parameter_reference.md#SENS_EN_ETSASPD))
|
||||
|
||||
:::
|
||||
|
||||
## 执行校准
|
||||
|
||||
To calibrate the airspeed sensor:
|
||||
|
||||
1. Start _QGroundControl_ and connect the vehicle.
|
||||
|
||||
2. Enable the airspeed sensors if not already done (as in _warning_ above).
|
||||
|
||||
3. Select **"Q" icon > Vehicle Setup > Sensors** (sidebar) to open _Sensor Setup_.
|
||||
|
||||
4. Click the **Airspeed** sensor button.
|
||||
|
||||

|
||||
|
||||
5. Shield the sensor from the wind (i.e. cup it with your hand).
|
||||
Take care not to block any of its holes.
|
||||
|
||||
6. Click **OK** to start the calibration.
|
||||
|
||||
7. Once asked for, blow into the tip of the pitot tube to signal the end of calibration.
|
||||
|
||||
:::tip
|
||||
Blowing into the tube is also a basic check that the dynamic and static ports are installed correctly.
|
||||
If they are swapped then the sensor will read a large negative differential pressure when you blow into the tube, and the calibration will abort with an error.
|
||||
|
||||
:::
|
||||
|
||||
8. _QGroundControl_ then tells you if the calibration was successful or not.
|
||||
|
||||
## 更多信息
|
||||
|
||||
- [QGroundControl User Guide > Sensors](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/sensors_px4.html#airspeed)
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
title: Fixed-wing Auto-Tuning
|
||||
frame: Plane
|
||||
newEditLink: en/config/_autotune.md
|
||||
---
|
||||
|
||||
<!--@include: _autotune.md-->
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
title: Multicopter Auto-Tuning
|
||||
frame: 多旋翼
|
||||
newEditLink: en/config/_autotune.md
|
||||
---
|
||||
|
||||
<!--@include: _autotune.md-->
|
||||
@@ -0,0 +1,10 @@
|
||||
# Autotuning (VTOL)
|
||||
|
||||
Auto-tuning automates the process of tuning the PX4 rate and attitude PID controllers, which are the most important controllers for stable and responsive flight (other tuning is more "optional").
|
||||
|
||||
Tuning only needs to be done once, and is recommended unless you're using a vehicle that has already been tuned by the manufacturer (and not modified since).
|
||||
|
||||
Hybrid VTOL fixed-wing vehicles ("VTOL") must be tuned following the multicopter instructions in MC mode and then the fixed-wing instructions in FW mode:
|
||||
|
||||
- [Auto-tune (Multicopter)](../config/autotune_mc.md)
|
||||
- [Auto-tune (Fixed-wing)](../config/autotune_fw.md)
|
||||
@@ -0,0 +1,232 @@
|
||||
# 电池和电源模块设置
|
||||
|
||||
该主题解释了如何进行电源设置
|
||||
|
||||
:::info
|
||||
These instructions require that the vehicle has a [Power Module (PM)](../power_module/index.md), or other hardware that can measure the battery voltage and (optionally) the current.
|
||||
:::
|
||||
|
||||
:::tip
|
||||
This tuning is not needed for [Smart/MAVLink Batteries](../smart_batteries/index.md): batteries that can supply a reliable indication of remaining charge.
|
||||
:::
|
||||
|
||||
## 综述
|
||||
|
||||
Battery Estimation Tuning uses the measured voltage and current (if available) to estimate the remaining battery capacity.
|
||||
This is important because it allows PX4 to take action when the vehicle is close to running out of power and crashing (and also to prevent battery damage due to deep-discharge).
|
||||
|
||||
PX4 提供了许多(逐渐变得更有效)可用于估计容量的方法:
|
||||
|
||||
1. [Basic Battery Settings](#basic_settings) (default): raw measured voltage is compared to the range between "empty" and "full" voltages.
|
||||
这样的估计较为粗略,因为测量的电压(及其相应的容量)将在负载下产生波动。
|
||||
2. [Voltage-based Estimation with Load Compensation](#load_compensation): Counteracts the effects of loading on the capacity calculation.
|
||||
3. [Voltage-based Estimation with Current Integration](#current_integration): Fuses the load-compensated voltage-based estimate for the available capacity with a current-based estimate of the charge that has been consumed.
|
||||
这样的容量估计相当于智能电池的容量估计。
|
||||
|
||||
后面的方法建立在前面的方法之上。
|
||||
您使用的方法将取决于机体的电源模块是否可以测量电流。
|
||||
|
||||
:::info
|
||||
The instructions below refer to battery 1 calibration parameters: `BAT1_*`.
|
||||
Other batteries use the `BATx_*` parameters, where `x` is the battery number.
|
||||
All battery calibration parameters [are listed here](../advanced_config/parameter_reference.md#battery-calibration).
|
||||
:::
|
||||
|
||||
:::tip
|
||||
In addition to PX4 configuration discussed here, you should ensure that the ESC's low voltage cutoff is either disabled or set below the expected minimum voltage.
|
||||
这确保了电池故障保护行为由 PX4 管理,并且当电池仍有电量时,ESC 不会断电(根据您选择的“空电池”设置)。
|
||||
:::
|
||||
|
||||
:::tip
|
||||
[Battery Chemistry Overview](../power_systems/battery_chemistry.md) explains the difference between the main battery types, and how that impacts the battery settings.
|
||||
:::
|
||||
|
||||
## Basic Battery Settings (default) {#basic_settings}
|
||||
|
||||
基本电池设置将PX4配置为使用默认方法进行容量估算。
|
||||
此方法将测得的原始电池电压与“空”和“满”电芯的电池电压范围进行比较(按芯数量缩放)。
|
||||
|
||||
:::info
|
||||
This approach results in relatively coarse estimations due to fluctuations in the estimated charge as the measured voltage changes under load.
|
||||
:::
|
||||
|
||||
配置电池1的基本参数:
|
||||
|
||||
1. Start _QGroundControl_ and connect the vehicle.
|
||||
2. Select **"Q" icon > Vehicle Setup > Power** (sidebar) to open _Power Setup_.
|
||||
|
||||
You are presented with the basic settings that characterize the battery.
|
||||
The sections below explain what values to set for each field.
|
||||
|
||||

|
||||
|
||||
:::info
|
||||
At time of writing _QGroundControl_ only allows you to set values for battery 1 in this view.
|
||||
For vehicles with multiple batteries you'll need to directly [set the parameters](../advanced_config/parameters.md) for battery 2 (`BAT2_*`), as described in the following sections.
|
||||
:::
|
||||
|
||||
### 电池芯数(串联)
|
||||
|
||||
This sets the number of cells connected in series in the battery.
|
||||
Typically this will be written on the battery as a number followed by "S" (e.g "3S", "5S").
|
||||
|
||||
:::info
|
||||
The voltage across a single galvanic battery cell is dependent on the [chemical properties of the battery type](../power_systems/battery_chemistry.md).
|
||||
Lithium-Polymer (LiPo) batteries and Lithium-Ion batteries both have the same _nominal_ cell voltage of 3.7V.
|
||||
In order to achieve higher voltages (which will more efficiently power a vehicle), multiple cells are connected in _series_.
|
||||
The battery voltage at the terminals is then a multiple of the cell voltage.
|
||||
:::
|
||||
|
||||
If the number of cells is not supplied you can calculate it by dividing the battery voltage by the nominal voltage for a single cell.
|
||||
The table below shows the voltage-to-cell relationship for these batteries:
|
||||
|
||||
| Cells | LiPo (V) | LiIon (V) |
|
||||
| ----- | --------------------------- | ---------------------------- |
|
||||
| 1S | 3.7 | 3.7 |
|
||||
| 2S | 7.4 | 7.4 |
|
||||
| 3S | 11.1 | 11.1 |
|
||||
| 4S | 14.8 | 14.8 |
|
||||
| 5S | 18.5 | 18.5 |
|
||||
| 6S | 22.2 | 22.2 |
|
||||
|
||||
:::info
|
||||
This setting corresponds to [parameters](../advanced_config/parameters.md): [BAT1_N_CELLS](../advanced_config/parameter_reference.md#BAT1_N_CELLS) and [BAT2_N_CELLS](../advanced_config/parameter_reference.md#BAT2_N_CELLS).
|
||||
:::
|
||||
|
||||
### Full Voltage (per cell)
|
||||
|
||||
This sets the _nominal_ maximum voltage of each cell (the lowest voltage at which the cell will be considered "full").
|
||||
|
||||
The value should be set slightly lower that the nominal maximum cell voltage for the battery, but not so low that the estimated capacity is still 100% after a few minutes of flight.
|
||||
|
||||
Appropriate values to use are:
|
||||
|
||||
- **LiPo:** 4.05V (default in _QGroundControl_)
|
||||
- **LiIon:** 4.05V
|
||||
|
||||
:::info
|
||||
The voltage of a full battery may drop a small amount over time after charging.
|
||||
Setting a slightly-lower than maximum value compensates for this drop.
|
||||
:::
|
||||
|
||||
:::info
|
||||
This setting corresponds to [parameters](../advanced_config/parameters.md): [BAT1_V_CHARGED](../advanced_config/parameter_reference.md#BAT1_V_CHARGED) and [BAT2_V_CHARGED](../advanced_config/parameter_reference.md#BAT2_V_CHARGED).
|
||||
:::
|
||||
|
||||
### 空电电压(每个电芯)
|
||||
|
||||
This sets the nominal minimum safe voltage of each cell (using below this voltage may damage the battery).
|
||||
|
||||
:::info
|
||||
There is no single value at which a battery is said to be empty.
|
||||
If you choose a value that is too low the battery may be damaged due to deep discharge (and/or the vehicle may crash).
|
||||
If you choose a value that is too high you may unnecessarily curtail your flight.
|
||||
:::
|
||||
|
||||
A rule of thumb for minimum per-cell voltages:
|
||||
|
||||
| Level | LiPo (V) | LiIon (V) |
|
||||
| ------------------------------------------------------------------- | --------------------------- | ---------------------------- |
|
||||
| Conservative (voltage under no-load) | 3.7 | 3 |
|
||||
| "Real" minimum (voltage under load/while flying) | 3.5 | 2.7 |
|
||||
| Damage battery (voltage under load) | 3.0 | 2.5 |
|
||||
|
||||
:::tip
|
||||
Below the conservative range, the sooner you recharge the battery the better - it will last longer and lose capacity slower.
|
||||
:::
|
||||
|
||||
:::info
|
||||
This setting corresponds to [parameter](../advanced_config/parameters.md): [BAT1_V_EMPTY](../advanced_config/parameter_reference.md#BAT1_V_EMPTY) and [BAT2_V_EMPTY](../advanced_config/parameter_reference.md#BAT2_V_EMPTY).
|
||||
:::
|
||||
|
||||
### Voltage Divider
|
||||
|
||||
If you have a vehicle that measures voltage through a power module and the ADC of the flight controller then you should calibrate the measurements once per power module.
|
||||
To calibrate, the actual voltage from the battery is measured (using a multimeter) and compared to the value provided by the power module.
|
||||
This is used to calculate a "voltage divider" value, which can subsequently be used to scale the power module measurement to the correct value.
|
||||
|
||||
The easiest way to perform this calibration is by using _QGroundControl_ and following the step-by-step guide on [Setup > Power Setup](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/power.html) (QGroundControl User Guide).
|
||||
|
||||
:::info
|
||||
This setting corresponds to parameters: [BAT1_V_DIV](../advanced_config/parameter_reference.md#BAT1_V_DIV) and [BAT2_V_DIV](../advanced_config/parameter_reference.md#BAT2_V_DIV).
|
||||
:::
|
||||
|
||||
### Amps per volt {#current_divider}
|
||||
|
||||
:::tip
|
||||
This calibration is not needed if your power module does not provide current measurements.
|
||||
:::
|
||||
|
||||
Current measurements are used (by default) for [Load Compensation](#load_compensation) and [Current Integration](#current_integration) if provided by the power module.
|
||||
The amps per volt divider must be calibrated to ensure an accurate current measurement.
|
||||
|
||||
The easiest way to calibrate the dividers is by using _QGroundControl_ and following the step-by-step guide on [Setup > Power Setup](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/power.html) (QGroundControl User Guide).
|
||||
|
||||
:::info
|
||||
This setting corresponds to parameter(s): [BAT1_A_PER_V](../advanced_config/parameter_reference.md#BAT1_A_PER_V) and [BAT2_A_PER_V](../advanced_config/parameter_reference.md#BAT2_A_PER_V).
|
||||
:::
|
||||
|
||||
## Voltage-based Estimation with Load Compensation {#load_compensation}
|
||||
|
||||
When a current flows through a battery, the internal resistance causes a voltage drop, reducing the measured output voltage of the battery compared to its open-circuit (no-load) voltage.
|
||||
When using the [basic configuration](#basic_settings), the measured output voltage is what is used to estimate the available capacity, which means that the battery level will appear to fluctuate when you fly up and down, or otherwise change the load on the battery.
|
||||
|
||||
_Load compensation_ uses a measured or estimated value for the internal resistance to correct for changes under load, resulting in far less variation in the estimated capacity when flying.
|
||||
This is enabled by default when using a power module that provides current measurements.
|
||||
|
||||
To use the load compensation first set the [basic configuration](#basic_settings).
|
||||
The _Empty Voltage_ ([BATn_V_EMPTY](../advanced_config/parameter_reference.md#BAT1_V_EMPTY), where `n` is the battery number) should be set higher (than without compensation) because the compensated voltage gets used for the estimation (typically set a bit below the expected rest cell voltage when empty after use).
|
||||
|
||||
You will then need to calibrate the [Amps per volt divider](#current_divider) in the basic settings screen (in order to get reliable current measurements).
|
||||
|
||||
PX4 uses current-based load compensation based on a _real-time estimate_ of the internal resistance of the battery by default (real time estimates are enabled if [BAT1_R_INTERNAL=-1](../advanced_config/parameter_reference.md#BAT1_R_INTERNAL)).
|
||||
Using a real time estimate allows the compensation to adapt to changes in the internal resistance of the battery due to temperature changes during flight, as well as over time as the battery degrades.
|
||||
|
||||
The internal resistance can also be measured and [set manually](../advanced_config/parameters.md) in [BAT1_R_INTERNAL](../advanced_config/parameter_reference.md#BAT1_R_INTERNAL).
|
||||
A positive value in this parameter will be used for the internal resistance instead of the estimated value (`0` disables load compensation altogether).
|
||||
|
||||
:::info
|
||||
There are LiPo chargers that can measure the internal resistance of your battery.
|
||||
A typical value for LiPo batteries is 5mΩ per cell but this can vary with discharge current rating, age and health of the cells.
|
||||
:::
|
||||
|
||||
## Voltage-based Estimation Fused with Current Integration {#current_integration}
|
||||
|
||||
This method is the most accurate way to measure relative battery consumption.
|
||||
If set up correctly with a healthy and fresh charged battery on every boot, then the estimation quality will be comparable to that from a smart battery (and theoretically allow for accurate remaining flight time estimation).
|
||||
|
||||
The method evaluates the remaining battery capacity by _fusing_ the voltage-based estimate for the available capacity with a current-based estimate of the charge that has been consumed.
|
||||
It requires hardware that can accurately measure current.
|
||||
|
||||
To enable this feature:
|
||||
|
||||
1. First set up accurate voltage estimation using [load compensation](#load_compensation).
|
||||
|
||||
:::tip
|
||||
Including calibrating the [Amps per volt divider](#current_divider) setting.
|
||||
|
||||
:::
|
||||
|
||||
2. Set the parameter [BAT1_CAPACITY](../advanced_config/parameter_reference.md#BAT1_CAPACITY) to around 90% of the advertised battery capacity (usually printed on the battery label).
|
||||
|
||||
::: info
|
||||
Do not set this value too high as this may result in a poor estimation or sudden drops in estimated capacity.
|
||||
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
**Additional information**
|
||||
|
||||
The estimate of the charge that has been consumed over time is produced by mathematically integrating the measured current (this approach provides very accurate energy consumption estimates).
|
||||
|
||||
At system startup PX4 first uses a voltage-based estimate to determine the initial battery charge. This estimate is then fused with the value from current integration to provide a combined better estimate.
|
||||
The relative value placed on each estimate in the fused result depends on the battery state.
|
||||
The emptier the battery gets, the more of the voltage based estimate gets fused in. This prevents deep discharge (e.g. because it was configured with the wrong capacity or the start value was wrong).
|
||||
|
||||
If you always start with a healthy full battery, this approach is similar to that used by a smart battery.
|
||||
|
||||
:::info
|
||||
Current integration cannot be used on its own (without voltage-based estimation) because it has no way to determine the _initial_ capacity.
|
||||
Voltage-estimation allows you to estimate the initial capacity and provides ongoing feedback of possible errors (e.g. if the battery is faulty, or if there is a mismatch between capacity calculated using different methods).
|
||||
:::
|
||||
@@ -0,0 +1,142 @@
|
||||
# 罗盘校准
|
||||
|
||||
This process calibrates and configures all [magnetometers](../gps_compass/index.md).
|
||||
_QGroundControl_ will guide you to position the vehicle in a number of set orientations and rotate the vehicle about the specified axis.
|
||||
|
||||
:::info
|
||||
It also auto-detects the compass orientation for external magnetometers ([by default](../advanced_config/parameter_reference.md#SENS_MAG_AUTOROT)).
|
||||
If you have [mounted the compass](../assembly/mount_gps_compass.md#compass-orientation) at a non-standard angle you will need to [manually set the compass orientation](../config/flight_controller_orientation.md#setting-the-compass-orientation) before calibrating.
|
||||
:::
|
||||
|
||||
## 综述
|
||||
|
||||
You will need to calibrate your compass(es) when you first setup your vehicle, and you may need to recalibrate it if the vehicles is ever exposed to a very strong magnetic field, or if it is used in an area with abnormal magnetic characteristics.
|
||||
|
||||
:::tip
|
||||
Indications of a poor compass calibration include multicopter circling during hover, toilet bowling (circling at increasing radius/spiraling-out, usually constant altitude, leading to fly-way), or veering off-path when attempting to fly straight.
|
||||
_QGroundControl_ should also notify the error `mag sensors inconsistent`.
|
||||
:::
|
||||
|
||||
The process calibrates all compasses and autodetects the orientation of any external compasses.
|
||||
If any external magnetometers are available, it then disables the internal magnetometers (these are primarily needed for automatic rotation detection of external magnetometers).
|
||||
|
||||
Several types of compass calibration are available:
|
||||
|
||||
1. [Complete](#complete-calibration): This calibration is required after installing the autopilot on an airframe for the first time or when the configuration of the vehicle has changed significantly.
|
||||
It compensates for hard and soft iron effects by estimating an offset and a scale factor for each axis.
|
||||
2. [Partial](#partial-quick-calibration): This calibration can be performed as a routine when preparing the vehicle for a flight, after changing the payload, or simply when the compass rose seems inaccurate.
|
||||
This type of calibration only estimates the offsets to compensate for a hard iron effect.
|
||||
3. [Large vehicle](#large-vehicle-calibration): This calibration can be performed when the vehicle is too large or heavy to perform a complete calibration. This type of calibration only estimates the offsets to compensate for a hard iron effect.
|
||||
|
||||
## 执行校准
|
||||
|
||||
### 操作前提
|
||||
|
||||
Before starting the calibration:
|
||||
|
||||
1. Choose a location away from large metal objects or magnetic fields.
|
||||
:::tip
|
||||
Metal is not always obvious! Avoid calibrating on top of an office table (often contain metal bars) or next to a vehicle.
|
||||
Calibration can even be affected if you're standing on a slab of concrete with uneven distribution of re-bar.
|
||||
|
||||
:::
|
||||
2. Connect via telemetry radio rather than USB if at all possible.
|
||||
USB can potentially cause significant magnetic interference.
|
||||
3. If using an external compass (or a combined GPS/compass module), make sure it is [mounted](../assembly/mount_gps_compass.md) as far as possible from other electronics in order to reduce magnetic interference, and in a _supported orientation_.
|
||||
|
||||
### Complete Calibration
|
||||
|
||||
The calibration steps are:
|
||||
|
||||
1. Start _QGroundControl_ and connect the vehicle.
|
||||
|
||||
2. Select **"Q" icon > Vehicle Setup > Sensors** (sidebar) to open _Sensor Setup_.
|
||||
|
||||
3. Click the **Compass** sensor button.
|
||||
|
||||

|
||||
|
||||
::: info
|
||||
You should already have set the [Autopilot Orientation](../config/flight_controller_orientation.md). If not, you can also set it here.
|
||||
|
||||
:::
|
||||
|
||||
4. Click **OK** to start the calibration.
|
||||
|
||||
5. 把你的飞机放置在下面显示的某一个方向,并保持静止。 随后提示(方向图像变为黄色)在指定方向旋转飞行器。 该位置标定完成后,屏幕上的相应图示将变成绿色。
|
||||
|
||||

|
||||
|
||||
6. 在机体的所有方向上重复校准步骤。
|
||||
|
||||
Once you've calibrated the vehicle in all the positions _QGroundControl_ will display _Calibration complete_ (all orientation images will be displayed in green and the progress bar will fill completely). You can then proceed to the next sensor.
|
||||
|
||||
### Partial "Quick" Calibration
|
||||
|
||||
This calibration is similar to the well-known figure-8 compass calibration done on a smartphone:
|
||||
|
||||
1. Hold the vehicle in front of you and randomly perform partial rotations on all its axes.
|
||||
2-3 oscillations of ~30 degrees in every direction is usually sufficient.
|
||||
2. Wait for the heading estimate to stabilize and verify that the compass rose is pointing to the correct direction (this can take a couple of seconds).
|
||||
|
||||
备注:
|
||||
|
||||
- There is no start/stop for this type of calibration (the algorithm runs continuously when the vehicle is disarmed).
|
||||
- The calibration is immediately applied to the data (no reboot is required) but is saved to the calibration parameters after disarming the vehicle only (the calibration is lost if no arming/disarming sequence is performed between calibration and shutdown).
|
||||
- The amplitude and the speed of the partial rotations done in step 1 can affect the calibration quality.
|
||||
Following the advice above is usually enough.
|
||||
|
||||
### Large Vehicle Calibration
|
||||
|
||||
<Badge type="tip" text="PX4 v1.15" />
|
||||
|
||||
This calibration process leverages external knowledge of vehicle's orientation and location, and a World Magnetic Model (WMM) to calibrate the hard iron biases.
|
||||
|
||||
1. Ensure GNSS Fix. This is required to find the expected Earth magnetic field in WMM tables.
|
||||
2. Align the vehicle to face True North.
|
||||
Be as accurate as possible for best results.
|
||||
3. Open the [QGroundControl MAVLink Console](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/mavlink_console.html) and send the following command:
|
||||
|
||||
```sh
|
||||
commander calibrate mag quick
|
||||
```
|
||||
|
||||
备注:
|
||||
|
||||
- This method is specifically designed for vehicles where full rotation is impractical or impossible.
|
||||
If full rotation is possible, use the [complete calibration](#complete-calibration) instead.
|
||||
- The vehicle doesn't need to be exactly levelled as this is automatically compensated using the tilt estimate.
|
||||
- This calibration can also be triggered using the MAVLink command [MAV_CMD_FIXED_MAG_CAL_YAW](https://mavlink.io/en/messages/common.html#MAV_CMD_FIXED_MAG_CAL_YAW).
|
||||
|
||||
## 验证
|
||||
|
||||
After the calibration is complete, check that the heading indicator and the heading of the arrow on the map are stable and match the orientation of the vehicle when turning it e.g. to the cardinal directions.
|
||||
|
||||
## Additional Calibration/Configuration
|
||||
|
||||
The process above will autodetect, [set default rotations](../advanced_config/parameter_reference.md#SENS_MAG_AUTOROT), calibrate, and prioritise, all available magnetometers.
|
||||
If external magnetometers are available, internal magnetometers are disabled.
|
||||
|
||||
Further compass configuration should generally not be required.
|
||||
|
||||
### Enable/Disable a Compass
|
||||
|
||||
While no further configuration should be _required_, developers who wish to disable/enable compasses for any reason, such as testing, can do so using the compass parameters.
|
||||
These are prefixed with [CAL_MAGx_](../advanced_config/parameter_reference.md#CAL_MAG0_ID) (where `x=0-3`):
|
||||
|
||||
- [CAL_MAGn_ROT](../advanced_config/parameter_reference.md#CAL_MAG0_ROT) can be used to determine which compasses are internal.
|
||||
A compass is internal if `CAL_MAGn_ROT==1`.
|
||||
- [CAL_MAGx_PRIO](../advanced_config/parameter_reference.md#CAL_MAG0_PRIO) sets the relative compass priority and can be used to disable a compass.
|
||||
|
||||
## 调试
|
||||
|
||||
Raw comparison data for magnetometers (in fact, for all sensors) can be logged by setting [SDLOG_MODE=1](../advanced_config/parameter_reference.md#SDLOG_MODE) and [SDLOG_PROFILE=64](../advanced_config/parameter_reference.md#SDLOG_PROFILE).
|
||||
See [Logging](../dev_log/logging.md) for more information.
|
||||
|
||||
## 更多信息
|
||||
|
||||
- [Peripherals > GPS & Compass](../gps_compass/index.md)
|
||||
- [Basic Assembly](../assembly/index.md) (setup guides for each flight controller)
|
||||
- [Compass Power Compensation](../advanced_config/compass_power_compensation.md) (Advanced Configuration)
|
||||
- [QGroundControl User Guide > Sensors](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/sensors_px4.html#compass)
|
||||
- [PX4 Setup Video - @2m38s](https://youtu.be/91VGmdSlbo4?t=2m38s) (Youtube)
|
||||
@@ -0,0 +1,87 @@
|
||||
# 加载固件
|
||||
|
||||
_QGroundControl_ **desktop** versions can be used to install PX4 firmware onto [Pixhawk-series](../getting_started/flight_controller_selection.md) flight-controller boards.
|
||||
|
||||
:::warning
|
||||
**Before you start installing Firmware** all USB connections to the vehicle must be _disconnected_ (both direct or through a telemetry radio).
|
||||
The vehicle must _not be_ powered by a battery.
|
||||
:::
|
||||
|
||||
## 安装稳定的PX4版本
|
||||
|
||||
Generally you should use the most recent _released_ version of PX4, in order to benefit from bug fixes and get the latest and greatest features.
|
||||
|
||||
:::tip
|
||||
This is the version that is installed by default.
|
||||
:::
|
||||
|
||||
To install PX4:
|
||||
|
||||
1. Start _QGroundControl_ and connect the vehicle.
|
||||
|
||||
2. Select **"Q" icon > Vehicle Setup > Firmware** (sidebar) to open _Firmware Setup_.
|
||||
|
||||

|
||||
|
||||
3. Connect the flight controller directly to your computer via USB.
|
||||
|
||||
::: info
|
||||
Connect directly to a powered USB port on your machine (do not connect through a USB hub).
|
||||
|
||||
:::
|
||||
|
||||
4. Select the **PX4 Pro Stable Release vX.x.x** option to install the latest stable version of PX4 _for your flight controller_ (autodetected).
|
||||
|
||||

|
||||
|
||||
5. Click the **OK** button to start the update.
|
||||
|
||||
The firmware will then proceed through a number of upgrade steps (downloading new firmware, erasing old firmware etc.).
|
||||
Each step is printed to the screen and overall progress is displayed on a progress bar.
|
||||
|
||||

|
||||
|
||||
Once the firmware has completed loading, the device/vehicle will reboot and reconnect.
|
||||
|
||||
:::tip
|
||||
If _QGroundControl_ installs the FMUv2 target (see console during installation) and you have a newer board, you may need to [update the bootloader](#bootloader) in order to access all the memory on your flight controller.
|
||||
|
||||
:::
|
||||
|
||||
Next you will need to specify the [vehicle airframe](../config/airframe.md) (and then sensors, radio, etc.)
|
||||
|
||||
<a id="custom"></a>
|
||||
|
||||
## 安装PX4 Main, Beta或自定义固件
|
||||
|
||||
To install a different version of PX4:
|
||||
|
||||
1. Connect the vehicle as above, and select **PX4 Pro Stable Release vX.x.x**.
|
||||

|
||||
2. Check **Advanced settings** and select the version from the dropdown list:
|
||||
- **Standard Version (stable):** The default version (i.e. no need to use advanced settings to install this!)
|
||||
- **Beta Testing (beta):** A beta/candidate release.
|
||||
只有当新版本准备完毕时才可用。
|
||||
- **Developer Build (master):** The latest build of PX4/PX4-Autopilot _main_ branch.
|
||||
- **Custom Firmware file...:** A custom firmware file (e.g. [that you have built locally](../dev_setup/building_px4.md)).
|
||||
如果选择 Custom firmware file ,您需要在下一步中从文件系统中选择自定义固件。
|
||||
|
||||
Firmware update then continues as before.
|
||||
|
||||
<a id="bootloader"></a>
|
||||
|
||||
## Bootloader 更新
|
||||
|
||||
硬件通常预先安装匹配版本的引导程序。
|
||||
|
||||
您可能需要更新的是安装较新的 Pixhawk 板FMUv2 固件 。
|
||||
If _QGroundControl_ installs the FMUv2 target (see console during installation), and you have a newer board, you may need to update the bootloader in order to access all the memory on your flight controller.
|
||||
|
||||

|
||||
|
||||
You can update it by following the instructions in [Bootloader update > FMUv2 Bootloader Update](../advanced_config/bootloader_update.md#fmuv2-bootloader-update).
|
||||
|
||||
## 更多信息
|
||||
|
||||
- [QGroundControl User Guide > Firmware](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/firmware.html).
|
||||
- [PX4 Setup Video](https://youtu.be/91VGmdSlbo4) (Youtube)
|
||||
@@ -0,0 +1,66 @@
|
||||
# 飞行控制器/传感器方向
|
||||
|
||||
默认的飞行器(如果具有外部罗盘)应该向上安装在机架上部,箭头朝向飞行器的前方。
|
||||
如果板载或外部罗盘被安装在其他方向,您需要在固件中配置。
|
||||
|
||||
## 计算朝向
|
||||
|
||||
ROLL, PITCH and/or YAW offsets of the flight controller are calculated relative to the vehicle around the forward (x), right (y), down (z) axes.
|
||||
|
||||

|
||||
|
||||
The axes to rotate around stay the same from one rotation step to the next one.
|
||||
So the frame to perform the rotation in stays fixed.
|
||||
This is also known as _extrinsic rotation_.
|
||||
|
||||

|
||||
|
||||
For example, the vehicles shown below have rotations around the z-axis (i.e. yaw only) corresponding to: `ROTATION_NONE`, `ROTATION_YAW_90`,`ROTATION_YAW_180`,`ROTATION_YAW_270`.
|
||||
|
||||

|
||||
|
||||
:::info
|
||||
For a VTOL Tailsitter airframe set the vehicle orientation according to its multirotor configuration (i.e. relative to the vehicle during, takeoff, hovering, landing) for all sensor calibrations.
|
||||
|
||||
The axis are normally relative to the orientation of the vehicle during steady forward flight.
|
||||
For more information see [Basic Concepts](../getting_started/px4_basic_concepts.md#heading-and-directions).
|
||||
:::
|
||||
|
||||
## 设置朝向
|
||||
|
||||
To set the orientations:
|
||||
|
||||
1. Start _QGroundControl_ and connect the vehicle.
|
||||
|
||||
2. Select **"Q" icon > Vehicle Setup > Sensors** (sidebar) to open _Sensor Setup_.
|
||||
|
||||
3. Select the **Orientations** button.
|
||||
|
||||

|
||||
|
||||
4. Select the **AutoPilot Orientation** (as [calculated above](#calculating-orientation)).
|
||||
|
||||

|
||||
|
||||
5. Press **OK**.
|
||||
|
||||
:::info
|
||||
You can use [Level Horizon Calibration](../config/level_horizon_calibration.md) to compensate for small miss-alignments in controller orientation and to level the horizon in flight view.
|
||||
:::
|
||||
|
||||
## 优化调整
|
||||
|
||||
PX4 will automatically detect the compass orientation as part of [compass calibration](../config/compass.md) ([by default](../advanced_config/parameter_reference.md#SENS_MAG_AUTOROT)) for any of the [standard MAVLink orientations](https://mavlink.io/en/messages/common.html#MAV_SENSOR_ORIENTATION) (upright and facing forward, or any multiple of 45° offset in any axis) .
|
||||
|
||||
:::info
|
||||
You can confirm that auto detection worked by looking at the [CAL_MAGn_ROT](../advanced_config/parameter_reference.md#CAL_MAG0_ROT) parameters.
|
||||
:::
|
||||
|
||||
If a non-standard orientation has been used you will need to set the [CAL_MAGx_ROLL](../advanced_config/parameter_reference.md#CAL_MAG0_ROLL), [CAL_MAGx_PITCH](../advanced_config/parameter_reference.md#CAL_MAG0_PITCH), and [CAL_MAGx_YAW](../advanced_config/parameter_reference.md#CAL_MAG0_YAW) parameters for each compass to the angles that were used.
|
||||
|
||||
This will automatically set [CAL_MAGn_ROT](../advanced_config/parameter_reference.md#CAL_MAG0_ROT) to "custom euler angle" and prevents automatic calibration for the selected compass (even if [SENS_MAG_AUTOROT](../advanced_config/parameter_reference.md#SENS_MAG_AUTOROT) is set).
|
||||
|
||||
## 更多信息
|
||||
|
||||
- [Advanced Orientation Tuning](../advanced_config/advanced_flight_controller_orientation_leveling.md) (advanced users only).
|
||||
- [QGroundControl User Guide > Sensors](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/sensors_px4.html#flight_controller_orientation)
|
||||
@@ -0,0 +1,117 @@
|
||||
# 飞行模式有关配置
|
||||
|
||||
This topic explains how to map [flight modes](../getting_started/px4_basic_concepts.md#flight-modes) and other functions to the switches on your radio control transmitter.
|
||||
|
||||
:::tip
|
||||
In order to set up flight modes you must already have:
|
||||
|
||||
- [Configured your radio](../config/radio.md)
|
||||
- [Setup your transmitter](#rc-transmitter-setup) to encode the physical positions of your mode switch(es) into a single channel.
|
||||
We provide examples for the popular _Taranis_ transmitter [below](#taranis-setup-3-way-switch-configuration-for-single-channel-mode) (check your documentation if you use a different transmitter).
|
||||
|
||||
:::
|
||||
|
||||
## What Flight Modes and Switches Should I Set?
|
||||
|
||||
Flight Modes provide different types of _autopilot-assisted flight_, and _fully autonomous flight_.
|
||||
You can set any (or none) of the flight modes [available to your vehicle](../flight_modes/index.md#flight-modes).
|
||||
|
||||
Most users should set the following modes and functions, as these make the vehicle easier and safer to fly:
|
||||
|
||||
- **Position mode** — Easiest and safest mode for manual flight.
|
||||
- **Return mode** — Return to launch position by safe path and land.
|
||||
- (VTOL only) **VTOL Transition Switch** — Toggle between fixed-wing and multicopter flight configuration on VTOL vehicles.
|
||||
|
||||
It is also common to map switches to:
|
||||
|
||||
- **Mission mode** — This mode runs a pre-programmed mission sent by the ground control station.
|
||||
- <a id="kill_switch"></a> [Kill Switch](../config/safety.md#kill-switch) - Immediately stops all motor outputs (the vehicle will crash, which may in some circumstances be more desirable than allowing it to continue flying).
|
||||
|
||||
## Flight Mode Selection
|
||||
|
||||
PX4 allows you to specify a "mode" channel and select up to 6 flight modes that will be activated based on the PWM value of the channel.
|
||||
You can also separately specify channels for mapping a kill switch, return to launch mode, and offboard mode.
|
||||
|
||||
To configure single-channel flight mode selection:
|
||||
|
||||
1. Start _QGroundControl_ and connect the vehicle.
|
||||
|
||||
2. 打开您的 RC 遥控器发射机。
|
||||
|
||||
3. Select **"Q" icon > Vehicle Setup > Flight Modes** (sidebar) to open _Flight Modes Setup_.
|
||||
|
||||

|
||||
|
||||
4. Specify _Flight Mode Settings_:
|
||||
- Select the **Mode channel** (above this shown as Channel 5, but this will depend on your transmitter configuration).
|
||||
- Move the transmitter switch (or switches) that you have set up for mode selection through the available positions.
|
||||
The mode slot matching your current switch position will be highlighted (above this is _Flight Mode 1_).
|
||||
::: info
|
||||
While you can set flight modes in any of the 6 slots, only the channels that are mapped to switch positions will be highlighted/used.
|
||||
|
||||
:::
|
||||
- Select the flight mode that you want triggered for each switch position.
|
||||
|
||||
5. Specify _Switch Settings_:
|
||||
- Select the channels that you want to map to specific actions - e.g.: _Return_ mode, _Kill switch_, _offboard_ mode, etc. (if you have spare switches and channels on your transmitter).
|
||||
|
||||
6. Test that the modes are mapped to the right transmitter switches:
|
||||
- Check the _Channel Monitor_ to confirm that the expected channel is changed by each switch.
|
||||
- Select each mode switch on your transmitter in turn, and check that the desired flight mode is activated (the text turns yellow on _QGroundControl_ for the active mode).
|
||||
|
||||
All values are automatically saved as they are changed.
|
||||
|
||||
## RC Transmitter Setup
|
||||
|
||||
This section contains a small number of possible setup configurations for taranis.
|
||||
QGroundControl _may_ have [setup information for other transmitters here](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/flight_modes.html#transmitter-setup).
|
||||
|
||||
<a id="taranis_setup"></a>
|
||||
|
||||
### Taranis Setup: 3-way Switch Configuration for Single-Channel Mode
|
||||
|
||||
If you only need to support selecting between two or three modes then you can map the modes to the positions of a single 3-way switch.
|
||||
Below we show how to map the Taranis 3-way "SD" switch to channel 5.
|
||||
|
||||
:::info
|
||||
This example shows how to set up the popular _FrSky Taranis_ transmitter.
|
||||
Transmitter setup will be different on other transmitters.
|
||||
:::
|
||||
|
||||
Open the Taranis UI **MIXER** page and scroll down to **CH5**, as shown below:
|
||||
|
||||

|
||||
|
||||
Press **ENT(ER)** to edit the **CH5** configuration then change the **Source** to be the _SD_ button.
|
||||
|
||||

|
||||
|
||||
设置完成!
|
||||
Channel 5 will now output 3 different PWM values for the three different **SD** switch positions.
|
||||
|
||||
The _QGroundControl_ configuration is then as described in the previous section.
|
||||
|
||||
### Taranis Setup: Multi-Switch Configuration for Single-Channel Mode
|
||||
|
||||
Most transmitters do not have 6-way switches, so if you need to be able to support more modes than the number of switch positions available (up to 6) then you will have to represent them using multiple switches.
|
||||
Commonly this is done by encoding the positions of a 2- and a 3-position switch into a single channel, so that each switch position results in a different PWM value.
|
||||
|
||||
On the FrSky Taranis this process involves assigning a "logical switch" to each combination of positions of the two real switches.
|
||||
Each logical switch is then assigned to a different PWM value on the same channel.
|
||||
|
||||
The video below shows how this is done with the _FrSky Taranis_ transmitter.
|
||||
|
||||
<!-- [youtube](https://youtu.be/scqO7vbH2jo) Video has gone private and is no longer available -->
|
||||
|
||||
<!-- @[youtube](https://youtu.be/BNzeVGD8IZI?t=427) - video showing how to set the QGC side - at about 7mins and 3 secs -->
|
||||
|
||||
<lite-youtube videoid="TFEjEQZqdVA" title="Taranis Mode Switches"/>
|
||||
|
||||
The _QGroundControl_ configuration is then [as described above](#flight-mode-selection).
|
||||
|
||||
## 更多信息
|
||||
|
||||
- [Flight Modes Overview](../flight_modes/index.md)
|
||||
- [QGroundControl > Flight Modes](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/flight_modes.html#px4-pro-flight-mode-setup)
|
||||
- [PX4 Setup Video - @6m53s](https://youtu.be/91VGmdSlbo4?t=6m53s) (Youtube)
|
||||
- [Radio switch parameters](../advanced_config/parameter_reference.md#radio-switches) - Can be used to set mappings via parameters
|
||||
@@ -0,0 +1,34 @@
|
||||
# Gyroscope Calibration
|
||||
|
||||
_QGroundControl_ will guide you to place the vehicle on a flat surface and keep it still.
|
||||
|
||||
## 执行校准
|
||||
|
||||
The calibration steps are:
|
||||
|
||||
1. Start _QGroundControl_ and connect the vehicle.
|
||||
|
||||
2. Select **"Q" icon > Vehicle Setup > Sensors** (sidebar) to open _Sensor Setup_.
|
||||
|
||||
3. Click the **Gyroscope** sensor button.
|
||||
|
||||

|
||||
|
||||
4. Place the vehicle on a surface and leave it still.
|
||||
|
||||
5. Click **Ok** to start the calibration.
|
||||
|
||||
The bar at the top shows the progress:
|
||||
|
||||

|
||||
|
||||
6. When finished, _QGroundControl_ will display a progress bar _Calibration complete_
|
||||

|
||||
|
||||
:::info
|
||||
If you move the vehicle _QGroundControl_ will automatically restart the gyroscope calibration.
|
||||
:::
|
||||
|
||||
## 更多信息
|
||||
|
||||
- [QGroundControl User Guide > Gyroscope](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/sensors_px4.html#gyroscope)
|
||||
@@ -0,0 +1,84 @@
|
||||
# 标准配置
|
||||
|
||||
This section covers the common software configuration and calibration needed for most PX4 vehicles.
|
||||
|
||||
You must first [load firmware and select your vehicle frame/type](#firmware-vehicle-selection).
|
||||
Most other steps can be done out of order, except for [tuning](#tuning), which must be done last.
|
||||
|
||||
## 操作前提
|
||||
|
||||
Before starting you should [Download QGroundControl](http://qgroundcontrol.com/downloads/) and install it on your **desktop** computer.
|
||||
Then open the QGC application menu ("Q" icon in the top-left corner) and choose **Vehicle Setup** in the _Select Tool_ popup:
|
||||
|
||||

|
||||
|
||||
## Configuration Steps
|
||||
|
||||
### Firmware/Vehicle Selection
|
||||
|
||||
- [Loading Firmware](../config/firmware.md)
|
||||
- [Vehicle (Frame) Selection](../config/airframe.md)
|
||||
|
||||
### Motor/Actuator Setup
|
||||
|
||||
- [ESC Calibration](../advanced_config/esc_calibration.md)
|
||||
- [Actuator Configuration and Testing](../config/actuators.md)
|
||||
|
||||
### Sensor Calibration
|
||||
|
||||
- [Sensor Orientation](../config/flight_controller_orientation.md)
|
||||
- [Magnetometer (Compass)](../config/compass.md)
|
||||
- [Gyroscope](../config/gyroscope.md)
|
||||
- [Accelerometer](../config/accelerometer.md)
|
||||
- [Level Horizon](../config/level_horizon_calibration.md)
|
||||
- [Airspeed](../config/airspeed.md) (Fixed-wing/VTOL only)
|
||||
|
||||
:::info
|
||||
Setup for these and other sensors is located in [Sensor Hardware & Setup](../sensor/index.md).
|
||||
:::
|
||||
|
||||
### 手动控制设置
|
||||
|
||||
Radio Control:
|
||||
|
||||
- [Radio Controller (RC) Setup](../config/radio.md)
|
||||
- [Flight Mode Configuration](../config/flight_mode.md)
|
||||
|
||||
Joystick/GamePad:
|
||||
|
||||
- [Joystick Setup](../config/joystick.md)
|
||||
|
||||
### 安全配置
|
||||
|
||||
- [Battery Estimation Tuning](../config/battery.md) (requires [Power Module](../power_module/index.md))
|
||||
- [Safety Configuration (Failsafes)](../config/safety.md)
|
||||
|
||||
### 调试
|
||||
|
||||
Auto-tuning is supported, and recommended, on the following frames:
|
||||
|
||||
- [Autotune (Multicopter)](../config/autotune_mc.md)
|
||||
- [Autotune (Fixed Wing)](../config/autotune_fw.md)
|
||||
- [Autotune (VTOL)](../config/autotune_vtol.md)
|
||||
|
||||
## 一键安装脚本
|
||||
|
||||
The video below shows most of the calibration process (it uses an older version of _QGroundControl_, but most of the process is unchanged).
|
||||
|
||||
<lite-youtube videoid="91VGmdSlbo4" title="PX4 Autopilot Setup Tutorial Preview"/>
|
||||
|
||||
## 技术支持
|
||||
|
||||
If you need help with the configuration you can ask for help on the [QGroundControl Support forum](https://discuss.px4.io//c/qgroundcontrol/qgroundcontrol-usage).
|
||||
|
||||
## See Also
|
||||
|
||||
- [QGroundControl > Setup](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/setup_view.html)
|
||||
- [飞控外设](../peripherals/index.md) - 设置特定传感器、可选传感器、执行器等。
|
||||
- [Advanced Configuration](../advanced_config/index.md) - Factory/OEM calibration, configuring advanced features, less-common configuration.
|
||||
- Vehicle-Centric Config/Tuning:
|
||||
|
||||
- [多旋翼配置/调参](../config_mc/index.md)
|
||||
- [直升机配置/调参](../config_heli/index.md)
|
||||
- [固定翼配置/调参](../config_fw/index.md)
|
||||
- [VTOL 配置/调参](../config_vtol/index.md)
|
||||
@@ -0,0 +1,30 @@
|
||||
# 操纵杆设置
|
||||
|
||||
A [computer joystick](https://en.wikipedia.org/wiki/Joystick) or gamepad connected through _QGroundControl_ can be used to manually control the vehicle (_instead_ of using an [RC Transmitter](../config/radio.md)).
|
||||
|
||||
This approach may be used by manual control units that have an integrated ground control station (like the _UAVComponents_ [MicroNav](https://uxvtechnologies.com/ground-control-stations/micronav/) shown below).
|
||||
Joysticks are also commonly used to allow developers to fly the vehicle in simulation.
|
||||
|
||||

|
||||
|
||||
:::tip
|
||||
[Radio Setup](../config/radio.md) is not required if using only a joystick (because a joystick is not an RC controller)!
|
||||
:::
|
||||
|
||||
:::info
|
||||
_QGroundControl_ uses the cross-platform [SDL2](http://www.libsdl.org/index.php) library to convert joystick movements to MAVLink [MANUAL_CONTROL](https://mavlink.io/en/messages/common.html#MANUAL_CONTROL) messages, which are then sent to PX4 over the telemetry channel.
|
||||
In consequence, a joystick-based controller system requires a reliable high bandwidth telemetry channel to ensure that the vehicle is responsive to joystick movements.
|
||||
:::
|
||||
|
||||
## Enabling PX4 Joystick Support
|
||||
|
||||
Information about how to set up a joystick is covered in: [QGroundControl > Joystick Setup](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/joystick.html).
|
||||
|
||||
总结:
|
||||
|
||||
- Open _QGroundControl_
|
||||
- Set the parameter [COM_RC_IN_MODE=1](../advanced_config/parameter_reference.md#COM_RC_IN_MODE) - `Joystick`
|
||||
- See [Parameters](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/parameters.html) for information about setting parameters
|
||||
- Setting the parameter to `2` or `3` also enables Joystick under some circumstances.
|
||||
- Connect the joystick
|
||||
- Configure the connected joystick in: **Vehicle Setup > Joystick**.
|
||||
@@ -0,0 +1,41 @@
|
||||
# 水平平面校准
|
||||
|
||||
You can use _Level Horizon Calibration_ to compensate for small misalignments in controller orientation and to level the horizon in the _QGroundControl_ flight view (blue on top and green on bottom).
|
||||
|
||||
:::tip
|
||||
Performing this calibration step is only recommended if the autopilot's orientation is visibly misaligned with the specified orientation, or if there is a constant drift during flight in not position-controlled flight modes.
|
||||
:::
|
||||
|
||||
## 执行校准
|
||||
|
||||
To level the horizon:
|
||||
|
||||
1. Start _QGroundControl_ and connect the vehicle.
|
||||
|
||||
2. Select the **Gear** icon (Vehicle Setup) in the top toolbar and then **Sensors** in the sidebar.
|
||||
|
||||
3. Click the **Level Horizon** button.
|
||||

|
||||
::: info
|
||||
You should already have set the [Autopilot Orientation](../config/flight_controller_orientation.md). If not, you can also set it here.
|
||||
|
||||
:::
|
||||
|
||||
4. Place the vehicle in its level flight orientation on a level surface:
|
||||
|
||||
- For planes this is the position during level flight (planes tend to have their wings slightly pitched up!)
|
||||
- For copters this is the hover position.
|
||||
|
||||
5. Press **OK** to start the calibration process.
|
||||
|
||||
6. Wait until the calibration process is finished.
|
||||
|
||||
## 验证
|
||||
|
||||
Check that the artificial horizon displayed in the flight view has the indicator in the middle when the vehicle is placed on a level surface.
|
||||
|
||||
## 更多信息
|
||||
|
||||
- [Advanced Orientation Tuning](../advanced_config/advanced_flight_controller_orientation_leveling.md) (advanced users only).
|
||||
- [QGroundControl User Guide > Sensors](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/sensors_px4.html#level-horizon)
|
||||
- [PX4 Setup Video "Gyroscope" - @1m14s](https://youtu.be/91VGmdSlbo4?t=1m14s) (Youtube)
|
||||
@@ -0,0 +1,10 @@
|
||||
# Operations
|
||||
|
||||
This section contains topics related to using PX4 vehicles that are largely independent of the vehicle type:
|
||||
|
||||
- [Safety](../config/safety_intro.md)
|
||||
- [Flying](../flying/index.md)
|
||||
- [Missions](../flying/missions.md)
|
||||
- [Flight Reporting](../getting_started/flight_reporting.md)
|
||||
- [Flight Log Analysis](../log/flight_log_analysis.md)
|
||||
- [Vehicle Status Notifications](../getting_started/vehicle_status.md)
|
||||
@@ -0,0 +1,175 @@
|
||||
# 无线电控制(遥控)设置
|
||||
|
||||
The _Radio Setup_ screen is used to configure the mapping of your RC controller's main attitude control sticks (roll, pitch, yaw, throttle) to channels, and to calibrate the minimum, maximum, trim and reverse settings for all other transmitter controls/RC channels.
|
||||
|
||||
:::info
|
||||
A [Joystick](../config/joystick.md) can be used instead of RC for manual control.
|
||||
The [COM_RC_IN_MODE](../advanced_config/parameter_reference.md#COM_RC_IN_MODE) parameter [can be set](../advanced_config/parameters.md) to define what kind of manual controller(s) are enabled.
|
||||
:::
|
||||
|
||||
## 绑定接收机
|
||||
|
||||
在你校准遥控器之前,遥控器的发射机和接收机需要绑定(对频)。
|
||||
发射机和接收机对频的方法各有不同(请参照您使用的遥控器的说明书)
|
||||
提醒:如果您使用的是 Spektrum 的接收机,
|
||||
提醒:如果您使用的是 FrSky 的接收机,您可以在发射机上进行绑定(对频),下面是介绍。
|
||||
|
||||
:::info
|
||||
If you are using a _Spektrum_ receiver, you can put it into bind mode using _QGroundControl_, as [shown below](#spectrum-bind).
|
||||
:::
|
||||
|
||||
:::info
|
||||
If you are using a _FrSky_ receiver, you can bind it with its transmitter, by following instructions [here](https://www.youtube.com/watch?v=1IYg5mQdLVI).
|
||||
:::
|
||||
|
||||
## RC Loss Detection
|
||||
|
||||
PX4 needs to be able to detect when the signal from the RC controller has been lost in order to be able to take [appropriate safety measures](../config/safety.md#manual-control-loss-failsafe).
|
||||
|
||||
遥控器接收器有不同方式指示信号损失:
|
||||
|
||||
- 无输出(由PX4自动检测)
|
||||
- Output a low throttle value (you can configure PX4 to detect this).
|
||||
- Output the last received signal (_cannot be detected by PX4_ as it looks like valid input).
|
||||
|
||||
If your RC receiver does not support outputting no signal on RC loss, you must configure it to set throttle low instead, and set the corresponding value in [RC_FAILS_THR](../advanced_config/parameter_reference.md#RC_FAILS_THR).
|
||||
|
||||
The way to do this is to set the RC controller trim and throttle stick as low as possible, and use the resulting output PWM value in both PX4 and the receiver (read your receiver manual to determine how to set the RC loss value).
|
||||
Then reset the throttle stick trim back to its normal position.
|
||||
This process ensures that the RC loss value is below the minimum value output by the receiver in normal operation.
|
||||
|
||||
:::info
|
||||
Do not use a receiver that cannot support one of the two supported RC loss detection methods!
|
||||
:::
|
||||
|
||||
## 执行校准
|
||||
|
||||
The calibration process is straightforward - you will be asked to move the sticks in a specific pattern that is shown on the transmitter diagram on the top right of the screen.
|
||||
|
||||
To calibrate the radio:
|
||||
|
||||
1. 打开您的 RC 遥控器发射机。
|
||||
|
||||
2. Start _QGroundControl_ and connect the vehicle.
|
||||
|
||||
3. Select the **Gear** icon (Vehicle Setup) in the top toolbar and then **Radio** in the sidebar.
|
||||
|
||||
4. Press **OK** to start the calibration.
|
||||
|
||||

|
||||
|
||||
5. Set the [transmitter mode](../getting_started/rc_transmitter_receiver.md#transmitter_modes) radio button that matches your transmitter (this ensures that _QGroundControl_ displays the correct stick positions for you to follow during calibration).
|
||||
|
||||

|
||||
|
||||
6. 按照文字(在遥控器的图上)提示移动摇杆的位置。 Press **Next** when the sticks are in position. 重复上述步骤。
|
||||
|
||||
7. When prompted, move all other switches and dials through their full range (you will be able to observe them moving on the _Channel Monitor_).
|
||||
|
||||
8. Press **Next** to save the settings.
|
||||
|
||||
Radio calibration is demonstrated in the [autopilot setup video here](https://youtu.be/91VGmdSlbo4?t=4m30s) (youtube).
|
||||
|
||||
## 其他的遥控器设置
|
||||
|
||||
As well as calibrating your control sticks and other transmitter controls, there are a number of additional radio setup options that you may find useful on this screen.
|
||||
|
||||
<img src="../../assets/qgc/setup/radio/radio_additional_radio_setup.jpg" title="Radio setup - additional settings" width="300px" />
|
||||
|
||||
### Spectrum 对频
|
||||
|
||||
在你校准遥控器之前,遥控器的发射机和接收机需要绑定(对频)。 If you have a _Spektrum_ receiver you can put it in _bind mode_ using _QGroundControl_ as shown below (this can be particularly useful if you don't have easy physical access to the receiver on your vehicle).
|
||||
|
||||
To bind a Spektrum transmitter/receiver:
|
||||
|
||||
1. Select the **Spektrum Bind** button
|
||||
|
||||
2. 选择接收机上的 “radio” 按钮。
|
||||
|
||||
3. Press **OK**
|
||||
|
||||

|
||||
|
||||
4. 按着对频按钮,打开你的 Spektrum 遥控器。
|
||||
|
||||
### 复制微调
|
||||
|
||||
This setting is used to copy the manual trim settings from your radio transmitter so that they can be applied automatically within the autopilot. After this is done you will need to remove the manually set trims.
|
||||
|
||||
:::info
|
||||
Trim settings are used to adjust the roll, pitch, yaw such that when you center the sticks on your remote control, you get stable or level flight (in Stabilized flight mode).
|
||||
Some RC controllers provide trim knobs that allow you to provide an offset to the value sent by the RC controller for each stick position.
|
||||
The **Copy Trims** setting here moves the offsets into the autopilot.
|
||||
:::
|
||||
|
||||
To copy the trims:
|
||||
|
||||
1. Select **Copy Trims**.
|
||||
|
||||
2. 摇杆居中,油门杆最低。
|
||||
|
||||
3. Press **Ok**.
|
||||
|
||||

|
||||
|
||||
4. 设置遥控器器微调为0。
|
||||
|
||||
### 辅助通道
|
||||
|
||||
AUX passthrough channels allow you to control arbitrary optional hardware from your transmitter (for example, a gripper).
|
||||
|
||||
To use the AUX passthrough channels:
|
||||
|
||||
1. 映射2个遥控器控制来隔离通道。
|
||||
2. 如下所示,依次映射这些通道到端口 AUX1 和 AUX2。
|
||||
设置后,保存到自驾仪。
|
||||
|
||||

|
||||
|
||||
The flight controller will pass through the unmodified values from the specified channels out of AUX1/AUX2 to the connected servos/relays that drive your hardware.
|
||||
|
||||
### 参数调试通道
|
||||
|
||||
Tuning channels allow you to map a transmitter tuning knob to a parameter (so that you can dynamically modify a parameter from your transmitter).
|
||||
|
||||
:::tip
|
||||
This feature is provided to enable manual in-flight tuning: [Multicopter PID Tuning Guide](../config_mc/pid_tuning_guide_multicopter.md), [Fixed-wing PID Tuning Guide](../config_fw/pid_tuning_guide_fixedwing.md).
|
||||
:::
|
||||
|
||||
The channels used for parameter tuning are assigned in the _Radio_ setup (here!), while the mapping from each tuning channel to its associated parameter is defined in the _Parameter editor_.
|
||||
|
||||
To set up tuning channels:
|
||||
|
||||
1. 映射3个遥控器通道(旋钮或滑块开关)来分离通道。
|
||||
2. Select the mapping of _PARAM Tuning Id_ to radio channels, using the selection lists.
|
||||
设置后,保存到自驾仪。
|
||||
|
||||

|
||||
|
||||
To map a PARAM tuning channel to a parameter:
|
||||
|
||||
1. Open the **Parameters** sidebar.
|
||||
|
||||
2. Select the parameter to map to your transmitter (this will open the _Parameter Editor_).
|
||||
|
||||
3. Check the **Advanced Settings** checkbox.
|
||||
|
||||
4. Click the **Set RC to Param...** button (this will pop-up the foreground dialog displayed below)
|
||||
|
||||

|
||||
|
||||
5. Select the tuning channel to map (1, 2 or 3) from the _Parameter Tuning ID_ selection list.
|
||||
|
||||
6. Press **OK** to close the dialog.
|
||||
|
||||
7. Press **Save** to save all changes and close the _Parameter Editor_.
|
||||
|
||||
:::tip
|
||||
You can clear all parameter/tuning channel mappings by selecting menu **Tools > Clear RC to Param** at the top right of the _Parameters_ screen.
|
||||
:::
|
||||
|
||||
## 更多信息
|
||||
|
||||
- [QGroundControl > Radio Control](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/radio.html)
|
||||
- [PX4 Setup Video - @4m30s](https://youtu.be/91VGmdSlbo4?t=4m30s) (Youtube)
|
||||
- [RC System Selection](../getting_started/rc_transmitter_receiver.md) - Choose a compatible RC system.
|
||||
@@ -0,0 +1,411 @@
|
||||
# Safety (Failsafe) Configuration
|
||||
|
||||
PX4有许多安全功能,可以在发生故障时保护并恢复您的机体:
|
||||
|
||||
- _Failsafes_ allow you to specify areas and conditions under which you can safely fly, and the [action](#failsafe-actions) that will be performed if a failsafe is triggered (for example, landing, holding position, or returning to a specified point).
|
||||
The most important failsafe settings are configured in the _QGroundControl_ [Safety Setup](#qgroundcontrol-safety-setup) page.
|
||||
Others must be configured via [parameters](../advanced_config/parameters.md).
|
||||
- [Safety switches](#emergency-switches) on the remote control can be used to immediately stop motors or return the vehicle in the event of a problem.
|
||||
|
||||
## QGroundControl 安全设置
|
||||
|
||||
The _QGroundControl_ Safety Setup page is accessed by clicking the _QGroundControl_ icon, **Vehicle Setup**, and then **Safety** in the sidebar.
|
||||
This includes many of the most important failsafe settings (battery, RC loss etc.) and the settings for the triggered actions _Return_ and _Land_.
|
||||
|
||||

|
||||
|
||||
## 故障保护动作
|
||||
|
||||
When a failsafe is triggered, the default behavior (for most failsafes) is to enter Hold for [COM_FAIL_ACT_T](../advanced_config/parameter_reference.md#COM_FAIL_ACT_T) seconds before performing an associated failsafe action.
|
||||
这使用户有时间注意到正在发生的情况,并在需要时取消故障保护。
|
||||
在大多数情况下,可以通过使用 RC或 GCS 切换模式来做到这一点(注意在故障保护保持期间, 移动 RC操纵杆不会触发取消操作)。
|
||||
|
||||
下面的列表显示了所有故障保护动作的集合,按其严重程度升序排列。
|
||||
请注意,不同类型的故障保护可能无法支持所有这些操作。
|
||||
|
||||
| 动作 | 描述 |
|
||||
| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| <a id="act_none"></a>None/Disabled | 无操作. 故障保护将被忽略。 |
|
||||
| <a id="act_warn"></a>Warning | A warning message will be sent (i.e. to _QGroundControl_). |
|
||||
| <a id="act_hold"></a>Hold mode | The vehicle will enter [Hold mode (MC)](../flight_modes_mc/hold.md) or [Hold mode (FW)](../flight_modes_fw/hold.md) and hover or circle, respectively. VTOL车辆将保持其目前的模式(MC/FW)。 |
|
||||
| <a id="act_return"></a>[Return mode][return] | The vehicle will enter _Return mode_. Return behaviour can be set in the [Return Home Settings](#return-mode-settings) (below). |
|
||||
| <a id="act_land"></a>Land mode | The vehicle will enter [Land mode (MC)](../flight_modes_mc/land.md) or [Land mode (FW)](../flight_modes_fw/land.md), and land. VTAL 将首先过渡到 MC 模式。 |
|
||||
| <a id="act_disarm"></a>Disarm | 马达立即停止。 |
|
||||
| <a id="act_term"></a>[Flight termination][flight_term] | Turns off all controllers and sets all PWM outputs to their failsafe values (e.g. [PWM\_MAIN\_FAILn][pwm_main_failn], [PWM\_AUX\_FAILn][pwm_main_failn]). 故障保护输出可用于启动降落伞、起落架或执行其他操作。 对于固定翼飞行器,这可能允许您将机体滑翔至安全位置。 |
|
||||
|
||||
[flight_term]: ../advanced_config/flight_termination.md
|
||||
[return]: ../flight_modes/return.md
|
||||
[pwm_main_failn]: ../advanced_config/parameter_reference.md#PWM_MAIN_FAIL1
|
||||
[pwm_aux_failn]: ../advanced_config/parameter_reference.md#PWM_AUX_FAIL1
|
||||
|
||||
如果多个故障保险被触发,将采取高级别的操作。
|
||||
For example if both RC and GPS are lost, and manual control loss is set to [Return mode](#act_return) and GCS link loss to [Land](#act_land), Land is executed.
|
||||
|
||||
:::tip
|
||||
The exact behavior when different failsafes are triggered can be tested with the [Failsafe State Machine Simulation](safety_simulation.md).
|
||||
:::
|
||||
|
||||
### 返航设置
|
||||
|
||||
<!-- Propose replace section by a summary and links - return mode is complicated -->
|
||||
|
||||
_Return_ is a common [failsafe action](#failsafe-actions) that engages [Return mode](../flight_modes/return.md) to return the vehicle to the home position.
|
||||
The default settings for each vehicle are usually suitable, though for fixed wing vehicles you will usually need to define a mission landing.
|
||||
|
||||
:::tip
|
||||
If you want to change the configuration you should carefully read the [Return mode](../flight_modes/return.md) documentation _for your vehicle type_ to understand the options.
|
||||
:::
|
||||
|
||||
QGC allows users to set some aspects of the return mode and landing behaviour, such as the altitude to fly back, and the loiter time if you need to deploy landing gear.
|
||||
|
||||

|
||||
|
||||
### 降落模式设置
|
||||
|
||||
_Land at the current position_ is a common [failsafe action](#failsafe-actions) (in particular for multicopters), that engages [Land Mode](../flight_modes_mc/land.md).
|
||||
The default settings for each vehicle are usually suitable.
|
||||
|
||||
:::tip
|
||||
If you want to change the configuration you should carefully read the [Land mode](../flight_modes_fw/land.md) documentation _for your vehicle type_ to understand the options.
|
||||
:::
|
||||
|
||||
QGC allows users to set some aspects of the landing behaviour, such as the time to disarm after landing and the descent rate (for multicopters only).
|
||||
|
||||

|
||||
|
||||
## Battery Failsafes
|
||||
|
||||
### Battery level failsafe
|
||||
|
||||
The low battery failsafe is triggered when the battery capacity drops below battery failafe level values.
|
||||
You can configure both the levels and the failsafe actions at each level in QGroundControl.
|
||||
|
||||

|
||||
|
||||
The most common configuration is to set the values and action as above (with `Warn > Failsafe > Emergency`), and to set the [Failsafe Action](#COM_LOW_BAT_ACT) to warn at "warn level", trigger Return mode at "Failsafe level", and land immediately at "Emergency level".
|
||||
|
||||
The settings and underlying parameters are shown below.
|
||||
|
||||
| 设置 | 参数 | 描述 |
|
||||
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| <a id="COM_LOW_BAT_ACT"></a>Failsafe Action | [COM_LOW_BAT_ACT](../advanced_config/parameter_reference.md#COM_LOW_BAT_ACT) | Warn, Return, or Land based when capacity drops below the trigger levels. |
|
||||
| <a id="BAT_LOW_THR"></a>Battery Warn Level | [BAT_LOW_THR](../advanced_config/parameter_reference.md#BAT_LOW_THR) | 需做出警告(或其他动作)的电量百分比。 |
|
||||
| <a id="BAT_CRIT_THR"></a>Battery Failsafe Level | [BAT_CRIT_THR](../advanced_config/parameter_reference.md#BAT_CRIT_THR) | 电量低于该百分比则返航(或者执行其他事前选择动作)。 |
|
||||
| <a id="BAT_EMERGEN_THR"></a>Battery Emergency Level | [BAT_EMERGEN_THR](../advanced_config/parameter_reference.md#BAT_EMERGEN_THR) | 电量低于该百分比则(立即)触发降落动作。 |
|
||||
|
||||
### Flight Time Failsafes
|
||||
|
||||
There are several other "battery related" failsafe mechanisms that may be configured using parameters:
|
||||
|
||||
- The "remaining flight time for safe return" failsafe ([COM_FLTT_LOW_ACT](#COM_FLTT_LOW_ACT)) is engaged when PX4 estimates that the vehicle has just enough battery remaining for a return mode landing.
|
||||
You can configure this to ignore the failsafe, warn, or engage Return mode.
|
||||
- The "maximum flight time failsafe" ([COM_FLT_TIME_MAX](#COM_FLT_TIME_MAX)) allows you to set a maximum flight time after takeoff, at which the vehicle will automatically enter return mode (it will also "warn" at 90% of this time). This is like a "hard coded" estimate of the total flight time in a battery. The feature is disabled by default.
|
||||
- The "minimum battery" for arming parameter ([COM_ARM_BAT_MIN](#COM_ARM_BAT_MIN)) prevents arming in the first place if the battery level is below the specified value.
|
||||
|
||||
The settings and underlying parameters are shown below.
|
||||
|
||||
| 设置 | 参数 | 描述 |
|
||||
| -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="COM_FLTT_LOW_ACT"></a> Low flight time for safe return action | [COM_FLTT_LOW_ACT](../advanced_config/parameter_reference.md#COM_FLTT_LOW_ACT) | Action when return mode can only just reach safety with remaining battery. `0`: None, `1`: Warning, `3`: Return mode (default). |
|
||||
| <a id="COM_FLT_TIME_MAX"></a> Maximum flight time failsafe level | [COM_FLT_TIME_MAX](../advanced_config/parameter_reference.md#COM_FLT_TIME_MAX) | Maximum allowed flight time before Return mode will be engaged, in seconds. `-1`: Disabled (default). |
|
||||
|
||||
## Manual Control Loss Failsafe
|
||||
|
||||
The manual control loss failsafe may be triggered if the connection to the [RC transmitter](../getting_started/rc_transmitter_receiver.md) or [joystick](../config/joystick.md) is lost, and there is no fallback.
|
||||
If using an [RC transmitter](../getting_started/rc_transmitter_receiver.md) this is triggered if the RC [transmitter link is lost](../getting_started/rc_transmitter_receiver.md#set-signal-loss-behaviour).
|
||||
If using [joysticks](../config/joystick.md) connected over a MAVLink data link, this is triggered if the joysticks are disconnected or the data link is lost.
|
||||
|
||||
:::info
|
||||
PX4 and the receiver may also need to be configured in order to _detect RC loss_: [Radio Setup > RC Loss Detection](../config/radio.md#rc-loss-detection).
|
||||
:::
|
||||
|
||||

|
||||
|
||||
The QGCroundControl Safety UI allows you to set the [failsafe action](#failsafe-actions) and [RC Loss timeout](#COM_RC_LOSS_T).
|
||||
Users that want to disable the RC loss failsafe in specific automatic modes (mission, hold, offboard) can do so using the parameter [COM_RCL_EXCEPT](#COM_RCL_EXCEPT).
|
||||
|
||||
Additional (and underlying) parameter settings are shown below.
|
||||
|
||||
| 参数 | 设置 | 描述 |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="COM_RC_LOSS_T"></a>[COM_RC_LOSS_T](../advanced_config/parameter_reference.md#COM_RC_LOSS_T) | Manual Control Loss Timeout | Time after last setpoint received from the selected manual control source after which manual control is considered lost. This must be kept short because the vehicle will continue to fly using the old manual control setpoint until the timeout triggers. |
|
||||
| <a id="COM_FAIL_ACT_T"></a>[COM_FAIL_ACT_T](../advanced_config/parameter_reference.md#COM_FAIL_ACT_T) | Failsafe Reaction Delay | Delay in seconds between failsafe condition being triggered (`COM_RC_LOSS_T`) and failsafe action (RTL, Land, Hold). In this state the vehicle waits in hold mode for the manual control source to reconnect. This might be set longer for long-range flights so that intermittent connection loss doesn't immediately invoke the failsafe. It can be to zero so that the failsafe triggers immediately. |
|
||||
| <a id="NAV_RCL_ACT"></a>[NAV_RCL_ACT](../advanced_config/parameter_reference.md#NAV_RCL_ACT) | 故障保护动作 | Disabled, Loiter, Return, Land, Disarm, Terminate. |
|
||||
| <a id="COM_RCL_EXCEPT"></a>[COM_RCL_EXCEPT](../advanced_config/parameter_reference.md#COM_RCL_EXCEPT) | RC Loss Exceptions | Set the modes in which manual control loss is ignored: Mission, Hold, Offboard. |
|
||||
|
||||
## 数据链路丢失故障保护
|
||||
|
||||
The Data Link Loss failsafe is triggered if a telemetry link (connection to ground station) is lost.
|
||||
|
||||

|
||||
|
||||
The settings and underlying parameters are shown below.
|
||||
|
||||
| 设置 | 参数 | 描述 |
|
||||
| -------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||
| 数据链路丢失超时 | [COM_DL_LOSS_T](../advanced_config/parameter_reference.md#COM_DL_LOSS_T) | 数据连接断开后到故障保护触发之前的时间。 |
|
||||
| 故障保护动作 | [NAV_DLL_ACT](../advanced_config/parameter_reference.md#NAV_DLL_ACT) | Disabled, Hold mode, Return mode, Land mode, Disarm, Terminate. |
|
||||
|
||||
## 地理围栏故障保护
|
||||
|
||||
The _Geofence Failsafe_ is triggered when the drone breaches a "virtual" perimeter.
|
||||
In its simplest form, the perimeter is set up as a cylinder centered around the home position.
|
||||
If the vehicle moves outside the radius or above the altitude the specified _Failsafe Action_ will trigger.
|
||||
|
||||

|
||||
|
||||
:::tip
|
||||
PX4 separately supports more complicated Geofence geometries with multiple arbitrary polygonal and circular inclusion and exclusion areas: [Flying > Geofence](../flying/geofence.md).
|
||||
:::
|
||||
|
||||
The settings and underlying [geofence parameters](../advanced_config/parameter_reference.md#geofence) are shown below.
|
||||
|
||||
| 设置 | 参数 | 描述 |
|
||||
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
||||
| 冲出围栏时的响应动作 | [GF_ACTION](../advanced_config/parameter_reference.md#GF_ACTION) | None, Warning, Hold mode, Return mode, Terminate, Land. |
|
||||
| 最大半径 | [GF_MAX_HOR_DIST](../advanced_config/parameter_reference.md#GF_MAX_HOR_DIST) | 地理围栏圆柱体的水平半径。 如果为 0,则禁用地理围栏。 |
|
||||
| 最大高度 | [GF_MAX_VER_DIST](../advanced_config/parameter_reference.md#GF_MAX_VER_DIST) | 地理围栏圆柱体的高度。 如果为 0,则禁用地理围栏。 |
|
||||
|
||||
:::info
|
||||
Setting `GF_ACTION` to terminate will kill the vehicle on violation of the fence.
|
||||
Due to the inherent danger of this, this function is disabled using [CBRK_FLIGHTTERM](#CBRK_FLIGHTTERM), which needs to be reset to 0 to really shut down the system.
|
||||
:::
|
||||
|
||||
The following settings also apply, but are not displayed in the QGC UI.
|
||||
|
||||
| 设置 | 参数 | 描述 |
|
||||
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="GF_SOURCE"></a>Geofence source | [GF_SOURCE](../advanced_config/parameter_reference.md#GF_SOURCE) | 设置定位是来自全局位置估计还是直接来自 GPS 设备。 |
|
||||
| <a id="GF_PREDICT"></a>Preemptive geofence triggering | [GF_PREDICT](../advanced_config/parameter_reference.md#GF_PREDICT) | (Experimental) Trigger geofence if current motion of the vehicle is predicted to trigger the breach (rather than late triggering after the breach). |
|
||||
| <a id="CBRK_FLIGHTTERM"></a>Circuit breaker for flight termination | [CBRK_FLIGHTTERM](../advanced_config/parameter_reference.md#CBRK_FLIGHTTERM) | 启用/禁用飞行终止操作(默认禁用)。 |
|
||||
|
||||
## Position (GNSS) Loss Failsafe
|
||||
|
||||
The _Position Loss Failsafe_ is triggered if the quality of the PX4 global position estimate falls below acceptable levels (this might be caused by GPS loss) while in a mode that requires an acceptable position estimate.
|
||||
|
||||
The failure action is controlled by [COM_POSCTL_NAVL](../advanced_config/parameter_reference.md#COM_POSCTL_NAVL), based on whether RC control is assumed to be available (and altitude information):
|
||||
|
||||
- `0`: Remote control available.
|
||||
Switch to _Altitude mode_ if a height estimate is available, otherwise _Stabilized mode_.
|
||||
- `1`: Remote control _not_ available.
|
||||
Switch to _Descend mode_ if a height estimate is available, otherwise enter flight termination.
|
||||
_Descend mode_ is a landing mode that does not require a position estimate.
|
||||
|
||||
Fixed-wing planes, and VTOLs not configured to land in hover ([NAV_FORCE_VT](../advanced_config/parameter_reference.md#NAV_FORCE_VT)), have a parameter ([FW_GPSF_LT](../advanced_config/parameter_reference.md#FW_GPSF_LT)) that defines how long they will loiter (circle with a constant roll angle ([FW_GPSF_R](../advanced_config/parameter_reference.md#FW_GPSF_R)) at the current altitude) after losing position before attempting to land.
|
||||
If VTOLs have are configured to switch to hover for landing ([NAV_FORCE_VT](../advanced_config/parameter_reference.md#NAV_FORCE_VT)) then they will first transition and then descend.
|
||||
|
||||
The relevant parameters for all vehicles shown below.
|
||||
|
||||
| 参数 | 描述 |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="COM_POSCTL_NAVL"></a>[COM_POSCTL_NAVL](../advanced_config/parameter_reference.md#COM_POSCTL_NAVL) | Position control navigation loss response during mission. Values: `0` - assume use of RC, `1` - Assume no RC. |
|
||||
|
||||
Parameters that only affect Fixed-wing vehicles:
|
||||
|
||||
| 参数 | 描述 |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| <a id="FW_GPSF_LT"></a>[FW_GPSF_LT](../advanced_config/parameter_reference.md#FW_GPSF_LT) | Loiter time (waiting for GPS recovery before it goes into land or flight termination). 设置为 0 以禁用。 |
|
||||
| <a id="FW_GPSF_R"></a>[FW_GPSF_R](../advanced_config/parameter_reference.md#FW_GPSF_R) | 以一定的横滚/侧倾角盘旋。 |
|
||||
|
||||
## Offboard 中断故障保护
|
||||
|
||||
The _Offboard Loss Failsafe_ is triggered if the offboard link is lost while under [Offboard control](../flight_modes/offboard.md).
|
||||
Different failsafe behaviour can be specified based on whether or not there is also an RC connection available.
|
||||
|
||||
The relevant parameters are shown below:
|
||||
|
||||
| 参数 | 描述 |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
|
||||
| [COM_OF_LOSS_T](../advanced_config/parameter_reference.md#COM_OF_LOSS_T) | Offboard 连接中断后到触发故障保护前的延迟。 |
|
||||
| [COM_OBL_RC_ACT](../advanced_config/parameter_reference.md#COM_OBL_RC_ACT) | 如果遥控可用,则故障保护动作:定点模式、定高模式、手动模式、返航模式、降落模式、保持模式。 |
|
||||
|
||||
## 交通规避故障保护
|
||||
|
||||
The Traffic Avoidance Failsafe allows PX4 to respond to transponder data (e.g. from [ADSB transponders](../advanced_features/traffic_avoidance_adsb.md)) during missions.
|
||||
|
||||
The relevant parameters are shown below:
|
||||
|
||||
| 参数 | 描述 |
|
||||
| ---------------------------------------------------------------------------------------------------------------------- | ------------------------- |
|
||||
| [NAV_TRAFF_AVOID](../advanced_config/parameter_reference.md#NAV_TRAFF_AVOID) | 设置故障保护动作:禁用、警告、返航模式、降落模式。 |
|
||||
|
||||
## Quad-chute Failsafe
|
||||
|
||||
Failsafe for when a VTOL vehicle can no longer fly in fixed-wing mode, perhaps due to the failure of a pusher motor, airspeed sensor, or control surface.
|
||||
If the failsafe is triggered, the vehicle will immediately switch to multicopter mode and execute the action defined in parameter [COM_QC_ACT](#COM_QC_ACT).
|
||||
|
||||
:::info
|
||||
The quad-chute can also be triggered by sending a MAVLINK [MAV_CMD_DO_VTOL_TRANSITION](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_VTOL_TRANSITION) message with `param2` set to `1`.
|
||||
:::
|
||||
|
||||
The parameters that control when the quad-chute will trigger are listed in the table below.
|
||||
|
||||
| 参数 | 描述 |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="COM_QC_ACT"></a>[COM_QC_ACT](../advanced_config/parameter_reference.md#COM_QC_ACT) | Quad-chute action after switching to multicopter flight. Can be set to: [Warning](#act_warn), [Return](#act_return), [Land](#act_land), [Hold](#act_hold). |
|
||||
| <a id="VT_FW_QC_HMAX"></a>[VT_FW_QC_HMAX](../advanced_config/parameter_reference.md#VT_FW_QC_HMAX) | Maximum quad-chute height, below which the quad-chute failsafe cannot trigger. This prevents high altitude quad-chute descent, which can drain the battery (and itself cause a crash). The height is relative to ground, home, or the local origin (in preference order, depending on what is available). |
|
||||
| <a id="VT_QC_ALT_LOSS"></a>[VT_QC_ALT_LOSS](../advanced_config/parameter_reference.md#VT_QC_ALT_LOSS) | Uncommanded descent quad-chute altitude threshold.<br><br>In altitude controlled modes, such as [Hold mode](../flight_modes_fw/hold.md), [Position mode](../flight_modes_fw/position.md), [Altitude mode](../flight_modes_fw/altitude.md), or [Mission mode](../flight_modes_fw/mission.md), a vehicle should track its current "commanded" altitude setpoint. The quad chute failsafe is triggered if the vehicle falls too far below the commanded setpoint (by the amount defined in this parameter).<br><br>Note that the quad-chute is only triggered if the vehicle continuously loses altitude below the commanded setpoint; it is not triggered if the commanded altitude setpoint increases faster than the vehicle can follow. |
|
||||
| <a id="VT_QC_T_ALT_LOSS"></a>[VT_QC_T_ALT_LOSS](../advanced_config/parameter_reference.md#VT_QC_T_ALT_LOSS) | Altitude loss threshold for quad-chute triggering during VTOL transition to fixed-wing flight. The quad-chute is triggered if the vehicle falls this far below its initial altitude before completing the transition. |
|
||||
| <a id="VT_FW_MIN_ALT"></a>[VT_FW_MIN_ALT](../advanced_config/parameter_reference.md#VT_FW_MIN_ALT) | Minimum altitude above Home for fixed-wing flight. When the altitude drops below this value in fixed-wing flight the vehicle a quad-chute is triggered. |
|
||||
| <a id="VT_FW_QC_R"></a>[VT_FW_QC_R](../advanced_config/parameter_reference.md#VT_FW_QC_R) | Absolute roll threshold for quad-chute triggering in FW mode. |
|
||||
| <a id="VT_FW_QC_P"></a>[VT_FW_QC_P](../advanced_config/parameter_reference.md#VT_FW_QC_P) | Absolute pitch threshold for quad-chute triggering in FW mode. |
|
||||
|
||||
## High Wind Failsafe
|
||||
|
||||
The high wind failsafe can trigger a warning and/or other mode change when the wind speed exceeds the warning and maximum wind-speed threshhold values.
|
||||
The relevant parameters are listed in the table below.
|
||||
|
||||
| 参数 | 描述 |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| <a id="COM_WIND_MAX"></a>[COM_WIND_MAX](../advanced_config/parameter_reference.md#COM_WIND_MAX) | Wind speed threshold that triggers failsafe action, in m/s ([COM_WIND_MAX_ACT](#COM_WIND_MAX_ACT)). |
|
||||
| <a id="COM_WIND_MAX_ACT"></a>[COM_WIND_MAX_ACT](../advanced_config/parameter_reference.md#COM_WIND_MAX_ACT) | High wind failsafe action (following [COM_WIND_MAX](#COM_WIND_MAX) trigger). Can be set to: `0`: None (Default), `1`: [Warning](#act_warn), `2`: [Hold](#act_hold), `3`: [Return](#act_return), `4`: [Terminate](#act_term), `5`: [Land](#act_land). |
|
||||
| <a id="COM_WIND_WARN"></a>[COM_WIND_WARN](../advanced_config/parameter_reference.md#COM_WIND_WARN) | Wind speed threshold that triggers periodic failsafe warning. |
|
||||
|
||||
## 故障检测器
|
||||
|
||||
The failure detector allows a vehicle to take protective action(s) if it unexpectedly flips, or if it is notified by an external failure detection system.
|
||||
|
||||
During **flight**, the failure detector can be used to trigger [flight termination](../advanced_config/flight_termination.md) if failure conditions are met, which may then launch a [parachute](../peripherals/parachute.md) or perform some other action.
|
||||
|
||||
:::info
|
||||
Failure detection during flight is deactivated by default (enable by setting the parameter: [CBRK_FLIGHTTERM=0](#CBRK_FLIGHTTERM)).
|
||||
:::
|
||||
|
||||
During **takeoff** the failure detector [attitude trigger](#attitude-trigger) invokes the [disarm action](#act_disarm) if the vehicle flips (disarm kills the motors but, unlike flight termination, will not launch a parachute or perform other failure actions).
|
||||
Note that this check is _always enabled on takeoff_, irrespective of the `CBRK_FLIGHTTERM` parameter.
|
||||
|
||||
The failure detector is active in all vehicle types and modes, except for those where the vehicle is _expected_ to do flips (i.e. [Acro mode (MC)](../flight_modes_mc/altitude.md), [Acro mode (FW)](../flight_modes_fw/altitude.md), and [Manual (FW)](../flight_modes_fw/manual.md)).
|
||||
|
||||
### 姿态触发器
|
||||
|
||||
The failure detector can be configured to trigger if the vehicle attitude exceeds predefined pitch and roll values for longer than a specified time.
|
||||
|
||||
The relevant parameters are shown below:
|
||||
|
||||
| 参数 | 描述 |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="CBRK_FLIGHTTERM"></a>[CBRK_FLIGHTTERM](../advanced_config/parameter_reference.md#CBRK_FLIGHTTERM) | 飞行终止断路器。 从 121212(默认)取消设置,以启用由于故障检测器或 FMU 丢失而导致的飞行终止。 |
|
||||
| <a id="FD_FAIL_P"></a>[FD_FAIL_P](../advanced_config/parameter_reference.md#FD_FAIL_P) | 最大允许俯仰角(角度制)。 |
|
||||
| <a id="FD_FAIL_R"></a>[FD_FAIL_R](../advanced_config/parameter_reference.md#FD_FAIL_R) | 最大允许横滚角(角度制)。 |
|
||||
| <a id="FD_FAIL_P_TTRI"></a>[FD_FAIL_P_TTRI](../advanced_config/parameter_reference.md#FD_FAIL_P_TTRI) | Time to exceed [FD_FAIL_P](#FD_FAIL_P) for failure detection (default 0.3s). |
|
||||
| <a id="FD_FAIL_R_TTRI"></a>[FD_FAIL_R_TTRI](../advanced_config/parameter_reference.md#FD_FAIL_R_TTRI) | Time to exceed [FD_FAIL_R](#FD_FAIL_R) for failure detection (default 0.3s). |
|
||||
|
||||
### 外部自动触发系统(ATS)
|
||||
|
||||
The [failure detector](#failure-detector), if [enabled](#CBRK_FLIGHTTERM), can also be triggered by an external ATS system.
|
||||
The external trigger system must be connected to flight controller port AUX5 (or MAIN5 on boards that do not have AUX ports), and is configured using the parameters below.
|
||||
|
||||
:::info
|
||||
External ATS is required by [ASTM F3322-18](https://webstore.ansi.org/Standards/ASTM/ASTMF332218).
|
||||
One example of an ATS device is the [FruityChutes Sentinel Automatic Trigger System](https://fruitychutes.com/uav_rpv_drone_recovery_parachutes/sentinel-automatic-trigger-system.htm).
|
||||
:::
|
||||
|
||||
| 参数 | 描述 |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| <a id="FD_EXT_ATS_EN"></a>[FD_EXT_ATS_EN](../advanced_config/parameter_reference.md#FD_EXT_ATS_EN) | 启用 AUX5 或 MAIN5(取决于飞控板)上的 PWM 输入,以便从外部自动触发系统(ATS)启用故障保护。 默认值:禁用。 |
|
||||
| <a id="FD_EXT_ATS_TRIG"></a>[FD_EXT_ATS_TRIG](../advanced_config/parameter_reference.md#FD_EXT_ATS_TRIG) | 来自外部自动触发系统的用于接通故障保护的 PWM 阈值。 默认值:1900m/s。 |
|
||||
|
||||
## 任务可行性检查
|
||||
|
||||
A number of checks are run to ensure that a mission can only be started if it is _feasible_.
|
||||
For example, the checks ensures that the first waypoint isn't too far away, and that the mission flight path doesn't conflict with any geofences.
|
||||
|
||||
As these are not strictly speaking "failsafes" they are documented in [Mission Mode (FW) > Mission Feasibility Checks](../flight_modes_fw/mission.md#mission-feasibility-checks) and [Mission Mode (MC) > Mission Feasibility Checks](../flight_modes_mc/mission.md#mission-feasibility-checks).
|
||||
|
||||
## 应急开关
|
||||
|
||||
Remote control switches can be configured (as part of _QGroundControl_ [Flight Mode Setup](../config/flight_mode.md)) to allow you to take rapid corrective action in the event of a problem or emergency; for example, to stop all motors, or activate [Return mode](#return-switch).
|
||||
|
||||
This section lists the available emergency switches.
|
||||
|
||||
### 急停开关
|
||||
|
||||
A kill switch immediately stops all motor outputs — if flying, the vehicle will start to fall!
|
||||
|
||||
[By default](#COM_KILL_DISARM) the motors will restart if the switch is reverted within 5 seconds, after which the vehicle will automatically disarm, and you will need to arm it again in order to start the motors.
|
||||
|
||||
| 参数 | 描述 |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="COM_KILL_DISARM"></a>[COM_KILL_DISARM](../advanced_config/parameter_reference.md#COM_KILL_DISARM) | Timeout value for disarming after kill switch is engaged. Default: `5` seconds. |
|
||||
|
||||
:::info
|
||||
There is also a [Kill Gesture](#kill-gesture), which cannot be reverted.
|
||||
:::
|
||||
|
||||
### 解锁/上锁开关
|
||||
|
||||
The arm/disarm switch is a _direct replacement_ for the default stick-based arming/disarming mechanism (and serves the same purpose: making sure there is an intentional step involved before the motors start/stop).
|
||||
它可能优先于默认机制使用,原因如下:
|
||||
|
||||
- 这种机制偏向于切换动作而不是持续运动。
|
||||
- 这种机制可以避免因为某种意外误触而引发的飞行期间解锁/上锁。
|
||||
- 这种机制没有延迟(立即作出反应)。
|
||||
|
||||
The arm/disarm switch immediately disarms (stop) motors for those [flight modes](../flight_modes/index.md#flight-modes) that _support disarming in flight_.
|
||||
其中包括:
|
||||
|
||||
- _Manual mode_
|
||||
- _Acro mode_
|
||||
- _Stabilized_
|
||||
|
||||
对于不支持在飞行期间上锁的模式,在飞行期间会忽略该开关信号,但在检测到着陆后可以使用该开关。
|
||||
This includes _Position mode_ and autonomous modes (e.g. _Mission_, _Land_ etc.).
|
||||
|
||||
:::info
|
||||
[Auto disarm timeouts](#auto-disarming-timeouts) (e.g. via [COM_DISARM_LAND](#COM_DISARM_LAND)) are independent of the arm/disarm switch - ie even if the switch is armed the timeouts will still work.
|
||||
:::
|
||||
|
||||
<!--
|
||||
**Note** This can also be done by [manually setting](../advanced_config/parameters.md) the [RC_MAP_ARM_SW](../advanced_config/parameter_reference.md#RC_MAP_ARM_SW) parameter to the corresponding switch RC channel.
|
||||
If the switch positions are reversed, change the sign of the parameter [RC_ARMSWITCH_TH](../advanced_config/parameter_reference.md#RC_ARMSWITCH_TH) (or also change its value to alter the threshold value).
|
||||
-->
|
||||
|
||||
### 返航开关
|
||||
|
||||
A return switch can be used to immediately engage [Return mode](../flight_modes/return.md).
|
||||
|
||||
## Kill Gesture
|
||||
|
||||
A kill gesture immediately stops all motor outputs — if flying, the vehicle will start to fall!
|
||||
|
||||
The action cannot be reverted without a reboot (this differs from a [Kill Switch](#kill-switch), where the operation can be reverted within the time period defined by [COM_KILL_DISARM](#COM_KILL_DISARM)).
|
||||
|
||||
| 参数 | 描述 |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="MAN_KILL_GEST_T"></a>[MAN_KILL_GEST_T](../advanced_config/parameter_reference.md#MAN_KILL_GEST_T) | Time to hold sticks in gesture position before killing the motors. Default: `-1` seconds (Disabled). |
|
||||
|
||||
## Arming/Disarming Settings
|
||||
|
||||
The [commander module](../advanced_config/parameter_reference.md#commander) has a number of parameters prefixed with `COM_ARM` that configure whether the vehicle can arm at all, and under what conditions (note that some parameters named with the prefix `COM_ARM` are used to arm other systems).
|
||||
Parameters prefixed with `COM_DISARM_` affect disarming behaviour.
|
||||
|
||||
### Auto-Disarming Timeouts
|
||||
|
||||
You can set timeouts to automatically disarm a vehicle if it is too slow to takeoff, and/or after landing (disarming the vehicle removes power to the motors, so the propellers won't spin).
|
||||
|
||||
The [relevant parameters](../advanced_config/parameters.md) are shown below:
|
||||
|
||||
| 参数 | 描述 |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
|
||||
| <a id="COM_DISARM_LAND"></a>[COM_DISARM_LAND](../advanced_config/parameter_reference.md#COM_DISARM_LAND) | 降落后自动上锁的超时时间。 |
|
||||
| <a id="COM_DISARM_PRFLT"></a>[COM_DISARM_PRFLT](../advanced_config/parameter_reference.md#COM_DISARM_PRFLT) | 如果起飞速度太慢,将启动自动上锁。 |
|
||||
|
||||
### Arming Pre-Conditions
|
||||
|
||||
These parameters can be used to set conditions that prevent arming.
|
||||
|
||||
| 参数 | 描述 |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="COM_ARMABLE"></a>[COM_ARMABLE](../advanced_config/parameter_reference.md#COM_ARMABLE) | Enable arming (at all). `0`: Disabled, `1`: Enabled (default). |
|
||||
| <a id="COM_ARM_BAT_MIN"></a>[COM_ARM_BAT_MIN](../advanced_config/parameter_reference.md#COM_ARM_BAT_MIN) | Minimum battery level for arming. `0`: Disabled (default). Values: `0`-`0.9`, |
|
||||
| <a id="COM_ARM_WO_GPS"></a>[COM_ARM_WO_GPS](../advanced_config/parameter_reference.md#COM_ARM_WO_GPS) | Enable arming without GPS. `0`: Disabled, `1`: Enabled (default). |
|
||||
| <a id="COM_ARM_MIS_REQ"></a>[COM_ARM_MIS_REQ](../advanced_config/parameter_reference.md#COM_ARM_MIS_REQ) | Require valid mission to arm. `0`: Disabled (default), `1`: Enabled . |
|
||||
| <a id="COM_ARM_SDCARD"></a>[COM_ARM_SDCARD](../advanced_config/parameter_reference.md#COM_ARM_SDCARD) | Require SD card to arm. `0`: Disabled (default), `1`: Warning, `2`: Enabled. |
|
||||
| <a id="COM_ARM_AUTH_REQ"></a>[COM_ARM_AUTH_REQ](../advanced_config/parameter_reference.md#COM_ARM_AUTH_REQ) | Requires arm authorisation from an external (MAVLink) system. Flag to allow arming (at all). `1`: Enabled, `0`: Disabled (default). Associated configuration parameters are prefixed with `COM_ARM_AUTH_`. |
|
||||
| <a id="COM_ARM_ODID"></a>[COM_ARM_ODID](../advanced_config/parameter_reference.md#COM_ARM_ODID) | Require healthy Remote ID system to arm. `0`: Disabled (default), `1`: Warning, `2`: Enabled. |
|
||||
|
||||
In addition there are a number of parameters that configure system and sensor limits that make prevent arming if exceeded: [COM_CPU_MAX](../advanced_config/parameter_reference.md#COM_CPU_MAX), [COM_ARM_IMU_ACC](../advanced_config/parameter_reference.md#COM_ARM_IMU_ACC), [COM_ARM_IMU_GYR](../advanced_config/parameter_reference.md#COM_ARM_IMU_GYR), [COM_ARM_MAG_ANG](../advanced_config/parameter_reference.md#COM_ARM_MAG_ANG), [COM_ARM_MAG_STR](../advanced_config/parameter_reference.md#COM_ARM_MAG_STR).
|
||||
|
||||
## 更多信息
|
||||
|
||||
- [QGroundControl User Guide > Safety Setup](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/setup_view/safety.html)
|
||||
@@ -0,0 +1,21 @@
|
||||
# 安全
|
||||
|
||||
PX4 provides a number of manual and automated features that you can use to improve flight safety, protecting nearby people and property, and hopefully also your vehicle.
|
||||
|
||||
These features range from failsafe actions that can trigger when the vehicle travels outside an allowed geofence boundary, or starts to run low on battery, though to automatic disarming after landing, so that it is less likely that you will approach a vehicle while propellers are still spinning.
|
||||
They also include flight termination actions such as parachute deployment.
|
||||
|
||||
These are covered in the following topics:
|
||||
|
||||
- [Safety Configuration (Failsafes)](../config/safety.md)
|
||||
- [Failsafe Simulation](../config/safety_simulation.md)
|
||||
- [Geofence](../flying/geofence.md)
|
||||
- [Safe Points (Rally)](../flying/plan_safety_points.md)
|
||||
- [解锁前/解锁/加锁 配置](../advanced_config/prearm_arm_disarm.md)
|
||||
- [飞行终止配置](../advanced_config/flight_termination.md)
|
||||
- [First Flight Guidelines](../flying/first_flight_guidelines.md)
|
||||
|
||||
:::tip
|
||||
Note that the [First Flight Guidelines](../flying/first_flight_guidelines.md) are listed _last_.
|
||||
They are important, but you'll be a lot safer in that first flight if your vehicle is configured properly!
|
||||
:::
|
||||
@@ -0,0 +1,32 @@
|
||||
# Failsafe State Machine Simulation
|
||||
|
||||
<Badge type="tip" text="PX4 v1.14" />
|
||||
|
||||
This page can be used to simulate the actions of the PX4 failsafe state machine under all possible configurations and conditions.
|
||||
|
||||
The simulation runs the same code in the browser as is executed on the vehicle, in real-time (the simulation is automatically kept in sync with the latest version of the code).
|
||||
Note that any delayed action (`COM_FAIL_ACT_T`) will also be delayed in the simulation.
|
||||
|
||||
To use it:
|
||||
|
||||
1. First configure the parameters on the left.
|
||||
The initial values correspond to the PX4 defaults.
|
||||
2. Set the vehicle type
|
||||
3. Set the other values in the **State** or any of the flags under **Conditions**
|
||||
- The **Intended Mode** corresponds to the commanded mode via RC or GCS (or external script).
|
||||
The failsafe state machine can override this in case of a failsafe.
|
||||
4. Check the action under **Output**
|
||||
5. Check what happens when changing mode or **Move the RC sticks**
|
||||
6. Play with different settings and conditions!
|
||||
|
||||
The simulation can also be executed locally in order to test a specific version or set of changes:
|
||||
|
||||
```sh
|
||||
make run_failsafe_web_server
|
||||
```
|
||||
|
||||
<iframe :src="withBase('/config/failsafe/index.html')" frameborder="0" height="1400px" style="text-align: center; margin-left: -20px; margin-right: -230px;" width="1200"></iframe>
|
||||
|
||||
<script setup>
|
||||
import { withBase } from 'vitepress';
|
||||
</script>
|
||||
Reference in New Issue
Block a user