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

QuadPlane TVBS: set plane.nav_roll/pitch in QACRO mode #11102

Merged
merged 5 commits into from
Apr 22, 2019

Conversation

kd0aij
Copy link
Contributor

@kd0aij kd0aij commented Apr 12, 2019

Using plane.nav_pitch_cd resulted in motors tilting up when flying level in Q modes.
It might also be a good idea to disable this when in flight to avoid the possibility of inducing control instability during attitude upsets. But is_flying() doesn't seem to be the right test...

@IamPete1
Copy link
Member

LGTM, i will see if i can work out whats going on with my TVBS bronco in realflight and test this tommorow.

@kd0aij kd0aij added the WIP label Apr 13, 2019
Copy link
Member

@IamPete1 IamPete1 left a comment

Choose a reason for hiding this comment

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

Tested, works great!

@kd0aij kd0aij added WIP and removed WIP labels Apr 13, 2019
@kd0aij
Copy link
Contributor Author

kd0aij commented Apr 13, 2019

@IamPete1 This is still WIP because the motors don't tilt up until I raise the throttle in SITL. This would likely result in prop strikes with real vehicles.

@kd0aij kd0aij changed the title Plane: use multicopter attitude target to set extra elevator QuadPlane TVBS: use multicopter attitude target to set extra elevator Apr 13, 2019
@IamPete1
Copy link
Member

I have just checked this again in SITL, tilts seems to always point up for me as they should

@tridge
Copy link
Contributor

tridge commented Apr 15, 2019

nav_pitch_cd should have been correct here, I'd like to know why it wasn't

@kd0aij kd0aij changed the title QuadPlane TVBS: use multicopter attitude target to set extra elevator QuadPlane TVBS: use multicopter attitude target in QACRO mode Apr 17, 2019
@kd0aij
Copy link
Contributor Author

kd0aij commented Apr 17, 2019

@tridge @IamPete1 I found the root cause of the nav_pitch_cd problem and fixed it with a minimal change.
While I was testing, I also fixed a logging issue with bodyframe roll modes and added a constraint to protect from bad parameter values.
The motors tilt up reliably now for me in SITL/RF8/QHOVER, but they flop around a lot during bootup. Shouldn't we be suppressing servo outputs until init is complete?

@IamPete1 IamPete1 self-requested a review April 18, 2019 12:05
@kd0aij
Copy link
Contributor Author

kd0aij commented Apr 18, 2019

@tridge I just noticed that ACRO mode has the same issue with not setting nav_pitch/roll.
Of course, if you are flying in pure rate mode, there is no attitude target. but it is easy to define a "virtual" attitude target calculated from the current attitude and the desired rates. This is what the target attitude quaternion represents in the multicopter controller.

@kd0aij kd0aij changed the title QuadPlane TVBS: use multicopter attitude target in QACRO mode QuadPlane TVBS: set plane.nav_roll/pitch in QACRO mode Apr 21, 2019
@tridge tridge merged commit 0a78368 into ArduPilot:master Apr 22, 2019
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.

4 participants