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



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