Dijkstra not available to find the shortest path out of a fence

I’ve noticed that in SITL if the copter is inside an exclusion fence or outside an inclusion fence then the aircraft gets stuck due to Dijkstra’s not being able to find the path.

image

Parameters that I have set:

  • OA_TYPE 2
  • OA_OPTIONS 4
  • AVOID_ENABLE 3 (I read somewhere that setting this to 0 may fix, but I cannot do that in my application)

Is there a way to get the aircraft to calculate the shortest path out of the geofence and then handoff to the regular RTL controller or whatever the fence action calls?

What build are you on, IIRC there was some work on patching this though I am not sure if it was merged.

I’ve run into this problem using 4.6

@LupusTheCanine I’ve tried this on ArduCopter V4.7.0-dev (f62f1cde). I’m looking into adding recovery code into the Dijkstra implementation, hopefully can get that working.

See AC_Avoidance: Use closest fence point if Dijkstra starts outside fence by aadarshagarwal1 · Pull Request #31827 · ArduPilot/ardupilot · GitHub

1 Like

Tried running that; if I’m in ALTHOLD and I move outside of the inclusion fence or inside an exclusion fence, it still freezes up. I’ll add a comment on the PR.

1 Like