OfflineMR.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00029
00030
00031 #ifndef __OFFLINE_MR_H_
00032 #define __OFFLINE_MR_H_
00033
00034
00035 #include <MRControlInput.h>
00036 #include <MotionModule.h>
00037 #include <SimTime.h>
00038
00039 namespace MipResources{
00040
00041
00043
00044
00045
00046 class OfflineMR: public MIPObject{
00047 private:
00048 int _counterTState;
00049 int _counterProtrusions;
00050 int _counterPrevControlInput;
00051 int _counterControlInput;
00052 int _counterCamObs;
00053 int _counter3DObs;
00054 int _counterGaussianMixtureJointId;
00055 int _counterTrueTStates;
00056
00057 int _id;
00058
00059
00060 string _folder;
00061 string _TStateFile;
00062 string _protrusionsFile;
00063 string _camObsFile;
00064 string _gaussianMixtureJointIdFile;
00065 string _controlIputFile;
00066 string _truthFile;
00067 string _truthTSFile;
00068
00069
00070 void _readTStateFile();
00071
00072 void _readFeatSetFile();
00073
00074 void _readControlInputFile();
00075
00076 void _readGaussianMixtureFile();
00077
00078 void _readTruthFile(const int &opt);
00079
00080 public:
00081
00082 vector<PosiFeatures> _myProtrusions;
00083 vector<MotionModuleTState> _myProtrusionsTStates;
00084
00085 vector< vector <Angle> > _myCamObs;
00086 vector<MotionModuleTState> _myCamObsTStates;
00087
00088 vector<MotionModuleTState> _myTStates;
00089
00090 vector<MotionModuleTState> _myTrueTStates;
00091
00092 vector<string> _myGaussianMixtureJointId;
00093 vector<MotionModuleTState> _myGaussianMixtureJointIdTStates;
00094
00095 vector<MRControlInput> _myControlInput;
00096
00097 vector<MipBaselib::PosiFeatures3DTimeArma > _my3DObs;
00098
00099 map<int,vector< MipBaselib::Position3DTimeArma > > _my3DTempObs;
00100
00102 Decimal _startingTime;
00104 bool _firstValidFile;
00105
00107 OfflineMR();
00108
00110 OfflineMR(const int id, const string fol, const string tst, const string pro, const string cao, const string gam, const string coi, const string tru, const string trt, const int >Load);
00111
00117 bool getMyProtrusions(Time &instant, MotionModuleTState &myPTstate, PosiFeatures &pf);
00118
00124 bool getMyCamObs(Time &instant, MotionModuleTState &myCTstate, vector<Angle> &co);
00125
00131 bool getMy3DCamObs(Time &instant, PosiFeatures3DTimeArma &co,int &index);
00132
00136 bool getMyTState(Time &instant, MotionModuleTState &myTState);
00137
00142 bool getMyGaussianMixtureJointId(Time &instant, MotionModuleTState &myGTstate, string &myGMJI);
00143
00148 bool getMyControlInputs(Time &instant, Time &prevInstant, MRControlInputs &myCI);
00149
00154 bool getMyTrueTState(Time &instant, MotionModuleTState &myTrueTState,int* index = NULL);
00155
00161 void getMyTrueTState(MotionModuleTState &myPose, const int &index);
00162
00164 string getObjectName() const{
00165 return "OfflineMobileRobot";
00166 }
00167
00168 void compute3DCamObsStatic(Roto3DArma &_rotoFakeGroundTruthCamTrans, Position3DArma &_traslFakeGroundTruthCam, OfflineMR &_my3DObs);
00169
00170 void compute3DCamObs(Roto3DArma &_rotoFakeGroundTruthCamTrans, Position3DArma &_traslFakeGroundTruthCam, OfflineMR &_my3DObs, int i);
00171 };
00172
00173
00174
00175 };
00176
00177
00178
00179 #endif
00180
00181
00182
00183
00184