Class HeadlandGeneratorBase
Defined in File headland_generator_base.h
Inheritance Relationships
Derived Types
public f2c::hg::ConstHL(Class ConstHL)public f2c::hg::CorridorHL(Class CorridorHL)public f2c::hg::ReqHL(Class ReqHL)
Class Documentation
-
class HeadlandGeneratorBase
Base class to generate the headlands.
Subclassed by f2c::hg::ConstHL, f2c::hg::CorridorHL, f2c::hg::ReqHL
Public Functions
-
virtual F2CCells generateHeadlands(const F2CCell &field, const F2CRobot &robot, double track_ang)
Get the regions of a cell without the headlands the robot needs to turn.
- Parameters:
field – Borders of the cell and the obstacles on it.
robot – Robot doing the coverage.
track_ang – Angle of the swaths on the cell.
- Returns:
Mainland area
-
virtual F2CCells generateHeadlands(const F2CCells &field, const F2CRobot &robot, const std::vector<double> &track_angs)
Get the regions of the field without the headlands the robot needs.
- Parameters:
field – Borders of the field and the obstacles on it.
robot – Robot doing the coverage.
track_angs – Angle of the swaths on each cell.
- Returns:
Mainland area
-
double maxHLWidthRequired(const F2CRobot &robot) const
Width of the headland a robot can need on a border, at worst.
-
virtual F2CCells generateHeadlands(const F2CCells &field, double dist_headland) = 0
Get the regions of the field without headlands.
- Parameters:
_field – Original field
_dist_headland – Width of the headland
- Returns:
Field without headlands
-
virtual F2CCells generateHeadlandArea(const F2CCells &field, double swath_width, int n_swaths) = 0
Generate headland area of the field for a given number of swaths with given width.
- Parameters:
field – Borders of the field and the obstacles on it.
swath_width – Width of each headland swath.
n_swaths – Number of headland swaths.
- Returns:
Headland area
-
virtual std::vector<F2CCells> generateHeadlandSwaths(const F2CCells &field, double swath_width, int n_swaths, bool dir_out2in = true) = 0
Generate headland swaths of the field for a given number of swaths with given width.
- Parameters:
field – Borders of the field and the obstacles on it.
swath_width – Width of each headland swath.
n_swaths – Number of headland swaths.
dir_out2in – When true, headland swaths are created from outer borders to inner borders. Otherwise, they are created from inner borders to outers.
- Returns:
Vector of size n_swaths for each headland swath. Each F2CLinearRing on it is a headland swath ring.
-
virtual ~HeadlandGeneratorBase() = default
-
virtual F2CCells generateHeadlands(const F2CCell &field, const F2CRobot &robot, double track_ang)