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



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 338471620 Mon Feb 17 00:12:39 2020 +0100 at lun feb 17 00:15:10 CET 2020