Simox  2.3.74.0
VirtualRobot::GraspSet Class Reference

Public Member Functions

 GraspSet (const std::string &name, const std::string &robotType, const std::string &eef, const std::vector< GraspPtr > &grasps=std::vector< GraspPtr >())
 
virtual ~GraspSet ()
 
std::string getName () const
 
std::string getRobotType () const
 
std::string getEndEffector () const
 
void addGrasp (GraspPtr grasp)
 
bool hasGrasp (GraspPtr grasp) const
 
bool hasGrasp (const std::string &name) const
 
bool removeGrasp (GraspPtr grasp)
 
bool removeGrasp (unsigned int i)
 
void removeAllGrasps ()
 
bool isCompatibleGrasp (GraspPtr grasp) const
 
void clear ()
 
void includeGraspSet (GraspSetPtr grasps)
 
std::size_t getSize () const
 
GraspPtr getGrasp (std::size_t n) const
 
GraspPtr getGrasp (const std::string &name) const
 
void print () const
 
std::string getXMLString (int tabs=1) const
 
GraspSetPtr clone () const
 
std::vector< GraspPtrgetGrasps () const
 
void setPreshape (const std::string &preshape)
 Sets preshape string of all grasps. More...
 
auto begin () const
 
auto end () const
 
bool operator== (const GraspSet &rhs) const
 

Protected Attributes

std::vector< GraspPtrgrasps
 
std::string name
 
std::string robotType
 
std::string eef
 

Constructor & Destructor Documentation

◆ GraspSet()

VirtualRobot::GraspSet::GraspSet ( const std::string &  name,
const std::string &  robotType,
const std::string &  eef,
const std::vector< GraspPtr > &  grasps = std::vector< GraspPtr >() 
)

◆ ~GraspSet()

VirtualRobot::GraspSet::~GraspSet ( )
virtualdefault

Member Function Documentation

◆ addGrasp()

void VirtualRobot::GraspSet::addGrasp ( GraspPtr  grasp)

◆ begin()

auto VirtualRobot::GraspSet::begin ( ) const
inline

◆ clear()

void VirtualRobot::GraspSet::clear ( )

◆ clone()

VirtualRobot::GraspSetPtr VirtualRobot::GraspSet::clone ( ) const

◆ end()

auto VirtualRobot::GraspSet::end ( ) const
inline

◆ getEndEffector()

std::string VirtualRobot::GraspSet::getEndEffector ( ) const

◆ getGrasp() [1/2]

VirtualRobot::GraspPtr VirtualRobot::GraspSet::getGrasp ( std::size_t  n) const

Return grasp number n. If n is out of bounds an empty GraspPtr is returned.

◆ getGrasp() [2/2]

VirtualRobot::GraspPtr VirtualRobot::GraspSet::getGrasp ( const std::string &  name) const

◆ getGrasps()

std::vector< GraspPtr > VirtualRobot::GraspSet::getGrasps ( ) const

◆ getName()

std::string VirtualRobot::GraspSet::getName ( ) const

◆ getRobotType()

std::string VirtualRobot::GraspSet::getRobotType ( ) const

◆ getSize()

std::size_t VirtualRobot::GraspSet::getSize ( ) const

Return number of grasps stored in this set.

◆ getXMLString()

std::string VirtualRobot::GraspSet::getXMLString ( int  tabs = 1) const

◆ hasGrasp() [1/2]

bool VirtualRobot::GraspSet::hasGrasp ( GraspPtr  grasp) const

◆ hasGrasp() [2/2]

bool VirtualRobot::GraspSet::hasGrasp ( const std::string &  name) const

◆ includeGraspSet()

void VirtualRobot::GraspSet::includeGraspSet ( GraspSetPtr  grasps)

◆ isCompatibleGrasp()

bool VirtualRobot::GraspSet::isCompatibleGrasp ( GraspPtr  grasp) const

◆ operator==()

bool VirtualRobot::GraspSet::operator== ( const GraspSet rhs) const
inline

◆ print()

void VirtualRobot::GraspSet::print ( ) const

◆ removeAllGrasps()

void VirtualRobot::GraspSet::removeAllGrasps ( )

◆ removeGrasp() [1/2]

bool VirtualRobot::GraspSet::removeGrasp ( GraspPtr  grasp)

◆ removeGrasp() [2/2]

bool VirtualRobot::GraspSet::removeGrasp ( unsigned int  i)

◆ setPreshape()

void VirtualRobot::GraspSet::setPreshape ( const std::string &  preshape)

Sets preshape string of all grasps.

Field Documentation

◆ eef

std::string VirtualRobot::GraspSet::eef
protected

◆ grasps

std::vector< GraspPtr > VirtualRobot::GraspSet::grasps
protected

◆ name

std::string VirtualRobot::GraspSet::name
protected

◆ robotType

std::string VirtualRobot::GraspSet::robotType
protected