Expand description
Grid-based sweep coverage path planner (boustrophedon / lawn-mower pattern).
Ported from PythonRobotics GridBasedSweepCPP.
The algorithm:
- Find the longest edge of the input polygon to determine the sweep direction.
- Rotate the polygon so that the longest edge is axis-aligned.
- Build a grid map from the rotated polygon boundary, marking cells outside the polygon as occupied.
- Expand obstacles by one cell to avoid boundary collisions.
- Perform a boustrophedon (back-and-forth) sweep search on the grid.
- Convert the resulting grid path back to global coordinates.
Structs§
- Grid
Based Sweep Config - Configuration for the grid-based sweep coverage path planner.
- Sweep
Coverage Path - Result of the grid-based sweep coverage path planner.
Enums§
- Moving
Direction - Horizontal moving direction.
- Sweep
Direction - Sweep (vertical) direction.
Functions§
- plan_
sweep_ coverage - Plan a boustrophedon (lawn-mower) coverage path over the area enclosed by the given polygon.