Simox  2.3.62
VirtualRobot::EndEffector Class Reference
Inheritance diagram for VirtualRobot::EndEffector:

Data Structures

struct  ContactInfo

Public Types

typedef std::vector< ContactInfo, Eigen::aligned_allocator< ContactInfo > > ContactInfoVector
 We need an Eigen::aligned_allocator here, otherwise access to a std::vector could crash. More...

Public Member Functions

 EndEffector (const std::string &nameString, const std::vector< EndEffectorActorPtr > &actorsVector, const std::vector< RobotNodePtr > &staticPartVector, RobotNodePtr baseNodePtr, RobotNodePtr tcpNodePtr, RobotNodePtr gcpNodePtr=RobotNodePtr(), std::vector< RobotConfigPtr > preshapes=std::vector< RobotConfigPtr >())
virtual ~EndEffector ()
EndEffectorPtr clone (RobotPtr newRobot)
std::string getName ()
std::string getBaseNodeName ()
std::string getTcpName ()
RobotNodePtr getTcp ()
RobotNodePtr getBase ()
RobotNodePtr getGCP ()
RobotPtr getRobot ()
CollisionCheckerPtr getCollisionChecker ()
std::string getRobotType ()
void getActors (std::vector< EndEffectorActorPtr > &actors)
void getStatics (std::vector< RobotNodePtr > &statics)
ContactInfoVector closeActors (SceneObjectSetPtr obstacles=SceneObjectSetPtr(), float stepSize=0.02)
ContactInfoVector closeActors (SceneObjectPtr obstacle, float stepSize=0.02)
void openActors (SceneObjectSetPtr obstacles=SceneObjectSetPtr(), float stepSize=0.02)
SceneObjectSetPtr createSceneObjectSet (CollisionCheckerPtr colChecker=CollisionCheckerPtr())
RobotPtr createEefRobot (const std::string &newRobotType, const std::string &newRobotName, CollisionCheckerPtr collisionChecker=CollisionCheckerPtr())
void registerPreshape (RobotConfigPtr preshape)
RobotConfigPtr getPreshape (const std::string &name)
bool hasPreshape (const std::string &name)
bool setPreshape (const std::string &name)
std::vector< std::string > getPreshapes ()
bool hasNode (RobotNodePtr node)
void print ()
RobotConfigPtr getConfiguration ()
std::vector< RobotNodePtrgetAllNodes ()
 Return all associated robot nodes. More...
bool nodesSufficient (std::vector< RobotNodePtr > nodes) const
 Returns true, if nodes (only name strings are checked) are sufficient for building this eef. More...
float getApproximatedLength ()
virtual std::string toXML (int ident=1)
int addStaticPartContacts (SceneObjectPtr obstacle, ContactInfoVector &contacts, const Eigen::Vector3f &approachDirGlobal, float maxDistance=3.0f)

Member Typedef Documentation

typedef std::vector< ContactInfo, Eigen::aligned_allocator<ContactInfo> > VirtualRobot::EndEffector::ContactInfoVector

We need an Eigen::aligned_allocator here, otherwise access to a std::vector could crash.

Constructor & Destructor Documentation

VirtualRobot::EndEffector::EndEffector ( const std::string &  nameString,
const std::vector< EndEffectorActorPtr > &  actorsVector,
const std::vector< RobotNodePtr > &  staticPartVector,
RobotNodePtr  baseNodePtr,
RobotNodePtr  tcpNodePtr,
RobotNodePtr  gcpNodePtr = RobotNodePtr(),
std::vector< RobotConfigPtr preshapes = std::vector< RobotConfigPtr >() 
VirtualRobot::EndEffector::~EndEffector ( )

Member Function Documentation

int VirtualRobot::EndEffector::addStaticPartContacts ( SceneObjectPtr  obstacle,
EndEffector::ContactInfoVector contacts,
const Eigen::Vector3f &  approachDirGlobal,
float  maxDistance = 3.0f 
EndEffectorPtr VirtualRobot::EndEffector::clone ( RobotPtr  newRobot)

Clones this eef and performs all necessary registrations. (Be careful: no need to call registerEEF with newly created eef, since this is already done)

EndEffector::ContactInfoVector VirtualRobot::EndEffector::closeActors ( SceneObjectSetPtr  obstacles = SceneObjectSetPtr(),
float  stepSize = 0.02 

Closes each actor until a joint limit is hit or a collision occurred. This method is intended for gripper or hand-like end-effectors.

EndEffector::ContactInfoVector VirtualRobot::EndEffector::closeActors ( SceneObjectPtr  obstacle,
float  stepSize = 0.02 
VirtualRobot::RobotPtr VirtualRobot::EndEffector::createEefRobot ( const std::string &  newRobotType,
const std::string &  newRobotName,
CollisionCheckerPtr  collisionChecker = CollisionCheckerPtr() 

Construct a robot that consists only of this eef. All corresponding robot nodes with visualization and collision models are cloned. The resulting robot will have one end effector defined which is identical to this object.

VirtualRobot::SceneObjectSetPtr VirtualRobot::EndEffector::createSceneObjectSet ( CollisionCheckerPtr  colChecker = CollisionCheckerPtr())

Build a SceneObjectSet that covers all RobotNodes of this EndEffector.

The set can be used for collision detection, e.g. to check if the eef is in collision with an obstacle.
void VirtualRobot::EndEffector::getActors ( std::vector< EndEffectorActorPtr > &  actors)
std::vector< RobotNodePtr > VirtualRobot::EndEffector::getAllNodes ( )

Return all associated robot nodes.

float VirtualRobot::EndEffector::getApproximatedLength ( )

returns an approximation about the length of this eef.

VirtualRobot::RobotNodePtr VirtualRobot::EndEffector::getBase ( )
std::string VirtualRobot::EndEffector::getBaseNodeName ( )

Return name of Base RobotNode.

VirtualRobot::CollisionCheckerPtr VirtualRobot::EndEffector::getCollisionChecker ( )
VirtualRobot::RobotConfigPtr VirtualRobot::EndEffector::getConfiguration ( )

Return current configuration as robot config.

VirtualRobot::RobotNodePtr VirtualRobot::EndEffector::getGCP ( )

Returns the grasp center point. If it was not defined, the TCP is returned.

std::string VirtualRobot::EndEffector::getName ( )
VirtualRobot::RobotConfigPtr VirtualRobot::EndEffector::getPreshape ( const std::string &  name)
std::vector< std::string > VirtualRobot::EndEffector::getPreshapes ( )

Returns vector of all registered preshape names.

VirtualRobot::RobotPtr VirtualRobot::EndEffector::getRobot ( )

Return associated robot

std::string VirtualRobot::EndEffector::getRobotType ( )

Return the type of the associated robot

void VirtualRobot::EndEffector::getStatics ( std::vector< RobotNodePtr > &  statics)
VirtualRobot::RobotNodePtr VirtualRobot::EndEffector::getTcp ( )
std::string VirtualRobot::EndEffector::getTcpName ( )

Return name of TCP RobotNode.

bool VirtualRobot::EndEffector::hasNode ( RobotNodePtr  node)

Check, if node is part of this eef.

bool VirtualRobot::EndEffector::hasPreshape ( const std::string &  name)
bool VirtualRobot::EndEffector::nodesSufficient ( std::vector< RobotNodePtr nodes) const

Returns true, if nodes (only name strings are checked) are sufficient for building this eef.

void VirtualRobot::EndEffector::openActors ( SceneObjectSetPtr  obstacles = SceneObjectSetPtr(),
float  stepSize = 0.02 

Opens each actor until a joint limit is hit or a collision occurred. This method is intended for hand-like end-effectors. Note that the same effect can be realized by calling closeActors with a negative step size

void VirtualRobot::EndEffector::print ( )
void VirtualRobot::EndEffector::registerPreshape ( RobotConfigPtr  preshape)

Register a preshape to this EEF. An exception is thrown if preshape covers joints that are not part of this eef. If there is already a preshape with name preshape->getName(), it is replaced.

bool VirtualRobot::EndEffector::setPreshape ( const std::string &  name)

Set joints of this eef to preshape with given name.

nameThe name of the registered preshape.
false if preshape was not registered, otherwise true
std::string VirtualRobot::EndEffector::toXML ( int  ident = 1)

Creates an XML string of this EEF.