PoseFeatures.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
00026
00030
00032
00033
00034
00035 #ifndef __POSE_FEATURES_H_
00036 #define __POSE_FEATURES_H_
00037
00038 #ifdef MIP_HOST_APPLE
00039 #include <applePatch.h>
00040 #endif
00041
00042 #include <stdio.h>
00043 #include <math.h>
00044 #include <vector>
00045 #include <iostream>
00046 #include <string>
00047 #include <sstream>
00048 #include <sys/time.h>
00049 #include <sys/select.h>
00050 #include <assert.h>
00051
00052 #ifdef FOUND_BOOST_SER
00053 #include <boost/serialization/vector.hpp>
00054 #include <boost/archive/text_iarchive.hpp>
00055 #include <boost/archive/text_oarchive.hpp>
00056 #endif
00057
00058 #include <Types.h>
00059
00060 #include <SE2.h>
00061 #include <R2Arma.h>
00062
00063 using namespace std;
00064
00065
00066
00072 class PoseFeature : public Association<Pose,int>{
00073 private:
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083 public:
00084
00085
00088 PoseFeature() : Association<Pose,int>(){}
00089
00093 PoseFeature (Pose p) : Association<Pose,int>(p){}
00094
00099 PoseFeature (Pose p, int i) : Association<Pose,int>(p,i){}
00100
00102 PoseFeature (const PoseFeature& f) : Association<Pose,int>(f){};
00103
00105 using Association<Pose,int>::operator=;
00106
00109 Pose getPose(void){
00110 return getObj();
00111 }
00114 int getId(void){
00115 return getAsso();
00116 }
00119 void setId(int a){
00120 associate(a);
00121 }
00122
00125 string print(){
00126 stringstream s;
00127 if(associated()){
00128 s << "[" << getPose().print() << "," << getId() << "]";
00129 }else{
00130 s << "[" << getPose().print() << ",na]";
00131 }
00132 return s.str();
00133 }
00134
00139 bool notEqual(PoseFeature &pose, Decimal toll);
00140 };
00141
00142
00146
00147 class PoseFeatures:public vector<PoseFeature> {
00148 public:
00153 bool find(int id, Pose& pose);
00154
00155 bool find(int id, Pose& pose, int &pos);
00156 };
00157
00158
00159
00160
00161
00162
00163
00164
00165 #endif
00166
00167
00168
00169