Go to the documentation of this file.00001
00018 #ifndef TRACKER_H
00019 #define TRACKER_H
00020
00021
00022 #define DIEonERR(value) if (value<0) { \
00023 fprintf(stderr,"%i DIED in %s line %i with error %i\n",getpid(),__FILE__,__LINE__,-value);exit(1); }
00024
00025
00026 #include <string>
00027
00028
00029 #include "transformCoords.h"
00030
00031 #define KOGMO_RTDB_DONT_INCLUDE_ALL_OBJECTS
00032 #include "kogmo_rtdb.h"
00033 #include "kogmo_rtdb_obj_typeids.h"
00034
00035 #include "itec/kogmo_rtdb_obj_e1_itec.h"
00036 using namespace KogniMobil;
00037
00038
00039 typedef enum{rightTracker=1, leftTracker}trackerID;
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 class tracker_impl{
00055 public:
00056 tracker_impl(trackerID t, BirdTrack_impl* b, std::string trackerName);
00057 ~tracker_impl();
00058
00059 void start();
00060 void stop();
00061
00062 bool loadCalibFile(const char *srcFileName);
00063
00064
00065 private:
00066 trackerID myID;
00067 BirdTrack_impl* myBird;
00068 transformCoords* myTransformer;
00069 struct fulcrum{
00070 double sensorVal[3];
00071 double sensorAngle[3];
00072 double worldVal[3];
00073 double worldAngle[3];
00074 };
00075
00076 kogmo_rtdb_handle_t *dbc;
00077 kogmo_rtdb_connect_info_t dbinfo;
00078
00079 kogmo_rtdb_obj_info_t dataobj_info_data;
00080 kogmo_rtdb_obj_info_t dataobj_info_raw;
00081
00082 kogmo_rtdb_obj_e1_fobtracker_t *dataobj_data;
00083 kogmo_rtdb_obj_e1_fobtracker_t *dataobj_raw;
00084
00085 kogmo_rtdb_objid_t oid;
00086 kogmo_rtdb_objid_t pid;
00087
00089 void workerThread();
00091 bool threadRunning;
00092 bool writeNotification(kogmo_rtdb_obj_info_t &dataobj_info, double*);
00093
00095 pthread_t workerThreadHandle;
00097 static void *s_workerThread(void* arg);
00098
00099 void printFulcrum(fulcrum fulc);
00100
00101 bool loadCalibration(const fulcrum cal[255], unsigned int length);
00102
00103 };
00104
00105 #endif
asr_flock_of_birds
Author(s): Bernhardt Andre, Engelmann Stephan, Giesler Björn, Heller Florian, Jäkel Rainer, Nguyen Trung, Pardowitz Michael, Weckesser Peter, Yi Xie, Zöllner Raoul
autogenerated on Sat Jun 8 2019 19:36:21