mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-06 10:58:52 +08:00
ObstacleAvoidance: don't inject avoidance setpoint when in
loiter mode since it's the failsafe mode
This commit is contained in:
committed by
bresch
parent
0e27b5cbfa
commit
34c0bb1723
@@ -88,7 +88,8 @@ void ObstacleAvoidance::prepareAvoidanceSetpoints(Vector3f &pos_sp, Vector3f &ve
|
||||
float &yaw_speed_sp)
|
||||
{
|
||||
|
||||
if (!COM_OBS_AVOID.get()) {
|
||||
if (!COM_OBS_AVOID.get() || _sub_vehicle_status->get().nav_state == vehicle_status_s::NAVIGATION_STATE_AUTO_LOITER) {
|
||||
// if avoidance disabled or in failsafe nav_state LOITER, don't inject setpoints from avoidance system
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user