Main MRPT website > C++ reference for MRPT 1.4.0
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-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 #ifndef CMetricMapsAlignmentAlgorithm_H
10 #define CMetricMapsAlignmentAlgorithm_H
11 
12 #include <mrpt/maps/CPointsMap.h>
13 #include <mrpt/poses/poses_frwds.h>
14 
16 
17 #include <mrpt/slam/link_pragmas.h>
18 
19 namespace mrpt
20 {
21 namespace slam
22 {
23  /** A base class for any algorithm able of maps alignment. There are two methods
24  * depending on an PDF or a single 2D Pose value is available as initial guess for the methods.
25  *
26  * \sa CPointsMap, utils::CDebugOutputCapable \ingroup mrpt_slam_grp
27  */
29  {
30  public:
31  /** Destructor
32  */
34  {
35  }
36 
37  /** The method for aligning a pair of metric maps, aligning only 2D + orientation.
38  * The meaning of some parameters and the kind of the maps to be aligned 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 m1 is to be estimated.
46  * \param grossEst [IN] An initial gross estimation for the displacement. If a given algorithm doesn't need it, set to <code>CPose2D(0,0,0)</code> for example.
47  * \param runningTime [OUT] A pointer to a container for obtaining the algorithm running time in seconds, or NULL if you don't need it.
48  * \param info [OUT] See derived classes for details, or NULL if it isn't needed.
49  *
50  * \return A smart pointer to the output estimated pose PDF.
51  * \sa CICP
52  */
53  mrpt::poses::CPosePDFPtr Align(
54  const mrpt::maps::CMetricMap *m1,
55  const mrpt::maps::CMetricMap *m2,
56  const mrpt::poses::CPose2D &grossEst,
57  float *runningTime = NULL,
58  void *info = NULL );
59 
60  /** The virtual method for aligning a pair of metric maps, aligning only 2D + orientation.
61  * The meaning of some parameters are implementation dependant,
62  * so look at the derived classes for more details.
63  * The goal is to find a PDF for the pose displacement between
64  * maps, that is, <b>the pose of m2 relative to m1</b>. This pose
65  * is returned as a PDF rather than a single value.
66  *
67  * \note This method can be configurated with a "options" structure in the implementation classes.
68  *
69  * \param m1 [IN] The first map (MUST BE A COccupancyGridMap2D derived class)
70  * \param m2 [IN] The second map. (MUST BE A CPointsMap derived class) The pose of this map respect to m1 is to be estimated.
71  * \param initialEstimationPDF [IN] An initial gross estimation for the displacement.
72  * \param runningTime [OUT] A pointer to a container for obtaining the algorithm running time in seconds, or NULL if you don't need it.
73  * \param info [OUT] See derived classes for details, or NULL if it isn't needed.
74  *
75  * \return A smart pointer to the output estimated pose PDF.
76  * \sa CICP
77  */
78  virtual mrpt::poses::CPosePDFPtr AlignPDF(
79  const mrpt::maps::CMetricMap *m1,
80  const mrpt::maps::CMetricMap *m2,
81  const mrpt::poses::CPosePDFGaussian &initialEstimationPDF,
82  float *runningTime = NULL,
83  void *info = NULL ) = 0;
84 
85 
86  /** The method for aligning a pair of metric maps, aligning the full 6D pose.
87  * The meaning of some parameters and the kind of the maps to be aligned are implementation dependant,
88  * so look into the derived classes for instructions.
89  * The target is to find a PDF for the pose displacement between
90  * maps, <b>thus the pose of m2 relative to m1</b>. This pose
91  * is returned as a PDF rather than a single value.
92  *
93  * \param m1 [IN] The first map
94  * \param m2 [IN] The second map. The pose of this map respect to m1 is to be estimated.
95  * \param grossEst [IN] An initial gross estimation for the displacement. If a given algorithm doesn't need it, set to <code>CPose3D(0,0,0)</code> for example.
96  * \param runningTime [OUT] A pointer to a container for obtaining the algorithm running time in seconds, or NULL if you don't need it.
97  * \param info [OUT] See derived classes for details, or NULL if it isn't needed.
98  *
99  * \return A smart pointer to the output estimated pose PDF.
100  * \sa CICP
101  */
102  mrpt::poses::CPose3DPDFPtr Align3D(
103  const mrpt::maps::CMetricMap *m1,
104  const mrpt::maps::CMetricMap *m2,
105  const mrpt::poses::CPose3D &grossEst,
106  float *runningTime = NULL,
107  void *info = NULL );
108 
109  /** The virtual method for aligning a pair of metric maps, aligning the full 6D pose.
110  * The meaning of some parameters are implementation dependant,
111  * so look at the derived classes for more details.
112  * The goal is to find a PDF for the pose displacement between
113  * maps, that is, <b>the pose of m2 relative to m1</b>. This pose
114  * is returned as a PDF rather than a single value.
115  *
116  * \note This method can be configurated with a "options" structure in the implementation classes.
117  *
118  * \param m1 [IN] The first map (MUST BE A COccupancyGridMap2D derived class)
119  * \param m2 [IN] The second map. (MUST BE A CPointsMap derived class) The pose of this map respect to m1 is to be estimated.
120  * \param initialEstimationPDF [IN] An initial gross estimation for the displacement.
121  * \param runningTime [OUT] A pointer to a container for obtaining the algorithm running time in seconds, or NULL if you don't need it.
122  * \param info [OUT] See derived classes for details, or NULL if it isn't needed.
123  *
124  * \return A smart pointer to the output estimated pose PDF.
125  * \sa CICP
126  */
127  virtual mrpt::poses::CPose3DPDFPtr Align3DPDF(
128  const mrpt::maps::CMetricMap *m1,
129  const mrpt::maps::CMetricMap *m2,
130  const mrpt::poses::CPose3DPDFGaussian &initialEstimationPDF,
131  float *runningTime = NULL,
132  void *info = NULL ) = 0;
133 
134 
135  };
136 
137  } // End of namespace
138 } // End of namespace
139 
140 #endif
Declares a class that represents a Probability Density function (PDF) of a 2D pose ...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Declares a virtual base class for all metric maps storage classes.
A class used to store a 2D pose.
Definition: CPose2D.h:36
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:72
A base class for any algorithm able of maps alignment.
Declares a class that represents a Probability Density function (PDF) of a 3D pose ...
This base class provides a common printf-like method to send debug information to std::cout...



Page generated by Doxygen 1.8.14 for MRPT 1.4.0 SVN: at Sat Jul 14 16:13:21 UTC 2018