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

Curves parallel to each other or crossing cause automatic steering to get confused #391

Open
GNSS-Stylist opened this issue Apr 23, 2024 · 0 comments

Comments

@GNSS-Stylist
Copy link

GNSS-Stylist commented Apr 23, 2024

Fields with shapes that are not convex may be divided into two or more "sections" when using a boundary curve and an "inner" curve is selected. These sections are connected with two straight lines that are very close to each other. This may lead to automatic steering getting confused so that it doesn't seem to always know which one of those lines it should follow.

Made more thorough testing and videos with this external simulator: https://github.com/GNSS-Stylist/AgOpenGPSSimPoC but the same issue also occurs with the internal simulator and in a real tractor (tested also in a field to make sure this is not just a simulator glitch). Actually very likely stumbled upon this while driving last summer with AOG V5.7.2.

Video:

untitled.mp4

Based on the lookahead-pointer (yellow square) jumping back and forth it seems that the nearest point is always selected from the whole curve (also by looking at the code it seems to do so).

This also occurs with AB-curve that has self-crossing parts (may not be the most sensible curve though...):

untitled2.mp4

I already took a look at the code and got a fix to this somewhat working. It does, however still have some problems with some tight hairpins when a big look ahead-value is used and tractor is taking a shortcut. I will continue investigating, so assigning this to myself for now (not sure if I can do that, though. But will try at least...). Edit: Can't assign myself, but will continue investigating anyway.

Field used in the videos above:
Field_Sim_Blob.zip

Reproducible in 6.2.0, 6.3.1 and latest master ( bb5ed96 )

Edited: Updated "reproducible in"-list (tested V 6.3.1 and latest master).

GNSS-Stylist added a commit to GNSS-Stylist/AgOpenGPS that referenced this issue Apr 23, 2024
…"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
Projects
None yet
Development

No branches or pull requests

2 participants