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: loiter-turns fix #17142

Merged
merged 1 commit into from
Apr 11, 2021
Merged

Conversation

rmackay9
Copy link
Contributor

@rmackay9 rmackay9 commented Apr 11, 2021

This fixes Auto flying LOITER_TURNS mission command with a lat,lon,alt specified and resolves issue: #17126

The problem was that we were passing the loiter-turns lat,lon,alt to SCurves as the "next" destination. This is incorrect because the vehicle will never actually travel to the lat,lon,alt within the loiter-turns command. Instead it will fly to that location + circle radius.

The easy solution is just to not pass the loiter-turns command location to SCurves which is what this PR does. A future enhancement would be to actually calculate where the edge of the circle will be and pass that into SCurves. This would avoid a stop at the waypoint before the loiter-turns command.

This has been tested in SITL and below is a picture of a Copter flying a circle. Previously it would get stuck after having flown to the center of the circle.
image

@giacomo892
Copy link
Contributor

I've flown it. All good!

Copy link
Contributor

@lthall lthall left a comment

Choose a reason for hiding this comment

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

Perfect.

@rmackay9 rmackay9 merged commit 6a98ad5 into ArduPilot:master Apr 11, 2021
@rmackay9
Copy link
Contributor Author

Merged, thanks!

@rmackay9 rmackay9 deleted the copter-loiter-turns-fix branch April 11, 2021 23:32
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