Simox  2.3.74.0
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
 
std::thread processingThread
 
std::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

◆ PathProcessingThread()

Saba::PathProcessingThread::PathProcessingThread ( PathProcessorPtr  processor)

constructor

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

Parameters
processorAn initialized path processor to be started.

◆ ~PathProcessingThread()

Saba::PathProcessingThread::~PathProcessingThread ( )
virtual

destructor

Member Function Documentation

◆ getPathProcessor()

PathProcessorPtr Saba::PathProcessingThread::getPathProcessor ( )

◆ getProcessedPath()

Saba::CSpacePathPtr Saba::PathProcessingThread::getProcessedPath ( )

Returns the optimized path (when optimizer is finished)

◆ interrupt()

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.

◆ isRunning()

bool Saba::PathProcessingThread::isRunning ( )
Returns
True if the planning thread is operating

◆ start()

void Saba::PathProcessingThread::start ( int  optimizeSteps)
virtual

Start the path processing in an own thread.

◆ stop()

void Saba::PathProcessingThread::stop ( )

Same as interrupt(true)

◆ workingMethod()

void Saba::PathProcessingThread::workingMethod ( )
protected

Here the post processing takes place.

Field Documentation

◆ mutex

std::mutex Saba::PathProcessingThread::mutex
protected

◆ optimizeSteps

int Saba::PathProcessingThread::optimizeSteps
protected

◆ pathProcessor

PathProcessorPtr Saba::PathProcessingThread::pathProcessor
protected

◆ processingFinished

bool Saba::PathProcessingThread::processingFinished
protected

◆ processingThread

std::thread Saba::PathProcessingThread::processingThread
protected

◆ resultPath

CSpacePathPtr Saba::PathProcessingThread::resultPath
protected

◆ threadStarted

bool Saba::PathProcessingThread::threadStarted
protected