Prearm/Arm/Disarm Configuration
Last updated
Last updated
Vehicles may have moving parts, some of which are potentially dangerous when powered (in particular motors and propellers)!
To reduce the chance of accidents, PX4 has explicit state(s) for powering the vehicle components:
Disarmed: There is no power to motors or actuators.
Pre-armed: Motors/propellers are locked but actuators for non-dangerous electronics are powered (e.g. ailerons, flaps etc.).
Armed: Vehicle is fully powered. Motors/propellers may be turning (dangerous!)
:::note Ground stations may display disarmed for pre-armed vehicles. While not technically correct for pre-armed vehicles, it is "safe". :::
Users can control progression though these states using a on the vehicle (optional) and an , , or MAVLink command on the ground controller:
A safety switch is a control on the vehicle that must be engaged before the vehicle can be armed, and which may also prevent prearming (depending on the configuration). Commonly the safety switch is integrated into a GPS unit, but it may also be a separate physical component.
:::warning A vehicle that is armed is potentially dangerous. The safety switch is an additional mechanism that prevents arming from happening by accident. :::
An arming switch is a switch or button on an RC controller that can be used to arm the vehicle and start motors (provided arming is not prevented by a safety switch).
An arming gesture is a stick movement on an RC controller that can be used as an alternative to an arming switch.
MAVLink commands can also be sent by a ground control station to arm/disarm a vehicle.
PX4 will also automatically disarm the vehicle if it does not takeoff within a certain amount of time after arming, and if it is not manually disarmed after landing. This reduces the amount of time where an armed (and therefore dangerous) vehicle is on the ground.
PX4 allows you to configure how pre-arming, arming and disarming work using parameters (which can be edited in QGroundControl via the ), as described in the following sections.
:::tip Arming/disarming parameters can be found in (search for COM_ARM_*
and COM_DISARM_*
). :::
By default, the vehicle is armed and disarmed by moving RC throttle/yaw sticks to particular extremes and holding them for 1 second.
Arming: Throttle minimum, yaw maximum
Disarming: Throttle minimum, yaw minimum
Mode 2:
Arm: Left stick to bottom right.
Disarm: Left stick to the bottom left.
Mode 1:
Arm: Left-stick to right, right-stick to bottom.
Disarm: Left-stick to left, right-stick to the bottom.
Time that RC stick must be held in arm/disarm position before arming/disarming occurs (default: 1 second).
A two-position switch can also be used for arming/disarming, where the respective arm/disarm commands are sent on switch transitions.
:::tip Two-position arming switches are primarily used in/recommended for racing drones. :::
RC arm switch channel (default: 0 - unassigned). If defined, the specified RC channel (button/switch) is used for arming instead of a stick gesture. Note: - This setting disables the stick gesture! - This setting applies to RC controllers. It does not apply to Joystick controllers that are connected via QGroundControl.
By default vehicles will automatically disarm on landing, or if you take too long to take off after arming. The feature is configured using the following timeouts.
Time-out for auto disarm after landing. Default: 2s (-1 to disable).
Time-out for auto disarm if too slow to takeoff. Default: 10s (<=0 to disable).
To reduce accidents, vehicles are only allowed to arm certain conditions are met. Arming is prevented if:
The vehicle is not in a "healthy" state. For example it is not calibrated, or is reporting sensor errors.
The current mode requires an adequate global position estimate but the vehicle does not have GPS lock.
Many more ...
Disabled: Pre-arm mode disabled (there is no stage where only "safe"/non-throttling actuators are enabled).
Safety Switch (Default): The pre-arm mode is enabled by the safety switch. If there is no safety switch then pre-arm mode will not be enabled.
Always: Prearm mode is enabled from power up.
The sections below detail the startup sequences for the different configurations
The default startup sequence is:
Power-up.
All actuators locked into disarmed position
Not possible to arm.
Safety switch is pressed.
System now prearmed: non-throttling actuators can move (e.g. ailerons).
System safety is off: Arming possible.
Arm command is issued.
The system is armed.
All motors and actuators can move.
The startup sequence is:
Power-up.
All actuators locked into disarmed position
Not possible to arm.
Safety switch is pressed.
All actuators stay locked into disarmed position (same as disarmed).
System safety is off: Arming possible.
Arm command is issued.
The system is armed.
All motors and actuators can move.
The startup sequence is:
Power-up.
System now prearmed: non-throttling actuators can move (e.g. ailerons).
Not possible to arm.
Safety switch is pressed.
System safety is off: Arming possible.
Arm command is issued.
The system is armed.
All motors and actuators can move.
The startup sequence is:
Power-up.
All actuators locked into disarmed position
System safety is off: Arming possible.
Arm command is issued.
The system is armed.
All motors and actuators can move.
The startup sequence is:
Power-up.
System now prearmed: non-throttling actuators can move (e.g. ailerons).
System safety is off: Arming possible.
Arm command is issued.
The system is armed.
All motors and actuators can move.
Condition to enter prearmed mode. 0
: Disabled, 1
: Safety switch (prearm mode enabled by safety switch; if no switch present cannot be enabled), 2
: Always (prearm mode enabled from power up). Default: 1
(safety button).
Circuit breaker for IO safety.
RC controllers will have different gestures (as controller mode affects the sticks used for throttle and yaw):
The required hold time can be configured using .
An arming button or "momentary switch" can be configured to trigger arm/disarm instead of (setting an arming switch disables arming gestures). The button should be held down for () one second to arm (when disarmed) or disarm (when armed).
The switch or button is assigned (and enabled) using , and the switch "type" is configured using .
Arm switch is a momentary button.
- 0
: Arm switch is a 2-position switch where arm/disarm commands are sent on switch transitions.
-1
: Arm switch is a button or momentary button where the arm/disarm command ae sent after holding down button for set time ().
:::note The switch can also be set as part of QGroundControl configuration. :::
The vehicle has a that has not been engaged.
The vehicle has a that is unhealthy or otherwise not ready
A VTOL vehicle is in fixed-wing mode ().
The current failed checks can be viewed in QGroundControl (v4.2.0 and later): .
Note that internally PX4 runs arming checks at 10Hz. A list of the failed checks is kept, and if the list changes PX4 emits the current list using the . The list is also sent out when the GCS connects. Effectively the GCS knows the status of prearm checks immediately, both when disarmed and armed.
:::details Implementation notes for developers The client implementation is in :
QGC implementation: . :::
PX4 also emits a subset of the arming check information in the message (see ).
The arming sequence depends on whether or not there is a safety switch, and is controlled by the parameters (Prearm mode) and (I/O safety circuit breaker).
The parameter defines when/if pre-arm mode is enabled ("safe"/non-throttling actuators are able to move):
If there is a safety switch then this will be a precondition for arming. If there is no safety switch the I/O safety circuit breaker must be engaged (), and arming will depend only on the arm command.
The default configuration uses safety switch to prearm. From prearm you can then arm to engage all motors/actuators. It corresponds to: (safety switch) and (I/O safety circuit breaker disabled).
When prearm mode is Disabled, engaging the safety switch does not unlock the "safe" actuators, though it does allow you to then arm the vehicle. This corresponds to (Disabled) and (I/O safety circuit breaker disabled).
When prearm mode is Always, prearm mode is enabled from power up. To arm, you still need the safety switch. This corresponds to (Always) and (I/O safety circuit breaker disabled).
With no safety switch, when COM_PREARM_MODE
is set to Safety or Disabled prearm mode cannot be enabled (same as disarmed). This corresponds to (Disabled/Safety Switch) and (I/O safety circuit breaker engaged).
When prearm mode is Always, prearm mode is enabled from power up. This corresponds to (Always) and (I/O safety circuit breaker engaged).