Simox  2.3.74.0
Saba::CoinRrtWorkspaceVisualization Class Reference
Inheritance diagram for Saba::CoinRrtWorkspaceVisualization:
Saba::RrtWorkspaceVisualization

Public Member Functions

 CoinRrtWorkspaceVisualization (VirtualRobot::RobotPtr robot, CSpacePtr cspace, const std::string &TCPName)
 
 CoinRrtWorkspaceVisualization (VirtualRobot::RobotPtr robot, VirtualRobot::RobotNodeSetPtr robotNodeSet, const std::string &TCPName)
 
 ~CoinRrtWorkspaceVisualization () override
 
bool addCSpacePath (CSpacePathPtr path, RrtWorkspaceVisualization::ColorSet colorSet=eBlue) override
 
bool addTree (CSpaceTreePtr tree, RrtWorkspaceVisualization::ColorSet colorSet=eRed) override
 
bool addConfiguration (const Eigen::VectorXf &c, RrtWorkspaceVisualization::ColorSet colorSet=eGreen, float nodeSizeFactor=1.0f) override
 
void reset () override
 
SoSeparator * getCoinVisualization ()
 
- Public Member Functions inherited from Saba::RrtWorkspaceVisualization
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 ()
 
void setTCPName (const std::string TCPName)
 
virtual void setPathStyle (float lineSize=4.0f, float nodeSize=15.0f, float renderComplexity=1.0f)
 
virtual void setTreeStyle (float lineSize=1.0f, float nodeSize=15.0f, float renderComplexity=0.1f)
 
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 coinInit ()
 
- Protected Member Functions inherited from Saba::RrtWorkspaceVisualization
void init ()
 

Protected Attributes

SoSeparator * visualization
 
- Protected Attributes inherited from Saba::RrtWorkspaceVisualization
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
 

Additional Inherited Members

- Public Types inherited from Saba::RrtWorkspaceVisualization
enum  ColorSet { eRed, eGreen, eBlue, eCustom }
 

Constructor & Destructor Documentation

◆ CoinRrtWorkspaceVisualization() [1/2]

CoinRrtWorkspaceVisualization::CoinRrtWorkspaceVisualization ( 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 .

◆ CoinRrtWorkspaceVisualization() [2/2]

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

◆ ~CoinRrtWorkspaceVisualization()

CoinRrtWorkspaceVisualization::~CoinRrtWorkspaceVisualization ( )
override

If CoinRrtWorkspaceVisualization::visualization is a valid object call SoNode::unref() on it.

Member Function Documentation

◆ addConfiguration()

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

Add visualization of a configuration in cspace.

Implements Saba::RrtWorkspaceVisualization.

◆ addCSpacePath()

bool CoinRrtWorkspaceVisualization::addCSpacePath ( CSpacePathPtr  path,
RrtWorkspaceVisualization::ColorSet  colorSet = eBlue 
)
overridevirtual

Add visualization of a path in cspace.

Implements Saba::RrtWorkspaceVisualization.

◆ addTree()

bool CoinRrtWorkspaceVisualization::addTree ( CSpaceTreePtr  tree,
RrtWorkspaceVisualization::ColorSet  colorSet = eRed 
)
overridevirtual

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

Implements Saba::RrtWorkspaceVisualization.

◆ coinInit()

void CoinRrtWorkspaceVisualization::coinInit ( )
protected

◆ getCoinVisualization()

SoSeparator * CoinRrtWorkspaceVisualization::getCoinVisualization ( )

This mehtod returns the internal CoinRrtWorkspaceVisualization::visualization.

◆ reset()

void CoinRrtWorkspaceVisualization::reset ( )
overridevirtual

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

Clears all visualizations.

Reimplemented from Saba::RrtWorkspaceVisualization.

Field Documentation

◆ visualization

SoSeparator* Saba::CoinRrtWorkspaceVisualization::visualization
protected