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



Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011