Skip to content

Use Fields2Cover v2.1.1 for the pieces it now provides (jazzy) - #174

Merged
SteveMacenski merged 9 commits into
open-navigation:jazzy-v2from
u33549:Feature/umutc/f2c-enhancements-jazzy-v2/use-fields2cover-2.1.1
Nov 30, 2026
Merged

SteveMacenski merged 9 commits into
open-navigation:jazzy-v2from
u33549:Feature/umutc/f2c-enhancements-jazzy-v2/use-fields2cover-2.1.1

Conversation

@u33549

@u33549 u33549 commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Ports #162 and #171 to jazzy-v2 in one PR, so jazzy matches humble-v2 after #166 and #173: pins Fields2Cover to v2.1.1 and drops the downstream code that v2.1.1 now provides. Addresses the sharp corners reported in #168 on jazzy too, and carries the swath end point fix that ohauterville first reported and fixed for jazzy in #161.

The commits are cherry-picked from the humble ports (#166, #173). jazzy and humble share the same code here, so the adaptations are the same; each commit notes them and points at the main commit it comes from.

Part 1, from #162 (as in #166)

Commit Jazzy adaptation
Pin Fields2Cover to v2.1.1 for the upstreamed fixes deps.repos here only pins Fields2Cover; the README's Fields2Cover installation note is updated
Drop the unused multi-cell headland overload none (no callers on jazzy either)
Carve the inter-cell corridor with Fields2Cover also carries "Drop the sliver filter Fields2Cover no longer needs", which only removed a filter this commit had just added
Remove the unused default_max_swaths_for_global_route parameter none
Report where a swath ends in the coverage path message only the swath end test; the tests next to it on main belong to #141
Densify GPS paths before leaving the field frame takes main's zero-step guard (pt_dist <= 0 falls back to 0.1 m), which main got with #141

"Let Fields2Cover densify headland passes" from #162 is left out: it only changes #141 code, which is not on jazzy.

Part 2, from #171 (as in #173)

Commit Local code it removes on jazzy Replaced by
Let Fields2Cover plan the swath connections PathGenerator::assemblePath and appendConnection (#137, with the 1.3 length-ratio rule) PathPlanning::planPath(robot, route, turn) (Fields2Cover/Fields2Cover#234)
Reverse cell routes with Fields2Cover's Route::reverse reversedRoute, reversedConnection (#137) Route::reverse (Fields2Cover/Fields2Cover#233)
Drop guards Fields2Cover 2.1.1 no longer needs the pair_cells.size() > 0 check in the bridge, angDiff lambda (#137) Fields2Cover/Fields2Cover#239; F2CPoint::getAngleDiffAbs

The #145 parts of #171 (routeThroughCell, distanceToSegment, the deviation rule) are not on jazzy and are left out.

Testing

Fields2Cover v2.1.1 carries the fixes and APIs this package used to work
around: HL_SWATH densification, the corridor headland and the
degenerate-polygon guard.

Adapted for jazzy: jazzy-v2 only pins Fields2Cover in deps.repos, so only its version changes; the README note is updated to match.

(cherry picked from commit 2ef1796, part of open-navigation#162)
Signed-off-by: u33549 <[email protected]>
The server only calls the Field overload; the F2CCells one had no
callers left after the headland-first decomposition rework.

(cherry picked from commit 93915e2, part of open-navigation#162)
Signed-off-by: u33549 <[email protected]>
CorridorHL finds the borders cells really share and carves the corridor
from the smaller cell. route_headland_width is now the total corridor
width; the previous code could carve it from both cells, or miss a
partially shared border.

(cherry picked from commit 8ecb2f4, part of open-navigation#162)

Also drops the sliver filter Fields2Cover no longer needs:
CorridorHL already removes the zero-width pieces carving leaves, and the
degenerate-polygon crash the filter guarded against is fixed upstream.

(cherry picked from commit a4f3a87, part of open-navigation#162)
Signed-off-by: u33549 <[email protected]>
It has had no effect since multi-cell TSP routing moved to a per-cell
solve; the threshold it set is no longer read.

(cherry picked from commit 852e0f1, part of open-navigation#162)
Signed-off-by: u33549 <[email protected]>
With Fields2Cover v2 a straight swath is a single path state, so taking
the end from that state's start point gave every swath start == end.
Use PathState::atEnd() instead.

Adapted for jazzy: only the swath end test is added; the HL_SWATH and headland perimeter tests next to it on main belong to open-navigation#141, which is not on jazzy.

(cherry picked from commit af70ccf, part of open-navigation#162)
Signed-off-by: u33549 <[email protected]>
The densification step is in meters, but it ran after the path was
converted to the GPS frame, so swath lengths were in degrees and no
state was ever split.

Adapted for jazzy: the densify call takes main's zero-step guard (pt_dist <= 0 falls back to 0.1 m). On main it came with the headland driving change, which is not on jazzy.

(cherry picked from commit e7eb93b, part of open-navigation#162)
Signed-off-by: u33549 <[email protected]>
Fields2Cover 2.1.1 follows a connection track and rounds its corners
(Fields2Cover#234). The local appendConnection drove a detour verbatim,
turning 90 degrees at every corner. Use F2C's route planPath instead.

Adapted for jazzy: the connection handling removed here is open-navigation#137's, with its 1.3 length-ratio rule; the deviation rule and distanceToSegment from open-navigation#145 are not on jazzy.

(cherry picked from commit 5b95534, part of open-navigation#171)
Signed-off-by: u33549 <[email protected]>
Adapted for jazzy: the anonymous namespace held only these two helpers here, so it goes too.

(cherry picked from commit 2909e11, part of open-navigation#171)
Signed-off-by: u33549 <[email protected]>
shortestPath returns an empty path for a non-node endpoint instead of
throwing, and createShortestGraph leaves out swath ends outside every
cell (Fields2Cover#239). Use F2CPoint::getAngleDiffAbs for the heading
cost.

Adapted for jazzy: the bridge guard here was the earlier pair_cells.size() > 0 check (the two-cell check came with open-navigation#145). The per-pair try/catch in routeThroughCell is open-navigation#145 code and is not on jazzy.

(cherry picked from commit 4fd8f6b, part of open-navigation#171)
Signed-off-by: u33549 <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 27, 2026 21:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@SteveMacenski
SteveMacenski merged commit 86b1133 into open-navigation:jazzy-v2 Nov 30, 2026
9 checks passed
@u33549
u33549 deleted the Feature/umutc/f2c-enhancements-jazzy-v2/use-fields2cover-2.1.1 branch November 30, 2026 10:20
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.

3 participants