MRPT  2.0.4
metric_map_types.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 
12 #include <mrpt/math/TPoint3D.h>
13 #include <mrpt/obs/obs_frwds.h>
15 
16 namespace mrpt::maps
17 {
18 /** Parameters for the determination of matchings between point clouds, etc. \sa
19  * CMetricMap::determineMatching2D, CMetricMap::determineMatching3D */
21 {
22  /** Maximum linear distance between two points to be paired (meters) */
24  /** Allowed "angular error" (in radians): this permits larger pairing
25  * threshold distances to more distant points. */
27  /** If set to true (default), only the closest correspondence will be
28  * returned. If false all are returned. */
29  bool onlyKeepTheClosest{true};
30  /** Additional consistency filter: "onlyKeepTheClosest" allows one
31  * correspondence for each "local map" point, but many of them may have as
32  * corresponding pair the same "global point", which this flag avoids. */
33  bool onlyUniqueRobust{false};
34  /** (Default=1) Only consider 1 out of this number of points from the
35  * "other" map. */
37  /** Index of the first point in the "other" map to start checking for
38  * correspondences (Default=0) */
40  /** The point used to calculate angular distances: e.g. the coordinates of
41  * the sensor for a 2D laser scanner. */
43 
44  /** Ctor: default values */
45  TMatchingParams() = default;
46 };
47 
48 /** Additional results from the determination of matchings between point clouds,
49  * etc., apart from the pairings themselves \sa CMetricMap::determineMatching2D,
50  * CMetricMap::determineMatching3D */
52 {
53  /** The ratio [0,1] of points in otherMap with at least one correspondence.
54  */
56  /** The sum of all matched points squared distances.If undesired, set to
57  * nullptr, as default. */
58  float sumSqrDist{0};
59 
60  TMatchingExtraResults() = default;
61 };
62 
63 /** Parameters for CMetricMap::compute3DMatchingRatio() */
65 {
66  /** (Default: 0.10f) The minimum distance between 2 non-probabilistic map
67  * elements for counting them as a correspondence. */
68  float maxDistForCorr{0.10f};
69  /** (Default: 2.0f) The minimum Mahalanobis distance between 2 probabilistic
70  * map elements for counting them as a correspondence. */
71  float maxMahaDistForCorr{2.0f};
72 
73  TMatchingRatioParams() = default;
74 };
75 
76 /** Common params to all maps derived from mrpt::maps::CMetricMap */
79 {
81  public:
82  /** (Default=true) If false, calling CMetricMap::getAs3DObject() will have
83  * no effects */
85  /** (Default=true) Enable computing observation likelihoods with this map */
87  /** (Default=true) Enable inserting observations in this map */
89 
90  void loadFromConfigFile(
91  const mrpt::config::CConfigFileBase& source,
92  const std::string& sectionNamePrefix) override; // See base docs
93  void saveToConfigFile(
95  const std::string& section) const override;
96 };
97 
98 } // namespace mrpt::maps
mrpt::math::TPoint3D angularDistPivotPoint
The point used to calculate angular distances: e.g.
float maxAngularDistForCorrespondence
Allowed "angular error" (in radians): this permits larger pairing threshold distances to more distant...
Parameters for CMetricMap::compute3DMatchingRatio()
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
bool enableObservationInsertion
(Default=true) Enable inserting observations in this map
bool enableSaveAs3DObject
(Default=true) If false, calling CMetricMap::getAs3DObject() will have no effects ...
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 nullptr, as default.
bool enableObservationLikelihood
(Default=true) Enable computing observation likelihoods with this map
void loadFromConfigFile(const mrpt::config::CConfigFileBase &source, const std::string &sectionNamePrefix) override
This method load the options from a ".ini"-like file or memory-stored string list.
void saveToConfigFile(mrpt::config::CConfigFileBase &target, const std::string &section) const override
This method saves the options to a ".ini"-like file or memory-stored string list. ...
float maxDistForCorr
(Default: 0.10f) The minimum distance between 2 non-probabilistic map elements for counting them as a...
This class allows loading and storing values and vectors of different types from a configuration text...
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)
bool onlyKeepTheClosest
If set to true (default), only the closest correspondence will be returned.
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.
float maxMahaDistForCorr
(Default: 2.0f) The minimum Mahalanobis distance between 2 probabilistic map elements for counting th...
The virtual base class which provides a unified interface for all persistent objects in MRPT...
Definition: CSerializable.h:30
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Parameters for the determination of matchings between point clouds, etc.
TMatchingParams()=default
Ctor: default values.



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020