Coverage Control Library
Loading...
Searching...
No Matches
parameters.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
32#ifndef CPPSRC_CORE_INCLUDE_COVERAGECONTROL_PARAMETERS_H_
33#define CPPSRC_CORE_INCLUDE_COVERAGECONTROL_PARAMETERS_H_
34
35#include <cmath>
36#include <filesystem>
37#include <iostream>
38#include <string>
39
40namespace CoverageControl {
41
51 public:
52 std::string config_file_;
53
58 int pNumRobots = 32;
59 int pNumFeatures = 32;
60 int pNumPolygons = 0;
61 int pMaxVertices = 10;
62 double pPolygonRadius = 64;
63
70 double pPlotScale = 1.0;
78 double pResolution = 1.0;
79
82 int pWorldMapSize = 1024;
83
86
91 int pLocalMapSize = 256;
92
93 bool pUpdateRobotMap = true;
94 bool pUpdateExplorationMap = true;
95 bool pUpdateSensorView = true;
96 bool pUpdateSystemMap = true;
97
105 // Helps in reducing the number of erfc evaluations
106 // Needs testing to be sure that the probability masses are not significantly
107 // off
108 double pTruncationBND = 2;
109
110 double pNorm = 1;
111
112 // These settings are only required if the IDF is generated using random
113 // gaussians
114 double pMinSigma = 40;
115 double pMaxSigma = 50;
116 double pMinPeak = 6;
117 double pMaxPeak = 10;
118
119 double pUnknownImportance = 0.5;
120 bool pRobotMapUseUnknownImportance = false;
128 // Assuming square sensor FOV.
129 // Actual FOV: square with side pResolution * pSensorSize
130 // Robot is placed at the center of FOV
131 // Make it even so that I don't have to deal with substracting by
132 // half-resolution. Have made it to half of (pWorldMapSize - 1000 /
133 // pResolution)/2
134 int pSensorSize = 64;
135 double pCommunicationRange = 128;
136 // in m/s. Make sure pMaxRobotSpeed * pTimeStep / pResolution < pSensorSize/2
137 double pMaxRobotSpeed = 5;
138 double pRobotInitDist = 1024;
141 double pTimeStep = 1;
142
146 bool pAddNoisePositions = false;
147 double pPositionsNoiseSigma = 0.;
155 int pEpisodeSteps = 2000; // Total time is pEpisodeSteps * pTimeStep
156 bool pCheckOscillations = true;
157
161 int pLloydMaxIterations = 100;
162 int pLloydNumTries = 10;
168 int pNumFrontiers = 10; // Number of frontiers to be selected
172 Parameters() {}
173
174 explicit Parameters(std::string const &config_file)
175 : config_file_{config_file} {
176 ParseParameters();
177 /* PrintParameters(); */
178 }
179
180 void SetConfig(std::string const &config_file) {
181 config_file_ = config_file;
182 ParseParameters();
183 }
184
185 void PrintParameters();
186
187 private:
188 void ParseParameters();
189};
190
195} /* namespace CoverageControl */
196
197#endif // CPPSRC_CORE_INCLUDE_COVERAGECONTROL_PARAMETERS_H_
Class to store parameters.
Definition parameters.h:50
int pRobotMapSize
Robot map saves what the robot has seen.
Definition parameters.h:85
double pTimeStep
Each time step corresponds to pTimeStep seconds.
Definition parameters.h:141
int pNumPolygons
Number of polygonal features.
Definition parameters.h:60
int pNumRobots
Number of robots.
Definition parameters.h:58
int pNumFeatures
Number of features.
Definition parameters.h:59
int pMaxVertices
Maximum number of vertices in a polygon.
Definition parameters.h:61
int pRobotPosHistorySize
Number of previous positions to store.
Definition parameters.h:140
double pCommunicationRange
Radius of communication (in meters)
Definition parameters.h:135
double pTruncationBND
Bivariate Normal Distribution truncated after pTruncationBND * sigma.
Definition parameters.h:108
Namespace for the CoverageControl library.