Main MRPT website > C++ reference
MRPT logo
CMetricMapsAlignmentAlgorithm.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | The Mobile Robot Programming Toolkit (MRPT) C++ library |
3  | |
4  | http://www.mrpt.org/ |
5  | |
6  | Copyright (C) 2005-2012 University of Malaga |
7  | |
8  | This software was written by the Machine Perception and Intelligent |
9  | Robotics Lab, University of Malaga (Spain). |
10  | Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
11  | |
12  | This file is part of the MRPT project. |
13  | |
14  | MRPT is free software: you can redistribute it and/or modify |
15  | it under the terms of the GNU General Public License as published by |
16  | the Free Software Foundation, either version 3 of the License, or |
17  | (at your option) any later version. |
18  | |
19  | MRPT is distributed in the hope that it will be useful, |
20  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
21  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22  | GNU General Public License for more details. |
23  | |
24  | You should have received a copy of the GNU General Public License |
25  | along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
26  | |
27  +---------------------------------------------------------------------------+ */
28 #ifndef CMetricMapsAlignmentAlgorithm_H
29 #define CMetricMapsAlignmentAlgorithm_H
30 
31 #include <mrpt/slam/CPointsMap.h>
32 #include <mrpt/poses/CPose2D.h>
33 #include <mrpt/poses/CPosePDF.h>
34 #include <mrpt/poses/CPose3DPDF.h>
37 
39 
40 #include <mrpt/slam/link_pragmas.h>
41 
42 namespace mrpt
43 {
44 namespace slam
45 {
46  /** A base class for any algorithm able of maps alignment. There are two methods
47  * depending on an PDF or a single 2D Pose value is available as initial guess for the methods.
48  *
49  * \sa CPointsMap, utils::CDebugOutputCapable \ingroup mrpt_slam_grp
50  */
52  {
53  public:
54  /** Destructor
55  */
57  {
58  }
59 
60  /** The method for aligning a pair of metric maps, aligning only 2D + orientation.
61  * The meaning of some parameters and the kind of the maps to be aligned are implementation dependant,
62  * so look into the derived classes for instructions.
63  * The target is to find a PDF for the pose displacement between
64  * maps, <b>thus the pose of m2 relative to m1</b>. This pose
65  * is returned as a PDF rather than a single value.
66  *
67  * \param m1 [IN] The first map
68  * \param m2 [IN] The second map. The pose of this map respect to m1 is to be estimated.
69  * \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.
70  * \param runningTime [OUT] A pointer to a container for obtaining the algorithm running time in seconds, or NULL if you don't need it.
71  * \param info [OUT] See derived classes for details, or NULL if it isn't needed.
72  *
73  * \return A smart pointer to the output estimated pose PDF.
74  * \sa CICP
75  */
76  CPosePDFPtr Align(
77  const CMetricMap *m1,
78  const CMetricMap *m2,
79  const CPose2D &grossEst,
80  float *runningTime = NULL,
81  void *info = NULL );
82 
83  /** The virtual method for aligning a pair of metric maps, aligning only 2D + orientation.
84  * The meaning of some parameters are implementation dependant,
85  * so look at the derived classes for more details.
86  * The goal is to find a PDF for the pose displacement between
87  * maps, that is, <b>the pose of m2 relative to m1</b>. This pose
88  * is returned as a PDF rather than a single value.
89  *
90  * \note This method can be configurated with a "options" structure in the implementation classes.
91  *
92  * \param m1 [IN] The first map (MUST BE A COccupancyGridMap2D derived class)
93  * \param m2 [IN] The second map. (MUST BE A CPointsMap derived class) The pose of this map respect to m1 is to be estimated.
94  * \param initialEstimationPDF [IN] An initial gross estimation for the displacement.
95  * \param runningTime [OUT] A pointer to a container for obtaining the algorithm running time in seconds, or NULL if you don't need it.
96  * \param info [OUT] See derived classes for details, or NULL if it isn't needed.
97  *
98  * \return A smart pointer to the output estimated pose PDF.
99  * \sa CICP
100  */
101  virtual CPosePDFPtr AlignPDF(
102  const CMetricMap *m1,
103  const CMetricMap *m2,
104  const CPosePDFGaussian &initialEstimationPDF,
105  float *runningTime = NULL,
106  void *info = NULL ) = 0;
107 
108 
109  /** The method for aligning a pair of metric maps, aligning the full 6D pose.
110  * The meaning of some parameters and the kind of the maps to be aligned are implementation dependant,
111  * so look into the derived classes for instructions.
112  * The target is to find a PDF for the pose displacement between
113  * maps, <b>thus the pose of m2 relative to m1</b>. This pose
114  * is returned as a PDF rather than a single value.
115  *
116  * \param m1 [IN] The first map
117  * \param m2 [IN] The second map. The pose of this map respect to m1 is to be estimated.
118  * \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.
119  * \param runningTime [OUT] A pointer to a container for obtaining the algorithm running time in seconds, or NULL if you don't need it.
120  * \param info [OUT] See derived classes for details, or NULL if it isn't needed.
121  *
122  * \return A smart pointer to the output estimated pose PDF.
123  * \sa CICP
124  */
125  CPose3DPDFPtr Align3D(
126  const CMetricMap *m1,
127  const CMetricMap *m2,
128  const CPose3D &grossEst,
129  float *runningTime = NULL,
130  void *info = NULL );
131 
132  /** The virtual method for aligning a pair of metric maps, aligning the full 6D pose.
133  * The meaning of some parameters are implementation dependant,
134  * so look at the derived classes for more details.
135  * The goal is to find a PDF for the pose displacement between
136  * maps, that is, <b>the pose of m2 relative to m1</b>. This pose
137  * is returned as a PDF rather than a single value.
138  *
139  * \note This method can be configurated with a "options" structure in the implementation classes.
140  *
141  * \param m1 [IN] The first map (MUST BE A COccupancyGridMap2D derived class)
142  * \param m2 [IN] The second map. (MUST BE A CPointsMap derived class) The pose of this map respect to m1 is to be estimated.
143  * \param initialEstimationPDF [IN] An initial gross estimation for the displacement.
144  * \param runningTime [OUT] A pointer to a container for obtaining the algorithm running time in seconds, or NULL if you don't need it.
145  * \param info [OUT] See derived classes for details, or NULL if it isn't needed.
146  *
147  * \return A smart pointer to the output estimated pose PDF.
148  * \sa CICP
149  */
150  virtual CPose3DPDFPtr Align3DPDF(
151  const CMetricMap *m1,
152  const CMetricMap *m2,
153  const CPose3DPDFGaussian &initialEstimationPDF,
154  float *runningTime = NULL,
155  void *info = NULL ) = 0;
156 
157 
158  };
159 
160  } // End of namespace
161 } // End of namespace
162 
163 #endif



Page generated by Doxygen 1.8.3 for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013