MRPT
2.0.4
|
Virtual base for specifying the kind and parameters of one map (normally, to be inserted into mrpt::maps::CMultiMetricMap) See mrpt::maps::TSetOfMetricMapInitializers::loadFromConfigFile()
as an easy way of initialize this object, or construct with the factory methods <metric_map_class>::MapDefinition()
and TMetricMapInitializer::factory()
Definition at line 32 of file TMetricMapInitializer.h.
#include <mrpt/maps/TMetricMapInitializer.h>
Public Types | |
using | Ptr = std::shared_ptr< TMetricMapInitializer > |
Smart pointer to TMetricMapInitializer. More... | |
Public Member Functions | |
void | loadFromConfigFile (const mrpt::config::CConfigFileBase &source, const std::string §ionNamePrefix) override |
Load all params from a config file/source. More... | |
void | saveToConfigFile (mrpt::config::CConfigFileBase &target, const std::string §ion) const override |
This method saves the options to a ".ini"-like file or memory-stored string list. More... | |
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. More... | |
const mrpt::rtti::TRuntimeClassId::Ptr & | getMetricMapClassType () const |
Query the map type (C++ class), as set by the factory method MapDefinition() More... | |
void | loadFromConfigFileName (const std::string &config_file, const std::string §ion) |
Behaves like loadFromConfigFile, but you can pass directly a file name and a temporary CConfigFile object will be created automatically to load the file. More... | |
void | saveToConfigFileName (const std::string &config_file, const std::string §ion) const |
Behaves like saveToConfigFile, but you can pass directly a file name and a temporary CConfigFile object will be created automatically to save the file. More... | |
void | dumpToConsole () const |
Just like dumpToTextStream() but sending the text to the console (std::cout) More... | |
Static Public Member Functions | |
static TMetricMapInitializer * | factory (const std::string &mapClassName) |
Looks up in the registry of known map types and call the corresponding <metric_map_class>::MapDefinition() . More... | |
Public Attributes | |
mrpt::maps::TMapGenericParams | genericMapParams |
Common params for all maps: These are automatically set in TMetricMapTypesRegistry::factoryMapObjectFromDefinition() More... | |
Protected Member Functions | |
TMetricMapInitializer (const mrpt::rtti::TRuntimeClassId *classID) | |
virtual void | loadFromConfigFile_map_specific (const mrpt::config::CConfigFileBase &source, const std::string §ionNamePrefix)=0 |
Load all map-specific params. More... | |
virtual void | dumpToTextStream_map_specific (std::ostream &out) const =0 |
Static Protected Member Functions | |
static void | dumpVar_int (std::ostream &out, const char *varName, int v) |
Used to print variable info from dumpToTextStream with the macro LOADABLEOPTS_DUMP_VAR. More... | |
static void | dumpVar_float (std::ostream &out, const char *varName, float v) |
static void | dumpVar_double (std::ostream &out, const char *varName, double v) |
static void | dumpVar_bool (std::ostream &out, const char *varName, bool v) |
static void | dumpVar_string (std::ostream &out, const char *varName, const std::string &v) |
Protected Attributes | |
const mrpt::rtti::TRuntimeClassId::Ptr | metricMapClassType |
Derived classes set this to CLASS_ID(< class >) where < class > is any CMetricMap derived class. More... | |
Friends | |
class | TSetOfMetricMapInitializers |
Smart pointer to TMetricMapInitializer.
Definition at line 36 of file TMetricMapInitializer.h.
|
protected |
Definition at line 30 of file TMetricMapInitializer.cpp.
|
inherited |
Just like dumpToTextStream() but sending the text to the console (std::cout)
Definition at line 43 of file CLoadableOptions.cpp.
References mrpt::config::CLoadableOptions::dumpToTextStream().
Referenced by mrpt::hmtslam::CTopLCDetector_GridMatching::computeTopologicalObservationModel(), mrpt::ros1bridge::MapHdl::loadMap(), mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::printParams(), and mrpt::apps::CGridMapAlignerApp::run().
|
overridevirtual |
This method should clearly display all the contents of the structure in textual form, sending it to a std::ostream.
The default implementation in this base class relies on saveToConfigFile() to generate a plain text representation of all the parameters.
Reimplemented from mrpt::config::CLoadableOptions.
Definition at line 59 of file TMetricMapInitializer.cpp.
References mrpt::config::CLoadableOptions::dumpToTextStream(), dumpToTextStream_map_specific(), genericMapParams, metricMapClassType, and out.
|
protectedpure virtual |
Implemented in mrpt::maps::COccupancyGridMap2D::TMapDefinition, mrpt::maps::CLandmarksMap::TMapDefinition, mrpt::maps::COccupancyGridMap3D::TMapDefinition, mrpt::maps::CColouredPointsMap::TMapDefinition, mrpt::maps::CBeaconMap::TMapDefinition, mrpt::maps::CPointsMapXYZI::TMapDefinition, mrpt::maps::CGasConcentrationGridMap2D::TMapDefinition, mrpt::maps::CHeightGridMap2D::TMapDefinition, mrpt::maps::CWeightedPointsMap::TMapDefinition, mrpt::maps::CSimplePointsMap::TMapDefinition, mrpt::maps::CReflectivityGridMap2D::TMapDefinition, mrpt::maps::CHeightGridMap2D_MRF::TMapDefinition, mrpt::maps::CColouredOctoMap::TMapDefinition, mrpt::maps::CWirelessPowerGridMap2D::TMapDefinition, and mrpt::maps::COctoMap::TMapDefinition.
Referenced by dumpToTextStream().
|
staticprotectedinherited |
Definition at line 62 of file CLoadableOptions.cpp.
References mrpt::format(), LOADABLEOPTS_COLUMN_WIDTH, and out.
|
staticprotectedinherited |
Definition at line 56 of file CLoadableOptions.cpp.
References mrpt::format(), LOADABLEOPTS_COLUMN_WIDTH, and out.
|
staticprotectedinherited |
Definition at line 50 of file CLoadableOptions.cpp.
References mrpt::format(), LOADABLEOPTS_COLUMN_WIDTH, and out.
|
staticprotectedinherited |
Used to print variable info from dumpToTextStream with the macro LOADABLEOPTS_DUMP_VAR.
Definition at line 44 of file CLoadableOptions.cpp.
References mrpt::format(), LOADABLEOPTS_COLUMN_WIDTH, and out.
|
staticprotectedinherited |
Definition at line 69 of file CLoadableOptions.cpp.
References mrpt::format(), LOADABLEOPTS_COLUMN_WIDTH, and out.
|
static |
Looks up in the registry of known map types and call the corresponding <metric_map_class>::MapDefinition()
.
Definition at line 22 of file TMetricMapInitializer.cpp.
|
inline |
Query the map type (C++ class), as set by the factory method MapDefinition()
Definition at line 59 of file TMetricMapInitializer.h.
References metricMapClassType.
Referenced by mrpt::maps::internal::TMetricMapTypesRegistry::factoryMapObjectFromDefinition().
|
overridevirtual |
Load all params from a config file/source.
For examples and format, read the docs of mrpt::maps::CMultiMetricMap Typical section names:
<sectionNamePrefix>_creationOpts
<sectionNamePrefix>_insertOpts
<sectionNamePrefix>_likelihoodOpts
For examples and format, read the docs of mrpt::maps::CMultiMetricMap
Implements mrpt::config::CLoadableOptions.
Definition at line 38 of file TMetricMapInitializer.cpp.
References genericMapParams, mrpt::maps::TMapGenericParams::loadFromConfigFile(), and loadFromConfigFile_map_specific().
Referenced by mrpt::maps::TSetOfMetricMapInitializers::loadFromConfigFile().
|
protectedpure virtual |
Load all map-specific params.
Implemented in mrpt::maps::COccupancyGridMap2D::TMapDefinition, mrpt::maps::CLandmarksMap::TMapDefinition, mrpt::maps::COccupancyGridMap3D::TMapDefinition, mrpt::maps::CColouredPointsMap::TMapDefinition, mrpt::maps::CBeaconMap::TMapDefinition, mrpt::maps::CPointsMapXYZI::TMapDefinition, mrpt::maps::CGasConcentrationGridMap2D::TMapDefinition, mrpt::maps::CHeightGridMap2D::TMapDefinition, mrpt::maps::CWeightedPointsMap::TMapDefinition, mrpt::maps::CSimplePointsMap::TMapDefinition, mrpt::maps::CReflectivityGridMap2D::TMapDefinition, mrpt::maps::CHeightGridMap2D_MRF::TMapDefinition, mrpt::maps::CColouredOctoMap::TMapDefinition, mrpt::maps::CWirelessPowerGridMap2D::TMapDefinition, and mrpt::maps::COctoMap::TMapDefinition.
Referenced by loadFromConfigFile().
|
inherited |
Behaves like loadFromConfigFile, but you can pass directly a file name and a temporary CConfigFile object will be created automatically to load the file.
Definition at line 22 of file CLoadableOptions.cpp.
References mrpt::config::CLoadableOptions::loadFromConfigFile().
Referenced by mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::loadParams().
|
overridevirtual |
This method saves the options to a ".ini"-like file or memory-stored string list.
Reimplemented from mrpt::config::CLoadableOptions.
Definition at line 51 of file TMetricMapInitializer.cpp.
References genericMapParams, metricMapClassType, and mrpt::maps::TMapGenericParams::saveToConfigFile().
|
inherited |
Behaves like saveToConfigFile, but you can pass directly a file name and a temporary CConfigFile object will be created automatically to save the file.
Definition at line 36 of file CLoadableOptions.cpp.
References mrpt::config::CLoadableOptions::saveToConfigFile().
|
friend |
Definition at line 34 of file TMetricMapInitializer.h.
mrpt::maps::TMapGenericParams mrpt::maps::TMetricMapInitializer::genericMapParams |
Common params for all maps: These are automatically set in TMetricMapTypesRegistry::factoryMapObjectFromDefinition()
Definition at line 40 of file TMetricMapInitializer.h.
Referenced by dumpToTextStream(), mrpt::maps::internal::TMetricMapTypesRegistry::factoryMapObjectFromDefinition(), loadFromConfigFile(), saveToConfigFile(), mrpt::maps::COccupancyGridMap3D::serializeFrom(), and mrpt::maps::COccupancyGridMap3D::serializeTo().
|
protected |
Derived classes set this to CLASS_ID(< class >) where < class > is any CMetricMap derived class.
Definition at line 72 of file TMetricMapInitializer.h.
Referenced by dumpToTextStream(), getMetricMapClassType(), and saveToConfigFile().
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 |