Main Page
Classes
Files
File List
File Members
include
include/tracker_impl.h
Go to the documentation of this file.
1
18
#ifndef TRACKER_H
19
#define TRACKER_H
20
21
//MACROS
22
#define DIEonERR(value) if (value<0) { \
23
fprintf(stderr,"%i DIED in %s line %i with error %i\n",getpid(),__FILE__,__LINE__,-value);exit(1); }
24
25
/* system includes */
26
#include <string>
27
28
/* my includes */
29
#include "
ros/ros.h
"
30
#include <geometry_msgs/Pose.h>
31
#include <
tf/transform_broadcaster.h
>
32
#include <asr_msgs/AsrObject.h>
33
34
#include "
transform_coords.h
"
35
36
typedef
enum
{
rightTracker
=1,
leftTracker
}
trackerID
;
37
38
//for reference purposes: the old data structure
39
/*
40
// Definition of a calibration data set
41
struct fulcrum{
42
double sensorVal[3];
43
double sensorAngle[3];
44
double worldVal[3];
45
double worldAngle[3];
46
};
47
//typedef sequence<fulcrum> oneSensorCal;
48
typedef sequence<fulcrum> allSensorCal;
49
*/
50
51
class
tracker_impl
{
52
public
:
53
tracker_impl
(
trackerID
t,
BirdTrack_impl
* b, std::string trackerName);
54
~tracker_impl
();
55
56
void
start
();
57
void
stop
();
58
59
bool
loadCalibFile
(
const
char
*srcFileName);
60
61
62
private
:
63
trackerID
myID
;
64
BirdTrack_impl
*
myBird
;
65
transformCoords
*
myTransformer
;
66
unsigned
int
seqId
;
67
68
struct
fulcrum
{
69
double
sensorVal
[3];
70
double
sensorAngle
[3];
71
double
worldVal
[3];
72
double
worldAngle
[3];
73
};
74
76
void
workerThread
();
78
bool
threadRunning
;
79
bool
writeNotification
(
trackerID
id
,
double
* raw,
double
*
calibrated
);
80
82
pthread_t
workerThreadHandle
;
84
static
void
*
s_workerThread
(
void
* arg);
85
86
void
printFulcrum
(
fulcrum
fulc);
87
88
bool
loadCalibration
(
const
fulcrum
cal[255],
unsigned
int
length);
89
90
void
getPbdObject
(std::string name,
double
*
data
, asr_msgs::AsrObject &
object
);
91
void
getTransform
(
double
*
data
,
tf::Transform
&transform);
92
93
tf::TransformBroadcaster
transformPublisher
;
94
ros::NodeHandle
node
;
95
ros::Publisher
generalPublisher
;
96
};
97
98
#endif
/* TRACKER_H */
tracker_impl::node
ros::NodeHandle node
Definition:
include/tracker_impl.h:94
tracker_impl::getPbdObject
void getPbdObject(std::string name, double *data, asr_msgs::AsrObject &object)
Definition:
src/tracker_impl.cc:249
ros::NodeHandle
transformCoords
Definition:
transform_coords.h:31
tracker_impl::stop
void stop()
Definition:
kogmo_fob/trackerServer/tracker_impl.cc:205
tracker_impl::threadRunning
bool threadRunning
flag switching on/off thread
Definition:
include/tracker_impl.h:78
tracker_impl::myID
trackerID myID
Definition:
include/tracker_impl.h:63
transform_broadcaster.h
tracker_impl::getTransform
void getTransform(double *data, tf::Transform &transform)
Definition:
src/tracker_impl.cc:296
tracker_impl::fulcrum::worldAngle
double worldAngle[3]
Definition:
include/tracker_impl.h:72
tracker_impl::workerThread
void workerThread()
this method is called by static method s_workerthread
Definition:
kogmo_fob/trackerServer/tracker_impl.cc:126
tracker_impl::s_workerThread
static void * s_workerThread(void *arg)
Thread is bound to this method.
Definition:
kogmo_fob/trackerServer/tracker_impl.cc:93
tracker_impl::fulcrum::worldVal
double worldVal[3]
Definition:
include/tracker_impl.h:71
tracker_impl::start
void start()
Definition:
kogmo_fob/trackerServer/tracker_impl.cc:190
tracker_impl::loadCalibration
bool loadCalibration(const fulcrum cal[255], unsigned int length)
Definition:
kogmo_fob/trackerServer/tracker_impl.cc:287
tracker_impl::fulcrum::sensorAngle
double sensorAngle[3]
Definition:
include/tracker_impl.h:70
trackerID
trackerID
Definition:
include/tracker_impl.h:36
tracker_impl::transformPublisher
tf::TransformBroadcaster transformPublisher
Definition:
include/tracker_impl.h:93
tracker_impl::loadCalibFile
bool loadCalibFile(const char *srcFileName)
Definition:
kogmo_fob/trackerServer/tracker_impl.cc:215
tracker_impl::tracker_impl
tracker_impl(trackerID t, BirdTrack_impl *b, std::string trackerName)
Definition:
kogmo_fob/trackerServer/tracker_impl.cc:42
tracker_impl::printFulcrum
void printFulcrum(fulcrum fulc)
Definition:
kogmo_fob/trackerServer/tracker_impl.cc:279
tf::Transform
tracker_impl
Definition:
include/tracker_impl.h:51
tracker_impl::seqId
unsigned int seqId
Definition:
include/tracker_impl.h:66
tracker_impl::workerThreadHandle
pthread_t workerThreadHandle
Thread for delivering tracker data to nCenter.
Definition:
include/tracker_impl.h:82
tracker_impl::writeNotification
bool writeNotification(trackerID id, double *raw, double *calibrated)
Definition:
src/tracker_impl.cc:303
transform_coords.h
leftTracker
Definition:
include/tracker_impl.h:36
ros.h
tracker_impl::myBird
BirdTrack_impl * myBird
Definition:
include/tracker_impl.h:64
tracker_impl::generalPublisher
ros::Publisher generalPublisher
Definition:
include/tracker_impl.h:95
BirdTrack_impl
Definition:
bird_track_impl.h:30
rightTracker
Definition:
include/tracker_impl.h:36
ros::Publisher
calibrated
bool calibrated
Definition:
transformCoords.cc:37
tracker_impl::fulcrum
Definition:
include/tracker_impl.h:68
tracker_impl::~tracker_impl
~tracker_impl()
Definition:
kogmo_fob/trackerServer/tracker_impl.cc:80
tracker_impl::fulcrum::sensorVal
double sensorVal[3]
Definition:
include/tracker_impl.h:69
tf::TransformBroadcaster
data
Definition:
BirdTrack_impl.cc:49
tracker_impl::myTransformer
transformCoords * myTransformer
Definition:
include/tracker_impl.h:65
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 Mon Jun 10 2019 12:44:40