Copter: support using WPNav for guided mode position control #18603
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.
This resolves, "Dijkstra's in Guided mode not working (reported by Yamaguchi-san)" on the Copter-4.1.0-beta testing issues list by adding a GUID_OPTIONS (=64) to allow using the waypoint navigation controller (aka AC_WPNav, aka SCurves) instead of the position controller to fly to a specified location/position.
The default remains to use the position controller but the difference is:
This implementation includes involves moving the current position controller method to a new "Pos" SubMode and then essentially reverting the "WP" sub mode to use AC_WPNav as it did in Copter-4.0.
Some unrelated changes in this PR:
This has been tested in SITL including:
flew in a horizontal triangular pattern using both controllers to confirm they acted as expected (they did). I also interrupted the vehicle by passing in a new Guided mode target and noticed that the two controllers take different paths (see below).
Enabled Dijkstra's and confirmed the vehicle flew around the fence