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

FW Att and Rate Controller, Tailsitter: fix tailsitter frame transformations #20904

Merged
merged 1 commit into from
Jan 13, 2023

Conversation

sfuhrer
Copy link
Contributor

@sfuhrer sfuhrer commented Jan 11, 2023

Solved Problem

Tailsitters that require control surfaces are currently broken on main since #20237, as we there forgot to do a couple of required tailsitter axes transformations. We didn't notice in SITL testing because the model there has 4 motors that it uses for hover control, without the need of control surfaces and thus the FW rate controller.

Problem found by @Jaeyoung-Lim while working on #20859.

Solution

Strictly follow the following convention for tailsitter: FW Attitude and FW rate controller always operate in the FW frame, meaning that roll is roll in FW, which for tailsitter means around the yaw axis in the body frame. The interfaces between modules is though always in body frame.

That enables us to do the axis transformations for tailsitter, that are currently distributed all over the controller (attitude, rate, vtol module), only at the input and output data of modules.

Side effect is that the FW rate control tuning gains meanings change: while before the roll gains where meant for the body axis, they are now always applied for the FW roll axis (also in hover). So the naming now is correct for FW, while before it was for Hover.

Test coverage

SITL tested for all modes and in both hover and aerodynamic flight, and hover tested on real platform.

…mations

Strictly follow the following convention for tailsitter:
FW Attitude and FW rate controller always operate in the FW frame, meaning that roll is
roll in FW, which for tailsitter means around the yaw axis in the body frame. The interfaces
between modules is though always in body frame.

That enables us to do the axis transformations for tailsitter, that are currently distributed
all over the controller (attitude, rate, vtol module), only at the input and output data of modules.

Side effect is that the FW rate control tuning gains meanings change: while before the roll gains
where meant for the body axis, they are now always applied for the FW roll axis (also in hover). So
the naming now is correct for FW, while before it was for Hover.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
@sfuhrer sfuhrer added bug Hybrid VTOL 🛩️🚁 Multirotor + Fixedwing! labels Jan 11, 2023
@Jaeyoung-Lim
Copy link
Member

Jaeyoung-Lim commented Jan 13, 2023

Tested on a tailsitter with only control surfaces and works as expected!

Thanks for the quick fix!

@Jaeyoung-Lim Jaeyoung-Lim merged commit 7c76669 into main Jan 13, 2023
@Jaeyoung-Lim Jaeyoung-Lim deleted the pr-tailsitter-add-fw-roll-output-main branch January 13, 2023 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Hybrid VTOL 🛩️🚁 Multirotor + Fixedwing!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants