Object Avoidance with Dijkstra

Dear all,

I am working on object avoidance.
It seems that Bendy Ruler works perfectly!
But, the Object avoidance with Dijkstra keeps failing to find a path as shown in the below.

To resolve this issue, I increased OA_MARGIN_MAX. However, it did not help at all.
Could you help me to solve this problem?
Thank you in advance!

  • Testing environment:
    param set AVOID_ENABLE 7
    param set FENCE_ENABLE 1
    param set FENCE_RADIUS 10000
    param set OA_TYPE 2
    param set OA_MARGIN_MAX 10

  • Testing mission

  • Log

@KimHyungSub,

The issue is probably that some point are outside (or inside) some of the fences. The one that may be tripping you up is the circular fence because it doesn’t appear on the map. see FENCE_RADIUS.

1 Like

Hello @rmackay9,

He assigned 10,000 to the FENCE_RADIUS.
In such a case, the circular fence set by the FENCE_RADIUS still can make the rover stuck?

@Benjamin,

Another possibility is that the target point is inside one of the exclusion fences. I’m not sure of the exact issue but I’m pretty confident that Dijkstra’s is working correctly so instead of diving in I’m hoping @KimHyungSub can do some more analysis on his own. Maybe start with a simpler set of fences and confirm it works, then increases the fences until figuring out which one causes a failure.

Can you also send your obstacles file?

Hello @rmackay9 @manavgandhi17,

I could reproduce this issue by using this mission and obstacles file.
All waypoints were outside of the exclusion fences.

The rover was stuck in a location before reaching waypoint 2 as shown in the below.

Edit: I could also trigger this issue in a more simple fence than previous one.
There was only one fence, and the rover was stuck in the same location as previous one as shown in below.

@Benjamin,

OK, I think the issue is that simple avoidance is stopping the vehicle when it reaches the edge of the circular fence. Could you try turning off “simple” avoidance?

I think it is probably this issue.

Hello @rmackay9,

Yeah, that’s good point!
I could not reproduce this issue anymore after disabling “simple avoidance”!
Here, one lesson is that users need to turn off the “simple avoidance” when they want to use Dijkstra as a object avoidance path planning.
Could we explicitly mention such parameter setting in document? I thought that assigning 0 to “AVOID_ENABLE” disables object avoidance. Also, enabling the “simple avoidance” does not lead to any problem if users leverage BendyRuler. Thanks!

At the same time, I’m not sure what advantage is afforded by enabling simple avoidance when using BendyRuler. Is there any?

@Yuri_Rage me and Randy have often thought about Simple Avoidance being the second layer of defence… incase BendyRuler/Dijkstra fails… Simple Avoidance is activated and stops the vehicle

1 Like

Hello @rishabsingh3003
Yes, two layers of object avoidance is a good design choice!
It is also worth mentioning that if the simple avoidance acts as the second layer of collision prevention, disabling the simple avoidance and enabling Dijkstra is weird.
The simple avoidance always need to be disabled because turning on the simple avoidance and Dijkstra leads to an issue as mentioned @KimHyungSub.

I don’t think the Dijkstra’s + Simple avoidance issue will always have this issue. For example it may only happen if circular fences are used. The fix/improvement that we need is for Dijkstra’s to choose a path that is a little further from the fences… maybe it needs a configurable margin.

1 Like

Hello @rmackay9,

It would be great if ArduPilot provides the configurable margin :slight_smile:

1 Like