include libraries without the need for full path, make ObstacleAvoidance

instance protected
This commit is contained in:
Martina Rivizzigno
2019-03-06 13:05:04 +01:00
committed by bresch
parent 4dcc77b822
commit 0e27b5cbfa
3 changed files with 5 additions and 4 deletions
@@ -35,5 +35,5 @@ px4_add_library(FlightTaskAuto
FlightTaskAuto.cpp FlightTaskAuto.cpp
) )
target_link_libraries(FlightTaskAuto PUBLIC FlightTask) target_link_libraries(FlightTaskAuto PUBLIC FlightTask FlightTaskUtility)
target_include_directories(FlightTaskAuto PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(FlightTaskAuto PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
@@ -45,7 +45,7 @@
#include <uORB/topics/home_position.h> #include <uORB/topics/home_position.h>
#include <uORB/topics/vehicle_status.h> #include <uORB/topics/vehicle_status.h>
#include <lib/ecl/geo/geo.h> #include <lib/ecl/geo/geo.h>
#include "lib/FlightTasks/tasks/Utility/ObstacleAvoidance.hpp" #include "ObstacleAvoidance.hpp"
/** /**
* This enum has to agree with position_setpoint_s type definition * This enum has to agree with position_setpoint_s type definition
@@ -84,7 +84,6 @@ public:
* Sets an external yaw handler which can be used to implement a different yaw control strategy. * Sets an external yaw handler which can be used to implement a different yaw control strategy.
*/ */
void setYawHandler(WeatherVane *ext_yaw_handler) override {_ext_yaw_handler = ext_yaw_handler;} void setYawHandler(WeatherVane *ext_yaw_handler) override {_ext_yaw_handler = ext_yaw_handler;}
ObstacleAvoidance _obstacle_avoidance;
protected: protected:
void _setDefaultConstraints() override; void _setDefaultConstraints() override;
@@ -104,6 +103,8 @@ protected:
float _target_acceptance_radius = 0.0f; /**< Acceptances radius of the target */ float _target_acceptance_radius = 0.0f; /**< Acceptances radius of the target */
int _mission_gear = landing_gear_s::GEAR_KEEP; int _mission_gear = landing_gear_s::GEAR_KEEP;
ObstacleAvoidance _obstacle_avoidance;
DEFINE_PARAMETERS_CUSTOM_PARENT(FlightTask, DEFINE_PARAMETERS_CUSTOM_PARENT(FlightTask,
(ParamFloat<px4::params::MPC_XY_CRUISE>) _param_mpc_xy_cruise, (ParamFloat<px4::params::MPC_XY_CRUISE>) _param_mpc_xy_cruise,
(ParamFloat<px4::params::MPC_CRUISE_90>) _param_mpc_cruise_90, // speed at corner when angle is 90 degrees move to line (ParamFloat<px4::params::MPC_CRUISE_90>) _param_mpc_cruise_90, // speed at corner when angle is 90 degrees move to line
@@ -53,7 +53,7 @@
#include <matrix/matrix/math.hpp> #include <matrix/matrix/math.hpp>
#include <lib/FlightTasks/tasks/FlightTask/SubscriptionArray.hpp> #include <SubscriptionArray.hpp>
class ObstacleAvoidance : public ModuleParams class ObstacleAvoidance : public ModuleParams
{ {