grasp_representation Class Reference

This class is used to create a visual representation of a candidate grasp. More...

#include <grasp_visualization.h>

List of all members.

Public Member Functions

void changeColor (double, double, double)
void changeRadius (double)
 grasp_representation (SbMatrix, SbMatrix, SoSeparator *)
void resetColor ()
 ~grasp_representation ()

Private Attributes

SoArrowarrow
 A pointer to the long approach arrow.
SoMaterial * material
 Material for the representation.
SoSeparator * parentSep
 Inventor root node where this representation will be added to.
SoSeparator * sep
 Root of sub-graph containing sphere and palm arrow.
SoSphere * sphere
 A pointer to the palm position/quality indicator sphere.
SoArrowthArrow
 A pointer to the short thumb arrow.
SoTransform * thRot
 The rotation of the thumb arrow.
SoSeparator * thSep
 Root of sub-graph containing thumb arrow.
SoSeparator * top
 Root node of this representation.
SoTransform * tranArrowSphere
 The position and orientation of the sphere and approach vecotr.
bool visOn
 Not used right now.

Detailed Description

This class is used to create a visual representation of a candidate grasp.

After the user generates a set of candidate grasps either automatically with the planner, or by reading them in from a text file, a renderArea showing the shape primitves of the grasped object is opened. For each candidate grasp, a grasp representation, consisting of a sphere and two arrows at right angles, is built in that same window. The sphere indicates the center position of the palm relative to the object. The long arrow indicates the palm approach direction, and the short arrow indicates the thumb direction. During the testing process, the sphere representing the current grasp being tested is colored red. The resulting quality of the grasp is used to set the relative radiius of the grasp sphere. The higher the quality, the larger the sphere.

Definition at line 59 of file grasp_visualization.h.


Constructor & Destructor Documentation

grasp_representation::grasp_representation ( SbMatrix  mat,
SbMatrix  thMat,
SoSeparator *  glroot 
)

Creates a visual representation of a candidate grasp. The representations consists of a sphere with a long arrow leaving the center of the sphere and a short arrow at a right angle to the longer one. The long arrow indicates the palm approach vector, and the short arrow indicates the thumb direction. The rotation of the palm, z-approach, vector is specified with mat , the rotation of the thumb vector is specified with thMat . The Inventor sub graph containing these elements is added to the provided glroot node .

Definition at line 74 of file grasp_visualization.cpp.

grasp_representation::~grasp_representation (  ) 

Removes and deletes the Inventor elements for this represenntation.

Definition at line 118 of file grasp_visualization.cpp.


Member Function Documentation

void grasp_representation::changeColor ( double  r,
double  g,
double  b 
)

Changes the diffuse color of the representation.

Definition at line 151 of file grasp_visualization.cpp.

void grasp_representation::changeRadius ( double  rad  ) 

Alters the radius of the center sphere of the representation to rad GRASP_SPHERE_SIZE_FACTOR.

Definition at line 170 of file grasp_visualization.cpp.

void grasp_representation::resetColor (  ) 

Resets the material properties of the representation elements to their original values.

Definition at line 161 of file grasp_visualization.cpp.


Member Data Documentation

A pointer to the long approach arrow.

Definition at line 80 of file grasp_visualization.h.

SoMaterial* grasp_representation::material [private]

Material for the representation.

Definition at line 74 of file grasp_visualization.h.

SoSeparator* grasp_representation::parentSep [private]

Inventor root node where this representation will be added to.

Definition at line 62 of file grasp_visualization.h.

SoSeparator* grasp_representation::sep [private]

Root of sub-graph containing sphere and palm arrow.

Definition at line 68 of file grasp_visualization.h.

SoSphere* grasp_representation::sphere [private]

A pointer to the palm position/quality indicator sphere.

Definition at line 83 of file grasp_visualization.h.

A pointer to the short thumb arrow.

Definition at line 89 of file grasp_visualization.h.

SoTransform* grasp_representation::thRot [private]

The rotation of the thumb arrow.

Definition at line 86 of file grasp_visualization.h.

SoSeparator* grasp_representation::thSep [private]

Root of sub-graph containing thumb arrow.

Definition at line 71 of file grasp_visualization.h.

SoSeparator* grasp_representation::top [private]

Root node of this representation.

Definition at line 65 of file grasp_visualization.h.

SoTransform* grasp_representation::tranArrowSphere [private]

The position and orientation of the sphere and approach vecotr.

Definition at line 77 of file grasp_visualization.h.

Not used right now.

Definition at line 92 of file grasp_visualization.h.


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


graspit
Author(s):
autogenerated on Wed Jan 25 11:00:21 2012