Jafar
|
00001 #ifndef GRAPHPROPERTIES_HPP 00002 #define GRAPHPROPERTIES_HPP 00003 00004 #include <graphmap/transformation.hpp> 00005 #include <kernel/IdFactory.hpp> 00006 00007 namespace jafar{ 00008 namespace graphmap { 00009 00010 typedef unsigned int RobotId; 00011 typedef unsigned int MapId; 00012 typedef typename std::pair<RobotId, MapId> Vertex; 00013 typedef typename std::pair<Vertex, Vertex> Edge; 00014 00015 struct Graph_Properties 00016 { 00017 typedef unsigned int loop_id_t; 00018 00019 Graph_Properties() : 00020 loopIdFactory() { } 00021 00022 kernel::IdFactory<loop_id_t, kernel::IdCollectorNone> loopIdFactory; 00023 }; 00024 00025 struct Edge_Properties 00026 { 00027 Edge_Properties(); 00028 Edge_Properties(Transformation t); 00029 00030 void setTf(Transformation t); 00031 void setTf(jblas::vec7 x, jblas::sym_mat P); 00032 00033 Transformation getTf() const; 00034 Transformation getTfBase() const; 00035 00036 private: 00037 Transformation tf; 00038 Transformation base_tf; 00039 double time_last_update; 00040 bool initialized; 00041 00042 public: 00043 double uncertainty; 00044 std::vector<Graph_Properties::loop_id_t> loop_ids; 00045 00046 }; 00047 00048 struct Vertex_Properties 00049 { 00050 Vertex_Properties(); 00051 Vertex_Properties(Transformation t); 00052 00053 void setId(RobotId robot, MapId map); 00054 void setId(Vertex id); 00055 void setFrame(jblas::vec7 x, jblas::sym_mat P); 00056 void setFrame(Transformation t); 00057 00058 void getId(RobotId &robot, MapId &map) const; 00059 Vertex getId() const; 00060 00061 Transformation getFrame() const; 00062 00063 private: 00064 unsigned int robot_id; 00065 unsigned int map_id; 00066 Transformation frame; 00067 double time_last_update; 00068 }; 00069 00070 } 00071 } 00072 00073 #endif // GRAPHPROPERTIES_HPP
Generated on Wed Oct 15 2014 00:37:20 for Jafar by doxygen 1.7.6.1 |