Fix: replay the mission cached items only upon reaching resume waypoint#23484
Merged
Fix: replay the mission cached items only upon reaching resume waypoint#23484
Conversation
sfuhrer
reviewed
Aug 13, 2024
Contributor
sfuhrer
left a comment
There was a problem hiding this comment.
Thanks for your contribution, it works correctly in my simulation. An alternative would be to add a _work_item_type != WorkItemType::WORK_ITEM_TYPE_CLIMB after the check for is_mission_item_reached_or_completed(), as it's really only the inserted climb mission item that brings the logic out of order. But your proposed solution seems a bit more robust.
Split camera mode mission items from gimbal ones so to have a finer control over the relative replays
Ali-barari
pushed a commit
to Ali-barari/AvesAID
that referenced
this pull request
Apr 29, 2025
…ching resume waypoint (PX4#23484) * Fix: replay the mission cached items only upon reaching resume waypoint * Refactoring Split camera mode mission items from gimbal ones so to have a finer control over the relative replays * Chore: fix formatting --------- Co-authored-by: Silvan Fuhrer <silvan@auterion.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
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
Upon mission resume (e.g., after a RTL), the gimbal would immediately assume its previous configuration instead of waiting having reached a mission waypoint.
Similarly the camera would start triggering from take-off instead of from the last reached mission waypoint
Solution
Store the index of the last mission item reached before the mission interruption, then replay the cached drone commands only after having reached such mission item
Alternatives
We could also used the existing
_inactivation_indexvariable but it has a slightly different meaning and has a different reset behaviourTest coverage