MRPT  2.0.4
CLandmarksMap.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, 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 #pragma once
10 
13 #include <mrpt/maps/CLandmark.h>
14 #include <mrpt/maps/CMetricMap.h>
15 #include <mrpt/math/CMatrixF.h>
20 #include <mrpt/obs/obs_frwds.h>
23 
24 namespace mrpt
25 {
26 namespace maps
27 {
28 namespace internal
29 {
30 using TSequenceLandmarks = std::vector<CLandmark>;
31 }
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
37  descriptors.
38  * - For laser scanners: each of the range measuremnts, as "occupancy"
39  landmarks.
40  * - For grid maps: "Panoramic descriptor" feature points.
41  * - For range-only localization and SLAM: Beacons. It is also supported
42  the simulation of expected beacon-to-sensor readings, observation
43  likelihood,...
44  * <br>
45  * <b>How to load landmarks from observations:</b><br>
46  * When invoking CLandmarksMap::insertObservation(), the values in
47  CLandmarksMap::insertionOptions will
48  * determinate the kind of landmarks that will be extracted and fused into
49  the map. Supported feature
50  * extraction processes are listed next:
51  *
52  <table>
53  <tr> <td><b>Observation class:</b></td> <td><b>Generated Landmarks:</b></td>
54  <td><b>Comments:</b></td> </tr>
55  <tr> <td>CObservationImage</td> <td>vlSIFT</td> <td>1) A SIFT feature is
56  created for each SIFT detected in the image,
57  <br>2) Correspondences between SIFTs features and existing ones are
58  finded by computeMatchingWith3DLandmarks,
59  <br>3) The corresponding feaures are fused, and the new ones added,
60  with an initial uncertainty according to insertionOptions</td> </tr>
61  <tr> <td>CObservationStereoImages</td> <td>vlSIFT</td> <td> Each image is
62  separately procesed by the method for CObservationImage observations </td>
63  </tr>
64  <tr> <td>CObservationStereoImages</td> <td>vlColor</td> <td> TODO... </td>
65  </tr>
66  <tr> <td>CObservation2DRangeScan</td> <td>glOccupancy</td> <td> A landmark is
67  added for each range in the scan, with its appropiate covariance matrix derived
68  from the jacobians matrixes. </td> </tr>
69  </table>
70  *
71  * \sa CMetricMap
72  * \ingroup mrpt_vision_grp
73  */
75 {
77 
78  private:
79  void internal_clear() override;
81  const mrpt::obs::CObservation& obs,
82  const mrpt::poses::CPose3D* robotPose = nullptr) override;
83 
84  public:
85  /** Computes the (logarithmic) likelihood that a given observation was taken
86  *from a given pose in the world being modeled with this map.
87  *
88  * In the current implementation, this method behaves in a different way
89  *according to the nature of
90  * the observation's class:
91  * - "mrpt::obs::CObservation2DRangeScan": This calls
92  *"computeLikelihood_RSLC_2007".
93  * - "mrpt::obs::CObservationStereoImages": This calls
94  *"computeLikelihood_SIFT_LandmarkMap".
95  * <table>
96  * <tr> <td><b>Observation class:</b></td> <td><b>Generated
97  *Landmarks:</b></td> <td><b>Comments:</b></td> </tr>
98  * <tr> <td>CObservationImage</td> <td>vlSIFT</td> <td>1) A SIFT feature is
99  *created for each SIFT detected in the image,
100  * <br>2) Correspondences between SIFTs features and existing ones
101  *are found by computeMatchingWith3DLandmarks,
102  * <br>3) The corresponding feaures are fused, and the new ones
103  * added,
104  *with an initial uncertainty according to insertionOptions</td> </tr>
105  * <tr> <td>CObservationStereoImages</td> <td>vlSIFT</td> <td> Each image is
106  *separately procesed by the method for CObservationImage observations </td>
107  *</tr>
108  * <tr> <td>CObservationStereoImages</td> <td>vlColor</td> <td> TODO...
109  *</td> </tr>
110  * <tr> <td>CObservation2DRangeScan</td> <td>glOccupancy</td> <td> A
111  *landmark is added for each range in the scan, with its appropiate
112  *covariance matrix derived from the jacobians matrixes. </td> </tr>
113  * </table>
114  *
115  * \param takenFrom The robot's pose the observation is supposed to be taken
116  *from.
117  * \param obs The observation.
118  * \return This method returns a likelihood value > 0.
119  *
120  * \sa Used in particle filter algorithms, see: CMultiMetricMapPDF::update
121  */
123  const mrpt::obs::CObservation& obs,
124  const mrpt::poses::CPose3D& takenFrom) override;
125 
126  /** The color of landmark ellipsoids in CLandmarksMap::getAs3DObject */
128 
130 
131  /** The list of landmarks: the wrapper class is just for maintaining the
132  * KD-Tree representation
133  */
135  {
136  private:
137  /** The actual list */
139 
140  /** A grid-map with the set of landmarks falling into each cell.
141  */
143 
144  /** Auxiliary variables used in "getLargestDistanceFromOrigin"
145  * \sa getLargestDistanceFromOrigin
146  */
148 
149  /** Auxiliary variables used in "getLargestDistanceFromOrigin"
150  * \sa getLargestDistanceFromOrigin
151  */
153 
154  public:
155  /** Default constructor
156  */
158 
159  using iterator = internal::TSequenceLandmarks::iterator;
160  inline iterator begin() { return m_landmarks.begin(); };
161  inline iterator end() { return m_landmarks.end(); };
162  void clear();
163  inline size_t size() const { return m_landmarks.size(); };
164  using const_iterator = internal::TSequenceLandmarks::const_iterator;
165  inline const_iterator begin() const { return m_landmarks.begin(); };
166  inline const_iterator end() const { return m_landmarks.end(); };
167  /** The object is copied, thus the original copy passed as a parameter
168  * can be released.
169  */
170  void push_back(const CLandmark& lm);
171  CLandmark* get(unsigned int indx);
172  const CLandmark* get(unsigned int indx) const;
173  void isToBeModified(unsigned int indx);
174  void hasBeenModified(unsigned int indx);
175  void hasBeenModifiedAll();
176  void erase(unsigned int indx);
177 
179  {
180  return &m_grid;
181  }
182  /** Returns the landmark with a given landmrk ID, or nullptr if not
183  * found
184  */
185  const CLandmark* getByID(CLandmark::TLandmarkID ID) const;
186 
187  /** Returns the landmark with a given beacon ID, or nullptr if not found
188  */
189  const CLandmark* getByBeaconID(unsigned int ID) const;
190 
191  /** This method returns the largest distance from the origin to any of
192  * the points, such as a sphere centered at the origin with this radius
193  * cover ALL the points in the map (the results are buffered, such as,
194  * if the map is not modified, the second call will be much faster than
195  * the first one).
196  */
197  float getLargestDistanceFromOrigin() const;
198 
199  } landmarks;
200 
201  CLandmarksMap() = default;
202  ~CLandmarksMap() override = default;
203 
204  /**** FAMD ***/
205  /** Map of the Euclidean Distance between the descriptors of two SIFT-based
206  * landmarks
207  */
208  static std::map<
209  std::pair<
212  double>
215  static bool _maxIDUpdated;
216 
218  /**** END FAMD *****/
219 
220  // See docs in base class
222  const mrpt::maps::CMetricMap* otherMap,
223  const mrpt::poses::CPose3D& otherMapPose,
224  const TMatchingRatioParams& params) const override;
225 
226  /** With this struct options are provided to the observation insertion
227  * process.
228  */
230  {
231  public:
232  /** Initilization of default parameters
233  */
235 
236  void loadFromConfigFile(
237  const mrpt::config::CConfigFileBase& source,
238  const std::string& section) override; // See base docs
239  void dumpToTextStream(
240  std::ostream& out) const override; // See base docs
241 
242  /** If set to true (default), the insertion of a CObservationImage in
243  * the map will insert SIFT 3D features.
244  */
246 
247  /** If set to true (default), the insertion of a
248  * CObservationStereoImages in the map will insert SIFT 3D features.
249  */
251 
252  /** If set to true (default), inserting a CObservation2DRangeScan in the
253  * map will generate landmarks for each range.
254  */
256 
257  /** [For SIFT landmarks only] The ratio between the best and second best
258  * descriptor distances to set as correspondence (Default=0.4)
259  */
261 
262  /** [For SIFT landmarks only] The minimum likelihood value of a match to
263  * set as correspondence (Default=0.5)
264  */
266 
267  /****************************************** FAMD
268  * ******************************************/
269  /** [For SIFT landmarks only] The minimum Euclidean Descriptor Distance
270  * value of a match to set as correspondence (Default=200)
271  */
272  float SiftEDDThreshold{200.0f};
273 
274  /** [For SIFT landmarks only] Method to compute 3D matching (Default = 0
275  * (Our method))
276  * 0: Our method -> Euclidean Distance between Descriptors and 3D
277  * position
278  * 1: Sim, Elinas, Griffin, Little -> Euclidean Distance between
279  * Descriptors
280  */
281  unsigned int SIFTMatching3DMethod{0};
282 
283  /** [For SIFT landmarks only] Method to compute the likelihood (Default
284  * = 0 (Our method))
285  * 0: Our method -> Euclidean Distance between Descriptors and 3D
286  * position
287  * 1: Sim, Elinas, Griffin, Little -> 3D position
288  */
289  unsigned int SIFTLikelihoodMethod{0};
290 
291  /****************************************** END FAMD
292  * ******************************************/
293 
294  /** [For SIFT landmarks only] The distance (in meters) of the mean value
295  * of landmarks, for the initial position PDF (Default = 3m)
296  */
298 
299  /** [For SIFT landmarks only] The width (in meters, standard deviation)
300  * of the ellipsoid in the axis perpendicular to the main directiom
301  * (Default = 0.05f)
302  */
304 
305  /** [For SIFT landmarks only] The standard deviation (in pixels) for the
306  * SIFTs detector (This is used for the Jacobbian to project stereo
307  * images to 3D)
308  */
309  float SIFTs_stdXY{2.0f}, SIFTs_stdDisparity{1.0f};
310 
311  /** Number of points to extract in the image
312  */
314 
315  /** Maximum depth of 3D landmarks when loading a landmarks map from a
316  * stereo image observation.
317  */
318  float SIFTs_stereo_maxDepth{15.0f};
319 
320  /** Maximum distance (in pixels) from a point to a certain epipolar line
321  * to be considered a potential match.
322  */
323  float SIFTs_epipolar_TH{1.5f};
324 
325  /** Indicates if the images (as well as the SIFT detected features)
326  * should be shown in a window.
327  */
328  bool PLOT_IMAGES{false};
329 
330  /** Parameters of the SIFT feature detector/descriptors while inserting
331  * images in the landmark map.
332  * \note There exists another \a SIFT_feat_options field in the \a
333  * likelihoodOptions member.
334  * \note All parameters of this field can be loaded from a config
335  * file. See mrpt::vision::CFeatureExtraction::TOptions for the names of
336  * the expected fields.
337  */
339 
341 
342  /** With this struct options are provided to the likelihood computations.
343  */
345  {
346  public:
348 
349  void loadFromConfigFile(
350  const mrpt::config::CConfigFileBase& source,
351  const std::string& section) override; // See base docs
352  void dumpToTextStream(
353  std::ostream& out) const override; // See base docs
354 
355  /** @name Parameters for: 2D LIDAR scans
356  * @{ */
357  /** The number of rays from a 2D range scan will be decimated by this
358  * factor (default = 1, no decimation) */
359  unsigned int rangeScan2D_decimation{20};
360  /** @} */
361 
362  /** @name Parameters for: images
363  * @{ */
366  float SIFTs_mahaDist_std{4.0f};
368  /** Considers 1 out of "SIFTs_decimation" visual landmarks in the
369  * observation during the likelihood computation. */
371  /** Parameters of the SIFT feature detector/descriptors while inserting
372  * images in the landmark map.
373  * \note There exists another \a SIFT_feat_options field in the \a
374  * insertionOptions member.
375  * \note All parameters of this field can be loaded from a config
376  * file. See mrpt::vision::CFeatureExtraction::TOptions for the names of
377  * the expected fields. */
379  /** @} */
380 
381  /** @name Parameters for: Range-only observation
382  * @{ */
383  /** The standard deviation used for Beacon ranges likelihood
384  * (default=0.08) [meters] \sa beaconRangesUseObservationStd */
385  float beaconRangesStd{0.08f};
386  /** (Default: false) If true, `beaconRangesStd` is ignored and each
387  * individual `CObservationBeaconRanges::stdError` field is used
388  * instead. */
390  /** @} */
391 
392  /** @name Parameters for: External robot poses observation
393  * @{ */
394  /** The standard deviation used for external robot poses likelihood
395  * (default=0.05) [meters] */
396  float extRobotPoseStd{0.05f};
397  /** @} */
398 
399  /** @name Parameters for: GPS readings
400  * @{ */
401 
402  /** This struct store de GPS longitude, latitude (in degrees ) and
403  * altitude (in meters) for the first GPS observation
404  * compose with de sensor position on the robot */
405  struct TGPSOrigin
406  {
407  public:
408  TGPSOrigin();
409  /** degrees */
410  double longitude{-4.47763833333333};
411  /** degrees */
412  double latitude{36.71559000000000};
413  /** meters */
414  double altitude{42.3};
415  /** These 3 params allow rotating and shifting GPS coordinates with
416  * other 2D maps (e.g. gridmaps).
417  * - ang : Map rotation [deg]
418  * - x_shift, y_shift: (x,y) offset [m] */
419  double ang{0}, x_shift{0}, y_shift{0};
420  /** Minimum number of sats to take into account the data */
421  unsigned int min_sat{4};
422  } GPSOrigin;
423 
424  /** A constant "sigma" for GPS localization data (in meters) */
425  float GPS_sigma{1.0f};
426  /** @} */
427 
429 
430  /** This struct stores extra results from invoking insertObservation
431  */
433  {
434  /** The number of SIFT detected in left and right images respectively
435  */
436 
437  unsigned int nSiftL, nSiftR;
438 
440 
441  /** With this struct options are provided to the fusion process.
442  */
444  {
445  /** Initialization
446  */
447  TFuseOptions();
448 
449  /** Required number of times of a landmark to be seen not to be removed,
450  * in "ellapsedTime" seconds.
451  */
452  unsigned int minTimesSeen{2};
453 
454  /** See "minTimesSeen"
455  */
456  float ellapsedTime{4.0f};
457 
458  } fuseOptions;
459 
460  /** Save to a text file.
461  * In line "i" there are the (x,y,z) mean values of the i'th landmark +
462  * type of landmark + # times seen + timestamp + RGB/descriptor + ID
463  *
464  * Returns false if any error occured, true elsewere.
465  */
466  bool saveToTextFile(std::string file);
467 
468  /** Save to a MATLAB script which displays 2D error ellipses for the map
469  *(top-view, projection on the XY plane).
470  * \param file The name of the file to save the script to.
471  * \param style The MATLAB-like string for the style of the lines (see
472  *'help plot' in MATLAB for possibilities)
473  * \param stdCount The ellipsoids will be drawn from the center to
474  *"stdCount" times the "standard deviations". (default is 2std = 95%
475  *confidence intervals)
476  *
477  * \return Returns false if any error occured, true elsewere.
478  */
480  std::string file, const char* style = "b", float stdCount = 2.0f);
481 
482  /** Save to a MATLAB script which displays 3D error ellipses for the map.
483  * \param file The name of the file to save the script to.
484  * \param style The MATLAB-like string for the style of the lines (see
485  *'help plot' in MATLAB for possibilities)
486  * \param stdCount The ellipsoids will be drawn from the center to a given
487  *confidence interval in [0,1], e.g. 2 sigmas=0.95 (default is 2std = 0.95
488  *confidence intervals)
489  *
490  * \return Returns false if any error occured, true elsewere.
491  */
493  std::string file, const char* style = "b",
494  float confInterval = 0.95f) const;
495 
496  /** Returns the stored landmarks count.
497  */
498  size_t size() const;
499 
500  /** Computes the (logarithmic) likelihood function for a sensed observation
501  "o" according to "this" map.
502  * This is the implementation of the algorithm reported in the paper:
503  <em>J.L. Blanco, J. Gonzalez, and J.A. Fernandez-Madrigal, "A
504  Consensus-based Approach for Estimating the Observation Likelihood of
505  Accurate Range Sensors", in IEEE International Conference on Robotics and
506  Automation (ICRA), Rome (Italy), Apr 10-14, 2007</em>
507  */
509  const CLandmarksMap* s, const mrpt::poses::CPose2D& sensorPose);
510 
511  /** Loads into this landmarks map the SIFT features extracted from an image
512  * observation (Previous contents of map will be erased)
513  * The robot is assumed to be at the origin of the map.
514  * Some options may be applicable from "insertionOptions"
515  * (insertionOptions.SIFTsLoadDistanceOfTheMean)
516  *
517  * \param feat_options Optionally, you can pass here parameters for
518  * changing the default SIFT detector settings.
519  */
521  const mrpt::obs::CObservationImage& obs,
522  const mrpt::vision::CFeatureExtraction::TOptions& feat_options =
524 
525  /** Loads into this landmarks map the SIFT features extracted from an
526  * observation consisting of a pair of stereo-image (Previous contents of
527  * map will be erased)
528  * The robot is assumed to be at the origin of the map.
529  * Some options may be applicable from "insertionOptions"
530  *
531  * \param feat_options Optionally, you can pass here parameters for
532  * changing the default SIFT detector settings.
533  */
537  const mrpt::vision::CFeatureExtraction::TOptions& feat_options =
539 
540  /** Loads into this landmarks-map a set of occupancy features according to a
541  * 2D range scan (Previous contents of map will be erased)
542  * \param obs The observation
543  * \param robotPose The robot pose in the map (Default = the origin)
544  * Some options may be applicable from "insertionOptions"
545  */
548  const mrpt::poses::CPose3D* robotPose = nullptr,
549  unsigned int downSampleFactor = 1);
550 
551  // See docs in base class
553  const mrpt::maps::CMetricMap* otherMap,
554  const mrpt::poses::CPose2D& otherMapPose,
555  float maxDistForCorrespondence, float maxAngularDistForCorrespondence,
556  const mrpt::poses::CPose2D& angularDistPivotPoint,
557  mrpt::tfest::TMatchingPairList& correspondences,
558  float& correspondencesRatio, float* sumSqrDist = nullptr,
559  bool onlyKeepTheClosest = false, bool onlyUniqueRobust = false) const;
560 
561  /** Perform a search for correspondences between "this" and another
562  * lansmarks map:
563  * In this class, the matching is established solely based on the
564  * landmarks' IDs.
565  * \param otherMap [IN] The other map.
566  * \param correspondences [OUT] The matched pairs between maps.
567  * \param correspondencesRatio [OUT] This is NumberOfMatchings /
568  * NumberOfLandmarksInTheAnotherMap
569  * \param otherCorrespondences [OUT] Will be returned with a vector
570  * containing "true" for the indexes of the other map's landmarks with a
571  * correspondence.
572  */
574  const mrpt::maps::CLandmarksMap* otherMap,
575  mrpt::tfest::TMatchingPairList& correspondences,
576  float& correspondencesRatio,
577  std::vector<bool>& otherCorrespondences) const;
578 
579  /** Changes the reference system of the map to a given 3D pose.
580  */
582 
583  /** Changes the reference system of the map "otherMap" and save the result
584  * in "this" map.
585  */
587  const mrpt::poses::CPose3D& newOrg,
588  const mrpt::maps::CLandmarksMap* otherMap);
589 
590  /** Fuses the contents of another map with this one, updating "this" object
591  * with the result.
592  * This process involves fusing corresponding landmarks, then adding the
593  * new ones.
594  * \param other The other landmarkmap, whose landmarks will be inserted
595  * into "this"
596  * \param justInsertAllOfThem If set to "true", all the landmarks in
597  * "other" will be inserted into "this" without checking for possible
598  * correspondences (may appear duplicates ones, etc...)
599  */
600  void fuseWith(CLandmarksMap& other, bool justInsertAllOfThem = false);
601 
602  /** Returns the (logarithmic) likelihood of a set of landmarks "map" given
603  * "this" map.
604  * See paper: JJAA 2006
605  */
607  CLandmarksMap* map,
608  mrpt::tfest::TMatchingPairList* correspondences = nullptr,
609  std::vector<bool>* otherCorrespondences = nullptr);
610 
611  /** Returns true if the map is empty/no observation has been inserted.
612  */
613  bool isEmpty() const override;
614 
615  /** Simulates a noisy reading toward each of the beacons in the landmarks
616  * map, if any.
617  * \param in_robotPose This robot pose is used to simulate the ranges to
618  * each beacon.
619  * \param in_sensorLocationOnRobot The 3D position of the sensor on the
620  * robot
621  * \param out_Observations The results will be stored here. NOTICE that the
622  * fields
623  * "CObservationBeaconRanges::minSensorDistance","CObservationBeaconRanges::maxSensorDistance"
624  * and "CObservationBeaconRanges::stdError" MUST BE FILLED OUT before
625  * calling this function.
626  * An observation will be generated for each beacon in the map, but notice
627  * that some of them may be missed if out of the sensor maximum range.
628  */
630  const mrpt::poses::CPose3D& in_robotPose,
631  const mrpt::poses::CPoint3D& in_sensorLocationOnRobot,
632  mrpt::obs::CObservationBeaconRanges& out_Observations) const;
633 
634  /** Simulates a noisy bearing-range observation of all the beacons
635  * (landamrks with type glBeacon) in the landmarks map, if any.
636  * \param[in] robotPose The robot pose.
637  * \param[in] sensorLocationOnRobot The 3D position of the sensor on the
638  * robot
639  * \param[out] observations The results will be stored here.
640  * \param[in] sensorDetectsIDs If this is set to false, all the landmarks
641  * will be sensed with INVALID_LANDMARK_ID as ID.
642  * \param[in] stdRange The sigma of the sensor noise in range (meters).
643  * \param[in] stdYaw The sigma of the sensor noise in yaw (radians).
644  * \param[in] stdPitch The sigma of the sensor noise in pitch (radians).
645  * \param[out] real_associations If it's not a nullptr pointer, this will
646  * contain at the return the real indices of the landmarks in the map in the
647  * same order than they appear in out_Observations. Useful when
648  * sensorDetectsIDs=false. Spurious readings are assigned a
649  * std::string::npos (=-1) index.
650  * \param[in] spurious_count_mean The mean number of spurious measurements
651  * (uniformly distributed in range & angle) to generate. The number of
652  * spurious is generated by rounding a random Gaussin number. If both this
653  * mean and the std are zero (the default) no spurious readings are
654  * generated.
655  * \param[in] spurious_count_std Read spurious_count_mean above.
656  *
657  * \note The fields
658  * "CObservationBearingRange::fieldOfView_*","CObservationBearingRange::maxSensorDistance"
659  * and "CObservationBearingRange::minSensorDistance" MUST BE FILLED OUT
660  * before calling this function.
661  * \note At output, the observation will have
662  * CObservationBearingRange::validCovariances set to "false" and the 3
663  * sensor_std_* members correctly set to their values.
664  * An observation will be generated for each beacon in the map, but notice
665  * that some of them may be missed if out of the sensor maximum range or
666  * field of view-
667  */
669  const mrpt::poses::CPose3D& robotPose,
670  const mrpt::poses::CPose3D& sensorLocationOnRobot,
672  bool sensorDetectsIDs = true, const float stdRange = 0.01f,
673  const float stdYaw = mrpt::DEG2RAD(0.1f),
674  const float stdPitch = mrpt::DEG2RAD(0.1f),
675  std::vector<size_t>* real_associations = nullptr,
676  const double spurious_count_mean = 0,
677  const double spurious_count_std = 0) const;
678 
679  /** This virtual method saves the map to a file "filNamePrefix"+<
680  *some_file_extension >, as an image or in any other applicable way (Notice
681  *that other methods to save the map may be implemented in classes
682  *implementing this virtual interface).
683  * In the case of this class, these files are generated:
684  * - "filNamePrefix"+"_3D.m": A script for MATLAB for drawing landmarks
685  *as
686  *3D ellipses.
687  * - "filNamePrefix"+"_3D.3DScene": A 3D scene with a "ground plane
688  *grid"
689  *and the set of ellipsoids in 3D.
690  */
692  const std::string& filNamePrefix) const override;
693 
694  /** Returns a 3D object representing the map.
695  * \sa COLOR_LANDMARKS_IN_3DSCENES
696  */
697  void getAs3DObject(mrpt::opengl::CSetOfObjects::Ptr& outObj) const override;
698 
699  // See base docs
700  void auxParticleFilterCleanUp() override;
701 
703  using TPairIdBeacon = std::pair<mrpt::math::TPoint3D, unsigned int>;
704  /** Initial contents of the map, especified by a set of 3D Beacons with
705  * associated IDs */
706  std::deque<TPairIdBeacon> initialBeacons;
707  mrpt::maps::CLandmarksMap::TInsertionOptions insertionOpts;
708  mrpt::maps::CLandmarksMap::TLikelihoodOptions likelihoodOpts;
710 
711 }; // End of class def.
712 
713 } // namespace maps
714 } // namespace mrpt
mrpt::maps::CLandmarksMap::TLikelihoodOptions::TGPSOrigin::longitude
double longitude
degrees
Definition: CLandmarksMap.h:410
mrpt::maps::CLandmarksMap::TLikelihoodOptions::TGPSOrigin::latitude
double latitude
degrees
Definition: CLandmarksMap.h:412
mrpt::maps::CLandmarksMap::TInsertionOptions::insert_SIFTs_from_monocular_images
bool insert_SIFTs_from_monocular_images
If set to true (default), the insertion of a CObservationImage in the map will insert SIFT 3D feature...
Definition: CLandmarksMap.h:245
mrpt::maps::CLandmarksMap::TFuseOptions::ellapsedTime
float ellapsedTime
See "minTimesSeen".
Definition: CLandmarksMap.h:456
mrpt::maps::CLandmarksMap::COLOR_LANDMARKS_IN_3DSCENES
static mrpt::img::TColorf COLOR_LANDMARKS_IN_3DSCENES
The color of landmark ellipsoids in CLandmarksMap::getAs3DObject.
Definition: CLandmarksMap.h:127
mrpt::maps::CLandmarksMap::TLikelihoodOptions::TLikelihoodOptions
TLikelihoodOptions()
Definition: CLandmarksMap.cpp:2251
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::end
iterator end()
Definition: CLandmarksMap.h:161
mrpt::maps::CLandmarksMap::TInsertionOptions::SiftLikelihoodThreshold
float SiftLikelihoodThreshold
[For SIFT landmarks only] The minimum likelihood value of a match to set as correspondence (Default=0...
Definition: CLandmarksMap.h:265
mrpt::maps::CLandmarksMap::_mEDD
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.
Definition: CLandmarksMap.h:213
mrpt::maps::CLandmarksMap::simulateRangeBearingReadings
void simulateRangeBearingReadings(const mrpt::poses::CPose3D &robotPose, const mrpt::poses::CPose3D &sensorLocationOnRobot, mrpt::obs::CObservationBearingRange &observations, bool sensorDetectsIDs=true, const float stdRange=0.01f, const float stdYaw=mrpt::DEG2RAD(0.1f), const float stdPitch=mrpt::DEG2RAD(0.1f), std::vector< size_t > *real_associations=nullptr, const double spurious_count_mean=0, const double spurious_count_std=0) const
Simulates a noisy bearing-range observation of all the beacons (landamrks with type glBeacon) in the ...
Definition: CLandmarksMap.cpp:2689
mrpt::maps::CLandmarksMap::TMapDefinition::TPairIdBeacon
std::pair< mrpt::math::TPoint3D, unsigned int > TPairIdBeacon
Definition: CLandmarksMap.h:703
mrpt::maps::CLandmarksMap::TInsertionOptions::SIFTsLoadEllipsoidWidth
float SIFTsLoadEllipsoidWidth
[For SIFT landmarks only] The width (in meters, standard deviation) of the ellipsoid in the axis perp...
Definition: CLandmarksMap.h:303
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::getByID
const CLandmark * getByID(CLandmark::TLandmarkID ID) const
Returns the landmark with a given landmrk ID, or nullptr if not found.
Definition: CLandmarksMap.cpp:2502
mrpt::maps::CLandmarksMap::TLikelihoodOptions::GPSOrigin
struct mrpt::maps::CLandmarksMap::TLikelihoodOptions::TGPSOrigin GPSOrigin
mrpt::maps::CLandmarksMap::TLikelihoodOptions::TGPSOrigin::ang
double ang
These 3 params allow rotating and shifting GPS coordinates with other 2D maps (e.g.
Definition: CLandmarksMap.h:419
mrpt::maps::CLandmarksMap::TInsertionOptions::SiftEDDThreshold
float SiftEDDThreshold
[For SIFT landmarks only] The minimum Euclidean Descriptor Distance value of a match to set as corres...
Definition: CLandmarksMap.h:272
mrpt::maps::CLandmarksMap::saveToMATLABScript3D
bool saveToMATLABScript3D(std::string file, const char *style="b", float confInterval=0.95f) const
Save to a MATLAB script which displays 3D error ellipses for the map.
Definition: CLandmarksMap.cpp:1405
mrpt::maps::CLandmarksMap::_maxIDUpdated
static bool _maxIDUpdated
Definition: CLandmarksMap.h:215
mrpt::math::TPoint3D
TPoint3D_< double > TPoint3D
Lightweight 3D point.
Definition: TPoint3D.h:268
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::m_largestDistanceFromOriginIsUpdated
bool m_largestDistanceFromOriginIsUpdated
Auxiliary variables used in "getLargestDistanceFromOrigin".
Definition: CLandmarksMap.h:152
mrpt::maps::CLandmarksMap::computeMatchingWith3DLandmarks
void computeMatchingWith3DLandmarks(const mrpt::maps::CLandmarksMap *otherMap, mrpt::tfest::TMatchingPairList &correspondences, float &correspondencesRatio, std::vector< bool > &otherCorrespondences) const
Perform a search for correspondences between "this" and another lansmarks map: In this class,...
Definition: CLandmarksMap.cpp:1055
mrpt::maps::CLandmarksMap::computeLikelihood_RSLC_2007
double computeLikelihood_RSLC_2007(const CLandmarksMap *s, const mrpt::poses::CPose2D &sensorPose)
Computes the (logarithmic) likelihood function for a sensed observation "o" according to "this" map.
Definition: CLandmarksMap.cpp:1651
mrpt::opengl::CSetOfObjects::Ptr
std::shared_ptr< mrpt::opengl ::CSetOfObjects > Ptr
Definition: CSetOfObjects.h:28
mrpt::maps::CLandmarksMap::computeMatchingWith2D
void computeMatchingWith2D(const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose2D &otherMapPose, float maxDistForCorrespondence, float maxAngularDistForCorrespondence, const mrpt::poses::CPose2D &angularDistPivotPoint, mrpt::tfest::TMatchingPairList &correspondences, float &correspondencesRatio, float *sumSqrDist=nullptr, bool onlyKeepTheClosest=false, bool onlyUniqueRobust=false) const
Definition: CLandmarksMap.cpp:561
DEFINE_SERIALIZABLE
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Definition: CSerializable.h:152
mrpt::maps::CLandmarksMap::TLikelihoodOptions::dumpToTextStream
void dumpToTextStream(std::ostream &out) const override
This method should clearly display all the contents of the structure in textual form,...
Definition: CLandmarksMap.cpp:2266
mrpt::maps::CLandmarksMap::internal_insertObservation
bool internal_insertObservation(const mrpt::obs::CObservation &obs, const mrpt::poses::CPose3D *robotPose=nullptr) override
Internal method called by insertObservation()
Definition: CLandmarksMap.cpp:438
mrpt::maps::CLandmark::TLandmarkID
int64_t TLandmarkID
The type for the IDs of landmarks.
Definition: CLandmark.h:41
mrpt::obs::CObservation2DRangeScan
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
Definition: CObservation2DRangeScan.h:54
mrpt::maps::CLandmarksMap::TInsertionOptions::insert_SIFTs_from_stereo_images
bool insert_SIFTs_from_stereo_images
If set to true (default), the insertion of a CObservationStereoImages in the map will insert SIFT 3D ...
Definition: CLandmarksMap.h:250
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::iterator
internal::TSequenceLandmarks::iterator iterator
Definition: CLandmarksMap.h:159
mrpt::maps::CLandmarksMap::TLikelihoodOptions::SIFTs_mahaDist_std
float SIFTs_mahaDist_std
Definition: CLandmarksMap.h:366
mrpt::maps::CLandmarksMap::TLikelihoodOptions::SIFTnullCorrespondenceDistance
float SIFTnullCorrespondenceDistance
Definition: CLandmarksMap.h:367
mrpt::maps::CLandmarksMap::saveToTextFile
bool saveToTextFile(std::string file)
Save to a text file.
Definition: CLandmarksMap.cpp:1359
mrpt::maps::CLandmarksMap::insertionResults
struct mrpt::maps::CLandmarksMap::TInsertionResults insertionResults
mrpt::maps::CLandmarksMap::size
size_t size() const
Returns the stored landmarks count.
Definition: CLandmarksMap.cpp:147
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::end
const_iterator end() const
Definition: CLandmarksMap.h:166
mrpt::maps::CLandmarksMap::TInsertionOptions::SIFTsLoadDistanceOfTheMean
float SIFTsLoadDistanceOfTheMean
[For SIFT landmarks only] The distance (in meters) of the mean value of landmarks,...
Definition: CLandmarksMap.h:297
mrpt::maps::CLandmarksMap::TLikelihoodOptions::GPS_sigma
float GPS_sigma
A constant "sigma" for GPS localization data (in meters)
Definition: CLandmarksMap.h:425
mrpt::maps::CLandmarksMap::TInsertionOptions
With this struct options are provided to the observation insertion process.
Definition: CLandmarksMap.h:229
mrpt::maps::TMatchingRatioParams
Parameters for CMetricMap::compute3DMatchingRatio()
Definition: metric_map_types.h:64
mrpt::maps::CLandmarksMap::TLikelihoodOptions::SIFTs_sigma_euclidean_dist
double SIFTs_sigma_euclidean_dist
Definition: CLandmarksMap.h:364
mrpt::maps::CLandmarksMap::loadSiftFeaturesFromStereoImageObservation
void loadSiftFeaturesFromStereoImageObservation(const mrpt::obs::CObservationStereoImages &obs, mrpt::maps::CLandmark::TLandmarkID fID, const mrpt::vision::CFeatureExtraction::TOptions &feat_options=mrpt::vision::CFeatureExtraction::TOptions(mrpt::vision::featSIFT))
Loads into this landmarks map the SIFT features extracted from an observation consisting of a pair of...
Definition: CLandmarksMap.cpp:681
out
mrpt::vision::TStereoCalibResults out
Definition: chessboard_stereo_camera_calib_unittest.cpp:25
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: BaseAppDataSource.h:15
mrpt::maps::CLandmarksMap::TInsertionOptions::SIFTLikelihoodMethod
unsigned int SIFTLikelihoodMethod
[For SIFT landmarks only] Method to compute the likelihood (Default = 0 (Our method)) 0: Our method -...
Definition: CLandmarksMap.h:289
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::getLargestDistanceFromOrigin
float getLargestDistanceFromOrigin() const
This method returns the largest distance from the origin to any of the points, such as a sphere cente...
Definition: CLandmarksMap.cpp:1920
mrpt::maps::CLandmarksMap::TInsertionOptions::SiftCorrRatioThreshold
float SiftCorrRatioThreshold
[For SIFT landmarks only] The ratio between the best and second best descriptor distances to set as c...
Definition: CLandmarksMap.h:260
mrpt::maps::CLandmarksMap::insertionOptions
mrpt::maps::CLandmarksMap::TInsertionOptions insertionOptions
mrpt::maps::CLandmarksMap::TLikelihoodOptions::SIFTs_sigma_descriptor_dist
double SIFTs_sigma_descriptor_dist
Definition: CLandmarksMap.h:365
mrpt::maps::CLandmarksMap::loadOccupancyFeaturesFrom2DRangeScan
void loadOccupancyFeaturesFrom2DRangeScan(const mrpt::obs::CObservation2DRangeScan &obs, const mrpt::poses::CPose3D *robotPose=nullptr, unsigned int downSampleFactor=1)
Loads into this landmarks-map a set of occupancy features according to a 2D range scan (Previous cont...
Definition: CLandmarksMap.cpp:1551
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::m_grid
mrpt::containers::CDynamicGrid< std::vector< int32_t > > m_grid
A grid-map with the set of landmarks falling into each cell.
Definition: CLandmarksMap.h:142
CObservationGPS.h
mrpt::maps::CLandmarksMap::TLikelihoodOptions::rangeScan2D_decimation
unsigned int rangeScan2D_decimation
The number of rays from a 2D range scan will be decimated by this factor (default = 1,...
Definition: CLandmarksMap.h:359
mrpt::maps::CLandmarksMap::TInsertionOptions::SIFTs_stdDisparity
float SIFTs_stdDisparity
Definition: CLandmarksMap.h:309
mrpt::maps::CLandmarksMap::TInsertionOptions::SIFTMatching3DMethod
unsigned int SIFTMatching3DMethod
[For SIFT landmarks only] Method to compute 3D matching (Default = 0 (Our method)) 0: Our method -> E...
Definition: CLandmarksMap.h:281
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::m_largestDistanceFromOrigin
float m_largestDistanceFromOrigin
Auxiliary variables used in "getLargestDistanceFromOrigin".
Definition: CLandmarksMap.h:147
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::getByBeaconID
const CLandmark * getByBeaconID(unsigned int ID) const
Returns the landmark with a given beacon ID, or nullptr if not found.
Definition: CLandmarksMap.cpp:2523
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::m_landmarks
internal::TSequenceLandmarks m_landmarks
The actual list.
Definition: CLandmarksMap.h:138
CMetricMap.h
mrpt::maps::CLandmarksMap::TInsertionOptions::TInsertionOptions
TInsertionOptions()
Initilization of default parameters.
Definition: CLandmarksMap.cpp:2135
mrpt::maps::CLandmarksMap::fuseOptions
struct mrpt::maps::CLandmarksMap::TFuseOptions fuseOptions
mrpt::maps::CLandmarksMap::TLikelihoodOptions::TGPSOrigin
This struct store de GPS longitude, latitude (in degrees ) and altitude (in meters) for the first GPS...
Definition: CLandmarksMap.h:405
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::begin
const_iterator begin() const
Definition: CLandmarksMap.h:165
mrpt::maps::CLandmarksMap::TInsertionOptions::SIFTs_numberOfKLTKeypoints
int SIFTs_numberOfKLTKeypoints
Number of points to extract in the image.
Definition: CLandmarksMap.h:313
mrpt::maps::CLandmarksMap::getMapMaxID
mrpt::maps::CLandmark::TLandmarkID getMapMaxID()
Definition: CLandmarksMap.cpp:2496
mrpt::maps::CLandmarksMap::TFuseOptions
With this struct options are provided to the fusion process.
Definition: CLandmarksMap.h:443
mrpt::maps::CLandmarksMap::TInsertionOptions::insert_Landmarks_from_range_scans
bool insert_Landmarks_from_range_scans
If set to true (default), inserting a CObservation2DRangeScan in the map will generate landmarks for ...
Definition: CLandmarksMap.h:255
mrpt::maps::CLandmarksMap::TLikelihoodOptions::TGPSOrigin::x_shift
double x_shift
Definition: CLandmarksMap.h:419
mrpt::maps::CLandmarksMap::TInsertionOptions::dumpToTextStream
void dumpToTextStream(std::ostream &out) const override
This method should clearly display all the contents of the structure in textual form,...
Definition: CLandmarksMap.cpp:2145
mrpt::maps::CLandmarksMap::auxParticleFilterCleanUp
void auxParticleFilterCleanUp() override
This method is called at the end of each "prediction-update-map insertion" cycle within "mrpt::slam::...
Definition: CLandmarksMap.cpp:2680
mrpt::maps::CMetricMap
Declares a virtual base class for all metric maps storage classes.
Definition: CMetricMap.h:52
mrpt::maps::CLandmarksMap::~CLandmarksMap
~CLandmarksMap() override=default
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::erase
void erase(unsigned int indx)
Definition: CLandmarksMap.cpp:1856
CObservationBearingRange.h
mrpt::obs::CObservationBeaconRanges
Declares a class derived from "CObservation" that represents one (or more) range measurements to labe...
Definition: CObservationBeaconRanges.h:24
mrpt::maps::CLandmarksMap::fuseWith
void fuseWith(CLandmarksMap &other, bool justInsertAllOfThem=false)
Fuses the contents of another map with this one, updating "this" object with the result.
Definition: CLandmarksMap.cpp:940
CDynamicGrid.h
mrpt::maps::CLandmark
The class for storing "landmarks" (visual or laser-scan-extracted features,...)
Definition: CLandmark.h:35
mrpt::maps::CLandmarksMap::TInsertionResults
This struct stores extra results from invoking insertObservation.
Definition: CLandmarksMap.h:432
mrpt::config::CConfigFileBase
This class allows loading and storing values and vectors of different types from a configuration text...
Definition: config/CConfigFileBase.h:44
mrpt::maps::CLandmarksMap::TLikelihoodOptions::SIFTs_decimation
int SIFTs_decimation
Considers 1 out of "SIFTs_decimation" visual landmarks in the observation during the likelihood compu...
Definition: CLandmarksMap.h:370
mrpt::poses::CPose2D
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle.
Definition: CPose2D.h:39
mrpt::maps::CLandmarksMap::compute3DMatchingRatio
float compute3DMatchingRatio(const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose3D &otherMapPose, const TMatchingRatioParams &params) const override
Computes the ratio in [0,1] of correspondences between "this" and the "otherMap" map,...
Definition: CLandmarksMap.cpp:2550
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::push_back
void push_back(const CLandmark &lm)
The object is copied, thus the original copy passed as a parameter can be released.
Definition: CLandmarksMap.cpp:1806
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:85
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::size
size_t size() const
Definition: CLandmarksMap.h:163
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::hasBeenModified
void hasBeenModified(unsigned int indx)
Definition: CLandmarksMap.cpp:1862
mrpt::img::TColorf
An RGBA color - floats in the range [0,1].
Definition: TColor.h:88
mrpt::maps::CLandmarksMap::TLikelihoodOptions::extRobotPoseStd
float extRobotPoseStd
The standard deviation used for external robot poses likelihood (default=0.05) [meters].
Definition: CLandmarksMap.h:396
mrpt::maps::CLandmarksMap::landmarks
struct mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks landmarks
CFeatureExtraction.h
mrpt::config::CLoadableOptions
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
Definition: config/CLoadableOptions.h:26
mrpt::vision::CFeatureExtraction::TOptions
The set of parameters for all the detectors & descriptor algorithms.
Definition: CFeatureExtraction.h:87
mrpt::maps::internal::TSequenceLandmarks
std::vector< CLandmark > TSequenceLandmarks
Definition: CLandmarksMap.h:30
mrpt::maps::CLandmarksMap::isEmpty
bool isEmpty() const override
Returns true if the map is empty/no observation has been inserted.
Definition: CLandmarksMap.cpp:2381
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::begin
iterator begin()
Definition: CLandmarksMap.h:160
obs_frwds.h
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::getGrid
mrpt::containers::CDynamicGrid< std::vector< int32_t > > * getGrid()
Definition: CLandmarksMap.h:178
mrpt::obs::CObservationBearingRange
This observation represents a number of range-bearing value pairs, each one for a detected landmark,...
Definition: CObservationBearingRange.h:28
mrpt::maps::CLandmarksMap::TInsertionResults::nSiftL
unsigned int nSiftL
The number of SIFT detected in left and right images respectively.
Definition: CLandmarksMap.h:437
mrpt::maps::CLandmarksMap::saveToMATLABScript2D
bool saveToMATLABScript2D(std::string file, const char *style="b", float stdCount=2.0f)
Save to a MATLAB script which displays 2D error ellipses for the map (top-view, projection on the XY ...
Definition: CLandmarksMap.cpp:1455
mrpt::maps::CLandmarksMap::TInsertionOptions::SIFTs_stdXY
float SIFTs_stdXY
[For SIFT landmarks only] The standard deviation (in pixels) for the SIFTs detector (This is used for...
Definition: CLandmarksMap.h:309
mrpt::maps::CLandmarksMap::TLikelihoodOptions::SIFT_feat_options
mrpt::vision::CFeatureExtraction::TOptions SIFT_feat_options
Parameters of the SIFT feature detector/descriptors while inserting images in the landmark map.
Definition: CLandmarksMap.h:378
mrpt::maps::CLandmarksMap::saveMetricMapRepresentationToFile
void saveMetricMapRepresentationToFile(const std::string &filNamePrefix) const override
This virtual method saves the map to a file "filNamePrefix"+< some_file_extension >,...
Definition: CLandmarksMap.cpp:2436
mrpt::DEG2RAD
constexpr double DEG2RAD(const double x)
Degrees to radians
Definition: core/include/mrpt/core/bits_math.h:47
params
mrpt::vision::TStereoCalibParams params
Definition: chessboard_stereo_camera_calib_unittest.cpp:24
mrpt::maps::CLandmarksMap::loadSiftFeaturesFromImageObservation
void loadSiftFeaturesFromImageObservation(const mrpt::obs::CObservationImage &obs, const mrpt::vision::CFeatureExtraction::TOptions &feat_options=mrpt::vision::CFeatureExtraction::TOptions(mrpt::vision::featSIFT))
Loads into this landmarks map the SIFT features extracted from an image observation (Previous content...
Definition: CLandmarksMap.cpp:598
mrpt::vision::featSIFT
@ featSIFT
Scale Invariant Feature Transform [LOWE'04].
Definition: vision/include/mrpt/vision/types.h:54
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::const_iterator
internal::TSequenceLandmarks::const_iterator const_iterator
Definition: CLandmarksMap.h:164
MAP_DEFINITION_START
#define MAP_DEFINITION_START(_CLASS_NAME_)
Add a MAP_DEFINITION_START() ...
Definition: TMetricMapTypesRegistry.h:57
mrpt::maps::CLandmarksMap::TLikelihoodOptions::beaconRangesUseObservationStd
bool beaconRangesUseObservationStd
(Default: false) If true, beaconRangesStd is ignored and each individual CObservationBeaconRanges::st...
Definition: CLandmarksMap.h:389
mrpt::maps::CLandmarksMap::TInsertionOptions::loadFromConfigFile
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: CLandmarksMap.cpp:2204
mrpt::maps::CLandmarksMap::computeLikelihood_SIFT_LandmarkMap
double computeLikelihood_SIFT_LandmarkMap(CLandmarksMap *map, mrpt::tfest::TMatchingPairList *correspondences=nullptr, std::vector< bool > *otherCorrespondences=nullptr)
Returns the (logarithmic) likelihood of a set of landmarks "map" given "this" map.
Definition: CLandmarksMap.cpp:1944
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks
The list of landmarks: the wrapper class is just for maintaining the KD-Tree representation.
Definition: CLandmarksMap.h:134
mrpt::maps::CLandmarksMap::TInsertionOptions::SIFT_feat_options
mrpt::vision::CFeatureExtraction::TOptions SIFT_feat_options
Parameters of the SIFT feature detector/descriptors while inserting images in the landmark map.
Definition: CLandmarksMap.h:338
CLoadableOptions.h
mrpt::containers::CDynamicGrid
A 2D grid of dynamic size which stores any kind of data at each cell.
Definition: CDynamicGrid.h:38
mrpt::maps::CLandmarksMap::likelihoodOptions
mrpt::maps::CLandmarksMap::TLikelihoodOptions likelihoodOptions
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::hasBeenModifiedAll
void hasBeenModifiedAll()
Definition: CLandmarksMap.cpp:1880
MAP_DEFINITION_END
#define MAP_DEFINITION_END(_CLASS_NAME_)
Definition: TMetricMapTypesRegistry.h:67
mrpt::maps::CLandmarksMap::TInsertionResults::nSiftR
unsigned int nSiftR
Definition: CLandmarksMap.h:437
mrpt::maps::CLandmarksMap::changeCoordinatesReference
void changeCoordinatesReference(const mrpt::poses::CPose3D &newOrg)
Changes the reference system of the map to a given 3D pose.
Definition: CLandmarksMap.cpp:766
mrpt::maps::CLandmarksMap::TLikelihoodOptions::TGPSOrigin::y_shift
double y_shift
Definition: CLandmarksMap.h:419
mrpt::maps::CLandmarksMap::TLikelihoodOptions::beaconRangesStd
float beaconRangesStd
The standard deviation used for Beacon ranges likelihood (default=0.08) [meters].
Definition: CLandmarksMap.h:385
mrpt::maps::CLandmarksMap::TFuseOptions::TFuseOptions
TFuseOptions()
Initialization.
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::isToBeModified
void isToBeModified(unsigned int indx)
Definition: CLandmarksMap.cpp:1838
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::clear
void clear()
Definition: CLandmarksMap.cpp:1796
mrpt::maps::CLandmarksMap::internal_clear
void internal_clear() override
Internal method called by clear()
Definition: CLandmarksMap.cpp:145
mrpt::maps::CLandmarksMap::TLikelihoodOptions::TGPSOrigin::min_sat
unsigned int min_sat
Minimum number of sats to take into account the data.
Definition: CLandmarksMap.h:421
mrpt::maps::CLandmarksMap::_mapMaxID
static mrpt::maps::CLandmark::TLandmarkID _mapMaxID
Definition: CLandmarksMap.h:214
mrpt::maps::CLandmarksMap::TLikelihoodOptions::TGPSOrigin::altitude
double altitude
meters
Definition: CLandmarksMap.h:414
mrpt::obs::CObservation
Declares a class that represents any robot's observation.
Definition: CObservation.h:43
mrpt::maps::CLandmarksMap::internal_computeObservationLikelihood
double internal_computeObservationLikelihood(const mrpt::obs::CObservation &obs, const mrpt::poses::CPose3D &takenFrom) override
Computes the (logarithmic) likelihood that a given observation was taken from a given pose in the wor...
Definition: CLandmarksMap.cpp:197
mrpt::tfest::TMatchingPairList
A list of TMatchingPair.
Definition: TMatchingPair.h:70
mrpt::maps::CLandmarksMap::TLikelihoodOptions
With this struct options are provided to the likelihood computations.
Definition: CLandmarksMap.h:344
mrpt::maps::CLandmarksMap::simulateBeaconReadings
void simulateBeaconReadings(const mrpt::poses::CPose3D &in_robotPose, const mrpt::poses::CPoint3D &in_sensorLocationOnRobot, mrpt::obs::CObservationBeaconRanges &out_Observations) const
Simulates a noisy reading toward each of the beacons in the landmarks map, if any.
Definition: CLandmarksMap.cpp:2385
CObservationImage.h
mrpt::maps::CLandmarksMap
A class for storing a map of 3D probabilistic landmarks.
Definition: CLandmarksMap.h:74
mrpt::maps
Definition: CBeacon.h:21
mrpt::maps::CLandmarksMap::TInsertionOptions::SIFTs_stereo_maxDepth
float SIFTs_stereo_maxDepth
Maximum depth of 3D landmarks when loading a landmarks map from a stereo image observation.
Definition: CLandmarksMap.h:318
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::get
CLandmark * get(unsigned int indx)
Definition: CLandmarksMap.cpp:1827
mrpt::maps::CLandmarksMap::CLandmarksMap
CLandmarksMap()=default
CLandmark.h
mrpt::poses::CPoint3D
A class used to store a 3D point.
Definition: CPoint3D.h:31
CMatrixF.h
CSerializable.h
mrpt::maps::CLandmarksMap::getAs3DObject
void getAs3DObject(mrpt::opengl::CSetOfObjects::Ptr &outObj) const override
Returns a 3D object representing the map.
Definition: CLandmarksMap.cpp:2466
mrpt::obs::CObservationImage
Declares a class derived from "CObservation" that encapsules an image from a camera,...
Definition: CObservationImage.h:32
mrpt::maps::CLandmarksMap::TInsertionOptions::SIFTs_epipolar_TH
float SIFTs_epipolar_TH
Maximum distance (in pixels) from a point to a certain epipolar line to be considered a potential mat...
Definition: CLandmarksMap.h:323
mrpt::obs::CObservationStereoImages
Observation class for either a pair of left+right or left+disparity images from a stereo camera.
Definition: CObservationStereoImages.h:38
mrpt::maps::CLandmarksMap::TFuseOptions::minTimesSeen
unsigned int minTimesSeen
Required number of times of a landmark to be seen not to be removed, in "ellapsedTime" seconds.
Definition: CLandmarksMap.h:452
CObservation2DRangeScan.h
mrpt::maps::CLandmarksMap::TInsertionOptions::PLOT_IMAGES
bool PLOT_IMAGES
Indicates if the images (as well as the SIFT detected features) should be shown in a window.
Definition: CLandmarksMap.h:328
mrpt::maps::CLandmarksMap::TLikelihoodOptions::TGPSOrigin::TGPSOrigin
TGPSOrigin()
mrpt::maps::CLandmarksMap::TLikelihoodOptions::loadFromConfigFile
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: CLandmarksMap.cpp:2322
mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::TCustomSequenceLandmarks
TCustomSequenceLandmarks()
Default constructor.
Definition: CLandmarksMap.cpp:1790



Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Fri Jul 17 08:43:33 UTC 2020