libmove3d  3.13.0
Public Member Functions | Public Attributes
gpDoubleGrasp Class Reference

#include <gpGrasp.h>

List of all members.

Public Member Functions

 gpDoubleGrasp ()
 Default constructor of the class gpDoubleGrasp.
 gpDoubleGrasp (const gpGrasp &graspA, const gpGrasp &graspB)
 Constructor of the class gpDoubleGrasp from two gpGrasp.
 gpDoubleGrasp (const gpDoubleGrasp &dgrasp)
int setFromSingleGrasps (const gpGrasp &graspA, const gpGrasp &graspB)
gpDoubleGraspoperator= (const gpDoubleGrasp &dgrasp)
 Copy operator of the class gpDoubleGrasp.
bool operator< (const gpDoubleGrasp &grasp)
 Double grasp quality comparison operator.
int print ()
int draw (double cone_length, int cone_nb_slices=10)
int computeStability ()
int computeQuality ()
int computeBestObjectOrientation (p3d_matrix4 torsoPose, p3d_matrix4 objectPose)

Public Attributes

int ID
gpGrasp grasp1
gpGrasp grasp2
double distanceScore
double stability
double quality

Detailed Description

This class is used to describe all the characteristics of a double grasp (the object is grasped simultaneously with the two hands).


Member Function Documentation

int gpDoubleGrasp::computeBestObjectOrientation ( p3d_matrix4  torsoPose,
p3d_matrix4  objectPose 
)

Computes the "best" orientation to give to an object to grasp it from a given position with the double grasp and for a given pose of the robot torso. The function will try to align the best possible the hand frame to the torse pose.

Parameters:
torsoPosetorso pose matrix in world coordinates
objectPoseobject pose matrix in world coordinates Only the position part is used, the rotation part will be filled by the function.
Returns:
GP_OK in case of success, GP_ERROR otherwise NB: this function only works if the double grasp has one grasp for GP_SAHAND_RIGHT and one grasp for GP_SAHAND_LEFT. The convention for the torso pose matrix is Z upward,, X points to the front of the torse and Y to its left.
int gpDoubleGrasp::computeQuality ( )

Computes the quality score of a double grasp.

Returns:
GP_OK in case of success, GP_ERROR otherwise
int gpDoubleGrasp::computeStability ( )

Computes the stability score of a double grasp.

Returns:
GP_OK in case of success, GP_ERROR otherwise
int gpDoubleGrasp::draw ( double  length,
int  nb_slices = 10 
)

Draws all the contacts of a double grasp.

Parameters:
lengthlenght of each friction cone to draw
nb_slicesnumber of segments of each cone discretization
Returns:
GP_OK in case of success, GP_ERROR otherwise The convention is (view from top, with direct frames) Z Z ^ ^ | | | | || || || || || || || || || / / \ \ || || || ||_||_|| / / \ \ ||_||_|| | / ---> Y Y <--- \ | |__LEFT__/ |__RIGHT_|
int gpDoubleGrasp::print ( )

Prints the content of a gpDoubleGrasp variable in the standard output.

Returns:
GP_OK in case of success, GP_ERROR otherwise
int gpDoubleGrasp::setFromSingleGrasps ( const gpGrasp graspA,
const gpGrasp graspB 
)

Sets a double grasp from two gpGrasp.

Returns:
GP_OK in case of success, GP_ERROR otherwise

Member Data Documentation

distance score between the two hands

the grasps of each hand

ID number

quality score of the double grasp

stability score of the double grasp


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines