Simox  2.3.49
Saba::PathProcessingThread Class Reference

This class can be used to start a path processing algorithm in a thread. More...

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW PathProcessingThread (PathProcessorPtr processor)
 constructor More...
 
virtual ~PathProcessingThread ()
 destructor More...
 
virtual void start (int optimizeSteps)
 
virtual void interrupt (bool waitUntilStopped=false)
 
void stop ()
 
bool isRunning ()
 
PathProcessorPtr getPathProcessor ()
 
CSpacePathPtr getProcessedPath ()
 Returns the optimized path (when optimizer is finished) More...
 

Protected Member Functions

void workingMethod ()
 

Protected Attributes

bool threadStarted
 
bool processingFinished
 
PathProcessorPtr pathProcessor
 
boost::thread processingThread
 
boost::mutex mutex
 
CSpacePathPtr resultPath
 
int optimizeSteps
 

Detailed Description

This class can be used to start a path processing algorithm in a thread.

Constructor & Destructor Documentation

Saba::PathProcessingThread::PathProcessingThread ( PathProcessorPtr  processor)

constructor

Constructor The thread is not started until you call start()

Parameters
processorAn initialized path processor to be started.
Saba::PathProcessingThread::~PathProcessingThread ( )
virtual

destructor

Member Function Documentation

PathProcessorPtr Saba::PathProcessingThread::getPathProcessor ( )
Saba::CSpacePathPtr Saba::PathProcessingThread::getProcessedPath ( )

Returns the optimized path (when optimizer is finished)

void Saba::PathProcessingThread::interrupt ( bool  waitUntilStopped = false)
virtual

Send an interrupt signal to thread.

Parameters
waitUntilStoppedIf false this method returns immediately. Otherwise we wait until the thread has been successfully interrupted.
bool Saba::PathProcessingThread::isRunning ( )
Returns
True if the planning thread is operating
void Saba::PathProcessingThread::start ( int  optimizeSteps)
virtual

Start the path processing in an own thread.

void Saba::PathProcessingThread::stop ( )

Same as interrupt(true)

void Saba::PathProcessingThread::workingMethod ( )
protected

Here the post processing takes place.

Field Documentation

boost::mutex Saba::PathProcessingThread::mutex
protected
int Saba::PathProcessingThread::optimizeSteps
protected
PathProcessorPtr Saba::PathProcessingThread::pathProcessor
protected
bool Saba::PathProcessingThread::processingFinished
protected
boost::thread Saba::PathProcessingThread::processingThread
protected
CSpacePathPtr Saba::PathProcessingThread::resultPath
protected
bool Saba::PathProcessingThread::threadStarted
protected