Main MRPT website > C++ reference
MRPT logo

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



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