mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 08:40:35 +08:00
AutoSmoothVel: adjust controller constraints in emergency braking
When engaging auto mode at high vertical speed, we don't want to cut the velocity trajectory setpoint in order to create a smooth deceleration.
This commit is contained in:
@@ -429,7 +429,7 @@ void MulticopterPositionControl::Run()
|
||||
_control.setVelocityLimits(
|
||||
math::constrain(speed_horizontal, 0.f, _param_mpc_xy_vel_max.get()),
|
||||
math::min(speed_up, _param_mpc_z_vel_max_up.get()), // takeoff ramp starts with negative velocity limit
|
||||
math::constrain(speed_down, 0.f, _param_mpc_z_vel_max_dn.get()));
|
||||
math::max(speed_down, 0.f));
|
||||
|
||||
_control.setInputSetpoint(_setpoint);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user