Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change automatic steering to follow "local" nearest point instead of "global" while following a curve #392

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GNSS-Stylist
Copy link

(Leaving this PR as a draft, because this is potentially dangerous change. Of course I tried to be careful, but as this is my first time touching this project, it's a real possibility that I forgot something obvious...)

The previous implementation led the vehicle to sometimes pick a wrong part of a curve when the curve was intersecting itself (AB-curve) or there were more than one parallel lines near to each other (typically occurs when driving along an inner curve formed from a boundary curve and the field's shape is not convex).

This changes the curve-following algorithm to use a search for "local" nearest point instead of "global" (= taking all the points on the curve into account) when already following the curve.

Look ahead-distance is used when searching the nearest "local" point to prevent problems in tight hairpins caused by the search sticking to a local minimum "on the wrong side" of the hairpin (especially when using large look ahead values causing the vehicle to take a shortcut).

Videos from testing (about the same conditions as in the issue):

untitled3.mp4
untitled4.mp4

PS: As I now took a look at the code to make these changes, I have to say that I really like the coding style of AOG. Lot of descriptive comments and easy to read overall.

…"global" while following a curve

The previous implementation led the vehicle to sometimes pick a wrong part of a curve when the curve was intersecting itself (AB-curve) or there were more than one parallel lines near to each other (typically occurs when driving along an inner curve formed from a boundary curve and the field's shape is not convex).

This changes the curve-following algorithm to use a search for "local" nearest point instead of "global" (= taking all the points on the curve into account) when already following the curve.

Look ahead-distance is used when searching the nearest "local" point to prevent problems in tight hairpins caused by the search sticking to a local minimum "on the wrong side" of the hairpin (especially when using large look ahead values causing the vehicle to take a shortcut).

Fixes farmerbriantee#391
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant