Go to the documentation of this file.00001
00009 #ifndef DISPLAY_GDHE__HPP_
00010 #define DISPLAY_GDHE__HPP_
00011 #ifdef HAVE_MODULE_GDHE
00012
00013 #include "rtslam/display.hpp"
00014 #include "gdhe/client.hpp"
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 namespace jafar {
00037 namespace rtslam {
00038 namespace display {
00039
00040 class WorldGdhe;
00041 class MapGdhe;
00042 class RobotGdhe;
00043 class SensorGdhe;
00044 class LandmarkGdhe;
00045 class ObservationGdhe;
00046
00047 class ViewerGdhe: public Viewer<WorldGdhe,MapGdhe,RobotGdhe,SensorGdhe,LandmarkGdhe,ObservationGdhe,
00048 boost::variant<gdhe::Object*> >
00049 {
00050 public:
00051 double ellipsesScale;
00052 std::string robot_model;
00053 gdhe::Client client;
00054 double extent;
00055 public:
00056 ViewerGdhe(std::string _robot_model = "", double _ellipsesScale = 3.0, std::string _host="localhost"):
00057 ellipsesScale(_ellipsesScale), robot_model(_robot_model), client(_host)
00058 {
00059 client.launch_server();
00060 client.connect();
00061 client.clear();
00062 client.setCameraTarget(0.04,0,0.15);
00063 client.setCameraPos(80, 20, 0.5);
00064 }
00065 void setConvertTempPath(std::string path) { client.setConvertTempPath(path); }
00066 void dump(std::string filename)
00067 {
00068 client.dump(filename);
00069 }
00070 };
00071
00072
00073 class WorldGdhe : public WorldDisplay
00074 {
00075 ViewerGdhe *viewerGdhe;
00076 public:
00077 WorldGdhe(ViewerAbstract *viewer_, rtslam::WorldAbstract *_slamWor, WorldDisplay *garbage);
00078 void bufferize() {}
00079 void render() {}
00080 };
00081
00082 class MapGdhe : public MapDisplay
00083 {
00084
00085 jblas::vec poseQuat;
00086
00087 ViewerGdhe *viewerGdhe;
00088 gdhe::Frame *frame;
00089 public:
00090 MapGdhe(ViewerAbstract *viewer_, rtslam::MapAbstract *_slamMap, WorldGdhe *_dispWorld);
00091 ~MapGdhe();
00092 void bufferize();
00093 void render();
00094 };
00095
00096 class RobotGdhe : public RobotDisplay
00097 {
00098
00099 jblas::vec poseQuat;
00100 jblas::sym_mat poseQuatUncert;
00101
00102 ViewerGdhe *viewerGdhe;
00103 gdhe::Robot *robot;
00104 gdhe::EllipsoidWire *uncertEll;
00105 gdhe::Trajectory *traj;
00106 public:
00107 RobotGdhe(ViewerAbstract *viewer_, rtslam::RobotAbstract *_slamRob, MapGdhe *_dispMap);
00108 ~RobotGdhe();
00109 void bufferize();
00110 void render();
00111 };
00112
00113 class SensorGdhe : public SensorDisplay
00114 {
00115 ViewerGdhe *viewerGdhe;
00116 public:
00117 SensorGdhe(ViewerAbstract *viewer_, rtslam::SensorExteroAbstract *_slamSen, RobotGdhe *_dispRob);
00118 void bufferize() {}
00119 void render() {}
00120 };
00121
00122 class LandmarkGdhe : public LandmarkDisplay
00123 {
00124
00125 ObservationAbstract::Events events_;
00126
00127
00128
00129
00130
00131
00132 jblas::vec state_;
00133 jblas::sym_mat cov_;
00134 unsigned int id_;
00135 LandmarkAbstract::type_enum lmkType_;
00136
00137 ViewerGdhe *viewerGdhe;
00138 typedef std::list<gdhe::Object*> ItemList;
00139 ItemList items_;
00140 public:
00141 LandmarkGdhe(ViewerAbstract *viewer_, rtslam::LandmarkAbstract *_slamLmk, MapGdhe *_dispMap);
00142 ~LandmarkGdhe();
00143 void bufferize();
00144 void render();
00145 };
00146
00147 class ObservationGdhe : public ObservationDisplay
00148 {
00149 ViewerGdhe *viewerGdhe;
00150 public:
00151 ObservationGdhe(ViewerAbstract *viewer_, rtslam::ObservationAbstract *_slamObs, SensorGdhe *_dispSen);
00152 void bufferize() {}
00153 void render() {}
00154 };
00155
00156
00157 }}}
00158
00159 #endif
00160 #endif
00161