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
Tailsitter: remove thrust spikes around entering/leaving transition modes #23033
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
…transition Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
@sfuhrer Looks like it will do the job. I would also verify what happens in the case of a quadchute, as there we technically don't transition but go straight to MC mode. |
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Right, good point, I added the most basic anti-spike protection also in quad-chute now, and handle back-transitions aborts smoothly. See last two commits. |
@@ -294,12 +301,27 @@ void Tailsitter::fill_actuator_outputs() | |||
_torque_setpoint_0->xyz[2] = _vehicle_torque_setpoint_virtual_fw->xyz[2] * _param_vt_fw_difthr_s_r.get(); | |||
} | |||
|
|||
// for the short period after switching to FW where there is no thrust published yet from the FW controller, | |||
// keep publishing the last MC thrust to keep the motors running | |||
if (hrt_elapsed_time(&_trans_finished_ts) < 50_ms) { |
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.
Instead of hard coding these little magic timeouts everywhere what about checking against the actual FW controller publication (_fw_virtual_att_sp)?
Solved Problem
Various throttle spikes and jumps during tailsitter transitions, see screenshot:
The spikes are caused by the VTOL module selecting the FW rate controller output even when it doesn't have anything published yet, resulting in a publication of 0. The same happens during the initial phase of the back transition, as there the MC rate controller hasn't published yet.
The jumps are coming form different thrust level outputs of the MC vs FW controllers.
Solution
Changelog Entry
For release notes:
Alternatives
The transition logic between the VTOL types should be synced and simplified.
Test coverage
SITL tested. The spikes are gone and there are no jumps of the throttle.