Skip to content

Конфігурація безпеки (аварійні режими)

PX4 має кілька функцій безпеки для захисту та відновлення вашого транспортного засобу в разі виникнення проблем:

  • Аварійні режими дозволяють вам визначати зони та умови, за яких ви можете безпечно літати, і дію, яка буде виконана, якщо спрацює аварійний режим (наприклад, посадка, утримання позиції або повернення до вказаної точки). Найважливіші налаштування аварійних режимів конфігуруються на сторінці Налаштування безпеки в QGroundControl. Інші потрібно налаштовувати через параметри.
  • Перемикачі безпеки на пульті дистанційного керування можуть використовуватися для негайного зупинення двигунів або повернення транспортного засобу у випадку проблеми.

Дії аварійного режиму

Коли спрацьовує аварійний режим, типова поведінка (для більшості аварійних режимів) полягає в тому, що він входить у режим утримання протягом COM_FAIL_ACT_T секунд перед виконанням відповідної дії аварійного режиму. Це дає користувачу час помітити, що відбувається, і перевизначити аварійний режим, якщо це необхідно. У більшості випадків це можна зробити, використовуючи RC або GCS для перемикання режимів (зверніть увагу, що під час утримання аварійного режиму переміщення пультів RC не спричиняє перезапуску).

Нижче наведений список всіх дій аварійного режиму, впорядкованих за зростанням серйозності. Зверніть увагу, що різні типи аварійного режиму можуть не підтримувати всі ці дії.

ActionОпис
None/DisabledNo action. The failsafe will be ignored.
WarningA warning message will be sent (i.e. to QGroundControl).
Hold modeThe vehicle will enter Hold mode (MC) or Hold mode (FW) and hover or circle, respectively. VTOL vehicles will hold according to their current mode (MC/FW).
Return modeThe vehicle will enter Return mode. Return behaviour can be set in the Return Home Settings (below).
Land modeThe vehicle will enter Land mode (MC) or Land mode (FW), and land. A VTOL will first transition to MC mode.
DisarmStops the motors immediately.
Flight terminationTurns off all controllers and sets all PWM outputs to their failsafe values (e.g. PWM_MAIN_FAILn, PWM_AUX_FAILn). The failsafe outputs can be used to deploy a parachute, landing gear or perform another operation. For a fixed-wing vehicle this might allow you to glide the vehicle to safety.

If multiple failsafes are triggered, the more severe action is taken. For example if both RC and GPS are lost, and manual control loss is set to Return mode and GCS link loss to Land, Land is executed.

TIP

The exact behavior when different failsafes are triggered can be tested with the Failsafe State Machine Simulation.

Налаштування безпеки QGroundControl

Сторінка налаштувань безпеки в QGroundControl доступна за допомогою кліку на значок QGroundControl, вибору Налаштування транспортного засобу, а потім Безпека у бічній панелі. Це включає найважливіші налаштування аварійного режиму (батарея, втрата RC тощо) та налаштування спрацьованих дій Повернення та Посадка.

Safety Setup(QGC)

Аварійний режим в разі низького рівня заряду батареї

Аварійний режим при низькому заряді батареї спрацьовує, коли ємність батареї падає нижче одного (або кількох) значень рівня попередження.

Safety - Battery (QGC)

Найпоширеніша конфігурація полягає в встановленні значень та дій, як описано вище (з Попередження > Аварійний режим > Екстрена ситуація). З такою конфігурацією аварійний режим спочатку викличе попередження, потім повернення, і, нарешті, посадку, якщо ємність впаде нижче відповідних рівнів.

Також можливо встановити Дію аварійного режиму на попередження, повернення або посадку, коли досягнуто Рівень аварійного режиму батареї.

Налаштування та вибрані параметри показані нижче.

НалаштуванняПараметрОпис
Failsafe ActionCOM_LOW_BAT_ACTWarn, Return, or Land based when capacity drops below Battery Failsafe Level, OR Warn, then return, then land based on each of the level settings below.
Battery Warn LevelBAT_LOW_THRPercentage capacity for warnings (or other actions).
Battery Failsafe LevelBAT_CRIT_THRPercentage capacity for Return action (or other actions if a single action selected).
Battery Emergency LevelBAT_EMERGEN_THRPercentage capacity for triggering Land (immediately) action.

Аварійний режим втрати ручного керування

The manual control loss failsafe may be triggered if the connection to the RC transmitter or joystick is lost, and there is no fallback. If using an RC transmitter this is triggered if the RC transmitter link is lost. If using joysticks connected over a MAVLink data link, this is triggered if the joysticks are disconnected or the data link is lost.

:::note PX4 and the receiver may also need to be configured in order to detect RC loss: Radio Setup > RC Loss Detection. :::

Safety - RC Loss (QGC)

The QGCroundControl Safety UI allows you to set the failsafe action and RC Loss timeout. 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_RC_LOSS_TManual Control Loss TimeoutTime 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.
COM_FAIL_ACT_TFailsafe Reaction DelayDelay 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.
NAV_RCL_ACTFailsafe ActionDisabled, Loiter, Return, Land, Disarm, Terminate.
COM_RCL_EXCEPTRC Loss ExceptionsSet 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.

Safety - Data Link Loss (QGC)

The settings and underlying parameters are shown below.

НалаштуванняПараметрОпис
Data Link Loss TimeoutCOM_DL_LOSS_TAmount of time after losing the data connection before the failsafe will trigger.
Failsafe ActionNAV_DLL_ACTDisabled, Hold mode, Return mode, Land mode, Disarm, Terminate.

Аварійний режим "обмеження зони політів"

Аварійний режим "обмеження зони політів" спрацьовує, коли дрон перетинає "віртуальний" периметр. У найпростішій формі периметр налаштовується як циліндр, центрований навколо домашньої позиції. Якщо транспортний засіб виходить за межі радіуса або вище вказаної висоти, спрацьовує вказана Дія аварійного режиму.

Safety - Geofence (QGC)

PX4 окремо підтримує більш складні геофенси з багатьма довільними полігональними та круговими областями включення та виключення: Політ > Геофенс.

The settings and underlying geofence parameters are shown below.

SettingParameterDescription
Action on breachGF_ACTIONNone, Warning, Hold mode, Return mode, Terminate, Land.
Max RadiusGF_MAX_HOR_DISTHorizontal radius of geofence cylinder. Geofence disabled if 0.
Max AltitudeGF_MAX_VER_DISTHeight of geofence cylinder. Geofence disabled if 0.

:::note 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, 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.

НалаштуванняПараметрОпис
Geofence sourceGF_SOURCESet whether position source is estimated global position or direct from the GPS device.
Preemptive geofence triggeringGF_PREDICT(Experimental) Trigger geofence if current motion of the vehicle is predicted to trigger the breach (rather than late triggering after the breach).
Circuit breaker for flight terminationCBRK_FLIGHTTERMEnables/Disables flight termination action (disabled by default).

Return Mode Settings

Return is a common failsafe action that engages Return mode to return the vehicle to the home position. This section shows how to set the land/loiter behaviour after returning.

Safety - Return Home Settings (QGC)

The settings and underlying parameters are shown below:

НалаштуванняПараметрОпис
Climb to altitudeRTL_RETURN_ALTVehicle ascend to this minimum height (if below it) for the return flight.
Return behaviourChoice list of Return then: Land, Loiter and do not land, or Loiter and land after a specified time.
Loiter AltitudeRTL_DESCEND_ALTIf return with loiter is selected you can also specify the altitude at which the vehicle hold.
Loiter TimeRTL_LAND_DELAYIf return with loiter then land is selected you can also specify how long the vehicle will hold.

:::note The return behaviour is defined by RTL_LAND_DELAY. If negative the vehicle will land immediately. Additional information can be found in Return mode. :::

Land Mode Settings

Land at the current position is a common failsafe action (in particular for multicopters), that engages Land Mode. This section shows how to control when and if the vehicle automatically disarms after landing. For Multicopters (only) you can additionally set the descent rate.

Safety - Land Mode Settings (QGC)

The settings and underlying parameters are shown below:

SettingParameterDescription
Disarm AfterCOM_DISARM_LANDSelect checkbox to specify that the vehicle will disarm after landing. The value must be non-zero but can be a fraction of a second.
Landing Descent Rate (MC only)MPC_LAND_SPEEDRate of descent.

Інші налаштування аварійного режиму

This section contains information about failsafe settings that cannot be configured through the QGroundControl Safety Setup page.

Аварійний режим втрати позиції (GPS)

The Position Loss Failsafe is triggered if the quality of the PX4 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, 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 vehicles and VTOLs in fixed-wing flight additionally have a parameter (FW_GPSF_LT) that defines how long they will loiter (circle with a constant roll angle (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) then they will first transition and then descend.

The relevant parameters for all vehicles shown below.

ПараметрОпис
COM_POS_FS_DELAYDelay after loss of position before the failsafe is triggered.
COM_POSCTL_NAVLPosition control navigation loss response during mission. Values: 0 - assume use of RC, 1 - Assume no RC.

Parameters that only affect Fixed-wing vehicles:

ПараметрОпис
FW_GPSF_LTLoiter time (waiting for GPS recovery before it goes into land or flight termination). Set to 0 to disable.
FW_GPSF_RFixed roll/bank angle while circling.

Аварійний режим втрати управління з пульта

The Offboard Loss Failsafe is triggered if the offboard link is lost while under Offboard control. Можна вказати різні дії аварійного режиму в залежності від наявності зв'язку з RC.

Відповідні параметри наведено нижче:

ПараметрОпис
COM_OF_LOSS_TDelay after loss of offboard connection before the failsafe is triggered.
COM_OBL_RC_ACTFailsafe action if RC is available: Position mode, Altitude mode, Manual mode, Return mode, Land mode, Hold mode.

Перевірки можливості місії

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 and Mission Mode (MC) > Mission Feasibility Checks.

Аварійний режим уникнення трафіку

Аварійний режим уникнення трафіку дозволяє PX4 реагувати на дані від транспондерів (наприклад, від ADS-B транспондерів) під час місій.

Відповідні параметри наведено нижче:

ПараметрОпис
NAV_TRAFF_AVOIDSet the failsafe action: Disabled, Warn, Return mode, Land mode.

Quad-chute Failsafe

Аварійний режим для випадку, коли БЛА типу VTOL більше не може летіти у режимі фіксованого крила, наприклад, через відмову тягового мотора, датчика швидкості повітря або керованої поверхні. Якщо спрацьовує аварійний режим, транспортний засіб негайно перейде у режим багтороторного літання і виконає дію, визначену у параметрі COM_QC_ACT.

:::note The quad-chute can also be triggered by sending a MAVLINK 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.

ParameterDescription
COM_QC_ACTQuad-chute action after switching to multicopter flight. Can be set to: Warning, Return, Land, Hold.
VT_FW_QC_HMAXMaximum 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).
VT_QC_ALT_LOSSUncommanded descent quad-chute altitude threshold.

In altitude controlled modes, such as Hold mode, Position mode, Altitude mode, or Mission mode, 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).

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.
VT_QC_T_ALT_LOSSAltitude 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.
VT_FW_MIN_ALTMinimum 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.
VT_FW_QC_RAbsolute roll threshold for quad-chute triggering in FW mode.
VT_FW_QC_PAbsolute pitch threshold for quad-chute triggering in FW mode.

Виявлення відмов

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 if failure conditions are met, which may then launch a parachute or perform some other action.

:::note Failure detection during flight is deactivated by default (enable by setting the parameter: CBRK_FLIGHTTERM=0). :::

During takeoff the failure detector attitude trigger invokes the disarm action 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), Acro mode (FW), and Manual (FW)).

Attitude Trigger

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:

ParameterDescription
CBRK_FLIGHTTERMFlight termination circuit breaker. Unset from 121212 (default) to enable flight termination due to FailureDetector or FMU loss.
FD_FAIL_PMaximum allowed pitch (in degrees).
FD_FAIL_RMaximum allowed roll (in degrees).
FD_FAIL_P_TTRITime to exceed FD_FAIL_P for failure detection (default 0.3s).
FD_FAIL_R_TTRITime to exceed FD_FAIL_R for failure detection (default 0.3s).

External Automatic Trigger System (ATS)

The failure detector, if enabled, 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.

:::note External ATS is required by ASTM F3322-18. One example of an ATS device is the FruityChutes Sentinel Automatic Trigger System. :::

ПараметрОпис
FD_EXT_ATS_ENEnable PWM input on AUX5 or MAIN5 (depending on board) for engaging failsafe from an external automatic trigger system (ATS). Default: Disabled.
FD_EXT_ATS_TRIGThe PWM threshold from external automatic trigger system for engaging failsafe. Default: 1900 ms.

Перемикачі екстренного виклику

Пультові перемикачі можуть бути налаштовані (як частина налаштувань QGroundControl Режиму польоту) для того, щоб ви могли швидко вжити корекційних дій у разі проблеми або екстренної ситуації; наприклад, для зупинки всіх моторів або активації режиму Повернення.

Цей розділ перелічує доступні аварійні вимикачі.

Перемикач вимкнення

Кнопка "вимкнення" негайно припиняє всі виходи мотора (і, якщо транспортний засіб у повітрі, він почне падати)! Мотори будуть перезапускатися, якщо перемикач буде повернуто назад протягом 5 секунд. Після 5 секунд транспортний засіб автоматично вимкнеться; вам потрібно буде знову ввімкнути його для запуску моторів.

Перемикач увімкнення/вимкнення

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). It might be used in preference to the default mechanism because:

  • Of a preference of a switch over a stick motion.
  • It avoids accidentally triggering arming/disarming in-air with a certain stick motion.
  • There is no delay (it reacts immediately).

Перемикач увімкнення/вимкнення негайно вимикає (зупиняє) мотори для тих режимів польоту, які підтримують вимикання в повітрі. This includes:

  • Manual mode
  • Acro mode
  • Stabilized

Для режимів, які не підтримують вимикання в повітрі, перемикач ігнорується під час польоту, але може бути використаний після виявлення посадки. Це включає режим позиціонування та автономні режими (наприклад, місію, посадку і т. д.).

:::note Часові обмеження автоматичного вимкнення (наприклад, через параметр COM_DISARM_LAND) незалежні від перемикача увімкнення/вимкнення - іншими словами, навіть якщо перемикач увімкнений, часові обмеження все одно працюватимуть. :::

Перемикач повернення

Повернення перемикач може бути використаний для негайного ввімкнення режиму Повернення.

Інші налаштування безпеки

Таймаути автоматичного вимкнення

Ви можете встановити таймаути для автоматичного вимкнення транспортного засобу, якщо він занадто повільно збирається на зліт і/або після посадки (вимкнення транспортного засобу вимикає живлення моторів, тому пропелери не будуть обертатися).

Відповідні параметри наведено нижче:

ПараметрОпис
COM_DISARM_LANDTimeout for auto-disarm after landing.
COM_DISARM_PRFLTTimeout for auto disarm if vehicle is too slow to takeoff.

Додаткова інформація