Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
visibilityMap.hpp
Go to the documentation of this file.
00001 
00011 #ifndef VISIBILITY_MANAGER_HPP_
00012 #define VISIBILITY_MANAGER_HPP_
00013 
00014 #include <map>
00015 #include "jmath/misc.hpp"
00016 #include "jmath/jblas.hpp"
00017 #include "rtslam/rtSlam.hpp"
00018 #include "rtslam/spaceGrid.hpp"
00019 
00020 namespace jafar {
00021 namespace rtslam {
00022 
00028   class VisibilityMap
00029   {
00030     protected:
00031       struct Cell
00032       {
00033         unsigned nSuccess;
00034         unsigned nFailure;
00035         bool lastResult;
00036         unsigned lastTryFrame;
00037         Cell(): nSuccess(0), nFailure(0), lastResult(false), lastTryFrame(0) {}
00038       };
00039       SphericalGrid<Cell> grid;
00040       double nCertainty;
00041       Cell *lastCell;
00042       double lastVis, lastVisUncert;
00043     protected:
00044       Cell* getCell(const observation_ptr_t obsPtr, bool create = false);
00045     public:
00052       VisibilityMap(double angularRes, double distInit, double distFactor, int nDist, int nCertainty);
00053       VisibilityMap();
00057       void addObservation(const observation_ptr_t obsPtr);
00061       void estimateVisibility(const observation_ptr_t obsPtr, double &visibility, double &certainty);
00062       
00063       friend std::ostream& operator <<(std::ostream & s, Cell const & cell);
00064       friend std::ostream& operator <<(std::ostream & s, VisibilityMap const & vismap);
00065   };
00066   
00067 
00068 
00069 
00070 
00071 }}
00072 
00073 #endif
 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