Skip to content

feat(commander): extend COM_PARACHUTE to configure parachute failsafe#26918

Open
gguidone wants to merge 4 commits intomainfrom
gg/parachute-action
Open

feat(commander): extend COM_PARACHUTE to configure parachute failsafe#26918
gguidone wants to merge 4 commits intomainfrom
gg/parachute-action

Conversation

@gguidone
Copy link
Copy Markdown
Contributor

@gguidone gguidone commented Mar 31, 2026

Solved Problem

Previously, the parachute health failsafe was hardcoded to RTL and enabling/configuring the check required two separate parameters. This is too restrictive for mission profiles where a simple warning or landing is preferred.

Solution

Unified COM_PARACHUTE into a single enum that controls both whether the check is active and what action is taken:

  • Disabled (0, Default)
  • Warning only (1), orange indicator, does not block arming
  • Error and blocks arming (2), red indicator, warns in flight
  • Return and blocks arming (3)
  • Land and blocks arming (4)

Values ≥ 2 block arming.

Test coverage

  • SITL: Verified all six COM_PARACHUTE values behave correctly upon failure injection.
  • SITL: Confirmed warning-only mode shows orange indicator and does not block arming.
  • SITL: Confirmed values ≥ 2 block arming and trigger the correct in-flight failsafe action.

@github-actions
Copy link
Copy Markdown

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: 192 byte (0.01 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%    +192  +0.0%    +192    .text
  +0.0%     +56  +0.0%     +56    g_cromfs_image
  [NEW]     +40  [NEW]     +40    Failsafe::fromParachuteActParam()
   +13%     +28   +13%     +28    ParachuteChecks::checkAndReport()
  +4.4%     +20  +4.4%     +20    Failsafe::Failsafe()
  +1.1%     +20  +1.1%     +20    HealthAndArmingChecks::HealthAndArmingChecks()
  +0.0%     +16  +0.0%     +16    [section .text]
  +3.4%     +12  +3.4%     +12    Commander::handleAutoDisarm()
  +5.3%     +12  +5.3%     +12    Failsafe::updateParamsImpl()
   +38%     +12   +38%     +12    ParachuteChecks::updateParamsImpl()
  +0.5%      +8  +0.5%      +8    Commander::Commander()
  +2.3%      +8  +2.3%      +8    Commander::~Commander()
  +0.0%      +8  +0.0%      +8    px4::parameters
  [NEW]      +4  [NEW]      +4    CSWTCH.827
  +0.7%      +4  +0.7%      +4    Commander::arm()
 -99.9%      +4 -99.9%      +4    [11 Others]
  [DEL]      -4  [DEL]      -4    CSWTCH.824
  -1.6%      -4  -1.6%      -4    Commander::checkForMissionUpdate()
  -0.3%      -4  -0.3%      -4    Commander::dataLinkCheck()
  -0.2%      -8  -0.2%      -8    Commander::handle_command()
  -6.7%     -12  -6.7%     -12    Commander::updateControlMode()
  -5.0%     -28  -5.0%     -28    Commander::control_status_leds()
+0.0%    +120  [ = ]       0    .debug_abbrev
+0.0%      +8  [ = ]       0    .debug_aranges
+0.0%     +44  [ = ]       0    .debug_frame
+0.0% +4.74Ki  [ = ]       0    .debug_info
+0.0%    +378  [ = ]       0    .debug_line
+0.0%    +422  [ = ]       0    .debug_loclists
+0.0%     +43  [ = ]       0    .debug_rnglists
  [DEL]      -3  [ = ]       0    [Unmapped]
  +0.0%     +46  [ = ]       0    [section .debug_rnglists]
+0.0% +1.05Ki  [ = ]       0    .debug_str
+0.8%      +2  [ = ]       0    .shstrtab
+0.0%     +38  [ = ]       0    .strtab
  [DEL]     -11  [ = ]       0    CSWTCH.824
  [NEW]     +11  [ = ]       0    CSWTCH.827
  [NEW]     +38  [ = ]       0    Failsafe::fromParachuteActParam()
+0.0%     +32  [ = ]       0    .symtab
  [DEL]     -32  [ = ]       0    CSWTCH.824
  [NEW]     +32  [ = ]       0    CSWTCH.827
   +17%     +16  [ = ]       0    Commander::Commander()
 -50.0%     -16  [ = ]       0    Commander::checkForMissionUpdate()
  +100%     +16  [ = ]       0    Commander::checkWorkerThread()
 -25.0%     -16  [ = ]       0    Commander::control_status_leds()
  +100%     +16  [ = ]       0    Commander::updateControlMode()
 -33.3%     -16  [ = ]       0    Commander::updateTunes()
   +33%     +16  [ = ]       0    Failsafe::checkStateAndMode()
   +20%     +16  [ = ]       0    Failsafe::fromOffboardLossActParam()
  [NEW]     +32  [ = ]       0    Failsafe::fromParachuteActParam()
 -25.0%     -16  [ = ]       0    ParachuteChecks::checkAndReport()
  +100%     +16  [ = ]       0    ParachuteChecks::updateParamsImpl()
  -0.3%     -32  [ = ]       0    [section .symtab]
  -1.5%     -16  [ = ]       0    uORB::Publication<>::publish()
   +14%     +16  [ = ]       0    uORB::SubscriptionData<>::SubscriptionData()
-1.9%    -192  [ = ]       0    [Unmapped]
+0.0% +6.86Ki  +0.0%    +192    TOTAL

px4_fmu-v6x [Total VM Diff: 184 byte (0.01 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.0%    +184  +0.0%    +184    .text
  +0.0%     +48  +0.0%     +48    g_cromfs_image
  [NEW]     +40  [NEW]     +40    Failsafe::fromParachuteActParam()
   +13%     +28   +13%     +28    ParachuteChecks::checkAndReport()
  +4.4%     +20  +4.4%     +20    Failsafe::Failsafe()
  +1.1%     +20  +1.1%     +20    HealthAndArmingChecks::HealthAndArmingChecks()
  +0.0%     +16  +0.0%     +16    [section .text]
  +3.4%     +12  +3.4%     +12    Commander::handleAutoDisarm()
  +5.3%     +12  +5.3%     +12    Failsafe::updateParamsImpl()
   +38%     +12   +38%     +12    ParachuteChecks::updateParamsImpl()
  +0.5%      +8  +0.5%      +8    Commander::Commander()
  +2.3%      +8  +2.3%      +8    Commander::~Commander()
  +0.1%      +8  +0.1%      +8    px4::parameters
  [NEW]      +4  [NEW]      +4    CSWTCH.827
  +0.7%      +4  +0.7%      +4    Commander::arm()
 -99.9%      +4 -99.9%      +4    [9 Others]
  [DEL]      -4  [DEL]      -4    CSWTCH.824
  -1.6%      -4  -1.6%      -4    Commander::checkForMissionUpdate()
  -0.3%      -4  -0.3%      -4    Commander::dataLinkCheck()
  -0.2%      -8  -0.2%      -8    Commander::handle_command()
  -6.7%     -12  -6.7%     -12    Commander::updateControlMode()
  -5.0%     -28  -5.0%     -28    Commander::control_status_leds()
+0.0%    +120  [ = ]       0    .debug_abbrev
+0.0%      +8  [ = ]       0    .debug_aranges
+0.0%     +44  [ = ]       0    .debug_frame
+0.0% +4.68Ki  [ = ]       0    .debug_info
+0.0%    +378  [ = ]       0    .debug_line
   +25%      +1  [ = ]       0    [Unmapped]
  +0.0%    +377  [ = ]       0    [section .debug_line]
+0.0%    +372  [ = ]       0    .debug_loclists
+0.0%     +45  [ = ]       0    .debug_rnglists
 -50.0%      -1  [ = ]       0    [Unmapped]
  +0.0%     +46  [ = ]       0    [section .debug_rnglists]
+0.0% +1.07Ki  [ = ]       0    .debug_str
-0.8%      -2  [ = ]       0    .shstrtab
+0.0%     +38  [ = ]       0    .strtab
  [DEL]     -11  [ = ]       0    CSWTCH.824
  [NEW]     +11  [ = ]       0    CSWTCH.827
  [NEW]     +38  [ = ]       0    Failsafe::fromParachuteActParam()
+0.0%     +32  [ = ]       0    .symtab
  [DEL]     -32  [ = ]       0    CSWTCH.824
  [NEW]     +32  [ = ]       0    CSWTCH.827
   +17%     +16  [ = ]       0    Commander::Commander()
 -50.0%     -16  [ = ]       0    Commander::checkForMissionUpdate()
  +100%     +16  [ = ]       0    Commander::checkWorkerThread()
 -25.0%     -16  [ = ]       0    Commander::control_status_leds()
  +100%     +16  [ = ]       0    Commander::updateControlMode()
 -33.3%     -16  [ = ]       0    Commander::updateTunes()
   +33%     +16  [ = ]       0    Failsafe::checkStateAndMode()
   +20%     +16  [ = ]       0    Failsafe::fromOffboardLossActParam()
  [NEW]     +32  [ = ]       0    Failsafe::fromParachuteActParam()
 -25.0%     -16  [ = ]       0    ParachuteChecks::checkAndReport()
  +100%     +16  [ = ]       0    ParachuteChecks::updateParamsImpl()
  -0.3%     -32  [ = ]       0    [section .symtab]
  -1.5%     -16  [ = ]       0    uORB::Publication<>::publish()
   +14%     +16  [ = ]       0    uORB::SubscriptionData<>::SubscriptionData()
-4.1%    -184  [ = ]       0    [Unmapped]
+0.0% +6.75Ki  +0.0%    +184    TOTAL

Updated: 2026-03-31T16:04:18

Comment thread src/modules/commander/commander_params.yaml Outdated
@gguidone gguidone force-pushed the gg/parachute-action branch from a98093f to ced41d1 Compare April 13, 2026 12:10
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 13, 2026

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: 176 byte (0.01 %)]
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%    +176  +0.0%    +176    .text
    +0.1%     +92  +0.1%     +92    g_cromfs_image
    [NEW]     +56  [NEW]     +56    CSWTCH.260
    [NEW]     +54  [NEW]     +54    Failsafe::fromParachuteActParam()
    [NEW]     +32  [NEW]     +32    CSWTCH.256
     +15%     +32   +15%     +32    ParachuteChecks::checkAndReport()
    +4.2%     +20  +4.2%     +20    Failsafe::Failsafe()
    +5.0%     +12  +5.0%     +12    Failsafe::updateParamsImpl()
    +0.3%      +4  +0.3%      +4    Failsafe::checkStateAndMode()
    +3.2%      +2  +3.2%      +2    Failsafe::updateArmingState()
    -2.0%      -4  -2.0%      -4    Commander::updateParameters()
    -4.5%      -4  -4.5%      -4    FlightTask
    -0.7%     -12  -0.7%     -12    HealthAndArmingChecks::HealthAndArmingChecks()
   -62.5%     -20 -62.5%     -20    ParachuteChecks::updateParamsImpl()
    [DEL]     -32  [DEL]     -32    CSWTCH.257
    [DEL]     -56  [DEL]     -56    CSWTCH.261
  -0.0%      -9  [ = ]       0    .debug_abbrev
  +0.0%      +8  [ = ]       0    .debug_aranges
  +0.0%     +24  [ = ]       0    .debug_frame
  +0.0%    +917  [ = ]       0    .debug_info
  +0.0%    +268  [ = ]       0    .debug_line
    [NEW]      +6  [ = ]       0    [Unmapped]
    +0.0%    +262  [ = ]       0    [section .debug_line]
  +0.0%    +427  [ = ]       0    .debug_loclists
  +0.0%     +20  [ = ]       0    .debug_rnglists
   -66.7%      -2  [ = ]       0    [Unmapped]
    +0.0%     +22  [ = ]       0    [section .debug_rnglists]
  +0.0%    +133  [ = ]       0    .debug_str
  +0.8%      +2  [ = ]       0    .shstrtab
  +0.0%     +38  [ = ]       0    .strtab
    [NEW]     +11  [ = ]       0    CSWTCH.256
    [DEL]     -11  [ = ]       0    CSWTCH.257
    [NEW]     +11  [ = ]       0    CSWTCH.260
    [DEL]     -11  [ = ]       0    CSWTCH.261
    [NEW]     +38  [ = ]       0    Failsafe::fromParachuteActParam()
  +0.0%     +32  [ = ]       0    .symtab
    [NEW]     +32  [ = ]       0    CSWTCH.256
    [DEL]     -32  [ = ]       0    CSWTCH.257
    [NEW]     +32  [ = ]       0    CSWTCH.260
    [DEL]     -32  [ = ]       0    CSWTCH.261
   -25.0%     -16  [ = ]       0    Commander::handleCommandActuatorTest()
    +100%     +16  [ = ]       0    Commander::updateParameters()
    [NEW]     +32  [ = ]       0    Failsafe::fromParachuteActParam()
     +25%     +16  [ = ]       0    Failsafe::isFailsafeIgnored()
   -50.0%     -16  [ = ]       0    Failsafe::updateArmingState()
   -25.0%     -16  [ = ]       0    ParachuteChecks::checkAndReport()
    +100%     +16  [ = ]       0    ParachuteChecks::updateParamsImpl()
  -1.9%    -176  [ = ]       0    [Unmapped]
  +0.0% +1.82Ki  +0.0%    +176    TOTAL

px4_fmu-v6x [Total VM Diff: 128 byte (0.01 %)]
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%    +128  +0.0%    +128    .text
    [NEW]     +56  [NEW]     +56    CSWTCH.260
    [NEW]     +54  [NEW]     +54    Failsafe::fromParachuteActParam()
    +0.0%     +40  +0.0%     +40    g_cromfs_image
    [NEW]     +32  [NEW]     +32    CSWTCH.256
     +15%     +32   +15%     +32    ParachuteChecks::checkAndReport()
    +4.2%     +20  +4.2%     +20    Failsafe::Failsafe()
    +5.0%     +12  +5.0%     +12    Failsafe::updateParamsImpl()
    +0.3%      +4  +0.3%      +4    Failsafe::checkStateAndMode()
    +3.2%      +2  +3.2%      +2    Failsafe::updateArmingState()
    -2.0%      -4  -2.0%      -4    Commander::updateParameters()
    -0.7%     -12  -0.7%     -12    HealthAndArmingChecks::HealthAndArmingChecks()
   -62.5%     -20 -62.5%     -20    ParachuteChecks::updateParamsImpl()
    [DEL]     -32  [DEL]     -32    CSWTCH.257
    [DEL]     -56  [DEL]     -56    CSWTCH.261
  -0.0%      -9  [ = ]       0    .debug_abbrev
  +0.0%      +8  [ = ]       0    .debug_aranges
  +0.0%     +24  [ = ]       0    .debug_frame
  +0.0%    +917  [ = ]       0    .debug_info
  +0.0%    +268  [ = ]       0    .debug_line
    +600%      +6  [ = ]       0    [Unmapped]
    +0.0%    +262  [ = ]       0    [section .debug_line]
  +0.0%    +427  [ = ]       0    .debug_loclists
  +0.0%     +20  [ = ]       0    .debug_rnglists
    [DEL]      -2  [ = ]       0    [Unmapped]
    +0.0%     +22  [ = ]       0    [section .debug_rnglists]
  +0.0%    +133  [ = ]       0    .debug_str
  +0.9%      +2  [ = ]       0    .shstrtab
  +0.0%     +38  [ = ]       0    .strtab
    [NEW]     +11  [ = ]       0    CSWTCH.256
    [DEL]     -11  [ = ]       0    CSWTCH.257
    [NEW]     +11  [ = ]       0    CSWTCH.260
    [DEL]     -11  [ = ]       0    CSWTCH.261
    [NEW]     +38  [ = ]       0    Failsafe::fromParachuteActParam()
  +0.0%     +32  [ = ]       0    .symtab
    [NEW]     +32  [ = ]       0    CSWTCH.256
    [DEL]     -32  [ = ]       0    CSWTCH.257
    [NEW]     +32  [ = ]       0    CSWTCH.260
    [DEL]     -32  [ = ]       0    CSWTCH.261
   -25.0%     -16  [ = ]       0    Commander::handleCommandActuatorTest()
    +100%     +16  [ = ]       0    Commander::updateParameters()
    [NEW]     +32  [ = ]       0    Failsafe::fromParachuteActParam()
     +25%     +16  [ = ]       0    Failsafe::isFailsafeIgnored()
   -50.0%     -16  [ = ]       0    Failsafe::updateArmingState()
   -25.0%     -16  [ = ]       0    ParachuteChecks::checkAndReport()
    +100%     +16  [ = ]       0    ParachuteChecks::updateParamsImpl()
  -2.4%    -128  [ = ]       0    [Unmapped]
  +0.0% +1.82Ki  +0.0%    +128    TOTAL

Updated: 2026-04-23T15:49:42

Comment thread src/modules/commander/commander_params.yaml Outdated
@gguidone gguidone force-pushed the gg/parachute-action branch from ced41d1 to 25b24c8 Compare April 14, 2026 12:15
@gguidone gguidone requested a review from bresch April 14, 2026 15:27
Copy link
Copy Markdown
Contributor

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs docs - the main page for failsafes is here https://docs.px4.io/main/en/config/safety

You should add a badge like <Badge type="tip" text="PX4 v1.18" /> to the new section.

This may also need update to https://docs.px4.io/main/en/peripherals/parachute and https://docs.px4.io/main/en/advanced_config/flight_termination

Also a release note here https://docs.px4.io/main/en/releases/main

Non-blocking, but is there a planned QGC safety panel update. Makes things easier for users.

@gguidone If you need help, ping me.

@gguidone gguidone changed the title feat(commander): add COM_PARA_ACT to configure parachute failsafe feat(commander): extend COM_PARACHUTE to configure parachute failsafe Apr 15, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 15, 2026

💡 Commit messages could be improved

Not blocking, but these commit messages could use some cleanup.

Commit Message Suggestion
73db052b22 docs: add parachute health failsafe documentation Missing conventional commit format (e.g. "feat(ekf2): add something")

See the commit message convention for details.


This comment will be automatically removed once the issues are resolved.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 15, 2026

No broken links found in changed files.

Comment thread docs/en/peripherals/parachute.md Outdated
Comment thread docs/en/config/safety.md
@gguidone gguidone requested a review from hamishwillee April 20, 2026 08:06
@gguidone gguidone force-pushed the gg/parachute-action branch from 226c1f7 to e254c0b Compare April 20, 2026 08:07
hamishwillee
hamishwillee previously approved these changes Apr 23, 2026
Copy link
Copy Markdown
Contributor

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for the docs part - thanks for the work, and advice on the enabled bit.

Note, there are some merge conflicts

gguidone and others added 4 commits April 23, 2026 17:39
…ilsafe

Previously the parachute unhealthy failsafe was hardcoded to RTL.
Update safety.md, peripherals/parachute.md, and releases/main.md to document the extended COM_PARACHUTE parameter and the new configurable in-flight failsafe behaviour.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants