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/Scripting: add get_circle_radius and set_circle_rate #18434

Merged
merged 4 commits into from Aug 25, 2021

Conversation

rmackay9
Copy link
Contributor

This allows scripts to read the radius and write the rotation rate of a copter in Circle mode (or executing LOITER_TURNS). This has been tested in SITL and resolves a 4.1 issue reported by Arace.

@IamPete1
Copy link
Member

I think I would prefer to see this done as a direct singleton to AC_Circle so we don't have to clutter AP_Vehicle with bindings that are only used one one vehicle. It also means we can #define out the whole singleton on vehicles that are not copter, we don't currently support per-method defines. A sort of precedent for this is the quadplane bindings that go direct with a specially added quadplane singleton.

@rmackay9
Copy link
Contributor Author

@IamPete1, thanks very much for the review. I also thought about a direct binding to AC_Circle but after some thought I don't think it's a good idea. The reason is just that it makes it vehicle specific but also more importantly I think it is a layering violation and is inconsistent with how we control the vehicle in Guided mode.

@tridge tridge merged commit 4bdb428 into ArduPilot:master Aug 25, 2021
@rmackay9 rmackay9 deleted the copter-circle-rate branch August 25, 2021 10:44
@rmackay9 rmackay9 added this to pending in Copter 4.1 Aug 28, 2021
@rmackay9 rmackay9 moved this from pending to 4.1.0-beta8 in Copter 4.1 Aug 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Copter 4.1
4.1.0-beta8
Plane 4.1
Awaiting triage
Rover 4.1
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

4 participants