Browse Source

mc_pos_control: revert protection against nan thrust sp

sbg
Dennis Mannhart 8 years ago committed by Lorenz Meier
parent
commit
11a4410500
  1. 11
      src/modules/mc_pos_control/mc_pos_control_main.cpp

11
src/modules/mc_pos_control/mc_pos_control_main.cpp

@ -2042,17 +2042,6 @@ MulticopterPositionControl::calculate_thrust_setpoint(float dt) @@ -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:

Loading…
Cancel
Save