Main MRPT website > C++ reference
MRPT logo

CMetricMapsAlignmentAlgorithm.h

Go to the documentation of this file.
00001 /* +---------------------------------------------------------------------------+
00002    |          The Mobile Robot Programming Toolkit (MRPT) C++ library          |
00003    |                                                                           |
00004    |                   http://mrpt.sourceforge.net/                            |
00005    |                                                                           |
00006    |   Copyright (C) 2005-2011  University of Malaga                           |
00007    |                                                                           |
00008    |    This software was written by the Machine Perception and Intelligent    |
00009    |      Robotics Lab, University of Malaga (Spain).                          |
00010    |    Contact: Jose-Luis Blanco  <jlblanco@ctima.uma.es>                     |
00011    |                                                                           |
00012    |  This file is part of the MRPT project.                                   |
00013    |                                                                           |
00014    |     MRPT is free software: you can redistribute it and/or modify          |
00015    |     it under the terms of the GNU General Public License as published by  |
00016    |     the Free Software Foundation, either version 3 of the License, or     |
00017    |     (at your option) any later version.                                   |
00018    |                                                                           |
00019    |   MRPT is distributed in the hope that it will be useful,                 |
00020    |     but WITHOUT ANY WARRANTY; without even the implied warranty of        |
00021    |     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         |
00022    |     GNU General Public License for more details.                          |
00023    |                                                                           |
00024    |     You should have received a copy of the GNU General Public License     |
00025    |     along with MRPT.  If not, see <http://www.gnu.org/licenses/>.         |
00026    |                                                                           |
00027    +---------------------------------------------------------------------------+ */
00028 #ifndef CMetricMapsAlignmentAlgorithm_H
00029 #define CMetricMapsAlignmentAlgorithm_H
00030 
00031 #include <mrpt/slam/CPointsMap.h>
00032 #include <mrpt/poses/CPose2D.h>
00033 #include <mrpt/poses/CPosePDF.h>
00034 #include <mrpt/poses/CPose3DPDF.h>
00035 #include <mrpt/poses/CPosePDFGaussian.h>
00036 #include <mrpt/poses/CPose3DPDFGaussian.h>
00037 
00038 #include <mrpt/utils/CDebugOutputCapable.h>
00039 
00040 #include <mrpt/slam/link_pragmas.h>
00041 
00042 namespace mrpt
00043 {
00044 namespace slam
00045 {
00046         /** A base class for any algorithm able of maps alignment. There are two methods
00047          *   depending on an PDF or a single 2D Pose value is available as initial guess for the methods.
00048      *
00049          * \sa CPointsMap, utils::CDebugOutputCapable
00050          */
00051         class SLAM_IMPEXP  CMetricMapsAlignmentAlgorithm : public mrpt::utils::CDebugOutputCapable
00052         {
00053         public:
00054         /** Destructor
00055           */
00056         virtual ~CMetricMapsAlignmentAlgorithm()
00057         {
00058         }
00059 
00060                 /** The method for aligning a pair of metric maps, aligning only 2D + orientation.
00061                  *   The meaning of some parameters and the kind of the maps to be aligned are implementation dependant,
00062                  *    so look into the derived classes for instructions.
00063                  *  The target is to find a PDF for the pose displacement between
00064                  *   maps, <b>thus the pose of m2 relative to m1</b>. This pose
00065                  *   is returned as a PDF rather than a single value.
00066                  *
00067                  * \param m1                    [IN] The first map
00068                  * \param m2                    [IN] The second map. The pose of this map respect to m1 is to be estimated.
00069                  * \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.
00070                  * \param runningTime   [OUT] A pointer to a container for obtaining the algorithm running time in seconds, or NULL if you don't need it.
00071                  * \param info                  [OUT] See derived classes for details, or NULL if it isn't needed.
00072                  *
00073                  * \return A smart pointer to the output estimated pose PDF.
00074                  * \sa CICP
00075                  */
00076                 CPosePDFPtr Align(
00077                                 const CMetricMap                *m1,
00078                                 const CMetricMap                *m2,
00079                                 const CPose2D                   &grossEst,
00080                                 float                                   *runningTime = NULL,
00081                                 void                                    *info = NULL );
00082 
00083         /** The virtual method for aligning a pair of metric maps, aligning only 2D + orientation.
00084                  *   The meaning of some parameters are implementation dependant,
00085                  *    so look at the derived classes for more details.
00086                  *  The goal is to find a PDF for the pose displacement between
00087                  *   maps, that is, <b>the pose of m2 relative to m1</b>. This pose
00088                  *   is returned as a PDF rather than a single value.
00089                  *
00090                  *  \note This method can be configurated with a "options" structure in the implementation classes.
00091                  *
00092                  * \param m1                    [IN] The first map (MUST BE A COccupancyGridMap2D  derived class)
00093                  * \param m2                    [IN] The second map. (MUST BE A CPointsMap derived class) The pose of this map respect to m1 is to be estimated.
00094                  * \param initialEstimationPDF  [IN] An initial gross estimation for the displacement.
00095                  * \param runningTime   [OUT] A pointer to a container for obtaining the algorithm running time in seconds, or NULL if you don't need it.
00096                  * \param info                  [OUT] See derived classes for details, or NULL if it isn't needed.
00097                  *
00098                  * \return A smart pointer to the output estimated pose PDF.
00099                  * \sa CICP
00100                  */
00101                 virtual CPosePDFPtr AlignPDF(
00102                                 const CMetricMap                *m1,
00103                                 const CMetricMap                *m2,
00104                                 const CPosePDFGaussian  &initialEstimationPDF,
00105                                 float                                   *runningTime = NULL,
00106                                 void                                    *info = NULL ) = 0;
00107 
00108 
00109                 /** The method for aligning a pair of metric maps, aligning the full 6D pose.
00110                  *   The meaning of some parameters and the kind of the maps to be aligned are implementation dependant,
00111                  *    so look into the derived classes for instructions.
00112                  *  The target is to find a PDF for the pose displacement between
00113                  *   maps, <b>thus the pose of m2 relative to m1</b>. This pose
00114                  *   is returned as a PDF rather than a single value.
00115                  *
00116                  * \param m1                    [IN] The first map
00117                  * \param m2                    [IN] The second map. The pose of this map respect to m1 is to be estimated.
00118                  * \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.
00119                  * \param runningTime   [OUT] A pointer to a container for obtaining the algorithm running time in seconds, or NULL if you don't need it.
00120                  * \param info                  [OUT] See derived classes for details, or NULL if it isn't needed.
00121                  *
00122                  * \return A smart pointer to the output estimated pose PDF.
00123                  * \sa CICP
00124                  */
00125                 CPose3DPDFPtr Align3D(
00126                                 const CMetricMap                *m1,
00127                                 const CMetricMap                *m2,
00128                                 const CPose3D                   &grossEst,
00129                                 float                                   *runningTime = NULL,
00130                                 void                                    *info = NULL );
00131 
00132         /** The virtual method for aligning a pair of metric maps, aligning the full 6D pose.
00133                  *   The meaning of some parameters are implementation dependant,
00134                  *    so look at the derived classes for more details.
00135                  *  The goal is to find a PDF for the pose displacement between
00136                  *   maps, that is, <b>the pose of m2 relative to m1</b>. This pose
00137                  *   is returned as a PDF rather than a single value.
00138                  *
00139                  *  \note This method can be configurated with a "options" structure in the implementation classes.
00140                  *
00141                  * \param m1                    [IN] The first map (MUST BE A COccupancyGridMap2D  derived class)
00142                  * \param m2                    [IN] The second map. (MUST BE A CPointsMap derived class) The pose of this map respect to m1 is to be estimated.
00143                  * \param initialEstimationPDF  [IN] An initial gross estimation for the displacement.
00144                  * \param runningTime   [OUT] A pointer to a container for obtaining the algorithm running time in seconds, or NULL if you don't need it.
00145                  * \param info                  [OUT] See derived classes for details, or NULL if it isn't needed.
00146                  *
00147                  * \return A smart pointer to the output estimated pose PDF.
00148                  * \sa CICP
00149                  */
00150                 virtual CPose3DPDFPtr Align3DPDF(
00151                                 const CMetricMap                *m1,
00152                                 const CMetricMap                *m2,
00153                                 const CPose3DPDFGaussian        &initialEstimationPDF,
00154                                 float                                   *runningTime = NULL,
00155                                 void                                    *info = NULL ) = 0;
00156 
00157 
00158         };
00159 
00160         } // End of namespace
00161 } // End of namespace
00162 
00163 #endif



Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN:exported at Tue Jan 25 21:56:31 UTC 2011