Skip to content
Snippets Groups Projects
Commit 93d52581 authored by bresch's avatar bresch
Browse files

Auto - Fix cruise speed. Tested with and without SDK. Before that commit, the...

Auto - Fix cruise speed. Tested with and without SDK. Before that commit, the drone files at max speed instead of cruise speed if not precised by the SDK
parent 226f3c09
No related branches found
No related tags found
No related merge requests found
......@@ -63,13 +63,6 @@ void FlightTaskAutoLineSmoothVel::reActivate()
// flight task is always reset.
}
void FlightTaskAutoLineSmoothVel::_setDefaultConstraints()
{
FlightTaskAuto::_setDefaultConstraints();
_constraints.speed_xy = _param_mpc_xy_vel_max.get(); // TODO : Should be computed using heading
}
void FlightTaskAutoLineSmoothVel::_generateSetpoints()
{
_prepareSetpoints();
......@@ -206,8 +199,8 @@ void FlightTaskAutoLineSmoothVel::_updateTrajConstraints()
// Update the constraints of the trajectories
_trajectory[0].setMaxAccel(_param_mpc_acc_hor_max.get()); // TODO : Should be computed using heading
_trajectory[1].setMaxAccel(_param_mpc_acc_hor_max.get());
_trajectory[0].setMaxVel(_constraints.speed_xy);
_trajectory[1].setMaxVel(_constraints.speed_xy);
_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());
......
......@@ -66,7 +66,6 @@ protected:
);
void _generateSetpoints() override; /**< Generate setpoints along line. */
void _setDefaultConstraints() override;
inline float _constrainOneSide(float val, float constrain);
void _checkEkfResetCounters(); /**< Reset the trajectories when the ekf resets velocity or position */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment