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

improved implementation of tailsitter bodyframe-roll control #20855

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kd0aij
Copy link
Contributor

@kd0aij kd0aij commented May 26, 2022

graphical visualizations of the current implementation showed unwanted coupling of pitch and yaw to roll:
https://www.glowscript.org/#/user/kd0aij/folder/QuadPlane/program/bodyframe-master

updated version makes bodyframe-roll independent of pitch and yaw:
https://www.glowscript.org/#/user/kd0aij/folder/QuadPlane/program/bodyframe-roll-update

Also reduced the yaw error threshold from 90 to 30 degrees to reduce dynamic yaw (heading) errors at the expense of yaw rate tracking.

Flight test by @losawing: https://discuss.ardupilot.org/t/dual-motor-tailsitters/15302/2496

@kd0aij kd0aij requested review from lthall and IamPete1 May 26, 2022 15:31
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.

Looks OK. This is your input function that is not widely used, I think this has been tested by losawing? Basically if your happy with it then I'm happy for it to be merged.

@robustini
Copy link
Contributor

No news about that?

@lthall lthall removed their request for review September 9, 2022 00:03
@lthall
Copy link
Contributor

lthall commented Sep 9, 2022

I can't review this PR.

@kd0aij
Copy link
Contributor Author

kd0aij commented Sep 9, 2022

@lthall Thanks for responding; I assume you don't have a problem with it being merged.

@lthall
Copy link
Contributor

lthall commented Sep 10, 2022

Sorry, that statement was too short. I can't review this PR because I don't understand the original code design, so I can't evaluate the effectiveness of the changes.

While I often get asked to review code I don't fully understand. I do so if there are parts of the code that are in areas I am responsible for and I feel the other reviewers can cover the areas I do not feel I can review effectively.

I also don't want to stifle the development of other aircraft and in this case there are elements in the control structure that I do not understand and the comments don't explain. So I can't provide any value with my review, for or against.

@kd0aij
Copy link
Contributor Author

kd0aij commented Sep 10, 2022

I had hoped that the VPython implementation and visualizations (linked in the first comment) would clearly show the intent of the code and the differences between the two implementations.

But it's also clear that the quaternion manipulations in function bodyFrameRoll_eulerPitchYaw() are very difficult to understand hence probably more complicated than necessary :)

@robustini
Copy link
Contributor

Tested today in reality and in QStabilize I had an unpleasant behavior.
Watch the behavior of the pitch.

2022-09-11 10-54-17.zip

@kd0aij
Copy link
Contributor Author

kd0aij commented Sep 11, 2022

@robustini Thanks for testing.
Because you had parameter Q_TAILSIT_INPUT=0, bodyframe roll was not selected, and this PR had no effect.
To test this PR, you would need to set bit 1 of that parameter, so 2 instead of 0 for copter mode and 3 for plane mode.
I assume the issue is the failure to track desired pitch here?
image

@robustini
Copy link
Contributor

@kd0aij Damn Mark, you're right, thanks!
So I have to find out why she made that joke, also because I always flew with those parameters but I haven't used the master for two months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants