Simox  2.3.50
Saba::RrtWorkspaceVisualization Class Referenceabstract
Inheritance diagram for Saba::RrtWorkspaceVisualization:
Saba::CoinRrtWorkspaceVisualization

Data Structures

struct  RenderColors
 

Public Types

enum  ColorSet { eRed, eGreen, eBlue, eCustom }
 

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW RrtWorkspaceVisualization (VirtualRobot::RobotPtr robot, CSpacePtr cspace, const std::string &TCPName)
 
 RrtWorkspaceVisualization (VirtualRobot::RobotPtr robot, VirtualRobot::RobotNodeSetPtr robotNodeSet, const std::string &TCPName)
 
virtual ~RrtWorkspaceVisualization ()
 
virtual void reset ()
 
void setTCPName (const std::string TCPName)
 
virtual bool addCSpacePath (CSpacePathPtr path, RrtWorkspaceVisualization::ColorSet colorSet=eBlue)=0
 
virtual void setPathStyle (float lineSize=4.0f, float nodeSize=15.0f, float renderComplexity=1.0f)
 
virtual bool addTree (CSpaceTreePtr tree, RrtWorkspaceVisualization::ColorSet colorSet=eRed)=0
 
virtual void setTreeStyle (float lineSize=1.0f, float nodeSize=15.0f, float renderComplexity=0.1f)
 
virtual bool addConfiguration (const Eigen::VectorXf &c, RrtWorkspaceVisualization::ColorSet colorSet=eGreen, float nodeSizeFactor=1.0f)=0
 
virtual void setCustomColor (float nodeR, float nodeG, float nodeB, float lineR=0.5f, float lineG=0.5f, float lineB=0.5f)
 
virtual void colorizeTreeNodes (int status, ColorSet colorSet)
 

Protected Member Functions

void init ()
 

Protected Attributes

VirtualRobot::RobotPtr robot
 
CSpacePtr cspace
 
VirtualRobot::RobotNodeSetPtr robotNodeSet
 
VirtualRobot::RobotNodePtr TCPNode
 
std::string TCPName
 
float pathLineSize
 
float pathNodeSize
 
float pathRenderComplexity
 
float treeLineSize
 
float treeNodeSize
 
float treeRenderComplexity
 
std::map< ColorSet, RenderColorscolors
 
std::map< int, ColorSettreeNodeStatusColor
 

Detailed Description

A visualization of an RRT search tree.

See also
CoinRrtWorkspaceVisualization

Member Enumeration Documentation

Enumerator
eRed 
eGreen 
eBlue 
eCustom 

Constructor & Destructor Documentation

Saba::RrtWorkspaceVisualization::RrtWorkspaceVisualization ( VirtualRobot::RobotPtr  robot,
CSpacePtr  cspace,
const std::string &  TCPName 
)

Constructor Robot must have a node with name TCPName. The visualizations are build by determining the TCP's position in workspace according to the configurations of a path or tree .

Saba::RrtWorkspaceVisualization::RrtWorkspaceVisualization ( VirtualRobot::RobotPtr  robot,
VirtualRobot::RobotNodeSetPtr  robotNodeSet,
const std::string &  TCPName 
)
Saba::RrtWorkspaceVisualization::~RrtWorkspaceVisualization ( )
virtual

Member Function Documentation

virtual bool Saba::RrtWorkspaceVisualization::addConfiguration ( const Eigen::VectorXf &  c,
RrtWorkspaceVisualization::ColorSet  colorSet = eGreen,
float  nodeSizeFactor = 1.0f 
)
pure virtual

Add visualization of a configuration in cspace.

Implemented in Saba::CoinRrtWorkspaceVisualization.

virtual bool Saba::RrtWorkspaceVisualization::addCSpacePath ( CSpacePathPtr  path,
RrtWorkspaceVisualization::ColorSet  colorSet = eBlue 
)
pure virtual

Add visualization of a path in cspace.

Implemented in Saba::CoinRrtWorkspaceVisualization.

virtual bool Saba::RrtWorkspaceVisualization::addTree ( CSpaceTreePtr  tree,
RrtWorkspaceVisualization::ColorSet  colorSet = eRed 
)
pure virtual

Add visualization of a tree (e.g an RRT) in cspace.

Implemented in Saba::CoinRrtWorkspaceVisualization.

void Saba::RrtWorkspaceVisualization::colorizeTreeNodes ( int  status,
ColorSet  colorSet 
)
virtual

Set tree nodes with status flag equal to given parameter to the specified color.

void Saba::RrtWorkspaceVisualization::init ( )
protected
void Saba::RrtWorkspaceVisualization::reset ( )
virtual

Clears all visualizations.

Reimplemented in Saba::CoinRrtWorkspaceVisualization.

void Saba::RrtWorkspaceVisualization::setCustomColor ( float  nodeR,
float  nodeG,
float  nodeB,
float  lineR = 0.5f,
float  lineG = 0.5f,
float  lineB = 0.5f 
)
virtual

Set the custom line and node color. Does not affect already added trees or paths.

void Saba::RrtWorkspaceVisualization::setPathStyle ( float  lineSize = 4.0f,
float  nodeSize = 15.0f,
float  renderComplexity = 1.0f 
)
virtual
void Saba::RrtWorkspaceVisualization::setTCPName ( const std::string  TCPName)

Set name of TCP joint. Does not affect already added paths or trees.

void Saba::RrtWorkspaceVisualization::setTreeStyle ( float  lineSize = 1.0f,
float  nodeSize = 15.0f,
float  renderComplexity = 0.1f 
)
virtual

Field Documentation

std::map<ColorSet, RenderColors> Saba::RrtWorkspaceVisualization::colors
protected
CSpacePtr Saba::RrtWorkspaceVisualization::cspace
protected
float Saba::RrtWorkspaceVisualization::pathLineSize
protected
float Saba::RrtWorkspaceVisualization::pathNodeSize
protected
float Saba::RrtWorkspaceVisualization::pathRenderComplexity
protected
VirtualRobot::RobotPtr Saba::RrtWorkspaceVisualization::robot
protected
VirtualRobot::RobotNodeSetPtr Saba::RrtWorkspaceVisualization::robotNodeSet
protected
std::string Saba::RrtWorkspaceVisualization::TCPName
protected
VirtualRobot::RobotNodePtr Saba::RrtWorkspaceVisualization::TCPNode
protected
float Saba::RrtWorkspaceVisualization::treeLineSize
protected
float Saba::RrtWorkspaceVisualization::treeNodeSize
protected
std::map<int, ColorSet> Saba::RrtWorkspaceVisualization::treeNodeStatusColor
protected
float Saba::RrtWorkspaceVisualization::treeRenderComplexity
protected