-
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
Differential thrust for tailsitter #12518
Differential thrust for tailsitter #12518
Conversation
upgrade repository
I have no idea about SITL Tests abort |
Can you share the test log? https://logs.px4.io/ |
I will test a Quad tailsitter tomorrow ,and maybe try it. But my plane is not a typically aircraft ,yaw control in this craft will lead reverse roll because of aerodynamic issues. Not only for differential thrust but also for rudder. So it's better to test it in a more typically tailsitter if someone have it. Anyway I'll try it and upload it later tomorrow. But it won't be a very typically log. |
here is my flight test: The "Yaw Angular Rate" can show some useful information . addition: This plane don't have rudder , the only yaw control device is Differential thrust |
} else { | ||
_actuators_out_0->control[actuator_controls_s::INDEX_THROTTLE] = | ||
_actuators_mc_in->control[actuator_controls_s::INDEX_THROTTLE]; | ||
|
||
_actuators_out_0->control[actuator_controls_s::INDEX_ROLL] = | ||
_actuators_mc_in->control[actuator_controls_s::INDEX_ROLL] * _mc_roll_weight; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this duplicating what's already done on line 277?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it just to redefine the relations between actuators_out and actuators_in for roll axis in mc mode to avoid my code on line 290 for fw mode make roll control in mc control unpredictable. I don't know if it is necessary, so I insert this code. If you think it isn't necessary here we can delete it but need to do fly test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you're repeating work already done on line 277 (_actuators_out_0->control[actuator_controls_s::INDEX_ROLL]
). Please verify and delete if that's the case.
have tested, work normally 😃 |
Hi @bluecat1997 @dagar |
Thanks for your test ! I'm also waiting for checking. |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
Is this issue dropped? @bluecat1997 are you still available to bring this in, or if not @dagar should I make a new PR instead? |
If you could do a fresh PR with corresponding testing I think we could get this in asap. |
Done in #16537 |
Fixed in #16537. |
Change how differential thrust function works for tailsitter
Fixes issue #12302
In tailsitter VTOL aircraft if set "VT_FW_DIFTHR_EN"to 1 to enable differential thrust in fw mode, the motors not responded to yaw control stick but link to roll control stick. I found the code just use code in fw mode :
if (_params->diff_thrust == 1) { _mc_roll_weight = 1.0f; }
So in fw mode the plane can fix yaw error but can't response yaw stick control in stabilize and manual mode, and when you input roll control in these modes may lead to crash. This code also can't use "VT_FW_DIFTHR_SC" to control the scaling factor for differential thrust.
I rewrite the code to use fw input to control differential thrust and move the code from
update_fw_state()
tofill_actuator_outputs()
:/* allow differential thrust if enabled */ if (_params->diff_thrust == 1) { _actuators_out_0->control[actuator_controls_s::INDEX_ROLL] = _actuators_fw_in->control[actuator_controls_s::INDEX_YAW] * _params->diff_thrust_scale; }
Test information: I already test it in a transwing quad x tailsitter , it works well . here is my .ulog:
https://logs.px4.io/plot_app?log=0c83dc07-c03e-4f0c-acbc-d5b6e8cac0c2
The "Yaw Angular Rate" can show some useful information .
addition: This plane don't have rudder , the only yaw control device is Differential thrust. And my plane is not a typically aircraft ,yaw control in this craft will lead reverse roll because of aerodynamic issues. Not only for differential thrust but also for rudder. So it's better to test it in a more typically tailsitter if someone have it.