MRPT  1.9.9
CMetricMapsAlignmentAlgorithm.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-2018, 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 #ifndef CMetricMapsAlignmentAlgorithm_H
10 #define CMetricMapsAlignmentAlgorithm_H
11 
12 #include <mrpt/maps/CPointsMap.h>
13 #include <mrpt/poses/poses_frwds.h>
14 #include <mrpt/poses/CPosePDF.h>
15 #include <mrpt/poses/CPose3DPDF.h>
16 
18 
19 namespace mrpt::slam
20 {
21 /** A base class for any algorithm able of maps alignment. There are two methods
22  * depending on an PDF or a single 2D Pose value is available as initial guess
23  * for the methods.
24  *
25  * \sa CPointsMap, \ingroup mrpt_slam_grp
26  */
28 {
29  public:
31  : mrpt::system::COutputLogger("CMetricMapsAlignmentAlgorithm")
32  {
33  }
34  /** Dtor */
36  /** The method for aligning a pair of metric maps, aligning only 2D +
37  * orientation.
38  * The meaning of some parameters and the kind of the maps to be aligned
39  * are implementation dependant,
40  * so look into the derived classes for instructions.
41  * The target is to find a PDF for the pose displacement between
42  * maps, <b>thus the pose of m2 relative to m1</b>. This pose
43  * is returned as a PDF rather than a single value.
44  *
45  * \param m1 [IN] The first map
46  * \param m2 [IN] The second map. The pose of this map respect to
47  * m1
48  * is
49  * to
50  * be estimated.
51  * \param grossEst [IN] An initial gross estimation for the
52  * displacement.
53  * If a given algorithm doesn't need it, set to <code>CPose2D(0,0,0)</code>
54  * for example.
55  * \param runningTime [OUT] A pointer to a container for obtaining the
56  * algorithm running time in seconds, or nullptr if you don't need it.
57  * \param info [OUT] See derived classes for details, or nullptr if
58  * it
59  * isn't needed.
60  *
61  * \return A smart pointer to the output estimated pose PDF.
62  * \sa CICP
63  */
66  const mrpt::poses::CPose2D& grossEst, float* runningTime = nullptr,
67  void* info = nullptr);
68 
69  /** The virtual method for aligning a pair of metric maps, aligning only 2D
70  * + orientation.
71  * The meaning of some parameters are implementation dependant,
72  * so look at the derived classes for more details.
73  * The goal is to find a PDF for the pose displacement between
74  * maps, that is, <b>the pose of m2 relative to m1</b>. This pose
75  * is returned as a PDF rather than a single value.
76  *
77  * \note This method can be configurated with a "options" structure in the
78  * implementation classes.
79  *
80  * \param m1 [IN] The first map (MUST BE A COccupancyGridMap2D
81  * derived
82  * class)
83  * \param m2 [IN] The second map. (MUST BE A CPointsMap derived
84  * class)
85  * The
86  * pose of this map respect to m1 is to be estimated.
87  * \param initialEstimationPDF [IN] An initial gross estimation for the
88  * displacement.
89  * \param runningTime [OUT] A pointer to a container for obtaining the
90  * algorithm running time in seconds, or nullptr if you don't need it.
91  * \param info [OUT] See derived classes for details, or nullptr if
92  * it
93  * isn't needed.
94  *
95  * \return A smart pointer to the output estimated pose PDF.
96  * \sa CICP
97  */
100  const mrpt::poses::CPosePDFGaussian& initialEstimationPDF,
101  float* runningTime = nullptr, void* info = nullptr) = 0;
102 
103  /** The method for aligning a pair of metric maps, aligning the full 6D
104  * pose.
105  * The meaning of some parameters and the kind of the maps to be aligned
106  * are implementation dependant,
107  * so look into the derived classes for instructions.
108  * The target is to find a PDF for the pose displacement between
109  * maps, <b>thus the pose of m2 relative to m1</b>. This pose
110  * is returned as a PDF rather than a single value.
111  *
112  * \param m1 [IN] The first map
113  * \param m2 [IN] The second map. The pose of this map respect to
114  * m1
115  * is
116  * to
117  * be estimated.
118  * \param grossEst [IN] An initial gross estimation for the
119  * displacement.
120  * If a given algorithm doesn't need it, set to <code>CPose3D(0,0,0)</code>
121  * for example.
122  * \param runningTime [OUT] A pointer to a container for obtaining the
123  * algorithm running time in seconds, or nullptr if you don't need it.
124  * \param info [OUT] See derived classes for details, or nullptr if
125  * it
126  * isn't needed.
127  *
128  * \return A smart pointer to the output estimated pose PDF.
129  * \sa CICP
130  */
132  const mrpt::maps::CMetricMap* m1, const mrpt::maps::CMetricMap* m2,
133  const mrpt::poses::CPose3D& grossEst, float* runningTime = nullptr,
134  void* info = nullptr);
135 
136  /** The virtual method for aligning a pair of metric maps, aligning the full
137  * 6D pose.
138  * The meaning of some parameters are implementation dependant,
139  * so look at the derived classes for more details.
140  * The goal is to find a PDF for the pose displacement between
141  * maps, that is, <b>the pose of m2 relative to m1</b>. This pose
142  * is returned as a PDF rather than a single value.
143  *
144  * \note This method can be configurated with a "options" structure in the
145  * implementation classes.
146  *
147  * \param m1 [IN] The first map (MUST BE A COccupancyGridMap2D
148  * derived
149  * class)
150  * \param m2 [IN] The second map. (MUST BE A CPointsMap derived
151  * class)
152  * The
153  * pose of this map respect to m1 is to be estimated.
154  * \param initialEstimationPDF [IN] An initial gross estimation for the
155  * displacement.
156  * \param runningTime [OUT] A pointer to a container for obtaining the
157  * algorithm running time in seconds, or nullptr if you don't need it.
158  * \param info [OUT] See derived classes for details, or nullptr if
159  * it
160  * isn't needed.
161  *
162  * \return A smart pointer to the output estimated pose PDF.
163  * \sa CICP
164  */
166  const mrpt::maps::CMetricMap* m1, const mrpt::maps::CMetricMap* m2,
167  const mrpt::poses::CPose3DPDFGaussian& initialEstimationPDF,
168  float* runningTime = nullptr, void* info = nullptr) = 0;
169 };
170 
171 }
172 #endif
173 
174 
Declares a virtual base class for all metric maps storage classes.
Definition: CMetricMap.h:56
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle.
Definition: CPose2D.h:39
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:87
Declares a class that represents a Probability Density function (PDF) of a 3D pose .
std::shared_ptr< CPose3DPDF > Ptr
Definition: CPose3DPDF.h:43
Declares a class that represents a Probability Density function (PDF) of a 2D pose .
std::shared_ptr< CPosePDF > Ptr
Definition: CPosePDF.h:42
A base class for any algorithm able of maps alignment.
mrpt::poses::CPose3DPDF::Ptr Align3D(const mrpt::maps::CMetricMap *m1, const mrpt::maps::CMetricMap *m2, const mrpt::poses::CPose3D &grossEst, float *runningTime=nullptr, void *info=nullptr)
The method for aligning a pair of metric maps, aligning the full 6D pose.
mrpt::poses::CPosePDF::Ptr Align(const mrpt::maps::CMetricMap *m1, const mrpt::maps::CMetricMap *m2, const mrpt::poses::CPose2D &grossEst, float *runningTime=nullptr, void *info=nullptr)
The method for aligning a pair of metric maps, aligning only 2D + orientation.
virtual mrpt::poses::CPose3DPDF::Ptr Align3DPDF(const mrpt::maps::CMetricMap *m1, const mrpt::maps::CMetricMap *m2, const mrpt::poses::CPose3DPDFGaussian &initialEstimationPDF, float *runningTime=nullptr, void *info=nullptr)=0
The virtual method for aligning a pair of metric maps, aligning the full 6D pose.
virtual mrpt::poses::CPosePDF::Ptr AlignPDF(const mrpt::maps::CMetricMap *m1, const mrpt::maps::CMetricMap *m2, const mrpt::poses::CPosePDFGaussian &initialEstimationPDF, float *runningTime=nullptr, void *info=nullptr)=0
The virtual method for aligning a pair of metric maps, aligning only 2D.
Versatile class for consistent logging and management of output messages.
COutputLogger()
Default class constructor.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.



Page generated by Doxygen 1.9.1 for MRPT 1.9.9 Git: 814d80880 Fri Aug 24 01:51:28 2018 +0200 at mar 26 may 2026 12:30:59 CEST