Main MRPT website > C++ reference
MRPT logo

CTopLCDetector_GridMatching.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 
00029 #ifndef _CTopLCDetector_GridMatching_H
00030 #define _CTopLCDetector_GridMatching_H
00031 
00032 #include <mrpt/hmtslam/CTopLCDetectorBase.h>
00033 #include <mrpt/slam/CGridMapAligner.h>
00034 
00035 namespace mrpt
00036 {
00037         namespace hmtslam
00038         {
00039                 using namespace mrpt::slam;
00040 
00041                 class HMTSLAM_IMPEXP CTopLCDetector_GridMatching : public CTopLCDetectorBase
00042                 {
00043                 protected:
00044                         CTopLCDetector_GridMatching( CHMTSLAM *hmtslam );
00045 
00046                 public:
00047                         /** A class factory, to be implemented in derived classes.
00048                           */
00049                         static CTopLCDetectorBase* createNewInstance( CHMTSLAM *hmtslam )
00050                         {
00051                                 return static_cast<CTopLCDetectorBase*>(new CTopLCDetector_GridMatching(hmtslam));
00052                         }
00053 
00054                         /** Destructor */
00055                         virtual ~CTopLCDetector_GridMatching();
00056 
00057                         /** This method must compute the topological observation model.
00058                           * \param out_log_lik The output, a log-likelihood.
00059                           * \return NULL, or a PDF of the estimated translation between the two areas (should be a SOG PDF): it's the pose of "refArea", relative to "currentArea".
00060                           */
00061                         CPose3DPDFPtr computeTopologicalObservationModel(
00062                                 const THypothesisID             &hypID,
00063                                 const CHMHMapNodePtr    &currentArea,
00064                                 const CHMHMapNodePtr    &refArea,
00065                                 double                                  &out_log_lik
00066                                  );
00067 
00068                         /** Hook method for being warned about the insertion of a new poses into the maps.
00069                           *  This should be independent of hypothesis IDs.
00070                           */
00071                         void OnNewPose(
00072                                 const TPoseID                   &poseID,
00073                                 const CSensoryFrame             *SF );
00074 
00075 
00076                         /** Options for a TLC-detector of type gridmap-matching, used from CHMTSLAM 
00077                           */
00078                         struct TOptions : public utils::CLoadableOptions
00079                         {
00080                                 /** Initialization of default params
00081                                   */
00082                                 TOptions();
00083 
00084 
00085                                 /** Options for the grid-to-grid matching algorithm */
00086                                 mrpt::slam::CGridMapAligner::TConfigParams      matchingOptions;
00087 
00088                                 /** Load parameters from configuration source
00089                                   */
00090                                 void  loadFromConfigFile(
00091                                         const mrpt::utils::CConfigFileBase      &source,
00092                                         const std::string               &section);
00093 
00094                                 /** This method must display clearly all the contents of the structure in textual form, sending it to a CStream.
00095                                   */
00096                                 void  dumpToTextStream(CStream  &out) const;
00097 
00098                         };
00099 
00100                 }; // end class
00101 
00102         } // end namespace
00103 } // end namespace
00104 
00105 
00106 #endif



Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:40:17 UTC 2011