Main MRPT website > C++ reference for MRPT 1.5.9
TKLDParams.cpp
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 
10 #include "slam-precomp.h" // Precompiled headers
11 
12 #include <mrpt/utils/CStream.h>
14 #include <mrpt/slam/TKLDParams.h>
15 
16 using namespace mrpt::slam;
17 using namespace mrpt::utils;
18 
19 /*---------------------------------------------------------------
20  TKLDParams
21  ---------------------------------------------------------------*/
23  KLD_binSize_XY ( 0.2f ),
24  KLD_binSize_PHI ( DEG2RAD(5) ),
25  KLD_delta ( 0.01f ),
26  KLD_epsilon ( 0.02f ),
27  KLD_minSampleSize ( 250 ),
28  KLD_maxSampleSize ( 100000 ),
29  KLD_minSamplesPerBin ( 0 )
30 {
31 }
32 
33 
34 /*---------------------------------------------------------------
35  dumpToTextStream
36  ---------------------------------------------------------------*/
38 {
39  out.printf("\n----------- [TKLDParams] ------------ \n\n");
40 
41  out.printf("KLD_minSampleSize = %i\n", KLD_minSampleSize );
42  out.printf("KLD_maxSampleSize = %i\n", KLD_maxSampleSize );
43  out.printf("KLD_binSize_XY = %f m\n", KLD_binSize_XY );
44  out.printf("KLD_binSize_PHI = %f deg\n", RAD2DEG(KLD_binSize_PHI) );
45  out.printf("KLD_delta = %f\n", KLD_delta);
46  out.printf("KLD_epsilon = %f\n", KLD_epsilon);
47  out.printf("\n");
48 }
49 
50 /*---------------------------------------------------------------
51  loadFromConfigFile
52  ---------------------------------------------------------------*/
54  const mrpt::utils::CConfigFileBase &iniFile,
55  const std::string &section)
56 {
57  MRPT_LOAD_CONFIG_VAR( KLD_minSampleSize, int, iniFile,section );
58  MRPT_LOAD_CONFIG_VAR( KLD_maxSampleSize, int, iniFile,section );
59 
60  MRPT_LOAD_CONFIG_VAR( KLD_binSize_XY, double, iniFile,section );
62  MRPT_LOAD_CONFIG_VAR( KLD_delta, double, iniFile,section );
63  MRPT_LOAD_CONFIG_VAR( KLD_epsilon, double, iniFile,section );
64  MRPT_LOAD_CONFIG_VAR( KLD_minSamplesPerBin, double, iniFile,section );
65 
66 }
67 
68 
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
Definition: zip.h:16
void dumpToTextStream(mrpt::utils::CStream &out) const MRPT_OVERRIDE
This method should clearly display all the contents of the structure in textual form, sending it to a CStream.
Definition: TKLDParams.cpp:37
This class allows loading and storing values and vectors of different types from a configuration text...
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition: CStream.h:38
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:37
double KLD_minSamplesPerBin
(Default: KLD_minSamplesPerBin=0) The minimum number of samples will be the maximum of KLD_minSampleS...
Definition: TKLDParams.h:40
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:32
#define DEG2RAD
GLsizei const GLchar ** string
Definition: glext.h:3919
unsigned int KLD_maxSampleSize
Definition: TKLDParams.h:37
#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...
#define RAD2DEG
#define MRPT_LOAD_CONFIG_VAR_DEGREES(variableName, configFileObject, sectionNameStr)
Loads a double variable, stored as radians but entered in the INI-file as degrees.
void loadFromConfigFile(const mrpt::utils::CConfigFileBase &source, const std::string &section) MRPT_OVERRIDE
This method load the options from a ".ini"-like file or memory-stored string list.
Definition: TKLDParams.cpp:53
virtual int printf(const char *fmt,...) MRPT_printf_format_check(2
Writes a string to the stream in a textual form.
Definition: CStream.cpp:507



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020