00001 /* +---------------------------------------------------------------------------+ 00002 | The Mobile Robot Programming Toolkit (MRPT) C++ library | 00003 | | 00004 | http://mrpt.sourceforge.net/ | 00005 | | 00006 | Copyright (C) 2005-2010 University of Malaga | 00007 | | 00008 | This software was written by the Machine Perception and Intelligent | 00009 | Robotics Lab, University of Malaga (Spain). | 00010 | Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> | 00011 | | 00012 | This file is part of the MRPT project. | 00013 | | 00014 | MRPT is free software: you can redistribute it and/or modify | 00015 | it under the terms of the GNU General Public License as published by | 00016 | the Free Software Foundation, either version 3 of the License, or | 00017 | (at your option) any later version. | 00018 | | 00019 | MRPT is distributed in the hope that it will be useful, | 00020 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 00021 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 00022 | GNU General Public License for more details. | 00023 | | 00024 | You should have received a copy of the GNU General Public License | 00025 | along with MRPT. If not, see <http://www.gnu.org/licenses/>. | 00026 | | 00027 +---------------------------------------------------------------------------+ */ 00028 #ifndef CMultiMetricMap_H 00029 #define CMultiMetricMap_H 00030 00031 #include <mrpt/slam/COccupancyGridMap2D.h> 00032 #include <mrpt/slam/CGasConcentrationGridMap2D.h> 00033 #include <mrpt/slam/CHeightGridMap2D.h> 00034 #include <mrpt/slam/CSimplePointsMap.h> 00035 #include <mrpt/slam/CColouredPointsMap.h> 00036 #include <mrpt/slam/CLandmarksMap.h> 00037 #include <mrpt/slam/CBeaconMap.h> 00038 #include <mrpt/slam/CMetricMap.h> 00039 #include <mrpt/utils/CSerializable.h> 00040 #include <mrpt/utils/CLoadableOptions.h> 00041 00042 namespace mrpt 00043 { 00044 namespace slam 00045 { 00046 class TSetOfMetricMapInitializers; 00047 00048 DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE( CMultiMetricMap , CMetricMap ) 00049 00050 /** This class stores any customizable set of metric maps. 00051 * The internal metric maps can be accessed directly by the user. 00052 * If some kind of map is not desired, it can be just ignored, but if this fact is specified in the 00053 * "CMultiMetricMap::mapsUsage" member some methods (as the observation insertion) will be more 00054 * efficient since it will be invoked on desired maps only.<br><br> 00055 * <b>Currently these metric maps are supported for being kept internally:</b>: 00056 * - mrpt::slam::CPointsMap: For laser 2D range scans, and posibly for IR ranges,... (It keeps the full 3D structure of scans) 00057 * - mrpt::slam::COccupancyGridMap2D: Exclusively for 2D, <b>horizontal</b> laser range scans, at different altitudes. 00058 * - mrpt::slam::CLandmarksMap: For visual landmarks,etc... 00059 * - mrpt::slam::CGasConcentrationGridMap2D: For gas concentration maps. 00060 * - mrpt::slam::CBeaconMap: For range-only SLAM. 00061 * - mrpt::slam::CHeightGridMap2D: For maps of height for each (x,y) location. 00062 * - mrpt::slam::CColouredPointsMap: For points map with color. 00063 * 00064 * See CMultiMetricMap::setListOfMaps() for the method for initializing this class, and also 00065 * see TSetOfMetricMapInitializers::loadFromConfigFile for a template of ".ini"-like configuration 00066 * file that can be used to define what maps to create and all their parameters. 00067 * 00068 * \sa CMetricMap 00069 */ 00070 class MRPTDLLIMPEXP CMultiMetricMap : public CMetricMap 00071 { 00072 // This must be added to any CSerializable derived class: 00073 DEFINE_SERIALIZABLE( CMultiMetricMap ) 00074 00075 protected: 00076 /** Deletes all maps and clears the internal lists of maps. 00077 */ 00078 void deleteAllMaps(); 00079 00080 public: 00081 typedef std::pair<CPoint3D,unsigned int> TPairIdBeacon; 00082 00083 /** Returns true if the map is empty/no observation has been inserted. 00084 */ 00085 bool isEmpty() const; 00086 00087 /** Some options for this class: 00088 */ 00089 struct MRPTDLLIMPEXP TOptions : public utils::CLoadableOptions 00090 { 00091 TOptions() : likelihoodMapSelection(mapFuseAll), 00092 enableInsertion_pointsMap(true), 00093 enableInsertion_landmarksMap(true), 00094 enableInsertion_gridMaps(true), 00095 enableInsertion_gasGridMaps(true), 00096 enableInsertion_beaconMap(true), 00097 enableInsertion_heightMaps(true), 00098 enableInsertion_colourPointsMaps(true) 00099 { 00100 } 00101 00102 /** Load parameters from configuration source 00103 */ 00104 void loadFromConfigFile( 00105 const mrpt::utils::CConfigFileBase &source, 00106 const std::string §ion); 00107 00108 /** This method must display clearly all the contents of the structure in textual form, sending it to a CStream. 00109 */ 00110 void dumpToTextStream(CStream &out) const; 00111 00112 /** This selects the map to be used when computing the likelihood of an observation. 00113 * \sa computeObservationLikelihood 00114 */ 00115 enum TMapSelectionForLikelihood 00116 { 00117 mapFuseAll = -1, 00118 mapGrid = 0, 00119 mapPoints, 00120 mapLandmarks, 00121 mapGasGrid, 00122 mapBeacon, 00123 mapHeight, 00124 mapColourPoints 00125 } likelihoodMapSelection; 00126 00127 /** Default = true (set to false to avoid "insertObservation" to update a given map) 00128 */ 00129 bool enableInsertion_pointsMap; 00130 00131 /** Default = true (set to false to avoid "insertObservation" to update a given map) 00132 */ 00133 bool enableInsertion_landmarksMap; 00134 00135 /** Default = true (set to false to avoid "insertObservation" to update a given map) 00136 */ 00137 bool enableInsertion_gridMaps; 00138 00139 /** Default = true (set to false to avoid "insertObservation" to update a given map) 00140 */ 00141 bool enableInsertion_gasGridMaps; 00142 00143 /** Default = true (set to false to avoid "insertObservation" to update a given map) 00144 */ 00145 bool enableInsertion_beaconMap; 00146 00147 /** Default = true (set to false to avoid "insertObservation" to update a given map) 00148 */ 00149 bool enableInsertion_heightMaps; 00150 00151 /** Default = true (set to false to avoid "insertObservation" to update a given map) 00152 */ 00153 bool enableInsertion_colourPointsMaps; 00154 00155 00156 } options; 00157 00158 /** Some of the internal metric maps (the number of point-maps depends on the the TSetOfMetricMapInitializers passed to the constructor of this class) 00159 */ 00160 std::deque<CSimplePointsMapPtr> m_pointsMaps; 00161 00162 /** One of the internal metric map (will be NULL if not used, what comes from the TSetOfMetricMapInitializers passed to the constructor of this class) 00163 */ 00164 CLandmarksMapPtr m_landmarksMap; 00165 00166 /** One of the internal metric map (will be NULL if not used, what comes from the TSetOfMetricMapInitializers passed to the constructor of this class) 00167 */ 00168 CBeaconMapPtr m_beaconMap; 00169 00170 /** Some of the internal metric maps (the number of gridmaps depends on the the TSetOfMetricMapInitializers passed to the constructor of this class) 00171 */ 00172 std::deque<COccupancyGridMap2DPtr> m_gridMaps; 00173 00174 /** Some of the internal metric maps (the number of gas gridmaps depends on the the TSetOfMetricMapInitializers passed to the constructor of this class) 00175 */ 00176 std::deque<CGasConcentrationGridMap2DPtr> m_gasGridMaps; 00177 00178 /** Some of the internal metric maps (the number of gas gridmaps depends on the the TSetOfMetricMapInitializers passed to the constructor of this class) 00179 */ 00180 std::deque<CHeightGridMap2DPtr> m_heightMaps; 00181 00182 /** One of the internal metric map (will be NULL if not used, what comes from the TSetOfMetricMapInitializers passed to the constructor of this class) 00183 */ 00184 CColouredPointsMapPtr m_colourPointsMap; 00185 00186 /** Constructor. 00187 * \param initializers One internal map will be created for each entry in this "TSetOfMetricMapInitializers" struct, and each map will be initialized with the corresponding options. 00188 * \param opts If provided (not NULL), the member "options" will be initialized with those values. 00189 * If initializers is NULL, no internal map will be created. 00190 */ 00191 CMultiMetricMap( 00192 const mrpt::slam::TSetOfMetricMapInitializers *initializers = NULL, 00193 const TOptions *opts = NULL ); 00194 00195 /** Sets the list of internal map according to the passed list of map initializers (Current maps' content will be deleted!) 00196 */ 00197 void setListOfMaps( const mrpt::slam::TSetOfMetricMapInitializers *initializers ); 00198 00199 /** Copy constructor */ 00200 CMultiMetricMap(const mrpt::slam::CMultiMetricMap &other ); 00201 00202 /** Copy operator from "other" object. 00203 */ 00204 mrpt::slam::CMultiMetricMap &operator = ( const mrpt::slam::CMultiMetricMap &other ); 00205 00206 /** Destructor. 00207 */ 00208 virtual ~CMultiMetricMap( ); 00209 00210 /** Clear all elements of the map. 00211 */ 00212 void clear(); 00213 00214 /** Computes the likelihood that a given observation was taken from a given pose in the world being modeled with this map. 00215 * 00216 * \param takenFrom The robot's pose the observation is supposed to be taken from. 00217 * \param obs The observation. 00218 * \return This method returns a likelihood in the range [0,1]. 00219 * 00220 * \sa likelihoodMapSelection, Used in particle filter algorithms, see: CMultiMetricMapPDF::update 00221 */ 00222 double computeObservationLikelihood( const CObservation *obs, const CPose3D &takenFrom ); 00223 00224 /** Returns the ratio of points in a map which are new to the points map while falling into yet static cells of gridmap. 00225 * \param points The set of points to check. 00226 * \param takenFrom The pose for the reference system of points, in global coordinates of this hybrid map. 00227 */ 00228 float getNewStaticPointsRatio( 00229 CPointsMap *points, 00230 CPose2D &takenFrom ); 00231 00232 /** Insert the observation information into this map (see options) 00233 * \param obs The observation 00234 * \param robotPose The 3D pose of the robot mobile base in the map reference system, or NULL (default) if you want to use CPose2D(0,0,deg) 00235 * 00236 * \sa CObservation::insertObservationInto 00237 */ 00238 bool insertObservation( const CObservation *obs, const CPose3D *robotPose = NULL ); 00239 00240 /** See the definition in the base class: In this class calls to this method are passed to the inner points map. 00241 * 00242 * \sa computeMatching3DWith 00243 */ 00244 void computeMatchingWith2D( 00245 const CMetricMap *otherMap, 00246 const CPose2D &otherMapPose, 00247 float maxDistForCorrespondence, 00248 float maxAngularDistForCorrespondence, 00249 const CPose2D &angularDistPivotPoint, 00250 TMatchingPairList &correspondences, 00251 float &correspondencesRatio, 00252 float *sumSqrDist = NULL, 00253 bool onlyKeepTheClosest = false, 00254 bool onlyUniqueRobust = false ) const; 00255 00256 /** Computes the ratio in [0,1] of correspondences between "this" and the "otherMap" map, whose 6D pose relative to "this" is "otherMapPose" 00257 * In the case of a multi-metric map, this returns the average between the maps. This method always return 0 for grid maps. 00258 * \param otherMap [IN] The other map to compute the matching with. 00259 * \param otherMapPose [IN] The 6D pose of the other map as seen from "this". 00260 * \param minDistForCorr [IN] The minimum distance between 2 non-probabilistic map elements for counting them as a correspondence. 00261 * \param minMahaDistForCorr [IN] The minimum Mahalanobis distance between 2 probabilistic map elements for counting them as a correspondence. 00262 * 00263 * \return The matching ratio [0,1] 00264 * \sa computeMatchingWith2D 00265 */ 00266 float compute3DMatchingRatio( 00267 const CMetricMap *otherMap, 00268 const CPose3D &otherMapPose, 00269 float minDistForCorr = 0.10f, 00270 float minMahaDistForCorr = 2.0f 00271 ) const; 00272 00273 /** The implementation in this class just calls all the corresponding method of the contained metric maps. 00274 */ 00275 void saveMetricMapRepresentationToFile( 00276 const std::string &filNamePrefix 00277 ) const; 00278 00279 /** This method is called at the end of each "prediction-update-map insertion" cycle within "mrpt::slam::CMetricMapBuilderRBPF::processActionObservation". 00280 * This method should normally do nothing, but in some cases can be used to free auxiliary cached variables. 00281 */ 00282 void auxParticleFilterCleanUp(); 00283 00284 /** Returns a 3D object representing the map. 00285 */ 00286 void getAs3DObject ( mrpt::opengl::CSetOfObjectsPtr &outObj ) const; 00287 00288 /** Returns true if this map is able to compute a sensible likelihood function for this observation (i.e. an occupancy grid map cannot with an image). 00289 * \param obs The observation. 00290 * \sa computeObservationLikelihood 00291 */ 00292 bool canComputeObservationLikelihood( const CObservation *obs ); 00293 00294 /** An auxiliary variable that can be used freely by the users (this will be copied to other maps using the copy constructor, copy operator, streaming,etc) The default value is 0. 00295 */ 00296 unsigned int m_ID; 00297 00298 }; // End of class def. 00299 00300 /** Each structure of this kind will determine the kind (and initial configuration) of one map to be build into a CMultiMetricMap object. 00301 * See "mrpt::slam::TSetOfMetricMapInitializers::loadFromConfigFile" as an easy way of initialize this object. 00302 * \sa TSetOfMetricMapInitializers, CMultiMetricMap::CMultiMetricMap 00303 */ 00304 struct MRPTDLLIMPEXP TMetricMapInitializer 00305 { 00306 /** Initialization (sets 'metricMapClassType' to NULL, an invalid value -> it must be set correctly before use!) 00307 */ 00308 TMetricMapInitializer(); 00309 00310 /** Set this to CLASS_ID(< class >) where < class > is any CMetricMap derived class. 00311 */ 00312 TRuntimeClassIdPtr metricMapClassType; 00313 00314 /** This value will be copied to the member with the same value in the map, see mrpt::slam::CMetricMap::m_disableSaveAs3DObject 00315 */ 00316 bool m_disableSaveAs3DObject; 00317 00318 /** Especific options for grid maps (mrpt::slam::COccupancyGridMap2D) 00319 */ 00320 struct MRPTDLLIMPEXP TOccGridMap2DOptions 00321 { 00322 TOccGridMap2DOptions(); //!< Default values loader 00323 00324 float min_x,max_x,min_y,max_y,resolution; //!< See COccupancyGridMap2D::COccupancyGridMap2D 00325 COccupancyGridMap2D::TInsertionOptions insertionOpts; //!< Customizable initial options. 00326 COccupancyGridMap2D::TLikelihoodOptions likelihoodOpts; //!< Customizable initial options. 00327 00328 } occupancyGridMap2D_options; 00329 00330 /** Especific options for points maps (mrpt::slam::CPointsMap) 00331 */ 00332 struct MRPTDLLIMPEXP CPointsMapOptions 00333 { 00334 CPointsMapOptions(); //!< Default values loader 00335 CPointsMap::TInsertionOptions insertionOpts; //!< Customizable initial options for loading the class' own defaults. 00336 CPointsMap::TLikelihoodOptions likelihoodOpts; //!< //!< Customizable initial likelihood options 00337 } pointsMapOptions_options; 00338 00339 /** Especific options for gas grid maps (mrpt::slam::CGasConcentrationGridMap2D) 00340 */ 00341 struct MRPTDLLIMPEXP CGasConcentrationGridMap2DOptions 00342 { 00343 CGasConcentrationGridMap2DOptions(); //!< Default values loader 00344 00345 float min_x,max_x,min_y,max_y,resolution; //!< See CGasConcentrationGridMap2D::CGasConcentrationGridMap2D 00346 CGasConcentrationGridMap2D::TMapRepresentation mapType; //!< The kind of map representation (see CGasConcentrationGridMap2D::CGasConcentrationGridMap2D) 00347 CGasConcentrationGridMap2D::TInsertionOptions insertionOpts; //!< Customizable initial options. 00348 00349 } gasGridMap_options; 00350 00351 /** Especific options for landmarks maps (mrpt::slam::CLandmarksMap) 00352 */ 00353 struct MRPTDLLIMPEXP CLandmarksMapOptions 00354 { 00355 CLandmarksMapOptions(); //!< Default values loader 00356 00357 std::deque<CMultiMetricMap::TPairIdBeacon> initialBeacons; //!< Initial contents of the map, especified by a set of 3D Beacons with associated IDs 00358 CLandmarksMap::TInsertionOptions insertionOpts; //!< Customizable initial options. 00359 CLandmarksMap::TLikelihoodOptions likelihoodOpts; //!< Customizable initial options. 00360 00361 } landmarksMap_options; 00362 00363 00364 /** Especific options for landmarks maps (mrpt::slam::CBeaconMap) 00365 */ 00366 struct MRPTDLLIMPEXP CBeaconMapOptions 00367 { 00368 CBeaconMapOptions(); //!< Default values loader 00369 00370 CBeaconMap::TLikelihoodOptions likelihoodOpts; //!< Customizable initial options. 00371 CBeaconMap::TInsertionOptions insertionOpts; //!< Customizable initial options. 00372 00373 } beaconMap_options; 00374 00375 /** Especific options for height grid maps (mrpt::slam::CHeightGridMap2D) 00376 */ 00377 struct MRPTDLLIMPEXP CHeightGridMap2DOptions 00378 { 00379 CHeightGridMap2DOptions(); //!< Default values loader 00380 00381 float min_x,max_x,min_y,max_y,resolution; //!< See CHeightGridMap2D::CHeightGridMap2D 00382 CHeightGridMap2D::TMapRepresentation mapType; //!< The kind of map representation (see CHeightGridMap2D::CHeightGridMap2D) 00383 CHeightGridMap2D::TInsertionOptions insertionOpts; //!< Customizable initial options. 00384 } heightMap_options; 00385 00386 /** Especific options for coloured points maps (mrpt::slam::CPointsMap) 00387 */ 00388 struct MRPTDLLIMPEXP CColouredPointsMapOptions 00389 { 00390 CColouredPointsMapOptions(); //!< Default values loader 00391 CPointsMap::TInsertionOptions insertionOpts; //!< Customizable initial options for loading the class' own defaults. 00392 CPointsMap::TLikelihoodOptions likelihoodOpts; //!< //!< Customizable initial likelihood options 00393 CColouredPointsMap::TColourOptions colourOpts; //!< Customizable initial options for loading the class' own defaults. */ 00394 } colouredPointsMapOptions_options; 00395 }; 00396 00397 /** A set of TMetricMapInitializer structures, passed to the constructor CMultiMetricMap::CMultiMetricMap 00398 * See the comments for TSetOfMetricMapInitializers::loadFromConfigFile, and "CMultiMetricMap::setListOfMaps" for 00399 * effectively creating the list of desired maps. 00400 * \sa CMultiMetricMap::CMultiMetricMap, utils::CLoadableOptions 00401 */ 00402 class MRPTDLLIMPEXP TSetOfMetricMapInitializers : public utils::CLoadableOptions 00403 { 00404 protected: 00405 std::deque<TMetricMapInitializer> m_list; 00406 00407 public: 00408 size_t size() const { return m_list.size(); } 00409 void push_back( const TMetricMapInitializer &o ) { m_list.push_back(o); } 00410 00411 typedef std::deque<TMetricMapInitializer>::iterator iterator; 00412 typedef std::deque<TMetricMapInitializer>::const_iterator const_iterator; 00413 00414 iterator begin() { return m_list.begin(); } 00415 const_iterator begin() const { return m_list.begin(); } 00416 00417 iterator end() { return m_list.end(); } 00418 const_iterator end() const { return m_list.end(); } 00419 00420 void clear() { m_list.clear(); } 00421 00422 00423 TSetOfMetricMapInitializers() : m_list(), options() 00424 {} 00425 00426 00427 /** This options will be loaded when creating the set of maps in CMultiMetricMap (See CMultiMetricMap::TOptions) 00428 */ 00429 CMultiMetricMap::TOptions options; 00430 00431 /** Loads the configuration for the set of internal maps from a textual definition in an INI-like file. 00432 * The format of the ini file is defined in utils::CConfigFile. The list of maps and their options 00433 * will be loaded from a handle of sections: 00434 * 00435 * \code 00436 * [<sectionName>] 00437 * ; Creation of maps: 00438 * occupancyGrid_count=<Number of mrpt::slam::COccupancyGridMap2D maps> 00439 * gasGrid_count=<Number of mrpt::slam::CGasConcentrationGridMap2D maps> 00440 * landmarksMap_count=<0 or 1, for creating a mrpt::slam::CLandmarksMap map> 00441 * beaconMap_count=<0 or 1, for creating a mrpt::slam::CBeaconMap map> 00442 * pointsMap_count=<Number of mrpt::slam::CSimplePointsMap map> 00443 * heightMap_count=<Number of mrpt::slam::CHeightGridMap2D maps> 00444 * colourPointsMap_count=<0 or 1, for creating a mrpt::slam::CColouredPointsMap map> 00445 * 00446 * ; Selection of map for likelihood: (fuseAll=-1, occGrid=0, points=1,landmarks=2,gasGrid=3,4=landmarks SOG, 5=beacon map, 6=height map) 00447 * likelihoodMapSelection=[-1, 6] 00448 * 00449 * ; Enables (1) / Disables (0) insertion into specific maps: 00450 * enableInsertion_pointsMap=<0/1> 00451 * enableInsertion_landmarksMap=<0/1> 00452 * enableInsertion_gridMaps=<0/1> 00453 * enableInsertion_gasGridMaps=<0/1> 00454 * enableInsertion_beaconMap=<0/1> 00455 * enableInsertion_heightMap=<0/1> 00456 * enableInsertion_colourPointsMap=<0/1> 00457 * 00458 * ; Creation Options for OccupancyGridMap ##: 00459 * [<sectionName>+"_occupancyGrid_##_creationOpts"] 00460 * min_x=<value> 00461 * max_x=<value> 00462 * min_y=<value> 00463 * max_y=<value> 00464 * resolution=<value> 00465 * 00466 * ; Insertion Options for OccupancyGridMap ##: 00467 * [<sectionName>+"_occupancyGrid_##_insertOpts"] 00468 * <See COccupancyGridMap2D::TInsertionOptions> 00469 * 00470 * ; Likelihood Options for OccupancyGridMap ##: 00471 * [<sectionName>+"_occupancyGrid_##_likelihoodOpts"] 00472 * <See COccupancyGridMap2D::TLikelihoodOptions> 00473 * 00474 * 00475 * 00476 * ; Insertion Options for CSimplePointsMap ##: 00477 * [<sectionName>+"_pointsMap_##_insertOpts"] 00478 * <See CPointsMap::TInsertionOptions> 00479 * 00480 * ; Likelihood Options for CSimplePointsMap ##: 00481 * [<sectionName>+"_pointsMap_##_likelihoodOpts"] 00482 * <See CPointsMap::TLikelihoodOptions> 00483 * 00484 * ; Creation Options for CGasConcentrationGridMap2D ##: 00485 * [<sectionName>+"_gasGrid_##_creationOpts"] 00486 * mapType= <0-1> ; See CGasConcentrationGridMap2D::CGasConcentrationGridMap2D 00487 * min_x=<value> 00488 * max_x=<value> 00489 * min_y=<value> 00490 * max_y=<value> 00491 * resolution=<value> 00492 * 00493 * ; Insertion Options for CGasConcentrationGridMap2D ##: 00494 * [<sectionName>+"_gasGrid_##_insertOpts"] 00495 * <See CGasConcentrationGridMap2D::TInsertionOptions> 00496 * 00497 * 00498 * ; Creation Options for CLandmarksMap ##: 00499 * [<sectionName>+"_landmarksMap_##_creationOpts"] 00500 * nBeacons=<# of beacons> 00501 * beacon_001_ID=67 ; The ID and 3D coordinates of each beacon 00502 * beacon_001_X=<x> 00503 * beacon_001_Y=<x> 00504 * beacon_001_Z=<x> 00505 * 00506 * ; Insertion Options for CLandmarksMap ##: 00507 * [<sectionName>+"_landmarksMap_##_insertOpts"] 00508 * <See CLandmarksMap::TInsertionOptions> 00509 * 00510 * ; Likelihood Options for CLandmarksMap ##: 00511 * [<sectionName>+"_landmarksMap_##_likelihoodOpts"] 00512 * <See CLandmarksMap::TLikelihoodOptions> 00513 * 00514 * 00515 * ; Insertion Options for CBeaconMap ##: 00516 * [<sectionName>+"_beaconMap_##_insertOpts"] 00517 * <See CBeaconMap::TInsertionOptions> 00518 * 00519 * ; Likelihood Options for CBeaconMap ##: 00520 * [<sectionName>+"_beaconMap_##_likelihoodOpts"] 00521 * <See CBeaconMap::TLikelihoodOptions> 00522 * 00523 * ; Creation Options for HeightGridMap ##: 00524 * [<sectionName>+"_heightGrid_##_creationOpts"] 00525 * mapType= <0-1> ; See CHeightGridMap2D::CHeightGridMap2D 00526 * min_x=<value> 00527 * max_x=<value> 00528 * min_y=<value> 00529 * max_y=<value> 00530 * resolution=<value> 00531 * 00532 * ; Insertion Options for HeightGridMap ##: 00533 * [<sectionName>+"_heightGrid_##_insertOpts"] 00534 * <See CHeightGridMap2D::TInsertionOptions> 00535 * 00536 * 00537 * ; Insertion Options for CColouredPointsMap ##: 00538 * [<sectionName>+"_colourPointsMap_##_insertOpts"] 00539 * <See CPointsMap::TInsertionOptions> 00540 * 00541 * 00542 * ; Color Options for CColouredPointsMap ##: 00543 * [<sectionName>+"_colourPointsMap_##_colorOpts"] 00544 * <See CColouredPointsMap::TColourOptions> 00545 * 00546 * ; Likelihood Options for CSimplePointsMap ##: 00547 * [<sectionName>+"_colourPointsMap_##_likelihoodOpts"] 00548 * <See CPointsMap::TLikelihoodOptions> 00549 * 00550 * \endcode 00551 * 00552 * Where: 00553 * - ##: Represents the index of the map (e.g. "00","01",...) 00554 * - By default, the variables into each "TOptions" structure of the maps are defined in textual form by the same name of the corresponding C++ variable (e.g. "float resolution;" -> "resolution=0.10") 00555 */ 00556 void loadFromConfigFile( 00557 const mrpt::utils::CConfigFileBase &source, 00558 const std::string §ionName); 00559 00560 /** This method dumps the options of the multi-metric map AND those of every internal map. 00561 */ 00562 void dumpToTextStream(CStream &out) const; 00563 }; 00564 00565 00566 } // End of namespace 00567 } // End of namespace 00568 00569 #endif
| Page generated by Doxygen 1.6.2 for MRPT 0.8.1 SVN:exported at Mon Feb 15 22:01:07 UTC 2010 |
