| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: 56 byte (0 %)] FILE SIZE VM SIZE
-------------- --------------
+0.0% +56 +0.0% +56 .text
+1.5% +52 +1.5% +52 MulticopterPositionControl::parameters_update()
+3.0% +8 +3.0% +8 AlphaFilter<>::setCutoffFreq()
+0.6% +2 +0.6% +2 matrix::SliceT<>::operator=()
-2.1% -2 -2.1% -2 events::send<>()
-8.3% -4 -8.3% -4 Navigator::stop_capturing_images()
+0.0% +55 [ = ] 0 .debug_abbrev
+0.0% +20 [ = ] 0 .debug_info
+0.0% +21 [ = ] 0 .debug_line
-80.0% -4 [ = ] 0 [Unmapped]
+0.0% +25 [ = ] 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()
+36% +16 [ = ] 0 ___ZL19param_get_cplusplustPf.isra.0_veneer
-34.0% -16 [ = ] 0 __nxsched_merge_pending_veneer
-0.5% -56 [ = ] 0 [Unmapped]
+0.0% +164 +0.0% +56 TOTAL
FILE SIZE VM SIZE
-------------- --------------
+0.0% +56 +0.0% +56 .text
+1.5% +52 +1.5% +52 MulticopterPositionControl::parameters_update()
+3.0% +8 +3.0% +8 AlphaFilter<>::setCutoffFreq()
+0.6% +2 +0.6% +2 matrix::SliceT<>::operator=()
-2.1% -2 -2.1% -2 events::send<>()
-8.3% -4 -8.3% -4 Navigator::stop_capturing_images()
+50% +4 [ = ] 0 .ARM.exidx
+0.0% +55 [ = ] 0 .debug_abbrev
+0.0% +20 [ = ] 0 .debug_info
+0.0% +29 [ = ] 0 .debug_line
+200% +4 [ = ] 0 [Unmapped]
+0.0% +25 [ = ] 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()
-1.5% -60 [ = ] 0 [Unmapped]
+0.0% +172 +0.0% +56 TOTAL
Updated: 2026-08-29T15:54:43 |
Sorry, something went wrong.
…rejected 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>
…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>
…rejected (#28451) (#28534) 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 (cherry picked from commit 71f8b37) Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>
| Back | FazBrowse Home | New Git URL |
Summary
Follow-up from the #28415 review sweep. The velocity low pass configuration in the position controller now checks whether the filter accepted the requested cutoff.
Problem
All four setCutoffFreq calls ignored the return value, and the call is a silent no-op when the cutoff is at or above half the sample rate. The filters start at an alpha of zero, so a rejected configuration freezes the velocity feedback at zero. MPC_VEL_LP permits up to 50 Hz while the position loop runs at 100 Hz or less, so the maximum permitted value triggers this. In SIH a hover with MPC_VEL_LP=50 oscillates half a metre in altitude with vertical speed peaks near 1 m/s.
Solution
Check the return and bypass the low pass stage when the cutoff is not achievable, the pattern VehicleAngularVelocity already uses. The same hover then holds 2.5 m within a centimetre, and the default and valid cutoff configurations behave as before. One deliberate behaviour change, a runtime switch from a valid to an unachievable cutoff now bypasses the stage instead of keeping the stale configuration. The notch filter call at the same site also ignores its return but disables itself internally on invalid input, and a warning on rejection could be added here if wanted.