fix(mc_pos_control): handle rejected velocity filter cutoffs [1.18] - #28534
Open
Saibernard wants to merge 1 commit into
Open
fix(mc_pos_control): handle rejected velocity filter cutoffs [1.18]#28534Saibernard wants to merge 1 commit into
Saibernard wants to merge 1 commit into
Conversation
…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)
dakejahl
approved these changes
Sep 4, 2026
Contributor
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: 48 byte (0 %)]px4_fmu-v6x [Total VM Diff: 40 byte (0 %)]Updated: 2026-09-04T01:36:40 |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.