mc_pos_control: revert protection against nan thrust sp

This commit is contained in:
Dennis Mannhart
2017-09-11 02:08:22 -07:00
committed by Lorenz Meier
parent dae1093bec
commit 11a4410500
@@ -2042,17 +2042,6 @@ MulticopterPositionControl::calculate_thrust_setpoint(float dt)
thrust_sp(2) *= att_comp;
}
/* if any of thrust sp is not finite, it is safest to send out hover thrust*/
for (int i = 0; i < 3; ++i) {
if (!PX4_ISFINITE(thrust_sp(i))) {
thrust_sp(0) = 0.0f;
thrust_sp(1) = 0.0f;
thrust_sp(2) = -_params.thr_hover;
PX4_WARN("Caught invalid thrust setpoint");
break;
}
}
/* Calculate desired total thrust amount in body z direction. */
/* To compensate for excess thrust during attitude tracking errors we
* project the desired thrust force vector F onto the real vehicle's thrust axis in NED: