Coverage Control Library
Loading...
Searching...
No Matches
generate_world_map.h
Go to the documentation of this file.
1
/*
2
* This file is part of the CoverageControl library
3
*
4
* Author: Saurav Agarwal
5
* Contact: sauravag@seas.upenn.edu, agr.saurav1@gmail.com
6
* Repository: https://github.com/KumarRobotics/CoverageControl
7
*
8
* Copyright (c) 2024, Saurav Agarwal
9
*
10
* The CoverageControl library is free software: you can redistribute it and/or
11
* modify it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation, either version 3 of the License, or (at your
13
* option) any later version.
14
*
15
* The CoverageControl library is distributed in the hope that it will be
16
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
18
* Public License for more details.
19
*
20
* You should have received a copy of the GNU General Public License along with
21
* CoverageControl library. If not, see <https://www.gnu.org/licenses/>.
22
*/
23
29
#ifndef CPPSRC_CORE_INCLUDE_COVERAGECONTROL_GENERATE_WORLD_MAP_H_
30
#define CPPSRC_CORE_INCLUDE_COVERAGECONTROL_GENERATE_WORLD_MAP_H_
31
32
#include <limits>
33
#include <vector>
34
35
namespace
CoverageControl
{
36
float
const
kFloatMax
=
37
std::numeric_limits<float>::max();
38
float
const
kFloatMin
=
39
std::numeric_limits<float>::min();
40
42
struct
BND_Cuda
{
43
float
mean_x
,
mean_y
;
44
float
sigma_x
,
sigma_y
;
45
float
scale
,
rho
;
46
};
47
49
struct
Bounds
{
50
float
xmin
=
kFloatMax
;
51
float
xmax
=
kFloatMin
;
52
float
ymin
=
kFloatMax
;
53
float
ymax
=
kFloatMin
;
54
};
55
57
struct
Polygons_Cuda_Host
{
58
std::vector<float>
x
;
59
std::vector<float>
y
;
60
std::vector<float>
imp
;
61
std::vector<int>
sz
;
62
std::vector<Bounds>
bounds
;
63
int
num_pts
= 0;
64
int
num_polygons
= 0;
65
};
66
68
struct
Polygons_Cuda
{
69
float
*
x
=
nullptr
;
70
float
*
y
=
nullptr
;
71
float
*
imp
=
nullptr
;
72
int
*
sz
=
nullptr
;
73
Bounds
*
bounds
=
nullptr
;
74
int
num_pts
= 0;
75
int
num_polygons
= 0;
76
};
77
79
void
generate_world_map_cuda
(
BND_Cuda
*,
Polygons_Cuda_Host
const
&,
int
const
,
80
int
const
,
float
const
,
float
const
,
float
const
,
81
float
*importance_vec,
float
&);
82
}
/* namespace CoverageControl */
83
84
#endif
// CPPSRC_CORE_INCLUDE_COVERAGECONTROL_GENERATE_WORLD_MAP_H_
CoverageControl
Namespace for the CoverageControl library.
Definition
abstract_controller.h:34
CoverageControl::kFloatMin
float const kFloatMin
Minimum value of float.
Definition
generate_world_map.h:38
CoverageControl::kFloatMax
float const kFloatMax
Maximum value of float.
Definition
generate_world_map.h:36
CoverageControl::generate_world_map_cuda
void generate_world_map_cuda(BND_Cuda *, Polygons_Cuda_Host const &, int const, int const, float const, float const, float const, float *importance_vec, float &)
Function to generate the world map on the device.
Definition
generate_world_map.cu:175
CoverageControl::BND_Cuda
Structure to store the parameters of the Bivariate Normal Distribution.
Definition
generate_world_map.h:42
CoverageControl::BND_Cuda::scale
float scale
Definition
generate_world_map.h:45
CoverageControl::BND_Cuda::rho
float rho
Definition
generate_world_map.h:45
CoverageControl::BND_Cuda::sigma_y
float sigma_y
Definition
generate_world_map.h:44
CoverageControl::BND_Cuda::mean_x
float mean_x
Definition
generate_world_map.h:43
CoverageControl::BND_Cuda::sigma_x
float sigma_x
Definition
generate_world_map.h:44
CoverageControl::BND_Cuda::mean_y
float mean_y
Definition
generate_world_map.h:43
CoverageControl::Bounds
Structure to store the rectangular bounds of the polygons.
Definition
generate_world_map.h:49
CoverageControl::Bounds::xmin
float xmin
Definition
generate_world_map.h:50
CoverageControl::Bounds::ymin
float ymin
Definition
generate_world_map.h:52
CoverageControl::Bounds::xmax
float xmax
Definition
generate_world_map.h:51
CoverageControl::Bounds::ymax
float ymax
Definition
generate_world_map.h:53
CoverageControl::Polygons_Cuda_Host
Structure to store the parameters of the polygons on the host.
Definition
generate_world_map.h:57
CoverageControl::Polygons_Cuda_Host::sz
std::vector< int > sz
Definition
generate_world_map.h:61
CoverageControl::Polygons_Cuda_Host::x
std::vector< float > x
Definition
generate_world_map.h:58
CoverageControl::Polygons_Cuda_Host::num_pts
int num_pts
Definition
generate_world_map.h:63
CoverageControl::Polygons_Cuda_Host::y
std::vector< float > y
Definition
generate_world_map.h:59
CoverageControl::Polygons_Cuda_Host::imp
std::vector< float > imp
Definition
generate_world_map.h:60
CoverageControl::Polygons_Cuda_Host::bounds
std::vector< Bounds > bounds
Definition
generate_world_map.h:62
CoverageControl::Polygons_Cuda_Host::num_polygons
int num_polygons
Definition
generate_world_map.h:64
CoverageControl::Polygons_Cuda
Structure to store the parameters of the polygons on the device.
Definition
generate_world_map.h:68
CoverageControl::Polygons_Cuda::sz
int * sz
Definition
generate_world_map.h:72
CoverageControl::Polygons_Cuda::x
float * x
Definition
generate_world_map.h:69
CoverageControl::Polygons_Cuda::y
float * y
Definition
generate_world_map.h:70
CoverageControl::Polygons_Cuda::bounds
Bounds * bounds
Definition
generate_world_map.h:73
CoverageControl::Polygons_Cuda::num_pts
int num_pts
Definition
generate_world_map.h:74
CoverageControl::Polygons_Cuda::imp
float * imp
Definition
generate_world_map.h:71
CoverageControl::Polygons_Cuda::num_polygons
int num_polygons
Definition
generate_world_map.h:75
cppsrc
core
include
CoverageControl
generate_world_map.h
Generated by
1.12.0