#include <bhfinger.h>
Inheritance diagram for BHFinger:
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 | |
BHPIDController * | ForceCtr |
Protected Attributes | |
short | DForce |
ZLog * | ForceLog |
short | MaxForce |
short | MinForce |
short | ZeroForce |
BHFinger::BHFinger | ( | MotorFeedback * | mf | ) |
Constructor for BHMotorExt object.
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.
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.
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. |
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.
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.
force | Applied force on the finger. |
short BHFinger::getDForce | ( | ) | const [inline] |
returns the value of the 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
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
int BHFinger::getInitForce | ( | ) | const [inline] |
Returns the value of the initialization force of the finger.
int BHFinger::getMaxForce | ( | ) | const [inline] |
Returns the (relative) value of the maximum allowed force.
I.e. returns maxforce-zeroforce.
int BHFinger::getMaxForceAbs | ( | ) | const [inline] |
Returns the absolute value of the maximum allowed force.
int BHFinger::getMinForce | ( | ) | const [inline] |
Returns the (relative) value of the minimum allowed force.
I.e. returns minforce-zeroforce.
int BHFinger::getMinForceAbs | ( | ) | const [inline] |
Returns the absolut value of the minimum allowed force.
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.
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
force | Value for the desired force |
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().
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().
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().
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().
force | Minimum allowed force for finger. |
void BHFinger::setPos | ( | const unsigned int | pos | ) | throw (BHMotorException) [inline] |
Sets the (desired) position of the finger.
pos | Position of the finger. |
Reimplemented from BHMotor.
short BHFinger::DForce [protected] |
Desired force for finger
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.
![]() |
Generated Wed Aug 16 14:59:40 2006 by
![]() |