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