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

VTOL: Only Reset Thrust but not Attitude when Disarmed #13198

Merged
merged 1 commit into from
Oct 16, 2019

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Oct 15, 2019

Describe problem solved by this pull request
Apparently hot fixing the takeoff with #12250 had the side effect #13167:
VTOL flaps are not moving according to attitude control before arming in multicopter state.
VTOL flaps of a tailsitter are moving trying to reach north heading.

Describe your solution
Since for the takeoff fix it's only necessary to reset the body thrust I'm removing removing the reset for the attitude setpoint quaternion.

Describe possible alternatives
The real solution is to have a clear strategy to always publish an attitude setpoint AND to handle no valid attitude setpoint properly in the attitude controller. This is again a hotfix.

Test data / coverage

Additional context
First proposal by @xdwgood to solve this: #13178. I'm assuming it wouldn't pass the first test above.

@MaEtUgR MaEtUgR self-assigned this Oct 15, 2019
@dagar dagar added bug Hybrid VTOL 🛩️🚁 Multirotor + Fixedwing! labels Oct 15, 2019
@dagar dagar requested review from RomanBapst and sfuhrer October 15, 2019 14:48
@dagar
Copy link
Member

dagar commented Oct 15, 2019

@xdwgood could you verify if this fixes the problem from your perspective?

@MaEtUgR
Copy link
Member Author

MaEtUgR commented Oct 15, 2019

@dagar I think I understood the problem of #13167 is that the attitude setpoint is reset as well including the yaw heading which shows in terms of moving flaps to always reach level and head north. Heading north results in the described symptoms from #13167. Also it doesn't allow to check the flaps by sticks on any VTOL in multicopter stabilized because the setpoint is always level.

I tried just removing the attitude from reseting but this has other even rarer corner cases where if you deflect the stick in stabilized and switch to altitude the flaps stay how they were last until the spoolup time of the position controller is through. So I think I need to implement the real solution otherwise we're turning in circles here.

@xdwgood @sfuhrer I'm on it.

@MaEtUgR
Copy link
Member Author

MaEtUgR commented Oct 15, 2019

I came up with a strategy:
First I fix purely the preoblem of #13167 here which is a minimal change. And then in another pr I'll propose the real fix that will publish attitude setpoints all the time and allow testing the flaps with sticks in multicopter again in all modes.

to see flaps moving according to attitude control before arming
and not have tailsitter elevons move to follow north heading.
@MaEtUgR MaEtUgR force-pushed the vtol-disarmed-flaps-fix branch from 0b57b18 to 3744fee Compare October 15, 2019 15:38
@MaEtUgR
Copy link
Member Author

MaEtUgR commented Oct 15, 2019

I checked the takeoff in VTOL gazebo and it's still fine (as expected):
vtoltakeoff
@xdwgood It would be nice if you could check if your issue is fixed with this since I don't have a tailsitter at hand.

@MaEtUgR MaEtUgR marked this pull request as ready for review October 15, 2019 15:52
@xdwgood
Copy link
Contributor

xdwgood commented Oct 16, 2019

I'll propose the real fix that will publish attitude setpoints all the time and allow testing the flaps with sticks in multicopter again in all modes.

That will be fine

@MaEtUgR I verified that it works the same as expected.
// reinitialize the setpoint while not armed to make sure no value from the last mode or flight is still kept
Do you think we need to change this comment? 😃

Copy link
Contributor

@xdwgood xdwgood left a comment

Choose a reason for hiding this comment

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

😃

@MaEtUgR
Copy link
Member Author

MaEtUgR commented Oct 16, 2019

Attempt for the real fix #13210 according to the strategy in #13198 (comment).

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.

【Vtol】The left and right ailerons have a large output when they are stationary on the ground.
3 participants