MRPT  2.0.4
TKLDParams.cpp
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #include "slam-precomp.h" // Precompiled headers
11 
14 #include <mrpt/slam/TKLDParams.h>
15 
16 using namespace mrpt::slam;
17 
18 /*---------------------------------------------------------------
19  TKLDParams
20  ---------------------------------------------------------------*/
21 TKLDParams::TKLDParams() : KLD_binSize_PHI(5.0_deg) {}
22 /*---------------------------------------------------------------
23  dumpToTextStream
24  ---------------------------------------------------------------*/
25 void TKLDParams::dumpToTextStream(std::ostream& out) const
26 {
27  out << "\n----------- [TKLDParams] ------------ \n\n";
28 
29  out << mrpt::format(
30  "KLD_minSampleSize = %i\n", KLD_minSampleSize);
31  out << mrpt::format(
32  "KLD_maxSampleSize = %i\n", KLD_maxSampleSize);
33  out << mrpt::format(
34  "KLD_binSize_XY = %f m\n", KLD_binSize_XY);
35  out << mrpt::format(
36  "KLD_binSize_PHI = %f deg\n",
38  out << mrpt::format(
39  "KLD_delta = %f\n", KLD_delta);
40  out << mrpt::format(
41  "KLD_epsilon = %f\n", KLD_epsilon);
42  out << "\n";
43 }
44 
45 /*---------------------------------------------------------------
46  loadFromConfigFile
47  ---------------------------------------------------------------*/
49  const mrpt::config::CConfigFileBase& iniFile, const std::string& section)
50 {
53 
54  MRPT_LOAD_CONFIG_VAR(KLD_binSize_XY, double, iniFile, section);
56  MRPT_LOAD_CONFIG_VAR(KLD_delta, double, iniFile, section);
57  MRPT_LOAD_CONFIG_VAR(KLD_epsilon, double, iniFile, section);
59 }
std::string std::string format(std::string_view fmt, ARGS &&... args)
Definition: format.h:26
void dumpToTextStream(std::ostream &out) const override
This method should clearly display all the contents of the structure in textual form, sending it to a std::ostream.
Definition: TKLDParams.cpp:25
unsigned int KLD_minSampleSize
Parameters for the KLD adaptive sample size algorithm (see Dieter Fox&#39;s papers), which is used only i...
Definition: TKLDParams.h:38
This class allows loading and storing values and vectors of different types from a configuration text...
double KLD_minSamplesPerBin
(Default: KLD_minSamplesPerBin=0) The minimum number of samples will be the maximum of KLD_minSampleS...
Definition: TKLDParams.h:43
void loadFromConfigFile(const mrpt::config::CConfigFileBase &source, const std::string &section) override
This method load the options from a ".ini"-like file or memory-stored string list.
Definition: TKLDParams.cpp:48
string iniFile(myDataDir+string("benchmark-options.ini"))
double KLD_binSize_XY
Parameters for the KLD adaptive sample size algorithm (see Dieter Fox&#39;s papers), which is used only i...
Definition: TKLDParams.h:31
unsigned int KLD_maxSampleSize
Definition: TKLDParams.h:38
#define MRPT_LOAD_CONFIG_VAR( variableName, variableType, configFileObject, sectionNameStr)
An useful macro for loading variables stored in a INI-like file under a key with the same name that t...
mrpt::vision::TStereoCalibResults out
constexpr double RAD2DEG(const double x)
Radians to degrees.
#define MRPT_LOAD_CONFIG_VAR_DEGREES( variableName, configFileObject, sectionNameStr)
Loads a double variable, stored as radians but entered in the INI-file as degrees.



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020