#include <gloveServer_impl.h>
Public Member Functions | |
gloveServer_impl (gloveID id, std::string name) | |
bool | init (std::string serialPort) |
void | join () |
bool | loadCalibFile (const char *srcFileName) |
void | start () |
void | stop () |
void | workerThread () |
this method is called by static method s_workerthread | |
~gloveServer_impl () | |
Public Attributes | |
boost::thread * | boostWorkerThread |
Thread for delivering tracker data to nCenter. | |
bool | threadRunning |
flag switching on/off thread | |
Private Member Functions | |
double | getRadian (int index, unsigned char val) |
double * | getRadianArray (unsigned char *data, unsigned int size) |
bool | permuteValues (unsigned char *valIn, unsigned char *valOut) |
permute sensor values according to GLOVERAW_MAP2_GLOVEINVENTOR mapping | |
bool | sendNotificationDataToRos (double *data, unsigned int size, asr_msgs::AsrGlove gloveData, ros::Publisher publisher) |
Send sensor data to Notification Center. | |
Private Attributes | |
std::vector< double > | FulcRad1 |
std::vector< double > | FulcRad2 |
std::vector< double > | FulcRaw1 |
std::vector< double > | FulcRaw2 |
ros::Publisher | gloveDataPub |
ros::Publisher | gloveDataPub_radian |
gloveDevice * | gloveDev |
unsigned int | GLOVERAW_MAP2_GLOVEINVENTOR [22] |
gloveID | myID |
std::string | myName |
ros::NodeHandle | rosNode |
char * | serialID |
Definition at line 49 of file gloveServer_impl.h.
gloveServer_impl::gloveServer_impl | ( | gloveID | id, |
std::string | name | ||
) |
Definition at line 37 of file gloveServer_impl.cc.
Definition at line 48 of file gloveServer_impl.cc.
double gloveServer_impl::getRadian | ( | int | index, |
unsigned char | val | ||
) | [private] |
Definition at line 268 of file gloveServer_impl.cc.
double * gloveServer_impl::getRadianArray | ( | unsigned char * | data, |
unsigned int | size | ||
) | [private] |
Definition at line 286 of file gloveServer_impl.cc.
bool gloveServer_impl::init | ( | std::string | serialPort | ) |
Definition at line 53 of file gloveServer_impl.cc.
void gloveServer_impl::join | ( | ) |
Definition at line 152 of file gloveServer_impl.cc.
bool gloveServer_impl::loadCalibFile | ( | const char * | srcFileName | ) |
remember thread state to restart it after loading in case it was running
alte Kalibrierung loeschen
check consistency
Definition at line 70 of file gloveServer_impl.cc.
bool gloveServer_impl::permuteValues | ( | unsigned char * | valIn, |
unsigned char * | valOut | ||
) | [private] |
permute sensor values according to GLOVERAW_MAP2_GLOVEINVENTOR mapping
Definition at line 254 of file gloveServer_impl.cc.
bool gloveServer_impl::sendNotificationDataToRos | ( | double * | data, |
unsigned int | size, | ||
asr_msgs::AsrGlove | gloveData, | ||
ros::Publisher | publisher | ||
) | [private] |
Send sensor data to Notification Center.
Definition at line 294 of file gloveServer_impl.cc.
void gloveServer_impl::start | ( | ) |
Definition at line 143 of file gloveServer_impl.cc.
void gloveServer_impl::stop | ( | ) |
stop thread
Definition at line 147 of file gloveServer_impl.cc.
void gloveServer_impl::workerThread | ( | ) |
this method is called by static method s_workerthread
get data from gloveDevice
permutation according to inventor model
Definition at line 175 of file gloveServer_impl.cc.
boost::thread* gloveServer_impl::boostWorkerThread |
Thread for delivering tracker data to nCenter.
Definition at line 66 of file gloveServer_impl.h.
std::vector<double> gloveServer_impl::FulcRad1 [private] |
Definition at line 84 of file gloveServer_impl.h.
std::vector<double> gloveServer_impl::FulcRad2 [private] |
Definition at line 87 of file gloveServer_impl.h.
std::vector<double> gloveServer_impl::FulcRaw1 [private] |
Calibration data. These 2 vector-pairs define 2 fulcrums for interpolation. [rawX] = digits, [radX] = radiant
Definition at line 83 of file gloveServer_impl.h.
std::vector<double> gloveServer_impl::FulcRaw2 [private] |
Definition at line 86 of file gloveServer_impl.h.
ros::Publisher gloveServer_impl::gloveDataPub [private] |
Definition at line 78 of file gloveServer_impl.h.
Definition at line 79 of file gloveServer_impl.h.
gloveDevice* gloveServer_impl::gloveDev [private] |
Definition at line 73 of file gloveServer_impl.h.
unsigned int gloveServer_impl::GLOVERAW_MAP2_GLOVEINVENTOR[22] [private] |
Definition at line 74 of file gloveServer_impl.h.
gloveID gloveServer_impl::myID [private] |
Definition at line 70 of file gloveServer_impl.h.
std::string gloveServer_impl::myName [private] |
Definition at line 71 of file gloveServer_impl.h.
ros::NodeHandle gloveServer_impl::rosNode [private] |
Definition at line 77 of file gloveServer_impl.h.
char* gloveServer_impl::serialID [private] |
Definition at line 72 of file gloveServer_impl.h.
flag switching on/off thread
Definition at line 62 of file gloveServer_impl.h.