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 <iostream>
33#include <limits>
34#include <sstream>
35#include <vector>
36
37namespace CoverageControl {
38float const kFloatMax =
39 std::numeric_limits<float>::max();
40float const kFloatMin =
41 std::numeric_limits<float>::min();
42
44struct BND_Cuda {
45 float mean_x, mean_y;
46 float sigma_x, sigma_y;
47 float scale, rho;
48};
49
51struct Bounds {
52 float xmin = kFloatMax;
53 float xmax = kFloatMin;
54 float ymin = kFloatMax;
55 float ymax = kFloatMin;
56};
57
60 std::vector<float> x;
61 std::vector<float> y;
62 std::vector<float> imp;
63 std::vector<int> sz;
64 std::vector<Bounds> bounds;
65 int num_pts = 0;
66 int num_polygons = 0;
67};
68
71 float *x = nullptr;
72 float *y = nullptr;
73 float *imp = nullptr;
74 int *sz = nullptr;
75 Bounds *bounds = nullptr;
76 int num_pts = 0;
77 int num_polygons = 0;
78};
79
81void generate_world_map_cuda(BND_Cuda *, Polygons_Cuda_Host const &, int const,
82 int const, float const, float const, float const,
83 float *importance_vec, float &);
84} /* namespace CoverageControl */
85
86#endif // CPPSRC_CORE_INCLUDE_COVERAGECONTROL_GENERATE_WORLD_MAP_H_
Namespace for the CoverageControl library.
float const kFloatMin
Minimum value of float.
float const kFloatMax
Maximum value of float.
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.
Structure to store the parameters of the Bivariate Normal Distribution.
Structure to store the rectangular bounds of the polygons.
Structure to store the parameters of the polygons on the host.
Structure to store the parameters of the polygons on the device.