remove avoidance library and logic

Signed-off-by: Silvan <silvan@auterion.com>
This commit is contained in:
Silvan
2025-02-18 14:33:16 +01:00
committed by Silvan Fuhrer
parent d2cbe10243
commit 1f2dba68d2
21 changed files with 4 additions and 895 deletions
@@ -35,5 +35,5 @@ px4_add_library(FlightTaskAuto
FlightTaskAuto.cpp
)
target_link_libraries(FlightTaskAuto PUBLIC avoidance FlightTask FlightTaskUtility WeatherVane)
target_link_libraries(FlightTaskAuto PUBLIC FlightTask FlightTaskUtility WeatherVane)
target_include_directories(FlightTaskAuto PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
@@ -156,12 +156,6 @@ bool FlightTaskAuto::update()
break;
}
if (_param_com_obs_avoid.get()) {
_obstacle_avoidance.updateAvoidanceDesiredSetpoints(_position_setpoint, _velocity_setpoint, (int)_type);
_obstacle_avoidance.injectAvoidanceSetpoints(_position_setpoint, _velocity_setpoint, _yaw_setpoint,
_yawspeed_setpoint);
}
_checkEmergencyBraking();
Vector3f waypoints[] = {_prev_wp, _position_setpoint, _next_wp};
@@ -477,17 +471,6 @@ bool FlightTaskAuto::_evaluateTriplets()
_updateInternalWaypoints();
}
if (_param_com_obs_avoid.get()
&& _sub_vehicle_status.get().vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING) {
_obstacle_avoidance.updateAvoidanceDesiredWaypoints(_triplet_target, _yaw_setpoint, _yawspeed_setpoint,
_triplet_next_wp,
_sub_triplet_setpoint.get().next.yaw,
(float)NAN,
_weathervane.isActive(), _sub_triplet_setpoint.get().current.type);
_obstacle_avoidance.checkAvoidanceProgress(
_position, _triplet_prev_wp, _target_acceptance_radius, Vector2f(_closest_pt));
}
// set heading
_weathervane.update();
@@ -53,13 +53,6 @@
#include "StickAccelerationXY.hpp"
#include "StickYaw.hpp"
// TODO: make this switchable in the board config, like a module
#if CONSTRAINED_FLASH
#include <lib/avoidance/ObstacleAvoidance_dummy.hpp>
#else
#include <lib/avoidance/ObstacleAvoidance.hpp>
#endif
/**
* This enum has to agree with position_setpoint_s type definition
* The only reason for not using the struct position_setpoint is because
@@ -147,8 +140,6 @@ protected:
AlphaFilter<float> _yawspeed_filter;
bool _yaw_sp_aligned{false};
ObstacleAvoidance _obstacle_avoidance{this}; /**< class adjusting setpoints according to external avoidance module's input */
PositionSmoothing _position_smoothing;
Vector3f _unsmoothed_velocity_setpoint;
Sticks _sticks{this};
@@ -165,7 +156,6 @@ protected:
(ParamFloat<px4::params::NAV_MC_ALT_RAD>)
_param_nav_mc_alt_rad, //vertical acceptance radius at which waypoints are updated
(ParamInt<px4::params::MPC_YAW_MODE>) _param_mpc_yaw_mode, // defines how heading is executed,
(ParamInt<px4::params::COM_OBS_AVOID>) _param_com_obs_avoid, // obstacle avoidance active
(ParamFloat<px4::params::MPC_YAWRAUTO_MAX>) _param_mpc_yawrauto_max,
(ParamFloat<px4::params::MIS_YAW_ERR>) _param_mis_yaw_err, // yaw-error threshold
(ParamFloat<px4::params::MPC_ACC_HOR>) _param_mpc_acc_hor, // acceleration in flight
@@ -68,5 +68,5 @@ private:
uint8_t _reset_counter{0}; /**< counter for estimator resets in xy-direction */
WeatherVane _weathervane{this}; /**< weathervane library, used to implement a yaw control law that turns the vehicle nose into the wind */
CollisionPrevention _collision_prevention{this}; /**< collision avoidance setpoint amendment */
CollisionPrevention _collision_prevention{this}; /**< collision prevention setpoint amendment */
};