ArduPilot / ArduPilot/ardupilot
AC_Avoidance: vehicles using Dijkstra's may pass too close to fence
- Dominant language
- C++
- Stars
- 15.9k
- Forks
- 21.4k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 127
Description
When Dijkstra's populates the visibility graphs with distances between safe "nodes" it only checks if the points do not cross the polygon fence. This can mean that a safe path is created that comes within cm of the fence. Ideally we should use the "inner fence" instead of the original fence when calculating "visibility" but this bumps into the problem that when we want to calculate the visibility/distances between the inner polygon fence points they will always intersect with the inner fence because they are on the inner fence.
Below shows an example situation where this can happen

The solution is probably to add a special case when checking the visibility for two points which are both on the inner fence. For these cases we should not check if the line between the points intersects with lines that include either of the two points (i.e. don't check for intersection with segments adjacent to either point)
Contributor guide
Research direction
Start in the AC_Avoidance Dijkstra visibility-graph code and reproduce the reported fence-clearance situation from the issue image. Verify how visibility is checked for points on the inner fence; done means valid paths no longer pass too close to the fence while visibility between adjacent inner-fence points remains possible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- robotics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100