Simox  2.3.62
Saba::CSpacePath Class Reference

A path in c-space. More...

Inheritance diagram for Saba::CSpacePath:

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW CSpacePath (CSpacePtr cspace, const std::string &name="")
virtual ~CSpacePath ()
 Destructor. More...
CSpacePathPtr clone () const
CSpacePathPtr createSubPath (unsigned int startIndex, unsigned int endIndex) const
virtual float getLength () const
float getLength (bool useCSpaceWeights) const
float getLength (unsigned int startIndex, unsigned int endIndex, bool useCSpaceWeights=true) const
virtual void interpolate (float t, Eigen::VectorXf &storePos, int *storeIndex=NULL) const
virtual float getTime (unsigned int nr)
 return time t (0<=t<=1) for path entry with number nr More...
CSpacePtr getCSpace ()
std::vector< Eigen::Matrix4f > createWorkspacePath (VirtualRobot::RobotNodePtr r=VirtualRobot::RobotNodePtr())
- Public Member Functions inherited from VirtualRobot::Trajectory
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Trajectory (RobotNodeSetPtr rns, const std::string &name="")
virtual ~Trajectory ()
const std::vector< Eigen::VectorXf > & getPoints () const
void addPoint (const Eigen::VectorXf &c)
Eigen::VectorXf getPoint (unsigned int nr) const
unsigned int getNrOfPoints () const
 return total number of trajectory points More...
bool getPoints (unsigned int start, unsigned int end, std::vector< Eigen::VectorXf > &storePosList) const
 to retrieve entries of trajectory More...
TrajectoryPtr clone () const
TrajectoryPtr createSubPath (unsigned int startIndex, unsigned int endIndex) const
virtual void reset ()
 reset all data More...
virtual void reverse ()
 reverse position order: end becomes start More...
virtual void erasePosition (unsigned int pos)
virtual unsigned int removePositions (unsigned int startPos, unsigned int endPos)
virtual void insertPosition (unsigned int pos, const Eigen::VectorXf &c)
virtual void insertPosition (unsigned int pos, std::vector< Eigen::VectorXf > &newConfigurations)
virtual void insertTrajectory (unsigned int pos, TrajectoryPtr trajectoryToInsert)
unsigned int getDimension () const
virtual void print () const
 prints trajectory contents to console More...
const std::vector< Eigen::VectorXf > & getData () const
 For quick access to data. More...
Eigen::VectorXf & getPointRef (unsigned int pos)
VirtualRobot::RobotNodeSetPtr getRobotNodeSet ()
std::vector< Eigen::Matrix4f > createWorkspaceTrajectory (VirtualRobot::RobotNodePtr r=VirtualRobot::RobotNodePtr())
virtual std::string toXML (int tabs=0) const
std::string getName () const
std::string getRobotName () const
VisualizationNodePtr getVisualization (std::string visualizationFactoryName="")

Protected Attributes

CSpacePtr cspace
- Protected Attributes inherited from VirtualRobot::Trajectory
std::vector< Eigen::VectorXf > path
 vector with configurations which represent the path More...
RobotNodeSetPtr rns
std::string name
unsigned int dimension
 dimension of rns More...

Detailed Description

A path in c-space.

Constructor & Destructor Documentation

Saba::CSpacePath::CSpacePath ( CSpacePtr  cspace,
const std::string &  name = "" 

Constructor. Dimension of this path is retrieved from cspace.

cspaceIs used to retrieve the dimension of the corresponding c-space and the corresponding joints
nameAn optional string, identifying this path.
Saba::CSpacePath::~CSpacePath ( )


Member Function Documentation

CSpacePathPtr Saba::CSpacePath::clone ( ) const

Creates a copy of the path instance.

pointer to new instance (copy)
CSpacePathPtr Saba::CSpacePath::createSubPath ( unsigned int  startIndex,
unsigned int  endIndex 
) const
std::vector< Eigen::Matrix4f > Saba::CSpacePath::createWorkspacePath ( VirtualRobot::RobotNodePtr  r = VirtualRobot::RobotNodePtr())
Saba::CSpacePtr Saba::CSpacePath::getCSpace ( )
float Saba::CSpacePath::getLength ( ) const

Return euclidean c-space length of complete path. Any weights that may be defined in the corresponding c-space are considered.

Reimplemented from VirtualRobot::Trajectory.

float Saba::CSpacePath::getLength ( bool  useCSpaceWeights) const

Return euclidean c-space length of complete path

useCSpaceWeightsWhen set, the weight that might have been specified in the corresponding c-space are used for computing the path length.
float Saba::CSpacePath::getLength ( unsigned int  startIndex,
unsigned int  endIndex,
bool  useCSpaceWeights = true 
) const

Return length of part of the path (in CSpace!)

startIndexThe start point
endIndexThe end point
useCSpaceWeightsWhen set, the weights that have been specified in the corresponding c-space are used for computing the path length.
float Saba::CSpacePath::getTime ( unsigned int  nr)

return time t (0<=t<=1) for path entry with number nr

void Saba::CSpacePath::interpolate ( float  t,
Eigen::VectorXf &  storePos,
int *  storeIndex = NULL 
) const

return position on path for time t (0<=t<=1) If storeIndex!=NULL the index of the last path point is stored. This method consideres weighting of c-space dimensions!

Reimplemented from VirtualRobot::Trajectory.

Field Documentation

CSpacePtr Saba::CSpacePath::cspace