Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
abstractMapManager.hpp
00001 /* $Id$ */
00002 
00003 #ifndef SLAM_ABSTRACT_MAP_MANAGER_HPP
00004 #define SLAM_ABSTRACT_MAP_MANAGER_HPP
00005 
00006 #include "jmath/jblas.hpp"
00007 #include "kernel/dataLog.hpp"
00008 
00009 namespace jafar {
00010   namespace slam {
00011 
00012     class SlamEkf;
00013     class DefaultMapManager;
00014     class LocalMapManager;
00015     class GlobalMapManager;
00016     class AbstractMapObject;
00017     
00023     class AbstractMapManager: public jafar::kernel::DataLoggable {
00024 
00025     protected:
00026 
00027       SlamEkf& m_slam;
00028       class Stats
00029       {
00030        public:
00031         static const int m_histo_size = 11;
00032         int m_histo[m_histo_size];
00033         int m_histo_end[m_histo_size];
00034         int compHistoBucket(int nobs);
00035 
00036         Stats();
00037         int getHistoSize() const { return m_histo_size; }
00038         int getHisto(int i) const { if (i >= m_histo_size) i = m_histo_size-1; return m_histo[i]+m_histo_end[i]; }
00039       } stats;
00040 
00041     public:
00042 
00043       AbstractMapManager(SlamEkf& slam): m_slam(slam) {}
00044 
00045       virtual ~AbstractMapManager() {};
00046 
00047       virtual void clear() = 0;
00048       virtual void setMapObjectState(AbstractMapObject& mapObj) = 0;
00049       virtual void removeMapObject(AbstractMapObject const& mapObj) = 0;
00050       virtual void endProcessObservations(unsigned int robotId_);
00051       virtual void writeLogHeader(jafar::kernel::DataLogger& log) const {};
00052       virtual void writeLogData(jafar::kernel::DataLogger& log) const {};
00053       virtual void writeLogStats(jafar::kernel::DataLogger& log) const;
00054     };
00055 
00056   }
00057 }
00058 
00059 #endif // SLAM_ABSTRACT_MAP_MANAGER_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:27 for Jafar by doxygen 1.7.6.1
LAAS-CNRS