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

Rework 1st waypoint check #23568

Merged
merged 6 commits into from
Aug 21, 2024
Merged

Rework 1st waypoint check #23568

merged 6 commits into from
Aug 21, 2024

Conversation

KonradRudin
Copy link
Contributor

Solved Problem

In the mission feasibility, it is checked if the 1st waypoint is too far from the current position. This means that the mission feasibility can change during flight if moving further away from the first waypoint. The mission feasibility should not be able to change depending on the current position of the AV. Especially when a long mission is flown and interrupted, the mission check should make a mission infeasible because the AV did fly away from the fist mission item.

Since the first waypoint mission check should indicate that potentially an old mission from another location is loaded in PX4 it should not be able to change the feasibility in flight

Fixes #{Github issue ID}

Solution

  • The 1st waypoint check only generates a warning in QGC, but does not invalidate a mission
  • The 1st waypoint check is performed against the home position

Changelog Entry

For release notes:

Change: First waypoint mission check only generates a warning, but mission can still be executed

Alternatives

The home position can stil change during a flight and a even better point would be to specifically take a takeoff location which would be constant for an entire flight (AFAIK does not exist yet). Also it can still be argued if the check should make the whole mission infeasible, for simplicity, it was converted to a warning only.

Test coverage

  • Tested in SITL simulation with the standard VTOL configuration.
    • Upload a valid mission and test mission functionality
    • Reduce MIS_DIST_1WP to 1m and check that watning appears after mission feasibility is calculated again
    • Make sure mission can still be executed even with warning
    • Create a mission close to the vehicle and set MIS_DIST_1WP to barely include the first waypoint
    • Fly away manually
    • Execute mission again, make dure mission can still be flown but a warning is displayed.

Context

Related links, screenshot before/after, video

@KonradRudin KonradRudin changed the title Redo 1st waypoint check Rework 1st waypoint check Aug 19, 2024
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.

There are some CI failures and I have some mini comments, otherwise I fully agree with the approach.

@sfuhrer sfuhrer merged commit 3478765 into main Aug 21, 2024
55 checks passed
@sfuhrer sfuhrer deleted the redo_1st_waypoint_check branch August 21, 2024 07:08
vertiq-jordan pushed a commit to iq-motion-control/PX4-Autopilot that referenced this pull request Aug 21, 2024
)

* FeasibilityChecker: only warn when first waypoint is too far, but still accept mission as valid

* feasiblityChecker: make distance to first waypoint check against home position instead of current position, so it is more constant during a flight

* Apply suggestions from code review

Co-authored-by: Silvan Fuhrer <[email protected]>

* feasibilityCheckerTest: update tests to not fail for first waypoint check

* feasibilityChecker: make comment for 1stwaypointcheck event

* Feasibility check unit test: fix comment

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

---------

Signed-off-by: Silvan Fuhrer <[email protected]>
Co-authored-by: Silvan Fuhrer <[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