Skip to content

MissionBase: replay change speed on resume immediately if not going to previous#24484

Merged
sfuhrer merged 2 commits intomainfrom
pr-mission-base-fix-speed-replay-resume-prior-main
Mar 12, 2025
Merged

MissionBase: replay change speed on resume immediately if not going to previous#24484
sfuhrer merged 2 commits intomainfrom
pr-mission-base-fix-speed-replay-resume-prior-main

Conversation

@sfuhrer
Copy link
Contributor

@sfuhrer sfuhrer commented Mar 11, 2025

Solved Problem

This fixes an issue where the speed was not correctly set at the beginning of a survey (with first wp having a DO_CHANGE_SPEED attached) when the user paused and resumed the mission prior to reaching the first waypoint.

See following screen recording: mission is paused before reaching the survey, and on resume the survey speed is not applied.

AMC_change_speed_prior_survey.mp4

Digging further down: when resuming the mission, the previous DO_CHANGE_SPEED are not immediately replayed but only once the next waypoint is reached. In the case here, this coincides with the next DO_CHANGE_SPEED (12) of the survey, which is thus overwritten by the previous DO_CHANGE_SPEED (5), and the survey is flown at 5m/s instead of 12.

Solution

Replay DO_CHANGE_SPEED setpoints immediately on mission resume unless the vehicle first has to go back to previous waypoint.

Changelog Entry

For release notes:

Feature/Bugfix XYZ
New parameter: XYZ_Z
Documentation: Need to clarify page ... / done, read docs.px4.io/...

Test coverage

SITL tests with quad and survey pattern (which has a different mission speed defined as rest of mission).

Context

This is a follow up to #23484.

…o previous

This fixes an issue where the speed was not correctly set at the beginning of a
survey (with first wp having a DO_CHANGE_SPEED attached) when the user paused
and resumed the mission prior to reaching the first waypoint.

Signed-off-by: Silvan Fuhrer <[email protected]>
@sfuhrer sfuhrer requested a review from StefanoColli March 11, 2025 09:36
StefanoColli
StefanoColli previously approved these changes Mar 11, 2025
Copy link
Contributor

@StefanoColli StefanoColli left a comment

Choose a reason for hiding this comment

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

Nice catch! There is only a small typo to be corrected

@sfuhrer sfuhrer merged commit 5319b82 into main Mar 12, 2025
61 of 62 checks passed
@sfuhrer sfuhrer deleted the pr-mission-base-fix-speed-replay-resume-prior-main branch March 12, 2025 08:17
mrpollo pushed a commit that referenced this pull request Nov 24, 2025
…o previous (#24484)

* MissionBase: replay change speed on resume immediately if not going to previous

This fixes an issue where the speed was not correctly set at the beginning of a
survey (with first wp having a DO_CHANGE_SPEED attached) when the user paused
and resumed the mission prior to reaching the first waypoint.

Signed-off-by: Silvan Fuhrer <[email protected]>

* Update src/modules/navigator/mission_base.cpp

Co-authored-by: Stefano Colli <[email protected]>

---------

Signed-off-by: Silvan Fuhrer <[email protected]>
Co-authored-by: Stefano Colli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants