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

Copter: RTL with rally point finds shortest path using Dijkstras (WIP) #28542

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

rmackay9
Copy link
Contributor

@rmackay9 rmackay9 commented Nov 6, 2024

This enhancement causes RTL to fly to the Rally point with the shortest flight distance instead of the closest Rally point. Normally these are the same but if a fence separates the vehicle from a rally point it can actually be quicker to fly to another.

The change appears to be very large but most of it is just moving code as part of separating Dijkatras into more manageable pieces. These pieces are:

  1. AP_OADijkstra_Common : shared enums and error reporting
  2. AP_OADijkstra_StaticData: handling of fences including calculating inner fences
  3. AP_OADijkstra_CalcPath: the heart of Dijkstras which involves finding the shortest safe path

Other changes are:

  • AP_OADijkstra_CalcPathis enhanced to allow multiple callers to request the shortest path to different destinations
  • AP_Rally is enhanced to use Dijkstras when calculating the the "closets" rally point
  • Copter's ModeRTL's build_path method essentially becomes asyncronous so the vehicle waits until AP_Rally calculates the shortest Rally point (previously this was all done immediately in the main thread)
  • AP_OAPathPlanner is simply updated to use the slightly modified Dijkstras interface

This video demonstrates the enhancement
https://youtu.be/nH_pnZ0FbP0

This has been tested in SITL but not yet on a real vehicle

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.

1 participant