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>
16
17namespace 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
#define DEFINE_SERIALIZABLE_POST_CUSTOM_LINKAGE(class_name, _LINKAGE_)
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_LINKAGE(class_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Common params to all maps derived from mrpt::maps::CMetricMap
bool enableObservationInsertion
(Default=true) Enable inserting observations in this map
bool enableObservationLikelihood
(Default=true) Enable computing observation likelihoods with this map
bool enableSaveAs3DObject
(Default=true) If false, calling CMetricMap::getAs3DObject() will have no effects
void dumpToTextStream(mrpt::utils::CStream &out) const MRPT_OVERRIDE
This method should clearly display all the contents of the structure in textual form,...
void loadFromConfigFile(const mrpt::utils::CConfigFileBase &source, const std::string &sectionNamePrefix) MRPT_OVERRIDE
This method load the options from a ".ini"-like file or memory-stored string list.
This class allows loading and storing values and vectors of different types from a configuration text...
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition: CStream.h:39
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
Definition: mrpt_macros.h:28
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Additional results from the determination of matchings between point clouds, etc.,...
float correspondencesRatio
The ratio [0,1] of points in otherMap with at least one correspondence.
float sumSqrDist
The sum of all matched points squared distances.If undesired, set to NULL, as default.
Parameters for the determination of matchings between point clouds, etc.
float maxDistForCorrespondence
Maximum linear distance between two points to be paired (meters)
size_t decimation_other_map_points
(Default=1) Only consider 1 out of this number of points from the "other" map.
bool onlyKeepTheClosest
If set to true (default), only the closest correspondence will be returned. If false all are returned...
bool onlyUniqueRobust
Additional consistency filter: "onlyKeepTheClosest" allows one correspondence for each "local map" po...
size_t offset_other_map_points
Index of the first point in the "other" map to start checking for correspondences (Default=0)
float maxAngularDistForCorrespondence
Allowed "angular error" (in radians): this permits larger pairing threshold distances to more distant...
TMatchingParams()
Ctor: default values.
mrpt::math::TPoint3D angularDistPivotPoint
The point used to calculate angular distances: e.g. the coordinates of the sensor for a 2D laser scan...
Parameters for CMetricMap::compute3DMatchingRatio()
float maxMahaDistForCorr
(Default: 2.0f) The minimum Mahalanobis distance between 2 probabilistic map elements for counting th...
float maxDistForCorr
(Default: 0.10f) The minimum distance between 2 non-probabilistic map elements for counting them as a...
Lightweight 3D point.



Page generated by Doxygen 1.9.6 for MRPT 1.4.0 SVN: at Fri Jan 20 00:13:14 UTC 2023