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

Restore old mission if a new mission is not feasible #18255

Conversation

Igor-Misic
Copy link
Member

@Igor-Misic Igor-Misic commented Sep 17, 2021

Describe problem solved by this pull request
This solves the issue described here #12473

Describe your solution
Dataman has space to store 2 missions. This solution will keep one valid mission in Dataman while other space will be used to store new missions. If the new mission is not feasible, it will return to a previously feasible mission.
This solution also includes fixes that were raised when after this feature was implemented.

Test data / coverage
It is tested in simulation and real vehicles for the last 6 months.

@Igor-Misic Igor-Misic changed the title Restore old mission if a new missionis not feasible Restore old mission if a new missionis are not feasible Sep 17, 2021
@Igor-Misic Igor-Misic changed the title Restore old mission if a new missionis are not feasible Restore old mission if a new mission is not feasible Sep 17, 2021
@dagar dagar self-requested a review September 17, 2021 13:20
@dagar
Copy link
Member

dagar commented Sep 17, 2021

What worries me about this solution is that the GCS is currently oblivious to the mission and has this assumption of being in sync.

Is this correct?

  • the mission sync was technically a success, but then it's rejected by mission feasibility and the old mission is kept
  • QGC is showing a mission that doesn't exist on the vehicle (and doesn't know it)
  • if you click a waypoint on screen it's going to apply to a different mission

Let's at least pause to get a rough plan in place for resolving this fully in the near future.

@dagar dagar requested a review from julianoes September 17, 2021 13:33
@Igor-Misic
Copy link
Member Author

Igor-Misic commented Sep 17, 2021

This is correct, but it is not that bad and changes should probably be done on the GCS side.

Options:

  1. GCS should be updated to download feasible missions from the vehicle after the new mission is rejected. (as it does now when it connects to vehicles that have existing mission)
  2. GCS should have the capability to switch between two mission
  3. GCS should do feasibility checks so it unfeasible mission will never be sent to the vehicle

In either way, I think it is better to have something so you can trigger RTL or LAND rather than have a vehicle in the air without a feasible mission.

Edit:
Since users need to pause the mission before updating the new one, I think the best solution will be number 1).
If GCS receives unfeasible mission information, when the user presses the button for the mission to continue, GCS should download the old mission

@Igor-Misic Igor-Misic force-pushed the pr-restore_old_mission_if_a_new_missionis_not_feasible branch from 27ca85f to ce301a1 Compare September 25, 2021 10:36
@Igor-Misic
Copy link
Member Author

Closing this PR. In dev call was suggested a different approach where mission feasibility will be refactored to do validation more closely to mavlink level.

Everyone else who currently care more about the vehicle has a valid mission and to be capable of land and return to home, the branch is here: https://github.com/PX4/PX4-Autopilot/tree/pr-restore_old_mission_if_a_new_missionis_not_feasible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants