Simox  2.3.49
VirtualRobot::Grasp Class Reference

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW Grasp (const std::string &name, const std::string &robotType, const std::string &eef, const Eigen::Matrix4f &poseInTCPCoordSystem, const std::string &creation=std::string(""), float quality=0.0f, const std::string &eefPreshape=std::string(""))
virtual ~Grasp ()
void print (bool printDecoration=true)
void setName (const std::string &name)
void setPreshape (const std::string &preshapeName)
Eigen::Matrix4f getTargetPoseGlobal (RobotPtr robot)
Eigen::Matrix4f getTcpPoseGlobal (const Eigen::Matrix4f &objectPose)
Eigen::Matrix4f getObjectTargetPoseGlobal (const Eigen::Matrix4f &graspingPose)
void setTransformation (const Eigen::Matrix4f &tcp2Object)
std::string getName ()
std::string getRobotType ()
std::string getEefName ()
std::string getCreationMethod ()
std::string getPreshapeName ()
float getQuality ()
void setQuality (float q)
Eigen::Matrix4f getTransformation ()
std::string toXML (int tabs=2)
GraspPtr clone ()
std::map< std::string, float > getConfiguration ()
void setConfiguration (std::map< std::string, float > &c)

Protected Attributes

std::map< std::string, float > eefConfiguration
 Optional: the configuration of the actors. More...
Eigen::Matrix4f poseTcp
 The pose in TCP's coordinate system. More...
std::string robotType
std::string eef
 The eef specifies which TCP node should be used. More...
std::string name
std::string creation
float quality
std::string preshape
 Optionally an eef-preshape can be defined. More...

Detailed Description

A grasp is mainly specified by a TCP to object transformation.

Constructor & Destructor Documentation

VirtualRobot::Grasp::Grasp ( const std::string &  name,
const std::string &  robotType,
const std::string &  eef,
const Eigen::Matrix4f &  poseInTCPCoordSystem,
const std::string &  creation = std::string(""),
float  quality = 0.0f,
const std::string &  eefPreshape = std::string("") 


nameThe name of this grasp.
robotTypeThe robot type for which this grasp is defined.
eefThe end effector name.
poseInTCPCoordSystemThe pose of the object, given in eef's tcp coordinate system
creationA custom string explaining how the grasp was created.
qualityA custom quality index.
eefPreshapeAn optional preshape.
VirtualRobot::Grasp::~Grasp ( )

Member Function Documentation

VirtualRobot::GraspPtr VirtualRobot::Grasp::clone ( )
std::map< std::string, float > VirtualRobot::Grasp::getConfiguration ( )

Returns the (optionally) stored configuration of the fingers / actors.

std::string VirtualRobot::Grasp::getCreationMethod ( )
std::string VirtualRobot::Grasp::getEefName ( )
std::string VirtualRobot::Grasp::getName ( )
Eigen::Matrix4f VirtualRobot::Grasp::getObjectTargetPoseGlobal ( const Eigen::Matrix4f &  graspingPose)

The returned pose is the object pose that have to be set in order to apply a grasp at pose graspingPose.

std::string VirtualRobot::Grasp::getPreshapeName ( )
float VirtualRobot::Grasp::getQuality ( )
std::string VirtualRobot::Grasp::getRobotType ( )
Eigen::Matrix4f VirtualRobot::Grasp::getTargetPoseGlobal ( RobotPtr  robot)

Get the (current) global pose of the target object when the grasp is applied on the corresponding EEF of robot. Note, that this pose is only valid for the current configuration of the robot. When the robot moves, the grasping pose will change, and you have to call this method again.

Eigen::Matrix4f VirtualRobot::Grasp::getTcpPoseGlobal ( const Eigen::Matrix4f &  objectPose)

Get the global pose that has to be achieved by the tcp in order to apply the grasp on the object at position objectPose.

Eigen::Matrix4f VirtualRobot::Grasp::getTransformation ( )

Return the transformation of this grasp. The transformation is given in the coordinate system of the tcp (whereas the tcp belongs to the eef). This transformation specifies the tcp to object relation.

void VirtualRobot::Grasp::print ( bool  printDecoration = true)
void VirtualRobot::Grasp::setConfiguration ( std::map< std::string, float > &  c)

Optionally the configuration of the fingers / actors can be stored.

void VirtualRobot::Grasp::setName ( const std::string &  name)
void VirtualRobot::Grasp::setPreshape ( const std::string &  preshapeName)
void VirtualRobot::Grasp::setQuality ( float  q)
void VirtualRobot::Grasp::setTransformation ( const Eigen::Matrix4f &  tcp2Object)

Set the transformation of this grasp. The transformation is given in the coordinate system of the tcp (whereas the tcp belongs to the eef).

tcp2ObjectThe transformation specifies the tcp to object relation.
std::string VirtualRobot::Grasp::toXML ( int  tabs = 2)

Field Documentation

std::string VirtualRobot::Grasp::creation
std::string VirtualRobot::Grasp::eef

The eef specifies which TCP node should be used.

std::map< std::string, float > VirtualRobot::Grasp::eefConfiguration

Optional: the configuration of the actors.

std::string VirtualRobot::Grasp::name
Eigen::Matrix4f VirtualRobot::Grasp::poseTcp

The pose in TCP's coordinate system.

std::string VirtualRobot::Grasp::preshape

Optionally an eef-preshape can be defined.

float VirtualRobot::Grasp::quality
std::string VirtualRobot::Grasp::robotType