fix(flight_mode_manager): initialize smoothing with current acceleration#27652
Open
AkaiEurus wants to merge 1 commit into
Open
fix(flight_mode_manager): initialize smoothing with current acceleration#27652AkaiEurus wants to merge 1 commit into
AkaiEurus wants to merge 1 commit into
Conversation
Contributor
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: 16 byte (0 %)]px4_fmu-v6x [Total VM Diff: 24 byte (0 %)]Updated: 2026-06-12T10:22:29 |
Contributor
|
Need flight logs for validation on these kinds of changes so we can see the before/after and verify it works as intended |
Contributor
Author
Updated the PR with before/after SITL logs covering the affected FlightTask transitions. |
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.
Solved Problem
#26254 introduced
_accelerationand updatedFlightTaskAuto, but other flight tasks still fell back to zero acceleration.Solution
Use
_accelerationas the fallback in Orbit, ManualAltitudeSmoothVel, and ManualAcceleration.Changelog Entry
Test Coverage
Validated in multicopter SITL with before/after ULogs. For each case I compared
trajectory_setpoint.acceleration[*]withvehicle_local_position.ax/ay/azaround the FlightTask switch point.ManualAltitudeSmoothVel::activate()MPC_POS_MODE=4.STABILIZED, applied vertical stick input to create a non-zerovehicle_local_position.az, then switched toALTCTL.log before patch: https://logs.px4.io/plot_app?log=4a9e955e-e9a5-4942-a72a-18624371d7da
log after patch: https://logs.px4.io/plot_app?log=94daeb66-81ec-4616-828d-ea0f48fac17f
ManualAcceleration::activate()MPC_POS_MODE=4.STABILIZED, applied pitch/roll stick input to create non-zerovehicle_local_position.ax/ay, then switched toPOSCTLwhile the vehicle was still accelerating horizontally.log before patch: https://logs.px4.io/plot_app?log=3a5a6161-e2d5-4069-bb83-1aa30ce34d5d
log after patch: https://logs.px4.io/plot_app?log=096e588f-4e8a-4649-99ec-5e8bc799ffe8
FlightTaskOrbit::activate()MPC_POS_MODE=0.POSCTL, applied a short horizontal stick input/vertical stick input, then sentMAV_CMD_DO_ORBIT.horizontal input:
log before patch: https://logs.px4.io/plot_app?log=50deadae-9f72-4813-be58-a23dda815d76
log after patch: https://logs.px4.io/plot_app?log=9bb01426-a4e7-4684-a4cd-0cadc0b67e7c
vertical input:
log before patch: https://logs.px4.io/plot_app?log=fcd86b5c-1935-4c0a-abc5-df788f6773fc
log after patch: https://logs.px4.io/plot_app?log=7a6163e4-5f71-4cbe-8ad4-2c1444462f41