mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 13:40:35 +08:00
GotoControl: Save flash
This commit is contained in:
@@ -804,14 +804,13 @@ void FlightTaskAuto::_updateTrajConstraints()
|
||||
// Update the constraints of the trajectories
|
||||
_position_smoothing.setMaxAccelerationXY(_param_mpc_acc_hor.get()); // TODO : Should be computed using heading
|
||||
_position_smoothing.setMaxVelocityXY(_param_mpc_xy_vel_max.get());
|
||||
float max_jerk = _param_mpc_jerk_auto.get();
|
||||
_position_smoothing.setMaxJerk({max_jerk, max_jerk, max_jerk}); // TODO : Should be computed using heading
|
||||
_position_smoothing.setMaxJerk(_param_mpc_jerk_auto.get()); // TODO : Should be computed using heading
|
||||
|
||||
if (_is_emergency_braking_active) {
|
||||
// When initializing with large velocity, allow 1g of
|
||||
// acceleration in 1s on all axes for fast braking
|
||||
_position_smoothing.setMaxAcceleration({9.81f, 9.81f, 9.81f});
|
||||
_position_smoothing.setMaxJerk({9.81f, 9.81f, 9.81f});
|
||||
_position_smoothing.setMaxJerk(9.81f);
|
||||
|
||||
// If the current velocity is beyond the usual constraints, tell
|
||||
// the controller to exceptionally increase its saturations to avoid
|
||||
|
||||
Reference in New Issue
Block a user