Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
map3d.hpp
00001 /* $Id$ */
00002 
00003 #ifndef SLAM_MAP3D_HPP
00004 #define SLAM_MAP3D_HPP
00005 
00006 #ifdef HAVE_TTL
00007 
00008 #include <list>
00009 
00010 // #define DEBUG_TTL
00011 
00012 #include "HeTriang.h"
00013 #include "HeDart.h"
00014 #include "HeTraits.h"
00015 
00016 #include "jmath/jblas.hpp"
00017 #include "slam/slamEkf.hpp"
00018 #include "slam/feature.hpp"
00019 
00020 namespace jafar {
00021   namespace slam {
00022 
00023 #ifndef SWIG
00024 
00025     class Point3D : public hed::Node {
00026 
00027     private:
00028 
00029       BaseFeature::IdType id;
00030      
00031       jblas::vec3 px;
00032       jblas::sym_mat pxCov;
00033 
00034       int firstDataFrameId;
00035       int lastDataFrameId;
00036 
00037     public:
00038       
00039       Point3D();
00040       Point3D(double x_, double y_, double z_);
00041       Point3D(BaseFeature const& feature_);
00042 
00043       friend std::ostream& operator <<(std::ostream& s, Point3D const& p_);
00044       friend std::istream& operator >>(std::istream& s, Point3D& p_);
00045       friend class Map;
00046 
00047     };
00048 
00049     std::ostream& operator <<(std::ostream& s, Point3D const& p_);
00050 
00051     std::istream& operator >>(std::istream& s, Point3D& p_);
00052 
00053 #endif // SWIG
00054 
00055     class Map {
00056     public:
00057 
00058       Map(double xmin_, double ymin_, 
00059     double xmax_, double ymax_,
00060     double zref_=0.0);
00061 
00062       ~Map();
00063 
00064       typedef std::list<Point3D*>::iterator map_it;
00065       typedef std::list<Point3D*>::const_iterator map_const_it;
00066 
00067       std::list<Point3D*> pointsMap;
00068 
00069       hed::Triangulation triangulation;
00070 
00071       void add(BaseFeature const& feature);
00072       void removeBoundary();
00073       void write(std::string const& filename_) const;
00074       void writeCalife(std::string const& filename_) const;
00075 
00076       void read(std::string& filename_);
00077 
00078       //      friend std::ostream& operator <<(std::ostream& s, Map const& m_);
00079 
00080     private:
00081 
00082       hed::Dart boundaryDart;
00083 
00084     };
00085 
00086     std::ostream& operator <<(std::ostream& s, Map const& m_);
00087 
00088     std::istream& operator >>(std::istream& s, Map& m_);
00089 
00090   } // namespace slam
00091 } // namespace jafar
00092 
00093 #endif // HAVE_TTL
00094 #endif // SLAM_MAP3D_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