diff --git a/src/modules/vtol_att_control/tailsitter.cpp b/src/modules/vtol_att_control/tailsitter.cpp index b16a344ca6..5693d516b3 100644 --- a/src/modules/vtol_att_control/tailsitter.cpp +++ b/src/modules/vtol_att_control/tailsitter.cpp @@ -281,6 +281,12 @@ void Tailsitter::fill_actuator_outputs() _thrust_setpoint_0->xyz[2] = -_vehicle_thrust_setpoint_virtual_fw->xyz[0]; + // 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) { + _thrust_setpoint_0->xyz[2] = _last_thr_in_mc; + } + /* allow differential thrust if enabled */ if (_param_vt_fw_difthr_en.get() & static_cast(VtFwDifthrEnBits::YAW_BIT)) { _torque_setpoint_0->xyz[0] = _vehicle_torque_setpoint_virtual_fw->xyz[0] * _param_vt_fw_difthr_s_y.get(); diff --git a/src/modules/vtol_att_control/vtol_type.cpp b/src/modules/vtol_att_control/vtol_type.cpp index 1d6f5b667a..e43dd7c912 100644 --- a/src/modules/vtol_att_control/vtol_type.cpp +++ b/src/modules/vtol_att_control/vtol_type.cpp @@ -164,6 +164,8 @@ void VtolType::update_transition_state() _time_since_trans_start = (float)(t_now - _transition_start_timestamp) * 1e-6f; check_quadchute_condition(); + + _last_thr_in_mc = _vehicle_thrust_setpoint_virtual_mc->xyz[2]; } float VtolType::update_and_get_backtransition_pitch_sp() diff --git a/src/modules/vtol_att_control/vtol_type.h b/src/modules/vtol_att_control/vtol_type.h index 78d078b5c8..8f9ae9ef38 100644 --- a/src/modules/vtol_att_control/vtol_type.h +++ b/src/modules/vtol_att_control/vtol_type.h @@ -299,6 +299,7 @@ protected: // motors spinning up or cutting too fast when doing transitions. float _thrust_transition = 0.0f; // thrust value applied during a front transition (tailsitter & tiltrotor only) float _last_thr_in_fw_mode = 0.0f; + float _last_thr_in_mc = 0.f; hrt_abstime _trans_finished_ts = 0; hrt_abstime _transition_start_timestamp{0};