Main MRPT website > C++ reference for MRPT 1.3.2
maps/CLandmarksMap.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2015, 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 #ifndef CLandmarksMap_H
10 #define CLandmarksMap_H
11 
13 #include <mrpt/maps/CMetricMap.h>
14 #include <mrpt/maps/CLandmark.h>
20 #include <mrpt/math/CMatrix.h>
23 #include <mrpt/obs/obs_frwds.h>
24 
25 namespace mrpt
26 {
27 namespace maps
28 {
29  namespace internal { typedef std::vector<CLandmark> TSequenceLandmarks; }
30 
32 
33  /** A class for storing a map of 3D probabilistic landmarks.
34  * <br>
35  * Currently these types of landmarks are defined: (see mrpt::maps::CLandmark)
36  * - For "visual landmarks" from images: features with associated descriptors.
37  * - For laser scanners: each of the range measuremnts, as "occupancy" landmarks.
38  * - For grid maps: "Panoramic descriptor" feature points.
39  * - For range-only localization and SLAM: Beacons. It is also supported the simulation of expected beacon-to-sensor readings, observation likelihood,...
40  * <br>
41  * <b>How to load landmarks from observations:</b><br>
42  * When invoking CLandmarksMap::insertObservation(), the values in CLandmarksMap::insertionOptions will
43  * determinate the kind of landmarks that will be extracted and fused into the map. Supported feature
44  * extraction processes are listed next:
45  *
46  <table>
47  <tr> <td><b>Observation class:</b></td> <td><b>Generated Landmarks:</b></td> <td><b>Comments:</b></td> </tr>
48  <tr> <td>CObservationImage</td> <td>vlSIFT</td> <td>1) A SIFT feature is created for each SIFT detected in the image,
49  <br>2) Correspondences between SIFTs features and existing ones are finded by computeMatchingWith3DLandmarks,
50  <br>3) The corresponding feaures are fused, and the new ones added, with an initial uncertainty according to insertionOptions</td> </tr>
51  <tr> <td>CObservationStereoImages</td> <td>vlSIFT</td> <td> Each image is separately procesed by the method for CObservationImage observations </td> </tr>
52  <tr> <td>CObservationStereoImages</td> <td>vlColor</td> <td> TODO... </td> </tr>
53  <tr> <td>CObservation2DRangeScan</td> <td>glOccupancy</td> <td> A landmark is added for each range in the scan, with its appropiate covariance matrix derived from the jacobians matrixes. </td> </tr>
54  </table>
55  *
56  * \sa CMetricMap
57  * \ingroup mrpt_vision_grp
58  */
60  {
61  // This must be added to any CSerializable derived class:
63 
64  private:
65  void internal_clear() MRPT_OVERRIDE;
66  bool internal_insertObservation( const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D *robotPose = NULL ) MRPT_OVERRIDE;
67 
68  public:
69  /** Computes the (logarithmic) likelihood that a given observation was taken from a given pose in the world being modeled with this map.
70  *
71  * In the current implementation, this method behaves in a different way according to the nature of
72  * the observation's class:
73  * - "mrpt::obs::CObservation2DRangeScan": This calls "computeLikelihood_RSLC_2007".
74  * - "mrpt::obs::CObservationStereoImages": This calls "computeLikelihood_SIFT_LandmarkMap".
75  *
76  * \param takenFrom The robot's pose the observation is supposed to be taken from.
77  * \param obs The observation.
78  * \return This method returns a likelihood value > 0.
79  *
80  * \sa Used in particle filter algorithms, see: CMultiMetricMapPDF::update
81  */
82  double internal_computeObservationLikelihood( const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D &takenFrom ) MRPT_OVERRIDE;
83 
84 
85  static mrpt::utils::TColorf COLOR_LANDMARKS_IN_3DSCENES; //!< The color of landmark ellipsoids in CLandmarksMap::getAs3DObject
86 
87  typedef mrpt::maps::CLandmark landmark_type;
88 
89 
90  /** The list of landmarks: the wrapper class is just for maintaining the KD-Tree representation
91  */
93  {
94  private:
95  /** The actual list */
97 
98  /** A grid-map with the set of landmarks falling into each cell.
99  * \todo Use the KD-tree instead?
100  */
102 
103  /** Auxiliary variables used in "getLargestDistanceFromOrigin"
104  * \sa getLargestDistanceFromOrigin
105  */
107 
108  /** Auxiliary variables used in "getLargestDistanceFromOrigin"
109  * \sa getLargestDistanceFromOrigin
110  */
112 
113  public:
114  /** Default constructor
115  */
116  TCustomSequenceLandmarks();
117 
119  inline iterator begin() { return m_landmarks.begin(); };
120  inline iterator end() { return m_landmarks.end(); };
121  void clear();
122  inline size_t size() const { return m_landmarks.size(); };
123 
125  inline const_iterator begin() const { return m_landmarks.begin(); };
126  inline const_iterator end() const { return m_landmarks.end(); };
127 
128  /** The object is copied, thus the original copy passed as a parameter can be released.
129  */
130  void push_back( const CLandmark &lm);
131  CLandmark* get(unsigned int indx);
132  const CLandmark* get(unsigned int indx) const;
133  void isToBeModified(unsigned int indx);
134  void hasBeenModified(unsigned int indx);
135  void hasBeenModifiedAll();
136  void erase(unsigned int indx);
137 
139 
140  /** Returns the landmark with a given landmrk ID, or NULL if not found
141  */
142  const CLandmark* getByID( CLandmark::TLandmarkID ID ) const;
143 
144  /** Returns the landmark with a given beacon ID, or NULL if not found
145  */
146  const CLandmark* getByBeaconID( unsigned int ID ) const;
147 
148  /** This method returns the largest distance from the origin to any of the points, such as a sphere centered at the origin with this radius cover ALL the points in the map (the results are buffered, such as, if the map is not modified, the second call will be much faster than the first one).
149  */
150  float getLargestDistanceFromOrigin() const;
151 
152  } landmarks;
153 
154  /** Constructor
155  */
156  CLandmarksMap();
157 
158  /** Virtual destructor.
159  */
160  virtual ~CLandmarksMap();
161 
162 
163  /**** FAMD ***/
164  /** Map of the Euclidean Distance between the descriptors of two SIFT-based landmarks
165  */
166  static std::map<std::pair<mrpt::maps::CLandmark::TLandmarkID, mrpt::maps::CLandmark::TLandmarkID>, double> _mEDD;
168  static bool _maxIDUpdated;
169 
171  /**** END FAMD *****/
172 
173  // See docs in base class
174  float compute3DMatchingRatio(
175  const mrpt::maps::CMetricMap *otherMap,
176  const mrpt::poses::CPose3D &otherMapPose,
177  float maxDistForCorr = 0.10f,
178  float maxMahaDistForCorr = 2.0f
179  ) const;
180 
181  /** With this struct options are provided to the observation insertion process.
182  */
184  {
185  public:
186  /** Initilization of default parameters
187  */
189 
190  /** See utils::CLoadableOptions
191  */
192  void loadFromConfigFile(
193  const mrpt::utils::CConfigFileBase &source,
194  const std::string &section);
195 
196  /** See utils::CLoadableOptions
197  */
198  void dumpToTextStream(mrpt::utils::CStream &out) const;
199 
200  /** If set to true (default), the insertion of a CObservationImage in the map will insert SIFT 3D features.
201  */
203 
204  /** If set to true (default), the insertion of a CObservationStereoImages in the map will insert SIFT 3D features.
205  */
207 
208  /** If set to true (default), inserting a CObservation2DRangeScan in the map will generate landmarks for each range.
209  */
211 
212  /** [For SIFT landmarks only] The ratio between the best and second best descriptor distances to set as correspondence (Default=0.4)
213  */
215 
216  /** [For SIFT landmarks only] The minimum likelihood value of a match to set as correspondence (Default=0.5)
217  */
219 
220  /****************************************** FAMD ******************************************/
221  /** [For SIFT landmarks only] The minimum Euclidean Descriptor Distance value of a match to set as correspondence (Default=200)
222  */
224 
225  /** [For SIFT landmarks only] Method to compute 3D matching (Default = 0 (Our method))
226  * 0: Our method -> Euclidean Distance between Descriptors and 3D position
227  * 1: Sim, Elinas, Griffin, Little -> Euclidean Distance between Descriptors
228  */
229  unsigned int SIFTMatching3DMethod;
230 
231  /** [For SIFT landmarks only] Method to compute the likelihood (Default = 0 (Our method))
232  * 0: Our method -> Euclidean Distance between Descriptors and 3D position
233  * 1: Sim, Elinas, Griffin, Little -> 3D position
234  */
235  unsigned int SIFTLikelihoodMethod;
236 
237  /****************************************** END FAMD ******************************************/
238 
239  /** [For SIFT landmarks only] The distance (in meters) of the mean value of landmarks, for the initial position PDF (Default = 3m)
240  */
242 
243  /** [For SIFT landmarks only] The width (in meters, standard deviation) of the ellipsoid in the axis perpendicular to the main directiom (Default = 0.05f)
244  */
246 
247  /** [For SIFT landmarks only] The standard deviation (in pixels) for the SIFTs detector (This is used for the Jacobbian to project stereo images to 3D)
248  */
249  float SIFTs_stdXY, SIFTs_stdDisparity;
250 
251  /** Number of points to extract in the image
252  */
254 
255  /** Maximum depth of 3D landmarks when loading a landmarks map from a stereo image observation.
256  */
258 
259  /** Maximum distance (in pixels) from a point to a certain epipolar line to be considered a potential match.
260  */
262 
263  /** Indicates if the images (as well as the SIFT detected features) should be shown in a window.
264  */
266 
267  /** Parameters of the SIFT feature detector/descriptors while inserting images in the landmark map.
268  * \note There exists another \a SIFT_feat_options field in the \a likelihoodOptions member.
269  * \note All parameters of this field can be loaded from a config file. See mrpt::vision::CFeatureExtraction::TOptions for the names of the expected fields.
270  */
272 
273  } insertionOptions;
274 
275  /** With this struct options are provided to the likelihood computations.
276  */
278  {
279  public:
280  /** Initilization of default parameters
281  */
283 
284  /** See utils::CLoadableOptions
285  */
286  void loadFromConfigFile(
287  const mrpt::utils::CConfigFileBase &source,
288  const std::string &section);
289 
290  /** See utils::CLoadableOptions
291  */
292  void dumpToTextStream(mrpt::utils::CStream &out) const;
293 
294  /** The number of rays from a 2D range scan will be decimated by this factor (default = 1, no decimation)
295  */
297 
299 
301 
303 
305 
306  /** Considers 1 out of "SIFTs_decimation" visual landmarks in the observation during the likelihood computation.
307  */
309 
310  /** The standard deviation used for Beacon ranges likelihood (default=0.08).
311  */
313 
314  /** The ratio between gaussian and uniform distribution (default=1).
315  */
316  float alphaRatio;
317 
318  /** Maximun reliable beacon range value (default=20)
319  */
321 
322  /** This struct store de GPS longitude, latitude (in degrees ) and altitude (in meters) for the first GPS observation
323  * compose with de sensor position on the robot.
324  */
326  {
327  public:
328  TGPSOrigin();
329 
330  double longitude; //!< degrees
331  double latitude; //!< degrees
332  double altitude; //!< meters
333 
334  /** Estas tres opciones sirven para encajar mapas de GPS con posiciones absolutas con
335  * mapas de otros sensores (como laser :D) se obtienen facilmente con el programa matlab map_matching
336  * ang : Map rotation (deg)
337  * x_shift: Desplazamiento en x relativo al robot (en metros)
338  * y_shift: Desplazamiento en y relativo al robot (en metros)
339  */
340  double ang,
341  x_shift,
342  y_shift;
343 
344  unsigned int min_sat; //!< Minimum number of sats to take into account the data
345 
346  } GPSOrigin;
347 
348  /** A constant "sigma" for GPS localization data (in meters)
349  */
350  float GPS_sigma;
351 
352  /** Parameters of the SIFT feature detector/descriptors while inserting images in the landmark map.
353  * \note There exists another \a SIFT_feat_options field in the \a insertionOptions member.
354  * \note All parameters of this field can be loaded from a config file. See mrpt::vision::CFeatureExtraction::TOptions for the names of the expected fields.
355  */
357 
358  } likelihoodOptions;
359 
360  /** This struct stores extra results from invoking insertObservation
361  */
363  {
364  /** The number of SIFT detected in left and right images respectively
365  */
366 
367  unsigned int nSiftL, nSiftR;
368 
369 
370  } insertionResults;
371 
372  /** With this struct options are provided to the fusion process.
373  */
375  {
376  /** Initialization
377  */
378  TFuseOptions();
379 
380  /** Required number of times of a landmark to be seen not to be removed, in "ellapsedTime" seconds.
381  */
382  unsigned int minTimesSeen;
383 
384  /** See "minTimesSeen"
385  */
387 
388  } fuseOptions;
389 
390 
391  /** Save to a text file.
392  * In line "i" there are the (x,y,z) mean values of the i'th landmark + type of landmark + # times seen + timestamp + RGB/descriptor + ID
393  *
394  * Returns false if any error occured, true elsewere.
395  */
396  bool saveToTextFile(std::string file);
397 
398  /** Save to a MATLAB script which displays 2D error ellipses for the map (top-view, projection on the XY plane).
399  * \param file The name of the file to save the script to.
400  * \param style The MATLAB-like string for the style of the lines (see 'help plot' in MATLAB for posibilities)
401  * \param stdCount The ellipsoids will be drawn from the center to "stdCount" times the "standard deviations". (default is 2std = 95% confidence intervals)
402  *
403  * \return Returns false if any error occured, true elsewere.
404  */
405  bool saveToMATLABScript2D(
406  std::string file,
407  const char *style="b",
408  float stdCount = 2.0f );
409 
410  /** Save to a MATLAB script which displays 3D error ellipses for the map.
411  * \param file The name of the file to save the script to.
412  * \param style The MATLAB-like string for the style of the lines (see 'help plot' in MATLAB for posibilities)
413  * \param stdCount The ellipsoids will be drawn from the center to a given confidence interval in [0,1], e.g. 2 sigmas=0.95 (default is 2std = 0.95 confidence intervals)
414  *
415  * \return Returns false if any error occured, true elsewere.
416  */
417  bool saveToMATLABScript3D(
418  std::string file,
419  const char *style="b",
420  float confInterval = 0.95f ) const ;
421 
422  /** Returns the stored landmarks count.
423  */
424  size_t size() const;
425 
426  /** Computes the (logarithmic) likelihood function for a sensed observation "o" according to "this" map.
427  * This is the implementation of the algorithm reported in the paper:
428  <em>J.L. Blanco, J. Gonzalez, and J.A. Fernandez-Madrigal, "A Consensus-based Approach for Estimating the Observation Likelihood of Accurate Range Sensors", in IEEE International Conference on Robotics and Automation (ICRA), Rome (Italy), Apr 10-14, 2007</em>
429  */
430  double computeLikelihood_RSLC_2007( const CLandmarksMap *s, const mrpt::poses::CPose2D &sensorPose);
431 
432  /** Loads into this landmarks map the SIFT features extracted from an image observation (Previous contents of map will be erased)
433  * The robot is assumed to be at the origin of the map.
434  * Some options may be applicable from "insertionOptions" (insertionOptions.SIFTsLoadDistanceOfTheMean)
435  *
436  * \param feat_options Optionally, you can pass here parameters for changing the default SIFT detector settings.
437  */
438  void loadSiftFeaturesFromImageObservation(
439  const mrpt::obs::CObservationImage &obs,
441  );
442 
443  /** Loads into this landmarks map the SIFT features extracted from an observation consisting of a pair of stereo-image (Previous contents of map will be erased)
444  * The robot is assumed to be at the origin of the map.
445  * Some options may be applicable from "insertionOptions"
446  *
447  * \param feat_options Optionally, you can pass here parameters for changing the default SIFT detector settings.
448  */
449  void loadSiftFeaturesFromStereoImageObservation(
453  );
454 
455  /** Loads into this landmarks-map a set of occupancy features according to a 2D range scan (Previous contents of map will be erased)
456  * \param obs The observation
457  * \param robotPose The robot pose in the map (Default = the origin)
458  * Some options may be applicable from "insertionOptions"
459  */
460  void loadOccupancyFeaturesFrom2DRangeScan(
462  const mrpt::poses::CPose3D *robotPose = NULL,
463  unsigned int downSampleFactor = 1);
464 
465  // See docs in base class
466  void computeMatchingWith2D(
467  const mrpt::maps::CMetricMap *otherMap,
468  const mrpt::poses::CPose2D &otherMapPose,
469  float maxDistForCorrespondence,
470  float maxAngularDistForCorrespondence,
471  const mrpt::poses::CPose2D &angularDistPivotPoint,
472  mrpt::utils::TMatchingPairList &correspondences,
473  float &correspondencesRatio,
474  float *sumSqrDist = NULL,
475  bool onlyKeepTheClosest = false,
476  bool onlyUniqueRobust = false ) const;
477 
478  /** Perform a search for correspondences between "this" and another lansmarks map:
479  * In this class, the matching is established solely based on the landmarks' IDs.
480  * \param otherMap [IN] The other map.
481  * \param correspondences [OUT] The matched pairs between maps.
482  * \param correspondencesRatio [OUT] This is NumberOfMatchings / NumberOfLandmarksInTheAnotherMap
483  * \param otherCorrespondences [OUT] Will be returned with a vector containing "true" for the indexes of the other map's landmarks with a correspondence.
484  */
485  void computeMatchingWith3DLandmarks(
486  const mrpt::maps::CLandmarksMap *otherMap,
487  mrpt::utils::TMatchingPairList &correspondences,
488  float &correspondencesRatio,
489  std::vector<bool> &otherCorrespondences) const;
490 
491  /** Changes the reference system of the map to a given 3D pose.
492  */
493  void changeCoordinatesReference( const mrpt::poses::CPose3D &newOrg );
494 
495  /** Changes the reference system of the map "otherMap" and save the result in "this" map.
496  */
497  void changeCoordinatesReference( const mrpt::poses::CPose3D &newOrg, const mrpt::maps::CLandmarksMap *otherMap );
498 
499  /** Fuses the contents of another map with this one, updating "this" object with the result.
500  * This process involves fusing corresponding landmarks, then adding the new ones.
501  * \param other The other landmarkmap, whose landmarks will be inserted into "this"
502  * \param justInsertAllOfThem If set to "true", all the landmarks in "other" will be inserted into "this" without checking for possible correspondences (may appear duplicates ones, etc...)
503  */
504  void fuseWith( CLandmarksMap &other, bool justInsertAllOfThem = false );
505 
506  /** Returns the (logarithmic) likelihood of a set of landmarks "map" given "this" map.
507  * See paper: JJAA 2006
508  */
509  double computeLikelihood_SIFT_LandmarkMap(
510  CLandmarksMap *map,
511  mrpt::utils::TMatchingPairList *correspondences = NULL,
512  std::vector<bool> *otherCorrespondences = NULL);
513 
514  /** Returns true if the map is empty/no observation has been inserted.
515  */
516  bool isEmpty() const;
517 
518  /** Simulates a noisy reading toward each of the beacons in the landmarks map, if any.
519  * \param in_robotPose This robot pose is used to simulate the ranges to each beacon.
520  * \param in_sensorLocationOnRobot The 3D position of the sensor on the robot
521  * \param out_Observations The results will be stored here. NOTICE that the fields "CObservationBeaconRanges::minSensorDistance","CObservationBeaconRanges::maxSensorDistance" and "CObservationBeaconRanges::stdError" MUST BE FILLED OUT before calling this function.
522  * An observation will be generated for each beacon in the map, but notice that some of them may be missed if out of the sensor maximum range.
523  */
524  void simulateBeaconReadings(
525  const mrpt::poses::CPose3D &in_robotPose,
526  const mrpt::poses::CPoint3D &in_sensorLocationOnRobot,
527  mrpt::obs::CObservationBeaconRanges &out_Observations ) const;
528 
529  /** Simulates a noisy bearing-range observation of all the beacons (landamrks with type glBeacon) in the landmarks map, if any.
530  * \param[in] robotPose The robot pose.
531  * \param[in] sensorLocationOnRobot The 3D position of the sensor on the robot
532  * \param[out] observations The results will be stored here.
533  * \param[in] sensorDetectsIDs If this is set to false, all the landmarks will be sensed with INVALID_LANDMARK_ID as ID.
534  * \param[in] stdRange The sigma of the sensor noise in range (meters).
535  * \param[in] stdYaw The sigma of the sensor noise in yaw (radians).
536  * \param[in] stdPitch The sigma of the sensor noise in pitch (radians).
537  * \param[out] real_associations If it's not a NULL pointer, this will contain at the return the real indices of the landmarks in the map in the same order than they appear in out_Observations. Useful when sensorDetectsIDs=false. Spurious readings are assigned a std::string::npos (=-1) index.
538  * \param[in] spurious_count_mean The mean number of spurious measurements (uniformly distributed in range & angle) to generate. The number of spurious is generated by rounding a random Gaussin number. If both this mean and the std are zero (the default) no spurious readings are generated.
539  * \param[in] spurious_count_std Read spurious_count_mean above.
540  *
541  * \note The fields "CObservationBearingRange::fieldOfView_*","CObservationBearingRange::maxSensorDistance" and "CObservationBearingRange::minSensorDistance" MUST BE FILLED OUT before calling this function.
542  * \note At output, the observation will have CObservationBearingRange::validCovariances set to "false" and the 3 sensor_std_* members correctly set to their values.
543  * An observation will be generated for each beacon in the map, but notice that some of them may be missed if out of the sensor maximum range or field of view-
544  */
545  void simulateRangeBearingReadings(
546  const mrpt::poses::CPose3D &robotPose,
547  const mrpt::poses::CPose3D &sensorLocationOnRobot,
549  bool sensorDetectsIDs = true,
550  const float stdRange = 0.01f,
551  const float stdYaw = mrpt::utils::DEG2RAD(0.1f),
552  const float stdPitch = mrpt::utils::DEG2RAD(0.1f),
553  vector_size_t *real_associations = NULL,
554  const double spurious_count_mean = 0,
555  const double spurious_count_std = 0
556  ) const;
557 
558 
559  /** This virtual method saves the map to a file "filNamePrefix"+< some_file_extension >, as an image or in any other applicable way (Notice that other methods to save the map may be implemented in classes implementing this virtual interface).
560  * In the case of this class, these files are generated:
561  * - "filNamePrefix"+"_3D.m": A script for MATLAB for drawing landmarks as 3D ellipses.
562  * - "filNamePrefix"+"_3D.3DScene": A 3D scene with a "ground plane grid" and the set of ellipsoids in 3D.
563  */
564  void saveMetricMapRepresentationToFile(
565  const std::string &filNamePrefix ) const;
566 
567  /** Returns a 3D object representing the map.
568  * \sa COLOR_LANDMARKS_IN_3DSCENES
569  */
570  void getAs3DObject ( mrpt::opengl::CSetOfObjectsPtr &outObj ) const;
571 
572  // See base docs
573  virtual void auxParticleFilterCleanUp();
574 
576  typedef std::pair<mrpt::math::TPoint3D,unsigned int> TPairIdBeacon;
577  std::deque<TPairIdBeacon> initialBeacons; //!< Initial contents of the map, especified by a set of 3D Beacons with associated IDs
578  mrpt::maps::CLandmarksMap::TInsertionOptions insertionOpts;
579  mrpt::maps::CLandmarksMap::TLikelihoodOptions likelihoodOpts;
581 
582  }; // End of class def.
583  DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE( CLandmarksMap, CMetricMap, VISION_IMPEXP )
584 
585 
586  } // End of namespace
587 } // End of namespace
588 
589 #endif
mrpt::utils::CDynamicGrid< vector_int > * getGrid()
float SiftEDDThreshold
[For SIFT landmarks only] The minimum Euclidean Descriptor Distance value of a match to set as corres...
Declares a class derived from "CObservation" that encapsules an image from a camera, whose relative pose to robot is also stored.
bool insert_SIFTs_from_stereo_images
If set to true (default), the insertion of a CObservationStereoImages in the map will insert SIFT 3D ...
#define MAP_DEFINITION_END(_CLASS_NAME_, _LINKAGE_)
static std::map< std::pair< mrpt::maps::CLandmark::TLandmarkID, mrpt::maps::CLandmark::TLandmarkID >, double > _mEDD
Map of the Euclidean Distance between the descriptors of two SIFT-based landmarks.
double DEG2RAD(const double x)
Degrees to radians.
unsigned int SIFTLikelihoodMethod
[For SIFT landmarks only] Method to compute the likelihood (Default = 0 (Our method)) 0: Our method -...
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
float beaconRangesStd
The standard deviation used for Beacon ranges likelihood (default=0.08).
void saveToTextFile(const std::string &file, mrpt::math::TMatrixTextFileFormat fileFormat=mrpt::math::MATRIX_FORMAT_ENG, bool appendMRPTHeader=false, const std::string &userHeader=std::string()) const
Save matrix to a text file, compatible with MATLAB text format (see also the methods of matrix classe...
float SIFTs_stereo_maxDepth
Maximum depth of 3D landmarks when loading a landmarks map from a stereo image observation.
Scalar * iterator
Definition: eigen_plugins.h:23
With this struct options are provided to the observation insertion process.
bool m_largestDistanceFromOriginIsUpdated
Auxiliary variables used in "getLargestDistanceFromOrigin".
std::pair< mrpt::math::TPoint3D, unsigned int > TPairIdBeacon
EIGEN_STRONG_INLINE void push_back(Scalar val)
Insert an element at the end of the container (for 1D vectors/arrays)
The set of parameters for all the detectors & descriptor algorithms.
float m_largestDistanceFromOrigin
Auxiliary variables used in "getLargestDistanceFromOrigin".
Declares a class derived from "CObservation" that represents one (or more) range measurements to labe...
STL namespace.
internal::TSequenceLandmarks::iterator iterator
const Scalar * const_iterator
Definition: eigen_plugins.h:24
This struct store de GPS longitude, latitude (in degrees ) and altitude (in meters) for the first GPS...
int64_t TLandmarkID
The type for the IDs of landmarks.
The list of landmarks: the wrapper class is just for maintaining the KD-Tree representation.
With this struct options are provided to the likelihood computations.
This class allows loading and storing values and vectors of different types from a configuration text...
bool insert_SIFTs_from_monocular_images
If set to true (default), the insertion of a CObservationImage in the map will insert SIFT 3D feature...
float SIFTsLoadDistanceOfTheMean
[For SIFT landmarks only] The distance (in meters) of the mean value of landmarks, for the initial position PDF (Default = 3m)
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition: CStream.h:38
int SIFTs_numberOfKLTKeypoints
Number of points to extract in the image.
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
int SIFTs_decimation
Considers 1 out of "SIFTs_decimation" visual landmarks in the observation during the likelihood compu...
A class for storing a map of 3D probabilistic landmarks.
internal::TSequenceLandmarks m_landmarks
The actual list.
float SIFTs_stdXY
[For SIFT landmarks only] The standard deviation (in pixels) for the SIFTs detector (This is used for...
Scale Invariant Feature Transform [LOWE&#39;04].
A list of TMatchingPair.
Definition: TMatchingPair.h:66
Observation class for either a pair of left+right or left+disparity images from a stereo camera...
mrpt::maps::CLandmarksMap CLandmarksMap
Backward compatible typedef.
static mrpt::maps::CLandmark::TLandmarkID _mapMaxID
A class used to store a 3D point.
Definition: CPoint3D.h:32
mrpt::vision::CFeatureExtraction::TOptions SIFT_feat_options
Parameters of the SIFT feature detector/descriptors while inserting images in the landmark map...
unsigned int minTimesSeen
Required number of times of a landmark to be seen not to be removed, in "ellapsedTime" seconds...
unsigned int rangeScan2D_decimation
The number of rays from a 2D range scan will be decimated by this factor (default = 1...
float beaconMaxRange
Maximun reliable beacon range value (default=20)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
The class for storing "landmarks" (visual or laser-scan-extracted features,...)
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
size_t size(const MATRIXLIKE &m, int dim)
Definition: bits.h:38
Declares a virtual base class for all metric maps storage classes.
A class used to store a 2D pose.
Definition: CPose2D.h:36
bool PLOT_IMAGES
Indicates if the images (as well as the SIFT detected features) should be shown in a window...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:72
float SIFTsLoadEllipsoidWidth
[For SIFT landmarks only] The width (in meters, standard deviation) of the ellipsoid in the axis perp...
This observation represents a number of range-bearing value pairs, each one for a detected landmark...
float alphaRatio
The ratio between gaussian and uniform distribution (default=1).
std::vector< size_t > vector_size_t
Definition: types_simple.h:25
bool insert_Landmarks_from_range_scans
If set to true (default), inserting a CObservation2DRangeScan in the map will generate landmarks for ...
This struct stores extra results from invoking insertObservation.
float SIFTs_epipolar_TH
Maximum distance (in pixels) from a point to a certain epipolar line to be considered a potential mat...
float SiftLikelihoodThreshold
[For SIFT landmarks only] The minimum likelihood value of a match to set as correspondence (Default=0...
mrpt::vision::CFeatureExtraction::TOptions SIFT_feat_options
Parameters of the SIFT feature detector/descriptors while inserting images in the landmark map...
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
float SiftCorrRatioThreshold
[For SIFT landmarks only] The ratio between the best and second best descriptor distances to set as c...
#define MAP_DEFINITION_START(_CLASS_NAME_, _LINKAGE_)
Add a MAP_DEFINITION_START() ...
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
unsigned int min_sat
Minimum number of sats to take into account the data.
mrpt::utils::CDynamicGrid< vector_int > m_grid
A grid-map with the set of landmarks falling into each cell.
float GPS_sigma
A constant "sigma" for GPS localization data (in meters)
With this struct options are provided to the fusion process.
std::vector< CLandmark > TSequenceLandmarks
unsigned int SIFTMatching3DMethod
[For SIFT landmarks only] Method to compute 3D matching (Default = 0 (Our method)) 0: Our method -> E...



Page generated by Doxygen 1.8.11 for MRPT 1.3.2 SVN:Unversioned directory at Sun May 1 08:45:24 UTC 2016