FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(mc_pos_control): handle rejected velocity filter cutoffs [1.18] by Saibernard · Pull Request #28534 · PX4/PX4-Autopilot · GitHub

fix(mc_pos_control): handle rejected velocity filter cutoffs [1.18] - #28534

Merged
dakejahl merged 1 commit into
PX4:release/1.18from
Saibernard:backport-1.18-mc-pos-control-filter
Sep 4, 2026
Merged

dakejahl merged 1 commit into
PX4:release/1.18from
Saibernard:backport-1.18-mc-pos-control-filter

Conversation

Copy link
Copy Markdown
Contributor

Backport of #28451 to release/1.18, the same commit as on main.

A rejected filter cutoff was silently accepted and degraded altitude hold on multicopters.

…rejected (PX4#28451)

setCutoffFreq refuses a cutoff at or above half the sample rate and
leaves the filter untouched, but all four velocity filter calls ignored
the return. With the filters at their initial alpha of zero this froze
the velocity feedback at zero, and the condition is reachable from a
permitted parameter value, MPC_VEL_LP allows up to 50 Hz while the
position loop commonly runs at 100 Hz or less. In SIH a hover with
MPC_VEL_LP=50 oscillates half a metre in altitude with vertical speed
peaks near 1 m/s, and holds 2.5 m within centimetres with this change.

Follow the pattern VehicleAngularVelocity already uses, check the
return and bypass the low pass stage when the requested cutoff is not
achievable. One deliberate behaviour change comes with that, a runtime
parameter change from a valid to an unachievable cutoff now bypasses
the stage instead of keeping the stale previous configuration.

Assisted-by: Claude:claude-fable-5

Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>
(cherry picked from commit 71f8b37)
github-actions Bot added kind:bug Something is broken or behaving incorrectly. vehicle:copter Copter-specific behavior. scope:control Rate, attitude, position, allocation, or actuator control. labels Sep 4, 2026

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: 48 byte (0 %)]
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%     +48  +0.0%     +48    .text
    +1.5%     +52  +1.5%     +52    MulticopterPositionControl::parameters_update()
    +3.0%      +8  +3.0%      +8    AlphaFilter<>::setCutoffFreq()
    +4.8%      +4  +4.8%      +4    FlightTask
     +44%      +4   +44%      +4    g_nullstring
    -2.1%      -2  -2.1%      -2    events::send<>()
    -0.6%      -2  -0.6%      -2    matrix::SliceT<>::operator=()
    -0.0%      -4  -0.0%      -4    g_cromfs_image
    -0.0%     -12  -0.0%     -12    [section .text]
  +0.0%     +55  [ = ]       0    .debug_abbrev
  +0.0%     +20  [ = ]       0    .debug_info
  +0.0%     +13  [ = ]       0    .debug_line
   -33.3%      -1  [ = ]       0    [Unmapped]
    +0.0%     +14  [ = ]       0    [section .debug_line]
  +0.0%     +84  [ = ]       0    .debug_loclists
  +0.8%      +2  [ = ]       0    .shstrtab
  -0.0%     -14  [ = ]       0    .strtab
   -12.8%     -14  [ = ]       0    AlphaFilter<>::setCutoffFreq()
     +76%     +16  [ = ]       0    __sq_addafter_veneer
   -37.2%     -16  [ = ]       0    __stm32_endtransfer_veneer
  -0.6%     -48  [ = ]       0    [Unmapped]
  +0.0%    +160  +0.0%     +48    TOTAL

px4_fmu-v6x [Total VM Diff: 40 byte (0 %)]
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%     +40  +0.0%     +40    .text
    +1.5%     +52  +1.5%     +52    MulticopterPositionControl::parameters_update()
    +3.0%      +8  +3.0%      +8    AlphaFilter<>::setCutoffFreq()
    +4.8%      +4  +4.8%      +4    FlightTask
    -2.1%      -2  -2.1%      -2    events::send<>()
    -0.6%      -2  -0.6%      -2    matrix::SliceT<>::operator=()
    -0.0%      -4  -0.0%      -4    g_cromfs_image
    -0.0%     -16  -0.0%     -16    [section .text]
  +0.0%     +55  [ = ]       0    .debug_abbrev
  +0.0%     +20  [ = ]       0    .debug_info
  +0.0%     +21  [ = ]       0    .debug_line
    [NEW]      +7  [ = ]       0    [Unmapped]
    +0.0%     +14  [ = ]       0    [section .debug_line]
  +0.0%     +84  [ = ]       0    .debug_loclists
  +0.9%      +2  [ = ]       0    .shstrtab
  -0.0%     -14  [ = ]       0    .strtab
   -12.8%     -14  [ = ]       0    AlphaFilter<>::setCutoffFreq()
  -0.7%     -40  [ = ]       0    [Unmapped]
  +0.0%    +168  +0.0%     +40    TOTAL

Updated: 2026-09-04T01:36:40

dakejahl merged commit b61b2c9 into PX4:release/1.18 Sep 4, 2026
73 checks passed
Saibernard added a commit to Saibernard/PX4-Autopilot that referenced this pull request Sep 10, 2026
… fix

PX4#28534 merged onto release/1.18 after the first five entries.

Assisted-by: Claude:claude-fable-5
Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>
hamishwillee added a commit that referenced this pull request Sep 17, 2026
* docs(releases): add v1.18 notes for five backported fixes

The estimator selector, VTOL mission return, analog battery filter,
home altitude filter and mission end fixes are on release/1.18 now,
this adds their entries to the release notes.

Assisted-by: Claude:claude-fable-5
Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>

* MOve entries

* docs(releases): add the v1.18 note for the position controller filter fix

#28534 merged onto release/1.18 after the first five entries.

Assisted-by: Claude:claude-fable-5
Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>

---------

Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
dakejahl pushed a commit that referenced this pull request Sep 22, 2026
…28749)

* docs(releases): add v1.18 notes for five backported fixes

The estimator selector, VTOL mission return, analog battery filter,
home altitude filter and mission end fixes are on release/1.18 now,
this adds their entries to the release notes.

Assisted-by: Claude:claude-fable-5


* MOve entries

* docs(releases): add the v1.18 note for the position controller filter fix

#28534 merged onto release/1.18 after the first five entries.

Assisted-by: Claude:claude-fable-5


---------



(cherry picked from commit fe87271)

Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug Something is broken or behaving incorrectly. scope:control Rate, attitude, position, allocation, or actuator control. vehicle:copter Copter-specific behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL