Skip to content

Snake: look at every pass nearer than a far order pass - #228

Merged
renatorgr merged 1 commit into
pulverizadorfrom
fix/snake-nearest-open-reach
Nov 14, 2026
Merged

renatorgr merged 1 commit into
pulverizadorfrom
fix/snake-nearest-open-reach

Conversation

@renatorgr

Copy link
Copy Markdown
Owner

Requested by Renato · project thread

What changed

With skip mode Ignore worked tracks, when the snake order's next pass is more than twice the skip's step away (MaxFallbackStep), the nearest pass still to do is tried first (#223). That search only looked within twice the skip's step, and then the order's own pass, further over, was tried.

On Tapada da Casa (simulator, beta 2be8132, 14 Nov 10:01) the tractor was on 21R. The order's next pass was 8R, 13 passes over; 15R, 6 over, was still to do. 15R was never looked at, the turn onto 8R did not build ("Turn near hard boundary was malformed"), so there was no U-turn and AutoSteer went off at the end of the pass (#197, correct on its own).

Now, when asked before a far order pass, TurnOntoNearestOpenPass reaches every pass nearer than the order's, on either side. The fallback after the order's pass has no room or no turn keeps its limit of twice the skip's step.

Replaying the dump's field and state (passes worked as in the dump, 8 m front boom, radius 8 m, U-turn distance 2 m, hard boundary): before, the result was 21R -> 8R, malformed, no turn. After, the result is 21R -> 15R: a 163-point turn along the headland, every point inside the fence, with the implement 2.28 m from the fence.

Tests (SnakeOpenPassTests):

  • new: a pass still to do five over, nearer than the order's pass eight over, is taken (one build only);
  • new: the same on the other side of the tractor;
  • changed: "the order's far pass is still taken" now has every pass nearer than the order's worked (before, only those within twice the skip).

CLAUDE.md's snake bullet says so. Fork only.

Related issue

Follows #223 (nearest open pass before a far order pass).

Pre-submit checklist

  • dotnet build succeeds with no errors
  • dotnet test passes: the U-turn tests (FullyQualifiedName~YouTurn, 1722 passed); the full suite runs in CI
  • Tested on: Linux (cloud), plus a replay of the tester's field and state

Screenshots

Not a UI change.


Generated by Claude Code

With skip mode "Ignore worked tracks", when the snake order's next pass
was more than twice the skip's step away, the nearest pass still to do
was looked for only within twice the skip's step, and then the order's
own pass, further over, was tried. On a tester's field (simulator) the
tractor on 21R had the order's 8R 13 passes over and 15R six over: 15R
was never looked at, the turn onto 8R did not build, and there was no
U-turn (AutoSteer went off at the end of the pass).

Asked before a far order pass, the search now reaches every pass nearer
than the order's, either side. The fallback after the order's pass has
no room or no turn keeps its limit of twice the skip's step. On the
tester's field the turn from 21R onto 15R builds, inside the fence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VKEBDFmQpFVsahedjtN2AZ
@renatorgr renatorgr self-assigned this Nov 14, 2026
@renatorgr
renatorgr marked this pull request as ready for review November 14, 2026 11:05
@renatorgr
renatorgr merged commit c81e53a into pulverizador Nov 14, 2026
7 checks passed
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.

2 participants