-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
[Two motor tailsitter]Controlling the servo through the output from the mc controller #13917
Conversation
Allow mc control output to control servo in mc mode
@sfuhrer Could you take a look? |
Hi @xdwgood , currently the elevons get always controlled via the FW rate controller, correct. Is is so by design, eg this way every actuator has a dedicated rate controller allocated to it, which we don't change. @RomanBapst could give you further insides why it is done this way. |
@sfuhrer Thank you very much for your reply
I follow px4 official guidelines to adjust my tailsitter. (https://docs.px4.io/master/en/config_vtol/vtol_quad_configuration.html) This guide says tuning MC mode using MC controller tuning So I started to adjust the control parameters in mc mode. As a result, I found that changing the PID parameters(eg I checked the code and found that we changed the control of the aileron after v1.8.2. |
please help |
Hi @xdwgood , |
@sfuhrer First, thank you for your reply Yes, I have used this PR to fly, and the effect is not as good as it is now. I think this is because I did not adjust the pid parameter. Just use the default rotor angular rate control pid parameter. Even if we use the parameters of fw to adjust the pitch and yaw in the rotor state, I worry that the same parameters are not applicable to the control of pitch and roll in the fixed-wing state. The control gain in fixed-wing mode may be different from the control gain required in rotor mode, right? |
Yeah that is indeed a limitation of the current implementation. Do you have an airspeed sensor on your drone? Because that should help in making the transition smoother, as it will automatically adapt the elevon deflection depending on how much airspeed you have. |
yes,I have.....Your suggestion is that I continue to use FW for rotor attitude control, right? @sfuhrer thanks 😃 |
Well yeah if it works with the FW rate controller then I would for now use that. But I don't want to discourage you from any software changes, it could e.g. be that your proposed change of using the MC rate controller for the control surfaces in hover makes more sense that what there is currently, but to bring in this change in PX4 upstream we would need to be able to compare the flight performance prior/after. |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
keep |
Closing because the fork disappeared. @xdwgood can you open a new PR with a valid fork if this is still relevant? |
I understand that we use the output value from the FW controller to control the aileron in fixed-wing and transmission mode. But in MC mode, the output from the rotor controller should be used to control the aileron.
Now when tailsitter UAV is flying in the rotor state, the pitch / yaw control is through the output of the fw controller instead of the rotor controller output. This PR fixes this problem.
FYI: @RomanBapst