mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 14:03:34 +08:00
mc_pos_control: revert protection against nan thrust sp
This commit is contained in:
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:
|
||||
|
||||
Reference in New Issue
Block a user