mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
FlightTaskAuto: remove isTargetModified()
As it is no longer needed w/o avoidance. Signed-off-by: Silvan <silvan@auterion.com>
This commit is contained in:
parent
a1ff1d8372
commit
04cd247c90
@ -159,11 +159,6 @@ bool FlightTaskAuto::update()
|
||||
_checkEmergencyBraking();
|
||||
Vector3f waypoints[] = {_prev_wp, _position_setpoint, _next_wp};
|
||||
|
||||
if (isTargetModified()) {
|
||||
// In case object avoidance has injected a new setpoint, we take this as the next waypoints
|
||||
waypoints[2] = _position_setpoint;
|
||||
}
|
||||
|
||||
const bool should_wait_for_yaw_align = _param_mpc_yaw_mode.get() == int32_t(yaw_mode::towards_waypoint_yaw_first)
|
||||
&& !_yaw_sp_aligned;
|
||||
const bool force_zero_velocity_setpoint = should_wait_for_yaw_align || _is_emergency_braking_active;
|
||||
@ -764,15 +759,6 @@ bool FlightTaskAuto::_generateHeadingAlongTraj()
|
||||
return res;
|
||||
}
|
||||
|
||||
bool FlightTaskAuto::isTargetModified() const
|
||||
{
|
||||
const bool xy_modified = (_target - _position_setpoint).xy().longerThan(FLT_EPSILON);
|
||||
const bool z_valid = PX4_ISFINITE(_position_setpoint(2));
|
||||
const bool z_modified = z_valid && std::fabs((_target - _position_setpoint)(2)) > FLT_EPSILON;
|
||||
|
||||
return xy_modified || z_modified;
|
||||
}
|
||||
|
||||
void FlightTaskAuto::_updateTrajConstraints()
|
||||
{
|
||||
// update params of the position smoothing
|
||||
|
||||
@ -108,7 +108,6 @@ protected:
|
||||
|
||||
void _checkEmergencyBraking();
|
||||
bool _generateHeadingAlongTraj(); /**< Generates heading along trajectory. */
|
||||
bool isTargetModified() const;
|
||||
void _updateTrajConstraints();
|
||||
|
||||
void rcHelpModifyYaw(float &yaw_sp);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user