Inheritance diagram for DataCollector:
This operator has been tested to output images at 30 fps.
Definition at line 21 of file DataCollector.H.
Public Member Functions | |
DataCollector (std::string pName) | |
~DataCollector () | |
void | initOperator () |
All Capability registration calls should be made in this operator, along with any other initialization. | |
void | runOperator (WURDE::WURDEImage image, WURDE::WURDEImage stereo) |
The main method for the class if the operator is stereo. | |
void | runOperator (WURDE::WURDEImage someImage) |
The main method for the class if the operator is monocular. | |
void | quitOperator () |
Cleanup function. | |
void | fileWriterThread1 () |
void | fileWriterThread2 () |
void | fileWriterThread3 () |
Protected Attributes | |
WURDE::RangeFinder | m_myRF |
WURDE::PTUnit | m_myPTU |
std::ofstream | m_outfile |
std::string | m_outfilename |
pthread_t | thread1 |
pthread_t | thread2 |
pthread_t | thread3 |
WURDE::RunState | t1state |
WURDE::RunState | t2state |
WURDE::RunState | t3state |
bool | m_newt1image |
bool | m_newt2image |
bool | m_newt3image |
WURDE::Time | t1time |
WURDE::Time | t2time |
WURDE::Time | t3time |
IplImage * | m_t1image |
IplImage * | m_t2image |
IplImage * | m_t3image |
int | next |
std::string | m_imageDir |
std::string | m_imagePrefix |
DataCollector | ( | std::string | pName | ) |
Definition at line 11 of file DataCollector.cpp.
References DataCollector::m_myPTU, DataCollector::m_myRF, and VisionOperator::registerConsumer().
~DataCollector | ( | ) |
void initOperator | ( | ) | [virtual] |
All Capability registration calls should be made in this operator, along with any other initialization.
The visionModule will then register the objects with the CommsManager. All WURDE should be members of the class and *not* allocated dynamically.
Implements VisionOperator.
Definition at line 20 of file DataCollector.cpp.
References WURDE::FORMAT_CHAR_111_RGB, WURDE::g_globalConfiguration, WURDEConfiguration::getDataDirectory(), WURDEConfiguration::getModuleOption(), WURDEConfiguration::haveModuleOption(), VisionOperator::m_format, DataCollector::m_imageDir, DataCollector::m_imagePrefix, VisionOperator::m_name, DataCollector::m_newt1image, DataCollector::m_newt2image, DataCollector::m_newt3image, DataCollector::m_outfile, DataCollector::m_outfilename, VisionOperator::m_state, DataCollector::m_t1image, DataCollector::m_t2image, DataCollector::m_t3image, DataCollector::next, WURDEVision::runDataCollectorThread1(), WURDEVision::runDataCollectorThread2(), WURDEVision::runDataCollectorThread3(), WURDE::STATE_RUN, DataCollector::t1state, DataCollector::t2state, DataCollector::t3state, DataCollector::thread1, DataCollector::thread2, and DataCollector::thread3.
void runOperator | ( | WURDE::WURDEImage | image, | |
WURDE::WURDEImage | stereo | |||
) | [inline, virtual] |
The main method for the class if the operator is stereo.
All work should be done within this function, which will be called each loop. If the operator is monocular, this method should return without doing any work.
Implements VisionOperator.
Definition at line 27 of file DataCollector.H.
void runOperator | ( | WURDE::WURDEImage | someImage | ) | [virtual] |
The main method for the class if the operator is monocular.
All work should be done within this function, which will be called each loop. If the operator is stereo, this method should return without doing any work.
Implements VisionOperator.
Definition at line 69 of file DataCollector.cpp.
References RangeFinder::data, RangeFinder::getNextData(), PTUnit::getNextInfo(), Writable::getValue(), PTUnit::info, DataCollector::m_myPTU, DataCollector::m_myRF, DataCollector::m_newt1image, DataCollector::m_newt2image, DataCollector::m_newt3image, DataCollector::m_outfile, DataCollector::m_t1image, DataCollector::m_t2image, DataCollector::m_t3image, RangeFinder::newData(), PTUnit::newInfo(), DataCollector::next, PTUnitInfoStruct::pan, RangeFinderDataStruct::ranges, DataCollector::t1time, DataCollector::t2time, DataCollector::t3time, and PTUnitInfoStruct::tilt.
void quitOperator | ( | ) | [virtual] |
Cleanup function.
Free any memory you've allocated here.
Implements VisionOperator.
Definition at line 142 of file DataCollector.cpp.
References DataCollector::m_outfile, DataCollector::m_t1image, DataCollector::m_t2image, DataCollector::m_t3image, WURDE::STATE_QUIT, DataCollector::t1state, DataCollector::t2state, DataCollector::t3state, DataCollector::thread1, DataCollector::thread2, and DataCollector::thread3.
void fileWriterThread1 | ( | ) |
Definition at line 162 of file DataCollector.cpp.
References WURDE::g_debug(), Time::getSeconds(), Time::getUSeconds(), DataCollector::m_imageDir, DataCollector::m_imagePrefix, DataCollector::m_newt1image, DataCollector::m_t1image, WURDE::STATE_RUN, DataCollector::t1state, and DataCollector::t1time.
Referenced by WURDEVision::runDataCollectorThread1().
void fileWriterThread2 | ( | ) |
Definition at line 181 of file DataCollector.cpp.
References WURDE::g_debug(), Time::getSeconds(), Time::getUSeconds(), DataCollector::m_imageDir, DataCollector::m_imagePrefix, DataCollector::m_newt2image, DataCollector::m_t2image, WURDE::STATE_RUN, DataCollector::t1state, and DataCollector::t2time.
Referenced by WURDEVision::runDataCollectorThread2().
void fileWriterThread3 | ( | ) |
Definition at line 199 of file DataCollector.cpp.
References WURDE::g_debug(), Time::getSeconds(), Time::getUSeconds(), DataCollector::m_imageDir, DataCollector::m_imagePrefix, DataCollector::m_newt3image, DataCollector::m_t3image, WURDE::STATE_RUN, DataCollector::t1state, and DataCollector::t3time.
Referenced by WURDEVision::runDataCollectorThread3().
WURDE::RangeFinder m_myRF [protected] |
Definition at line 35 of file DataCollector.H.
Referenced by DataCollector::DataCollector(), and DataCollector::runOperator().
WURDE::PTUnit m_myPTU [protected] |
Definition at line 36 of file DataCollector.H.
Referenced by DataCollector::DataCollector(), and DataCollector::runOperator().
std::ofstream m_outfile [protected] |
Definition at line 37 of file DataCollector.H.
Referenced by DataCollector::initOperator(), DataCollector::quitOperator(), and DataCollector::runOperator().
std::string m_outfilename [protected] |
pthread_t thread1 [protected] |
Definition at line 39 of file DataCollector.H.
Referenced by DataCollector::initOperator(), and DataCollector::quitOperator().
pthread_t thread2 [protected] |
Definition at line 39 of file DataCollector.H.
Referenced by DataCollector::initOperator(), and DataCollector::quitOperator().
pthread_t thread3 [protected] |
Definition at line 39 of file DataCollector.H.
Referenced by DataCollector::initOperator(), and DataCollector::quitOperator().
WURDE::RunState t1state [protected] |
Definition at line 40 of file DataCollector.H.
Referenced by DataCollector::fileWriterThread1(), DataCollector::fileWriterThread2(), DataCollector::fileWriterThread3(), DataCollector::initOperator(), and DataCollector::quitOperator().
WURDE::RunState t2state [protected] |
Definition at line 40 of file DataCollector.H.
Referenced by DataCollector::initOperator(), and DataCollector::quitOperator().
WURDE::RunState t3state [protected] |
Definition at line 40 of file DataCollector.H.
Referenced by DataCollector::initOperator(), and DataCollector::quitOperator().
bool m_newt1image [protected] |
Definition at line 41 of file DataCollector.H.
Referenced by DataCollector::fileWriterThread1(), DataCollector::initOperator(), and DataCollector::runOperator().
bool m_newt2image [protected] |
Definition at line 41 of file DataCollector.H.
Referenced by DataCollector::fileWriterThread2(), DataCollector::initOperator(), and DataCollector::runOperator().
bool m_newt3image [protected] |
Definition at line 41 of file DataCollector.H.
Referenced by DataCollector::fileWriterThread3(), DataCollector::initOperator(), and DataCollector::runOperator().
WURDE::Time t1time [protected] |
Definition at line 42 of file DataCollector.H.
Referenced by DataCollector::fileWriterThread1(), and DataCollector::runOperator().
WURDE::Time t2time [protected] |
Definition at line 42 of file DataCollector.H.
Referenced by DataCollector::fileWriterThread2(), and DataCollector::runOperator().
WURDE::Time t3time [protected] |
Definition at line 42 of file DataCollector.H.
Referenced by DataCollector::fileWriterThread3(), and DataCollector::runOperator().
IplImage* m_t1image [protected] |
Definition at line 44 of file DataCollector.H.
Referenced by DataCollector::fileWriterThread1(), DataCollector::initOperator(), DataCollector::quitOperator(), and DataCollector::runOperator().
IplImage * m_t2image [protected] |
Definition at line 44 of file DataCollector.H.
Referenced by DataCollector::fileWriterThread2(), DataCollector::initOperator(), DataCollector::quitOperator(), and DataCollector::runOperator().
IplImage * m_t3image [protected] |
Definition at line 44 of file DataCollector.H.
Referenced by DataCollector::fileWriterThread3(), DataCollector::initOperator(), DataCollector::quitOperator(), and DataCollector::runOperator().
int next [protected] |
Definition at line 45 of file DataCollector.H.
Referenced by DataCollector::initOperator(), and DataCollector::runOperator().
std::string m_imageDir [protected] |
Definition at line 46 of file DataCollector.H.
Referenced by DataCollector::fileWriterThread1(), DataCollector::fileWriterThread2(), DataCollector::fileWriterThread3(), and DataCollector::initOperator().
std::string m_imagePrefix [protected] |
Definition at line 47 of file DataCollector.H.
Referenced by DataCollector::fileWriterThread1(), DataCollector::fileWriterThread2(), DataCollector::fileWriterThread3(), and DataCollector::initOperator().