Simox  2.3.74.0
Saba::MotionPlanner Class Referenceabstract

An abstract base class of a motion planner. More...

Inheritance diagram for Saba::MotionPlanner:
Saba::Rrt Saba::BiRrt Saba::GraspRrt Saba::GraspIkRrt

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW MotionPlanner (CSpacePtr cspace)
 
virtual ~MotionPlanner ()
 destructor More...
 
virtual bool plan (bool bQuiet=false)=0
 
CSpacePathPtr getSolution ()
 
void setMaxCycles (unsigned int mc)
 
Eigen::VectorXf getStartConfig ()
 return start configuration More...
 
Eigen::VectorXf getGoalConfig ()
 return goal configuration More...
 
virtual void reset ()
 reset the planner More...
 
virtual bool setStart (const Eigen::VectorXf &c)
 set start configuration More...
 
virtual bool setGoal (const Eigen::VectorXf &c)
 set goal configuration More...
 
unsigned int getNrOfCycles ()
 check that planner is initialized More...
 
virtual void printConfig (bool printOnlyParams=false)
 
CSpacePtr getCSpace ()
 The CSpace. More...
 
virtual void stopExecution ()
 
void setName (std::string sName)
 Give the planner a name. More...
 
std::string getName ()
 The name of the planner. More...
 
float getPlanningTimeMS ()
 
virtual bool isInitialized ()
 returns true, when start and goal config have been set More...
 
void setPlanningTimeout (float timeoutMs)
 

Protected Member Functions

virtual bool createSolution (bool bQuiet=false)=0
 create the solution More...
 

Protected Attributes

CSpacePtr cspace
 the cspace on which are operating More...
 
CSpacePathPtr solution
 the solution More...
 
bool stopSearch
 indicates that the search should be interrupted More...
 
unsigned int dimension
 dimension of c-space More...
 
Eigen::VectorXf startConfig
 start config More...
 
bool startValid
 
Eigen::VectorXf goalConfig
 goal config More...
 
bool goalValid
 
unsigned int maxCycles
 maximum cycles for searching More...
 
unsigned int cycles
 current cycles done in the run method More...
 
std::string name
 Name of this planner (standard: "Motion Planner") More...
 
float planningTime
 
float planningTimeout
 Planning time in milliseconds. More...
 

Detailed Description

An abstract base class of a motion planner.

Constructor & Destructor Documentation

◆ MotionPlanner()

Saba::MotionPlanner::MotionPlanner ( CSpacePtr  cspace)

constructor

◆ ~MotionPlanner()

Saba::MotionPlanner::~MotionPlanner ( )
virtual

destructor

Member Function Documentation

◆ createSolution()

virtual bool Saba::MotionPlanner::createSolution ( bool  bQuiet = false)
protectedpure virtual

create the solution

Implemented in Saba::Rrt, and Saba::BiRrt.

◆ getCSpace()

CSpacePtr Saba::MotionPlanner::getCSpace ( )
inline

The CSpace.

◆ getGoalConfig()

Eigen::VectorXf Saba::MotionPlanner::getGoalConfig ( )
inline

return goal configuration

◆ getName()

std::string Saba::MotionPlanner::getName ( )

The name of the planner.

◆ getNrOfCycles()

unsigned int Saba::MotionPlanner::getNrOfCycles ( )
inline

check that planner is initialized

Return number of cycles that were needed for motion planning

◆ getPlanningTimeMS()

float Saba::MotionPlanner::getPlanningTimeMS ( )
inline

Returns the time needed for planning (in milliseconds).

◆ getSolution()

CSpacePathPtr Saba::MotionPlanner::getSolution ( )

Returns the solution path.

◆ getStartConfig()

Eigen::VectorXf Saba::MotionPlanner::getStartConfig ( )
inline

return start configuration

◆ isInitialized()

bool Saba::MotionPlanner::isInitialized ( )
virtual

returns true, when start and goal config have been set

◆ plan()

virtual bool Saba::MotionPlanner::plan ( bool  bQuiet = false)
pure virtual

do the planning (blocking method)

Returns
true if solution was found, otherwise false

Implemented in Saba::GraspRrt, Saba::Rrt, Saba::GraspIkRrt, and Saba::BiRrt.

◆ printConfig()

void Saba::MotionPlanner::printConfig ( bool  printOnlyParams = false)
virtual

Print setup of planner.

Parameters
printOnlyParamsIf set the decorating start and end is skipped (can be used to print derived classes).

Reimplemented in Saba::GraspRrt, Saba::Rrt, Saba::GraspIkRrt, and Saba::BiRrt.

◆ reset()

void Saba::MotionPlanner::reset ( )
virtual

reset the planner

Reimplemented in Saba::GraspRrt, Saba::Rrt, Saba::GraspIkRrt, and Saba::BiRrt.

◆ setGoal()

bool Saba::MotionPlanner::setGoal ( const Eigen::VectorXf &  c)
virtual

set goal configuration

Reimplemented in Saba::GraspRrt, Saba::Rrt, Saba::BiRrt, and Saba::GraspIkRrt.

◆ setMaxCycles()

void Saba::MotionPlanner::setMaxCycles ( unsigned int  mc)

Set maximal cycles. Initially set to 50000.

◆ setName()

void Saba::MotionPlanner::setName ( std::string  sName)

Give the planner a name.

◆ setPlanningTimeout()

void Saba::MotionPlanner::setPlanningTimeout ( float  timeoutMs)

◆ setStart()

bool Saba::MotionPlanner::setStart ( const Eigen::VectorXf &  c)
virtual

set start configuration

Reimplemented in Saba::GraspRrt, Saba::Rrt, and Saba::BiRrt.

◆ stopExecution()

virtual void Saba::MotionPlanner::stopExecution ( )
inlinevirtual

Sets stop flag, so that this planner can be notified to abort the search. Only useful for threaded planners.

Field Documentation

◆ cspace

CSpacePtr Saba::MotionPlanner::cspace
protected

the cspace on which are operating

◆ cycles

unsigned int Saba::MotionPlanner::cycles
protected

current cycles done in the run method

◆ dimension

unsigned int Saba::MotionPlanner::dimension
protected

dimension of c-space

◆ goalConfig

Eigen::VectorXf Saba::MotionPlanner::goalConfig
protected

goal config

◆ goalValid

bool Saba::MotionPlanner::goalValid
protected

◆ maxCycles

unsigned int Saba::MotionPlanner::maxCycles
protected

maximum cycles for searching

◆ name

std::string Saba::MotionPlanner::name
protected

Name of this planner (standard: "Motion Planner")

◆ planningTime

float Saba::MotionPlanner::planningTime
protected

◆ planningTimeout

float Saba::MotionPlanner::planningTimeout
protected

Planning time in milliseconds.

◆ solution

CSpacePathPtr Saba::MotionPlanner::solution
protected

the solution

◆ startConfig

Eigen::VectorXf Saba::MotionPlanner::startConfig
protected

start config

◆ startValid

bool Saba::MotionPlanner::startValid
protected

◆ stopSearch

bool Saba::MotionPlanner::stopSearch
protected

indicates that the search should be interrupted