Add jerk parameter for auto mode MPC_JERK_AUTO. Specify when a parameter is only used in a certain manual or auto mode

This commit is contained in:
bresch
2019-05-17 14:15:29 +02:00
committed by Matthias Grob
parent 011aef5464
commit b726d8df0d
3 changed files with 33 additions and 8 deletions
@@ -201,9 +201,9 @@ void FlightTaskAutoLineSmoothVel::_updateTrajConstraints()
_trajectory[1].setMaxAccel(_param_mpc_acc_hor_max.get());
_trajectory[0].setMaxVel(_param_mpc_xy_vel_max.get());
_trajectory[1].setMaxVel(_param_mpc_xy_vel_max.get());
_trajectory[0].setMaxJerk(_param_mpc_jerk_min.get()); // TODO : Should be computed using heading
_trajectory[1].setMaxJerk(_param_mpc_jerk_min.get());
_trajectory[2].setMaxJerk(_param_mpc_jerk_min.get());
_trajectory[0].setMaxJerk(_param_mpc_jerk_auto.get()); // TODO : Should be computed using heading
_trajectory[1].setMaxJerk(_param_mpc_jerk_auto.get());
_trajectory[2].setMaxJerk(_param_mpc_jerk_auto.get());
if (_velocity_setpoint(2) < 0.f) { // up
_trajectory[2].setMaxAccel(_param_mpc_acc_up_max.get());