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 <string>
37
38namespace CoverageControl {
39
49 public:
50 std::string config_file_;
51
56 int pNumRobots = 32;
57
64 double pPlotScale = 1.0;
72 double pResolution = 1.0;
73
76 int pWorldMapSize = 1024;
77
80
85 int pLocalMapSize = 256;
86
87 bool pUpdateRobotMap = true;
89 bool pUpdateSensorView = true;
90 bool pUpdateSystemMap = true;
91
99 // Helps in reducing the number of erfc evaluations
100 // Needs testing to be sure that the probability masses are not significantly
101 // off
103 double pTruncationBND = 2;
104
105 double pNorm = 1;
106
107 // These settings are only required if the IDF is generated using random
108 // gaussians
109 double pMinSigma = 40;
110 double pMaxSigma = 50;
111 double pMinPeak = 6;
112 double pMaxPeak = 10;
113
114 int pNumPolygons = 0;
115 int pMaxVertices = 10;
116 double pPolygonRadius = 64;
117
118 double pUnknownImportance = 0.5;
127 // Assuming square sensor FOV.
128 // Actual FOV: square with side pResolution * pSensorSize
129 // Robot is placed at the center of FOV
130 // Make it even so that I don't have to deal with substracting by
131 // half-resolution. Have made it to half of (pWorldMapSize - 1000 /
132 // pResolution)/2
133 int pSensorSize = 64;
134 double pCommunicationRange = 128;
135 // in m/s. Make sure pMaxRobotSpeed * pTimeStep / pResolution < pSensorSize/2
136 double pMaxRobotSpeed = 5;
137 double pRobotInitDist = 1024;
140 double pTimeStep = 1;
141
145 bool pAddNoisePositions = false;
154 int pEpisodeSteps = 2000; // Total time is pEpisodeSteps * pTimeStep
156
167 int pNumFrontiers = 10; // Number of frontiers to be selected
172
173 explicit Parameters(std::string const &config_file)
174 : config_file_{config_file} {
175 ParseParameters();
176 /* PrintParameters(); */
177 }
178
179 void SetConfig(std::string const &config_file) {
180 config_file_ = config_file;
181 ParseParameters();
182 }
183
184 void PrintParameters() const;
185
186 private:
187 void ParseParameters();
188};
189
194} /* namespace CoverageControl */
195
196#endif // CPPSRC_CORE_INCLUDE_COVERAGECONTROL_PARAMETERS_H_
Class to store parameters.
Definition parameters.h:48
int pRobotMapSize
Robot map saves what the robot has seen.
Definition parameters.h:79
double pTimeStep
Each time step corresponds to pTimeStep seconds.
Definition parameters.h:140
int pNumPolygons
Number of polygonal features.
Definition parameters.h:114
int pNumRobots
Number of robots.
Definition parameters.h:56
void SetConfig(std::string const &config_file)
Definition parameters.h:179
int pNumGaussianFeatures
Bivariate Normal Distribution truncated after pTruncationBND * sigma.
Definition parameters.h:102
int pMaxVertices
Maximum number of vertices in a polygon.
Definition parameters.h:115
int pRobotPosHistorySize
Number of previous positions to store.
Definition parameters.h:139
Parameters(std::string const &config_file)
Definition parameters.h:173
double pCommunicationRange
Radius of communication (in meters)
Definition parameters.h:134
Namespace for the CoverageControl library.