Simox  2.3.74.0
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

◆ ColorSet

Enumerator
eRed 
eGreen 
eBlue 
eCustom 

Constructor & Destructor Documentation

◆ RrtWorkspaceVisualization() [1/2]

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 .

◆ RrtWorkspaceVisualization() [2/2]

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

◆ ~RrtWorkspaceVisualization()

Saba::RrtWorkspaceVisualization::~RrtWorkspaceVisualization ( )
virtualdefault

Member Function Documentation

◆ addConfiguration()

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.

◆ addCSpacePath()

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

Add visualization of a path in cspace.

Implemented in Saba::CoinRrtWorkspaceVisualization.

◆ addTree()

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.

◆ colorizeTreeNodes()

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

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

◆ init()

void Saba::RrtWorkspaceVisualization::init ( )
protected

◆ reset()

void Saba::RrtWorkspaceVisualization::reset ( )
virtual

Clears all visualizations.

Reimplemented in Saba::CoinRrtWorkspaceVisualization.

◆ setCustomColor()

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.

◆ setPathStyle()

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

◆ setTCPName()

void Saba::RrtWorkspaceVisualization::setTCPName ( const std::string  TCPName)

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

◆ setTreeStyle()

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

Field Documentation

◆ colors

std::map<ColorSet, RenderColors> Saba::RrtWorkspaceVisualization::colors
protected

◆ cspace

CSpacePtr Saba::RrtWorkspaceVisualization::cspace
protected

◆ pathLineSize

float Saba::RrtWorkspaceVisualization::pathLineSize
protected

◆ pathNodeSize

float Saba::RrtWorkspaceVisualization::pathNodeSize
protected

◆ pathRenderComplexity

float Saba::RrtWorkspaceVisualization::pathRenderComplexity
protected

◆ robot

VirtualRobot::RobotPtr Saba::RrtWorkspaceVisualization::robot
protected

◆ robotNodeSet

VirtualRobot::RobotNodeSetPtr Saba::RrtWorkspaceVisualization::robotNodeSet
protected

◆ TCPName

std::string Saba::RrtWorkspaceVisualization::TCPName
protected

◆ TCPNode

VirtualRobot::RobotNodePtr Saba::RrtWorkspaceVisualization::TCPNode
protected

◆ treeLineSize

float Saba::RrtWorkspaceVisualization::treeLineSize
protected

◆ treeNodeSize

float Saba::RrtWorkspaceVisualization::treeNodeSize
protected

◆ treeNodeStatusColor

std::map<int, ColorSet> Saba::RrtWorkspaceVisualization::treeNodeStatusColor
protected

◆ treeRenderComplexity

float Saba::RrtWorkspaceVisualization::treeRenderComplexity
protected