BHFinger Class Reference

This class is designed to controll each finger. This class contains the informations for the movements and forces of one finger, and the methods to controll these values. More...

#include <bhfinger.h>

Inheritance diagram for BHFinger:

Inheritance graph
[legend]
Collaboration diagram for BHFinger:

Collaboration graph
[legend]

Public Member Functions

 BHFinger (MotorFeedback *mf, int speed, int minForce, int maxForce)
 Constructor with speed and force range.
 BHFinger (MotorFeedback *mf, int speed)
 BHFinger (MotorFeedback *mf)
void setPos (const unsigned int pos) throw (BHMotorException)
 Sets the (desired) position of the finger.
Force Commands
These commands should be used to get and set the force Values of a BarrettFinger

int forceInRange ()
 Computes the force applied on the finger.
int forceInRange (const short force)
 Computes the force applied on the finger.
short getDForce () const
 returns the value of the desired force.
int getForce () const
 Returns the force applied on the finger.
int getForceAbs () const
 Returns the absolute force applied on the finger.
int getInitForce () const
 Returns the value of the initialization force of the finger.
int getMaxForce () const
 Returns the (relative) value of the maximum allowed force.
int getMaxForceAbs () const
 Returns the absolute value of the maximum allowed force.
int getMinForce () const
 Returns the (relative) value of the minimum allowed force.
int getMinForceAbs () const
 Returns the absolut value of the minimum allowed force.
void initForce () throw (BHFingerException)
 Sets the ZeroForce of the finger.
void initForce (const short initForce) throw (BHFingerException)
 Sets the ZeroForce of the finger.
void resetForce ()
 Resets the force values.
void resetMaxForce ()
 Resets the min force values.
void resetMinForce ()
 Resets the min force values.
void setDForce (const short force) throw (BHFingerException)
 Sets the value for the desired Force.
void setMaxForce (short force) throw (BHFingerException)
 Sets the (relative) maximal allowed force for finger.
void setMaxForceAbs (short force) throw (BHFingerException)
 Sets the absolute maximal allowed force for finger.
void setMinForce (short force) throw (BHFingerException)
 Sets the (relative) minimal allowed force for finger.
void setMinForceAbs (short force) throw (BHFingerException)
 Sets the absolute minimal allowed force for finger.
Force Log Commands
These Commands can be use to log and mofify the logged force values observed by the hand.

void log ()
 Logs the current "normalized" force value.

Data Fields

BHPIDControllerForceCtr

Protected Attributes

short DForce
ZLogForceLog
short MaxForce
short MinForce
short ZeroForce

Detailed Description

This class is designed to controll each finger. This class contains the informations for the movements and forces of one finger, and the methods to controll these values.


Constructor & Destructor Documentation

BHFinger::BHFinger ( MotorFeedback mf  ) 

Constructor for BHMotorExt object.

Parameters:
mf MotorFeedback pointer, for force and position computation in rt mode

BHFinger::BHFinger ( MotorFeedback mf,
int  speed 
)

Constructor with speed setting.

Constroucts an object with the given speed.

Parameters:
mf MotorFeedback pointer, for force and position computation in rt mode
speed Speed for finger

BHFinger::BHFinger ( MotorFeedback mf,
int  speed,
int  minForce,
int  maxForce 
)

Constructor with speed and force range.

Constroucts a BHFinger Object with the given speed and the minimal/maximal allowed forces.

Parameters:
mf MotorFeedback pointer, for force and position computation in rt mode
speed Speed for finger
minForce Minimal allowed force for finger.
maxForce Maximal allowed force for finger.


Member Function Documentation

int BHFinger::forceInRange (  )  [inline]

Computes the force applied on the finger.

Computes the force applied on the finger an returns 0 if force is between Min and Max force. If value is lower than MinForce -1 is returned. If value is over MaxForce 1 is returned. This functions does not use exceptions because they take to much time to be processed.

Returns:
0 if force is OK, -1 if force is to low, +1 if force is to high.

int BHFinger::forceInRange ( const short  force  )  [inline]

Computes the force applied on the finger.

Computes the force applied on the finger an returns 0 if force is between Min and Max force. If value is lower than MinForce -1 is returned. If value is over MaxForce 1 is returned. This functions does not use exceptions because they take to much time to be processed.

Parameters:
force Applied force on the finger.
Returns:
0 if force is OK, -1 if force is to low, +1 if force is to high.

short BHFinger::getDForce (  )  const [inline]

returns the value of the desired force.

Returns:
Value of Desired force.

int BHFinger::getForce (  )  const [inline]

Returns the force applied on the finger.

Returns the "normalized" force. The force value is the actual force value minus the ZeroForce value

Returns:
Force applied on finger. The dricetion of the force is given by sing.
Minus -> Force is applied in direction of and plam (close). Positive -> Force is applied in opposite direction of and plam (open).

int BHFinger::getForceAbs (  )  const [inline]

Returns the absolute force applied on the finger.

Returns the "absolute " force. The force value is the actual force value obtained from the strain gauge sensor

Returns:
Force applied on finger.

int BHFinger::getInitForce (  )  const [inline]

Returns the value of the initialization force of the finger.

Returns:
Initialization force (ZeroForce) of finger.

int BHFinger::getMaxForce (  )  const [inline]

Returns the (relative) value of the maximum allowed force.

I.e. returns maxforce-zeroforce.

Returns:
Maximum allowed force value.

int BHFinger::getMaxForceAbs (  )  const [inline]

Returns the absolute value of the maximum allowed force.

Returns:
Maximum allowed force value.

int BHFinger::getMinForce (  )  const [inline]

Returns the (relative) value of the minimum allowed force.

I.e. returns minforce-zeroforce.

Returns:
Minimum allowed force value.

int BHFinger::getMinForceAbs (  )  const [inline]

Returns the absolut value of the minimum allowed force.

Returns:
Minimum allowed force value.

void BHFinger::initForce (  )  throw (BHFingerException) [inline]

Sets the ZeroForce of the finger.

Throws an exception, if force is to low or to high.

Here is the call graph for this function:

void BHFinger::initForce ( const short  initForce  )  throw (BHFingerException) [inline]

Sets the ZeroForce of the finger.

Throws an exception, if force is to low or to high.

Parameters:
initForce Force applied on finger without any payload.

void BHFinger::log (  )  [inline]

Logs the current "normalized" force value.

Here is the call graph for this function:

void BHFinger::resetForce (  )  [inline]

Resets the force values.

I.E. sets them to the lowest/highest possible value so that they do not have any influence

void BHFinger::resetMaxForce (  )  [inline]

Resets the min force values.

I.E. sets them to the highest possible value so that it does not have any influence

void BHFinger::resetMinForce (  )  [inline]

Resets the min force values.

I.E. sets them to the highest possible value so that it does not have any influence

void BHFinger::setDForce ( const short  force  )  throw (BHFingerException) [inline]

Sets the value for the desired Force.

The desired force value is used of the Hand should adjust a force value.
Throws an exception if force is not between MinForce and MaxForce

Parameters:
force Value for the desired force
See also:
DForce;

void BHFinger::setMaxForce ( short  force  )  throw (BHFingerException) [inline]

Sets the (relative) maximal allowed force for finger.

Relative means it the the maxforce = force +zeroforce. E.g. if you enter a maxforce of 40 and init force is 110 the abs force value (sensor value) will be 150. The force value is used in function forceInRange().

Parameters:
force Maximum allowed force for finger.

void BHFinger::setMaxForceAbs ( short  force  )  throw (BHFingerException) [inline]

Sets the absolute maximal allowed force for finger.

The force value is used in fnction forceInRange().

Parameters:
force Maximum allowed force for finger.

void BHFinger::setMinForce ( short  force  )  throw (BHFingerException) [inline]

Sets the (relative) minimal allowed force for finger.

Relative means it the the minforce = force+zeroforce. E.g. if you enter -40 and init force is 110 the abs force value (sensor value) for minforce will be 70. The force value is used in function forceInRange().

Parameters:
force Minimum allowed force for finger.

void BHFinger::setMinForceAbs ( short  force  )  throw (BHFingerException) [inline]

Sets the absolute minimal allowed force for finger.

The force value is used in function forceInRange().

Parameters:
force Minimum allowed force for finger.

void BHFinger::setPos ( const unsigned int  pos  )  throw (BHMotorException) [inline]

Sets the (desired) position of the finger.

Parameters:
pos Position of the finger.

Reimplemented from BHMotor.


Field Documentation

short BHFinger::DForce [protected]

Desired force for finger

BHPIDController* BHFinger::ForceCtr

controller to adjust force

ZLog* BHFinger::ForceLog [protected]

Log for force values

short BHFinger::MaxForce [protected]

Maximum force allowed for finger.

short BHFinger::MinForce [protected]

Minimum force allowed for finger.

short BHFinger::ZeroForce [protected]

Force applied on finger without any payload.


The documentation for this class was generated from the following files:

tams Tim Baier bhandlib v0.25
Generated Wed Aug 16 14:59:40 2006 by doxygen 1.4.7