mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 21:58:52 +08:00
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
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user