MRPT  1.9.9
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-2019, 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(DEG2RAD(5)) {}
22 /*---------------------------------------------------------------
23  dumpToTextStream
24  ---------------------------------------------------------------*/
25 void TKLDParams::dumpToTextStream(std::ostream& out) const
26 {
27  out << mrpt::format("\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 << mrpt::format("\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 }
double RAD2DEG(const double x)
Radians to degrees.
double DEG2RAD(const double x)
Degrees to radians.
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
GLsizei const GLchar ** string
Definition: glext.h:4116
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...
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
Definition: format.cpp:16
#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 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019