00001 /* +---------------------------------------------------------------------------+ 00002 | The Mobile Robot Programming Toolkit (MRPT) C++ library | 00003 | | 00004 | http://mrpt.sourceforge.net/ | 00005 | | 00006 | Copyright (C) 2005-2009 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 namespace mrpt 00041 { 00042 namespace slam 00043 { 00044 /** A base class for any algorithm able of maps alignment. There are two methods 00045 * depending on an PDF or a single 2D Pose value is available as initial guess for the methods. 00046 * 00047 * \sa CPointsMap, utils::CDebugOutputCapable 00048 */ 00049 class MRPTDLLIMPEXP CMetricMapsAlignmentAlgorithm : public mrpt::utils::CDebugOutputCapable 00050 { 00051 public: 00052 /** Destructor 00053 */ 00054 virtual ~CMetricMapsAlignmentAlgorithm() 00055 { 00056 } 00057 00058 /** The method for aligning a pair of metric maps, aligning only 2D + orientation. 00059 * The meaning of some parameters and the kind of the maps to be aligned are implementation dependant, 00060 * so look into the derived classes for instructions. 00061 * The target is to find a PDF for the pose displacement between 00062 * maps, <b>thus the pose of m2 relative to m1</b>. This pose 00063 * is returned as a PDF rather than a single value. 00064 * 00065 * \param m1 [IN] The first map 00066 * \param m2 [IN] The second map. The pose of this map respect to m1 is to be estimated. 00067 * \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. 00068 * \param runningTime [OUT] A pointer to a container for obtaining the algorithm running time in seconds, or NULL if you don't need it. 00069 * \param info [OUT] See derived classes for details, or NULL if it isn't needed. 00070 * 00071 * \return A smart pointer to the output estimated pose PDF. 00072 * \sa CICP 00073 */ 00074 CPosePDFPtr Align( 00075 const CMetricMap *m1, 00076 const CMetricMap *m2, 00077 const CPose2D &grossEst, 00078 float *runningTime = NULL, 00079 void *info = NULL ); 00080 00081 /** The virtual method for aligning a pair of metric maps, aligning only 2D + orientation. 00082 * The meaning of some parameters are implementation dependant, 00083 * so look at the derived classes for more details. 00084 * The goal is to find a PDF for the pose displacement between 00085 * maps, that is, <b>the pose of m2 relative to m1</b>. This pose 00086 * is returned as a PDF rather than a single value. 00087 * 00088 * \note This method can be configurated with a "options" structure in the implementation classes. 00089 * 00090 * \param m1 [IN] The first map (MUST BE A COccupancyGridMap2D derived class) 00091 * \param m2 [IN] The second map. (MUST BE A CPointsMap derived class) The pose of this map respect to m1 is to be estimated. 00092 * \param initialEstimationPDF [IN] An initial gross estimation for the displacement. 00093 * \param runningTime [OUT] A pointer to a container for obtaining the algorithm running time in seconds, or NULL if you don't need it. 00094 * \param info [OUT] See derived classes for details, or NULL if it isn't needed. 00095 * 00096 * \return A smart pointer to the output estimated pose PDF. 00097 * \sa CICP 00098 */ 00099 virtual CPosePDFPtr AlignPDF( 00100 const CMetricMap *m1, 00101 const CMetricMap *m2, 00102 const CPosePDFGaussian &initialEstimationPDF, 00103 float *runningTime = NULL, 00104 void *info = NULL ) = 0; 00105 00106 00107 /** The method for aligning a pair of metric maps, aligning the full 6D pose. 00108 * The meaning of some parameters and the kind of the maps to be aligned are implementation dependant, 00109 * so look into the derived classes for instructions. 00110 * The target is to find a PDF for the pose displacement between 00111 * maps, <b>thus the pose of m2 relative to m1</b>. This pose 00112 * is returned as a PDF rather than a single value. 00113 * 00114 * \param m1 [IN] The first map 00115 * \param m2 [IN] The second map. The pose of this map respect to m1 is to be estimated. 00116 * \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. 00117 * \param runningTime [OUT] A pointer to a container for obtaining the algorithm running time in seconds, or NULL if you don't need it. 00118 * \param info [OUT] See derived classes for details, or NULL if it isn't needed. 00119 * 00120 * \return A smart pointer to the output estimated pose PDF. 00121 * \sa CICP 00122 */ 00123 CPose3DPDFPtr Align3D( 00124 const CMetricMap *m1, 00125 const CMetricMap *m2, 00126 const CPose3D &grossEst, 00127 float *runningTime = NULL, 00128 void *info = NULL ); 00129 00130 /** The virtual method for aligning a pair of metric maps, aligning the full 6D pose. 00131 * The meaning of some parameters are implementation dependant, 00132 * so look at the derived classes for more details. 00133 * The goal is to find a PDF for the pose displacement between 00134 * maps, that is, <b>the pose of m2 relative to m1</b>. This pose 00135 * is returned as a PDF rather than a single value. 00136 * 00137 * \note This method can be configurated with a "options" structure in the implementation classes. 00138 * 00139 * \param m1 [IN] The first map (MUST BE A COccupancyGridMap2D derived class) 00140 * \param m2 [IN] The second map. (MUST BE A CPointsMap derived class) The pose of this map respect to m1 is to be estimated. 00141 * \param initialEstimationPDF [IN] An initial gross estimation for the displacement. 00142 * \param runningTime [OUT] A pointer to a container for obtaining the algorithm running time in seconds, or NULL if you don't need it. 00143 * \param info [OUT] See derived classes for details, or NULL if it isn't needed. 00144 * 00145 * \return A smart pointer to the output estimated pose PDF. 00146 * \sa CICP 00147 */ 00148 virtual CPose3DPDFPtr Align3DPDF( 00149 const CMetricMap *m1, 00150 const CMetricMap *m2, 00151 const CPose3DPDFGaussian &initialEstimationPDF, 00152 float *runningTime = NULL, 00153 void *info = NULL ) = 0; 00154 00155 00156 }; 00157 00158 } // End of namespace 00159 } // End of namespace 00160 00161 #endif
Page generated by Doxygen 1.5.9 for MRPT 0.7.1 SVN: at Mon Aug 17 22:20:53 EDT 2009 |