mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +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:
parent
226f3c0999
commit
93d52581ef
@ -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 */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user