mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 10:31:37 +08:00
FlightTaskAuto: check avoidance progress only for multicopter
This commit is contained in:
@@ -56,6 +56,10 @@ bool FlightTaskAuto::initializeSubscriptions(SubscriptionArray &subscription_arr
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!subscription_array.get(ORB_ID(vehicle_status), _sub_vehicle_status)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,7 +225,7 @@ bool FlightTaskAuto::_evaluateTriplets()
|
|||||||
_updateAvoidanceWaypoints();
|
_updateAvoidanceWaypoints();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MPC_OBS_AVOID.get()) {
|
if (MPC_OBS_AVOID.get() && _sub_vehicle_status->get().is_rotary_wing) {
|
||||||
_checkAvoidanceProgress();
|
_checkAvoidanceProgress();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
#include <uORB/topics/position_setpoint.h>
|
#include <uORB/topics/position_setpoint.h>
|
||||||
#include <uORB/topics/home_position.h>
|
#include <uORB/topics/home_position.h>
|
||||||
#include <uORB/topics/position_controller_status.h>
|
#include <uORB/topics/position_controller_status.h>
|
||||||
|
#include <uORB/topics/vehicle_status.h>
|
||||||
#include <lib/ecl/geo/geo.h>
|
#include <lib/ecl/geo/geo.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -117,6 +118,7 @@ private:
|
|||||||
matrix::Vector2f _lock_position_xy{NAN, NAN}; /**< if no valid triplet is received, lock positition to current position */
|
matrix::Vector2f _lock_position_xy{NAN, NAN}; /**< if no valid triplet is received, lock positition to current position */
|
||||||
bool _yaw_lock = false; /**< if within acceptance radius, lock yaw to current yaw */
|
bool _yaw_lock = false; /**< if within acceptance radius, lock yaw to current yaw */
|
||||||
uORB::Subscription<position_setpoint_triplet_s> *_sub_triplet_setpoint{nullptr};
|
uORB::Subscription<position_setpoint_triplet_s> *_sub_triplet_setpoint{nullptr};
|
||||||
|
uORB::Subscription<vehicle_status_s> *_sub_vehicle_status{nullptr};
|
||||||
|
|
||||||
matrix::Vector3f
|
matrix::Vector3f
|
||||||
_triplet_target; /**< current triplet from navigator which may differ from the intenal one (_target) depending on the vehicle state. */
|
_triplet_target; /**< current triplet from navigator which may differ from the intenal one (_target) depending on the vehicle state. */
|
||||||
|
|||||||
Reference in New Issue
Block a user