Main MRPT website > C++ reference for MRPT 1.5.6
metric_map_types.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-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 #pragma once
10 
14 #include <mrpt/obs/obs_frwds.h>
15 #include <mrpt/obs/link_pragmas.h>
16 
17 namespace mrpt
18 {
19  namespace maps
20  {
21  /** Parameters for the determination of matchings between point clouds, etc. \sa CMetricMap::determineMatching2D, CMetricMap::determineMatching3D */
23  {
24  float maxDistForCorrespondence; //!< Maximum linear distance between two points to be paired (meters)
25  float maxAngularDistForCorrespondence; //!< Allowed "angular error" (in radians): this permits larger pairing threshold distances to more distant points.
26  bool onlyKeepTheClosest; //!< If set to true (default), only the closest correspondence will be returned. If false all are returned.
27  bool onlyUniqueRobust; //!< Additional consistency filter: "onlyKeepTheClosest" allows one correspondence for each "local map" point, but many of them may have as corresponding pair the same "global point", which this flag avoids.
28  size_t decimation_other_map_points; //!< (Default=1) Only consider 1 out of this number of points from the "other" map.
29  size_t offset_other_map_points; //!< Index of the first point in the "other" map to start checking for correspondences (Default=0)
30  mrpt::math::TPoint3D angularDistPivotPoint; //!< The point used to calculate angular distances: e.g. the coordinates of the sensor for a 2D laser scanner.
31 
32  /** Ctor: default values */
34  maxDistForCorrespondence(0.50f),
35  maxAngularDistForCorrespondence(.0f),
36  onlyKeepTheClosest(true),
37  onlyUniqueRobust(false),
38  decimation_other_map_points(1),
39  offset_other_map_points(0),
40  angularDistPivotPoint(0,0,0)
41  {}
42  };
43 
44  /** Additional results from the determination of matchings between point clouds, etc., apart from the pairings themselves \sa CMetricMap::determineMatching2D, CMetricMap::determineMatching3D */
46  {
47  float correspondencesRatio; //!< The ratio [0,1] of points in otherMap with at least one correspondence.
48  float sumSqrDist; //!< The sum of all matched points squared distances.If undesired, set to NULL, as default.
49 
50  TMatchingExtraResults() : correspondencesRatio(0),sumSqrDist(0)
51  {}
52  };
53 
54  /** Parameters for CMetricMap::compute3DMatchingRatio() */
56  {
57  float maxDistForCorr; //!< (Default: 0.10f) The minimum distance between 2 non-probabilistic map elements for counting them as a correspondence.
58  float maxMahaDistForCorr; //!< (Default: 2.0f) The minimum Mahalanobis distance between 2 probabilistic map elements for counting them as a correspondence.
59 
60  TMatchingRatioParams() : maxDistForCorr(0.10f), maxMahaDistForCorr(2.0f)
61  {}
62  };
63 
65  /** Common params to all maps derived from mrpt::maps::CMetricMap */
66  class OBS_IMPEXP TMapGenericParams : public mrpt::utils::CLoadableOptions, public mrpt::utils::CSerializable
67  {
69  public:
70  bool enableSaveAs3DObject; //!< (Default=true) If false, calling CMetricMap::getAs3DObject() will have no effects
71  bool enableObservationLikelihood; //!< (Default=true) Enable computing observation likelihoods with this map
72  bool enableObservationInsertion; //!< (Default=true) Enable inserting observations in this map
73 
75  void loadFromConfigFile(const mrpt::utils::CConfigFileBase &source,const std::string &sectionNamePrefix) MRPT_OVERRIDE; // See base docs
76  void dumpToTextStream(mrpt::utils::CStream &out) const MRPT_OVERRIDE; // See base docs
77  };
79 
80 
81  } // End of namespace
82 } // End of namespace
83 
mrpt::math::TPoint3D angularDistPivotPoint
The point used to calculate angular distances: e.g. the coordinates of the sensor for a 2D laser scan...
float maxAngularDistForCorrespondence
Allowed "angular error" (in radians): this permits larger pairing threshold distances to more distant...
Parameters for CMetricMap::compute3DMatchingRatio()
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
size_t decimation_other_map_points
(Default=1) Only consider 1 out of this number of points from the "other" map.
float sumSqrDist
The sum of all matched points squared distances.If undesired, set to NULL, as default.
float maxDistForCorr
(Default: 0.10f) The minimum distance between 2 non-probabilistic map elements for counting them as a...
Additional results from the determination of matchings between point clouds, etc., apart from the pairings themselves.
bool onlyUniqueRobust
Additional consistency filter: "onlyKeepTheClosest" allows one correspondence for each "local map" po...
float maxDistForCorrespondence
Maximum linear distance between two points to be paired (meters)
#define DEFINE_SERIALIZABLE_POST_CUSTOM_LINKAGE(class_name, _LINKAGE_)
bool onlyKeepTheClosest
If set to true (default), only the closest correspondence will be returned. If false all are returned...
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
size_t offset_other_map_points
Index of the first point in the "other" map to start checking for correspondences (Default=0) ...
float correspondencesRatio
The ratio [0,1] of points in otherMap with at least one correspondence.
Common params to all maps derived from mrpt::maps::CMetricMap.
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_LINKAGE(class_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
float maxMahaDistForCorr
(Default: 2.0f) The minimum Mahalanobis distance between 2 probabilistic map elements for counting th...
Lightweight 3D point.
Parameters for the determination of matchings between point clouds, etc.
TMatchingParams()
Ctor: default values.
GLsizei GLsizei GLchar * source
Definition: glew.h:1739
GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble f
Definition: glew.h:5092



Page generated by Doxygen 1.8.6 for MRPT 1.5.6 Git: 4c65e84 Tue Apr 24 08:18:17 2018 +0200 at mar abr 24 08:26:17 CEST 2018