Skip to content
Snippets Groups Projects
Commit 34c0bb17 authored by Martina Rivizzigno's avatar Martina Rivizzigno Committed by bresch
Browse files

ObstacleAvoidance: don't inject avoidance setpoint when in

loiter mode since it's the failsafe mode
parent 0e27b5cb
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment