preshape Class Reference

Holds the grasp preshape type and the DOF values for that presahpe. More...

#include <grasp_preshape.h>

List of all members.

Public Member Functions

double distanceTo (preshape) const
void get_preshape (double &, double &, double &, double &) const
preshapeType get_preshapeType () const
 preshape (const preshape &)
 preshape (preshapeType)
 preshape ()
void set_preshape (double, double, double, double)
void set_preshapeType (preshapeType)

Private Member Functions

void updateAngles ()

Private Attributes

double a
 Spread angle for Barrett Hand in degrees (DOF #0).
double f1
 Flexion of finger 1 of Barrett Hand in degrees (DOF #1).
double f2
 Flexion of finger 2 of Barrett Hand in degrees (DOF #2).
double f3
 Flexion of finger 3 of Barrett Hand in degrees (DOF #3).
preshapeType pType
 The current preshape.

Detailed Description

Holds the grasp preshape type and the DOF values for that presahpe.

For the Barrett hand there are currently 4 defined preshapes. Each one is defined by its DOF values. Right now, the 4 shapes are only distinguished by the spread angle of the fingers.

Definition at line 76 of file grasp_preshape.h.


Constructor & Destructor Documentation

preshape::preshape (  ) 

Sets the preshape to PR_None and sets the initial angle values.

Definition at line 45 of file grasp_preshape.cpp.

preshape::preshape ( preshapeType  p  ) 

Initialized the preshape type to p and updates the DOF values.

Definition at line 53 of file grasp_preshape.cpp.

preshape::preshape ( const preshape p  ) 

Copies preshape p .

Definition at line 61 of file grasp_preshape.cpp.


Member Function Documentation

double preshape::distanceTo ( preshape  p  )  const

Computes a scalar distance between this preshape and preshape p. Since all preshapes currently only set the spread angle, this is simply computed as abs(a - p.a) / max(a, p.a) .

Definition at line 112 of file grasp_preshape.cpp.

void preshape::get_preshape ( double &  aa,
double &  ff1,
double &  ff2,
double &  ff3 
) const

Returns the preshape DOF values.

Definition at line 98 of file grasp_preshape.cpp.

preshapeType preshape::get_preshapeType (  )  const

Returns the preshape type.

Definition at line 90 of file grasp_preshape.cpp.

void preshape::set_preshape ( double  aa,
double  ff1,
double  ff2,
double  ff3 
)

Sets the preshape type to PR_None and sets the DOF values directly.

Definition at line 80 of file grasp_preshape.cpp.

void preshape::set_preshapeType ( preshapeType  p  ) 

Sets the preshape type to p and updates the DOF values.

Definition at line 71 of file grasp_preshape.cpp.

void preshape::updateAngles (  )  [private]

Uses the preshape type to set the DOF values.

Definition at line 136 of file grasp_preshape.cpp.


Member Data Documentation

double preshape::a [private]

Spread angle for Barrett Hand in degrees (DOF #0).

Definition at line 80 of file grasp_preshape.h.

double preshape::f1 [private]

Flexion of finger 1 of Barrett Hand in degrees (DOF #1).

Definition at line 83 of file grasp_preshape.h.

double preshape::f2 [private]

Flexion of finger 2 of Barrett Hand in degrees (DOF #2).

Definition at line 86 of file grasp_preshape.h.

double preshape::f3 [private]

Flexion of finger 3 of Barrett Hand in degrees (DOF #3).

Definition at line 89 of file grasp_preshape.h.

The current preshape.

Definition at line 92 of file grasp_preshape.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:23 2012