include
fields2cover.h
Go to the documentation of this file.
1
//=============================================================================
2
// Copyright (C) 2021-2024 Wageningen University - All Rights Reserved
3
// Author: Gonzalo Mier
4
// BSD-3 License
5
//=============================================================================
6
7
#pragma once
8
#ifndef FIELDS2COVER_H_
9
#define FIELDS2COVER_H_
10
11
#include "
fields2cover/types.h
"
12
13
14
#include "
fields2cover/utils/random.h
"
15
#include "
fields2cover/utils/spline.h
"
16
#include "
fields2cover/utils/transformation.h
"
17
#include "
fields2cover/utils/parser.h
"
18
#include "
fields2cover/utils/visualizer.h
"
19
20
21
#include "
fields2cover/objectives/base_objective.h
"
22
23
#include "
fields2cover/objectives/hg_obj/hg_objective.h
"
24
#include "
fields2cover/objectives/hg_obj/rem_area.h
"
25
26
#include "
fields2cover/objectives/sg_obj/sg_objective.h
"
27
#include "
fields2cover/objectives/sg_obj/n_swath.h
"
28
#include "
fields2cover/objectives/sg_obj/n_swath_modified.h
"
29
#include "
fields2cover/objectives/sg_obj/field_coverage.h
"
30
#include "
fields2cover/objectives/sg_obj/overlaps.h
"
31
#include "
fields2cover/objectives/sg_obj/swath_length.h
"
32
33
#include "
fields2cover/objectives/rp_obj/rp_objective.h
"
34
#include "
fields2cover/objectives/rp_obj/direct_dist_path_obj.h
"
35
#include "
fields2cover/objectives/rp_obj/complete_turn_path_obj.h
"
36
37
#include "
fields2cover/objectives/pp_obj/pp_objective.h
"
38
#include "
fields2cover/objectives/pp_obj/path_length.h
"
39
40
#include "
fields2cover/objectives/decomp_obj/decomp_objective.h
"
41
42
43
#include "
fields2cover/decomposition/decomposition_base.h
"
44
#include "
fields2cover/decomposition/trapezoidal_decomp.h
"
45
#include "
fields2cover/decomposition/boustrophedon_decomp.h
"
46
47
#include "
fields2cover/headland_generator/headland_generator_base.h
"
48
#include "
fields2cover/headland_generator/constant_headland.h
"
49
50
#include "
fields2cover/swath_generator/swath_generator_base.h
"
51
#include "
fields2cover/swath_generator/brute_force.h
"
52
53
54
#include "
fields2cover/route_planning/single_cell_swaths_order_base.h
"
55
#include "
fields2cover/route_planning/boustrophedon_order.h
"
56
#include "
fields2cover/route_planning/snake_order.h
"
57
#include "
fields2cover/route_planning/spiral_order.h
"
58
#include "
fields2cover/route_planning/custom_order.h
"
59
60
#include "
fields2cover/route_planning/route_planner_base.h
"
61
62
#include "
fields2cover/path_planning/turning_base.h
"
63
#include "
fields2cover/path_planning/dubins_curves.h
"
64
#include "
fields2cover/path_planning/dubins_curves_cc.h
"
65
#include "
fields2cover/path_planning/reeds_shepp_curves.h
"
66
#include "
fields2cover/path_planning/reeds_shepp_curves_hc.h
"
67
#include "
fields2cover/path_planning/path_planning.h
"
68
69
71
namespace
f2c
{
72
73
75
namespace
types {}
76
78
namespace
obj
{}
79
81
namespace
sg {}
82
83
enum class
SGAlg
{
84
BRUTE_FORCE
= 0,
//Default
85
GIVEN_ANGLE
= 1,
86
};
87
88
enum class
SGObjFunc
{
89
N_SWATH_MOD
= 0,
// Default
90
N_SWATH
= 1,
91
SWATH_LENGTH
= 2,
92
FIELD_COV
= 3,
93
OVERLAPS
= 4,
94
};
95
97
namespace
rp {}
98
99
enum class
RPAlg
{
100
SHORTEST_ROUTE
= 0,
// Default
101
//BOUSTROPHEDON = 1,
102
//SNAKE = 2,
103
//SPIRAL = 3,
104
//CUSTOM = 4,
105
};
106
108
namespace
pp {}
109
110
enum class
PPAlg
{
111
DUBINS
= 0,
// Default
112
DUBINS_CC
= 1,
113
REEDS_SHEPP
= 2,
114
REEDS_SHEPP_HC
= 3,
115
};
116
117
119
namespace
hg {}
120
121
enum class
HGAlg
{
122
NONE
= 0,
123
CONST
= 1,
// Default
124
};
125
126
128
namespace
decomp
{}
129
130
enum class
DecompAlg
{
131
NONE
= 0,
// Default
132
// TRAPEZOIDAL = 1,
133
// BOUSTROPHEDON = 2,
134
};
135
136
struct
Options
{
137
DecompAlg
decomp_alg
{
DecompAlg::NONE
};
138
double
decomp_angle
{0.0};
139
140
HGAlg
hg_alg
{
HGAlg::CONST
};
141
int
hg_swaths
{3};
142
143
SGAlg
sg_alg
{
SGAlg::BRUTE_FORCE
};
144
SGObjFunc
sg_obj
{
SGObjFunc::N_SWATH_MOD
};
145
double
sg_angle
{0.0};
146
147
RPAlg
rp_alg
{
RPAlg::SHORTEST_ROUTE
};
148
149
PPAlg
pp_alg
{
PPAlg::DUBINS
};
150
};
151
152
F2CRoute
planCovRoute
(
const
F2CRobot
&
robot
,
const
F2CCell
&
cell
,
153
const
Options& opt = Options());
154
F2CRoute
planCovRoute
(
const
F2CRobot
&
robot
,
const
F2CCells
&
cells
,
155
const
Options& opt = Options());
156
F2CRoute
planCovRoute
(
const
F2CRobot
&
robot
,
const
F2CField
&
field
,
157
bool
local_crs);
158
F2CRoute
planCovRoute
(
const
F2CRobot
&
robot
,
const
F2CField
&
field
,
159
const
Options& opt = Options(),
bool
local_crs =
true
);
160
F2CPath
planCovPath
(
const
F2CRobot
&
robot
,
const
F2CCell
&
cell
,
161
const
Options& opt = Options());
162
F2CPath
planCovPath
(
const
F2CRobot
&
robot
,
const
F2CCells
&
cells
,
163
const
Options& opt = Options());
164
F2CPath
planCovPath
(
const
F2CRobot
&
robot
,
const
F2CField
&
field
,
165
bool
local_crs);
166
F2CPath
planCovPath
(
const
F2CRobot
&
robot
,
const
F2CField
&
field
,
167
const
Options& opt = Options(),
bool
local_crs =
true
);
168
169
}
// namespace f2c
170
171
#endif // FIELDS2COVER_H_
172
snake_order.h
f2c::Options::pp_alg
PPAlg pp_alg
Definition:
fields2cover.h:149
f2c::PPAlg::REEDS_SHEPP_HC
@ REEDS_SHEPP_HC
f2c::SGObjFunc::FIELD_COV
@ FIELD_COV
spline.h
f2c::SGObjFunc::N_SWATH_MOD
@ N_SWATH_MOD
1_basic_types.cells
cells
Definition:
1_basic_types.py:93
f2c::SGAlg::BRUTE_FORCE
@ BRUTE_FORCE
custom_order.h
field_coverage.h
dubins_curves_cc.h
reeds_shepp_curves.h
f2c::SGObjFunc::SWATH_LENGTH
@ SWATH_LENGTH
f2c::SGObjFunc::OVERLAPS
@ OVERLAPS
swath_length.h
n_swath_modified.h
trapezoidal_decomp.h
f2c::HGAlg
HGAlg
Definition:
fields2cover.h:121
transformation.h
boustrophedon_decomp.h
types.h
f2c::types::Field
Definition:
Field.h:18
f2c::PPAlg::DUBINS_CC
@ DUBINS_CC
brute_force.h
f2c::Options::sg_angle
double sg_angle
Definition:
fields2cover.h:145
1_basic_types.cell
cell
Definition:
1_basic_types.py:88
path_length.h
7_decomposition.decomp
decomp
Definition:
7_decomposition.py:38
decomposition_base.h
f2c::Options::rp_alg
RPAlg rp_alg
Definition:
fields2cover.h:147
swath_generator_base.h
f2c::Options::sg_alg
SGAlg sg_alg
Definition:
fields2cover.h:143
spiral_order.h
f2c::RPAlg
RPAlg
Definition:
fields2cover.h:99
f2c::Options::hg_swaths
int hg_swaths
Definition:
fields2cover.h:141
constant_headland.h
f2c::RPAlg::SHORTEST_ROUTE
@ SHORTEST_ROUTE
complete_turn_path_obj.h
f2c::HGAlg::NONE
@ NONE
2_objective_functions.robot
robot
Definition:
2_objective_functions.py:76
f2c::planCovPath
F2CPath planCovPath(const F2CRobot &robot, const F2CCell &cell, const Options &opt=Options())
Definition:
fields2cover.cpp:136
f2c::DecompAlg::NONE
@ NONE
random.h
f2c::planCovRoute
F2CRoute planCovRoute(const F2CRobot &robot, const F2CCell &cell, const Options &opt=Options())
Definition:
fields2cover.cpp:81
f2c::Options::sg_obj
SGObjFunc sg_obj
Definition:
fields2cover.h:144
f2c::Options
Definition:
fields2cover.h:136
f2c::types::Cell
Definition:
Cell.h:32
reeds_shepp_curves_hc.h
7_decomposition.obj
obj
Definition:
7_decomposition.py:32
f2c::DecompAlg
DecompAlg
Definition:
fields2cover.h:130
rem_area.h
f2c::types::Path
Definition:
Path.h:23
f2c::PPAlg::DUBINS
@ DUBINS
visualizer.h
hg_objective.h
f2c::SGObjFunc::N_SWATH
@ N_SWATH
overlaps.h
f2c::PPAlg::REEDS_SHEPP
@ REEDS_SHEPP
pp_objective.h
f2c::Options::hg_alg
HGAlg hg_alg
Definition:
fields2cover.h:140
f2c::Options::decomp_angle
double decomp_angle
Definition:
fields2cover.h:138
f2c::types::Cells
Definition:
Cells.h:21
f2c::types::Route
Definition:
Route.h:23
boustrophedon_order.h
route_planner_base.h
f2c::types::Robot
Definition:
Robot.h:25
path_planning.h
f2c::Options::decomp_alg
DecompAlg decomp_alg
Definition:
fields2cover.h:137
base_objective.h
parser.h
headland_generator_base.h
f2c::PPAlg
PPAlg
Definition:
fields2cover.h:110
f2c::SGObjFunc
SGObjFunc
Definition:
fields2cover.h:88
2_objective_functions.field
field
Definition:
2_objective_functions.py:16
f2c
Main namespace of the fields2cover library.
Definition:
boustrophedon_decomp.h:14
f2c::SGAlg::GIVEN_ANGLE
@ GIVEN_ANGLE
f2c::SGAlg
SGAlg
Definition:
fields2cover.h:83
sg_objective.h
single_cell_swaths_order_base.h
rp_objective.h
direct_dist_path_obj.h
dubins_curves.h
turning_base.h
n_swath.h
decomp_objective.h
f2c::HGAlg::CONST
@ CONST
fields2cover
Author(s):
autogenerated on Fri Apr 25 2025 02:18:31