Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check mission climb always on current mission item #22230

Merged
merged 2 commits into from
Oct 18, 2023

Conversation

KonradRudin
Copy link
Contributor

Solved Problem

There is a bug when activating a mission for checking if a climb is required. The check is performed on the inactivation_index instead of the chosen mission index. The inactivation index should only be used when infering, if a mission was interrupted during a survey, instead the climb required check should always be performed on the mission item that comes first. In addition the inactivation index should be reset, when a misison is interrupted and the user changes the current sequence as well as when the mission is reset.

Fixes #{Github issue ID}

Solution

  • Make sure to use the current mission index when performing the climb check.
  • Reset inactivation index when user sets current sequence of the mission is reset.

Changelog Entry

For release notes:

Bugfix Make sure the climb check at the start of a mission is performed at the current mission item.

Test coverage

  • Unit/integration test: Tested in SITL gazebo-classic_standard_vtol

Copy link
Contributor

@sfuhrer sfuhrer left a comment

Choose a reason for hiding this comment

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

Seems right to me. The original intend is still covered, as when a resume during a survey happens setMissionIndex() sets the current_seq which is then checked by the checkClimbRequired().
Hopefully we can also simplify the whole mission logic further, there's currently too any internal states to take care of.

@KonradRudin
Copy link
Contributor Author

Yes, and the checkClimbRequired should still check the mission item even when the inactivation_index is set to -1 due to a reset.

@KonradRudin KonradRudin merged commit 9887058 into main Oct 18, 2023
87 checks passed
@KonradRudin KonradRudin deleted the fix_mission_check_climb branch October 18, 2023 05:59
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.

None yet

2 participants