Repository navigation
Snake: a pass is worked by the map, not by a section on it - #234
Merged
Merged
Conversation
At the end of a pass with no U-turn and a hard fence, AutoSteer goes off a metre into the headland (EndOfPassWithoutTurn). The check asks whether the tractor is on the line, heading along it, and walks the pass ahead to the fence. Both were measured against the straight pass. A pass bent round Go around obstacles leaves the crop up to 45 degrees off the pass, so the tractor looked like one turning by hand, and the check (made once per headland entry) said no. Walking the straight pass from abreast of the tractor also found crop the bend had already left. On a tester's field (simulator, 8 m front boom) 3R, bent round two trees in the headland, left the crop 36 degrees off the pass; AutoSteer steered on along the bend for 40 m until the fence guard stopped it with the boom over the fence. The pipeline now hands the check the bend it steers (GoAroundPasses.Current): "on the line" is the bend's heading at the tractor, and PassLeavesFieldAhead walks the bend from its point nearest the tractor. Without a bend nothing changes. On that field the check now says yes 1 m past the crop (was no). Tests: EndOfPassWithoutTurnTests (a tree in a wide headland: the bend leaves the crop 35 degrees off and AutoSteer goes off a metre past the line; a bend through a headland strip with crop past it is not the end). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VKEBDFmQpFVsahedjtN2AZ
Track.WorkedPaths is set when any section is on anywhere along the pass, and the snake asked it before the job's map. A pass cut by a bay counted as worked once its short piece was done, so its main piece was never turned onto (official AgOpenGPS-Official#815, the job harness on Baetas: "End of field reached" with 53 % of the field undone). With the map, worked means at least half covered (IsPassWorked); the mark is used only with no map. At the end ahead, a pass still to do on the whole is worked there when the piece a turn there lands on (from that end back until the pass leaves the cultivated area) is at least half covered (IsPieceDoneAtThisEnd): the main piece gets its turn from the other end. A pass with no bay is one piece, so one done only at this end is still turned onto here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VKEBDFmQpFVsahedjtN2AZ
# Conflicts: # CLAUDE.md # README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge order: this branch includes #233 (merged in, its README and CLAUDE.md lines sit next to these). Merge #233 first, then this one; merging only this one brings #233 too.
What
The snake order (skip mode "Ignore worked tracks") asked
Track.WorkedPathsbefore the job's map. That mark is set when any section is on anywhere along the pass, so a pass cut by a bay counted as worked once its short piece was done, and its main piece was never turned onto. This is the case Chris described on official AgOpenGPS-Official#815 (job harness, rig W1, Baetas, ignore worked tracks, 1 row): "End of field reached" on −6 with 53 % of the cultivated area undone.With the job's map, the map now decides:
IsPassWorked). The mark is used only with no map.IsPieceDoneAtThisEnd, new). A turn onto it there would drive the short piece again and stop at the bay; the main piece gets its turn from the other end.The existing rule for a pass worked on the whole but left short of this end (
IsPassOpenAtThisEnd, Tapada 27R) is unchanged.TurnMissesOpenEndreads the map's answer instead of the mark.Crossing a headland band to the next piece of a pass is still not done (as Chris says): at the short pieces' end the field reads as complete there, and the operator drives to the other end.
Tests
SnakeOpenEndTests:A_pass_cut_by_a_bay_with_only_its_short_piece_done_gets_the_turn_at_the_other_end(every pass marked worked, only pass 4's short piece painted: the turn at the north end goes onto 4; before, "Field complete")A_pass_cut_by_a_bay_is_not_turned_onto_where_its_piece_is_done(south end: no turn onto 4's painted short piece)A_pass_with_no_bay_done_only_at_this_end_still_gets_the_turn_hereWith_no_map_the_mark_says_which_passes_are_workedAll
YouTurntests pass locally.Fork only.
Generated by Claude Code