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 attitude control during transitions #11856

Closed
wants to merge 1 commit into from

Conversation

RomanBapst
Copy link
Contributor

image

In the upper figure you can see how a standard vtol just entered the backtransition and begins to oscillate in roll. Notice that the quad motors are still not active when the oscillations begin. Given that no oscillations were present during fixed wing flight and the airspeed scaling in the fixed wing rate controller was still active the cause of the oscillations is probably the fact that the rate setpoints were generated by the mc attitude controller which has a time constant that is about 3 times larger than the one of the fixed wing attitude controller.
This PR changes the logic such that during transitions the fixed wing attitude controller generates the rate setpoint.

…ttitude

controller

- generally the mc attitude controller has much smaller attitude time
constants than the fixed wing attitude controller. This resulted in strong
oscillations during transitions when the fixed wing rate controller was fed
with rate setpoints generated by the mc attitude controller. This was even the
case when the mc rate controller was not running at all.

Signed-off-by: Roman <bapstroman@gmail.com>
@RomanBapst RomanBapst requested a review from dagar April 15, 2019 20:14
@RomanBapst
Copy link
Contributor Author

This was tested first in SITL (manual, stabilized, position, mission)
and then outdoors on the funcub VTOL (stabilized, position)
https://logs.px4.io/plot_app?log=b260b20c-cde8-4409-b5ad-b2c97f595e2c

@@ -617,7 +618,8 @@ void FixedwingAttitudeControl::run()
_att_sp.fw_control_yaw = _att_sp.fw_control_yaw && _vcontrol_mode.flag_control_auto_enabled;

/* lock integrator until control is started */
bool lock_integrator = !(_vcontrol_mode.flag_control_rates_enabled && !_vehicle_status.is_rotary_wing);
bool lock_integrator = !(_vcontrol_mode.flag_control_rates_enabled);
lock_integrator &= _vehicle_status.is_rotary_wing;
Copy link
Member

Choose a reason for hiding this comment

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

This is the binary AND operator, not the boolean operator &&.

@dagar
Copy link
Member

dagar commented Apr 16, 2019

Looks right, I just want to be careful with the way we're weaving these controllers together. Splitting out the rate controllers

What about tailsitters?

@dagar dagar added this to Low priority in Devcall via automation Apr 16, 2019
@dagar dagar moved this from Low priority to Currently under discussion in Devcall Apr 17, 2019
@dagar dagar moved this from Currently under discussion to Discussed in Devcall Apr 17, 2019
@RomanBapst
Copy link
Contributor Author

Continued in #11898

@RomanBapst RomanBapst closed this Apr 24, 2019
Devcall automation moved this from Discussed to Done Apr 24, 2019
@dagar dagar deleted the pr-vtol_att_control branch April 28, 2019 23:39
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.

None yet

2 participants