Main MRPT website > C++ reference for MRPT 1.4.0
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-2016, 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::maps::TMatchingParams::TMatchingParams
TMatchingParams()
Ctor: default values.
Definition: metric_map_types.h:33
mrpt::maps::TMatchingParams::decimation_other_map_points
size_t decimation_other_map_points
(Default=1) Only consider 1 out of this number of points from the "other" map.
Definition: metric_map_types.h:28
mrpt::maps::TMapGenericParams::enableSaveAs3DObject
bool enableSaveAs3DObject
(Default=true) If false, calling CMetricMap::getAs3DObject() will have no effects
Definition: metric_map_types.h:70
mrpt::maps::TMatchingExtraResults::TMatchingExtraResults
TMatchingExtraResults()
Definition: metric_map_types.h:50
CLoadableOptions.h
mrpt::maps::TMatchingRatioParams
Parameters for CMetricMap::compute3DMatchingRatio()
Definition: metric_map_types.h:55
mrpt::maps::TMatchingRatioParams::maxDistForCorr
float maxDistForCorr
(Default: 0.10f) The minimum distance between 2 non-probabilistic map elements for counting them as a...
Definition: metric_map_types.h:57
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CParticleFilter.h:16
mrpt::maps::TMapGenericParams
Common params to all maps derived from mrpt::maps::CMetricMap
Definition: metric_map_types.h:66
mrpt::maps::TMatchingExtraResults::correspondencesRatio
float correspondencesRatio
The ratio [0,1] of points in otherMap with at least one correspondence.
Definition: metric_map_types.h:47
mrpt::maps::TMatchingParams::onlyUniqueRobust
bool onlyUniqueRobust
Additional consistency filter: "onlyKeepTheClosest" allows one correspondence for each "local map" po...
Definition: metric_map_types.h:27
mrpt::maps::TMatchingExtraResults::sumSqrDist
float sumSqrDist
The sum of all matched points squared distances.If undesired, set to NULL, as default.
Definition: metric_map_types.h:48
DEFINE_SERIALIZABLE_PRE_CUSTOM_LINKAGE
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_LINKAGE(class_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
Definition: CSerializable.h:152
lightweight_geom_data.h
mrpt::maps::TMatchingParams::maxDistForCorrespondence
float maxDistForCorrespondence
Maximum linear distance between two points to be paired (meters)
Definition: metric_map_types.h:24
mrpt::utils::CStream
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition: CStream.h:38
mrpt::utils::CConfigFileBase
This class allows loading and storing values and vectors of different types from a configuration text...
Definition: CConfigFileBase.h:30
obs_frwds.h
mrpt::maps::TMatchingRatioParams::maxMahaDistForCorr
float maxMahaDistForCorr
(Default: 2.0f) The minimum Mahalanobis distance between 2 probabilistic map elements for counting th...
Definition: metric_map_types.h:58
mrpt::maps::TMapGenericParams::enableObservationInsertion
bool enableObservationInsertion
(Default=true) Enable inserting observations in this map
Definition: metric_map_types.h:72
mrpt::maps::TMatchingParams
Parameters for the determination of matchings between point clouds, etc.
Definition: metric_map_types.h:22
mrpt::math::TPoint3D
Lightweight 3D point.
Definition: lightweight_geom_data.h:229
mrpt::maps::TMatchingParams::offset_other_map_points
size_t offset_other_map_points
Index of the first point in the "other" map to start checking for correspondences (Default=0)
Definition: metric_map_types.h:29
mrpt::maps::TMapGenericParams::enableObservationLikelihood
bool enableObservationLikelihood
(Default=true) Enable computing observation likelihoods with this map
Definition: metric_map_types.h:71
DEFINE_SERIALIZABLE
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Definition: CSerializable.h:147
mrpt::maps::TMatchingParams::onlyKeepTheClosest
bool onlyKeepTheClosest
If set to true (default), only the closest correspondence will be returned. If false all are returned...
Definition: metric_map_types.h:26
mrpt::maps::TMatchingRatioParams::TMatchingRatioParams
TMatchingRatioParams()
Definition: metric_map_types.h:60
mrpt::maps::TMatchingParams::angularDistPivotPoint
mrpt::math::TPoint3D angularDistPivotPoint
The point used to calculate angular distances: e.g. the coordinates of the sensor for a 2D laser scan...
Definition: metric_map_types.h:30
DEFINE_SERIALIZABLE_POST_CUSTOM_LINKAGE
#define DEFINE_SERIALIZABLE_POST_CUSTOM_LINKAGE(class_name, _LINKAGE_)
Definition: CSerializable.h:156
mrpt::maps::TMatchingExtraResults
Additional results from the determination of matchings between point clouds, etc.,...
Definition: metric_map_types.h:45
CSerializable.h
MRPT_OVERRIDE
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
Definition: mrpt_macros.h:28
mrpt::maps::TMatchingParams::maxAngularDistForCorrespondence
float maxAngularDistForCorrespondence
Allowed "angular error" (in radians): this permits larger pairing threshold distances to more distant...
Definition: metric_map_types.h:25



Page generated by Doxygen 1.8.17 for MRPT 1.4.0 SVN: at Tue Mar 3 09:15:16 UTC 2020