#include <bhkinematic.h>
Inheritance diagram for BHKinematic:


Public Member Functions | |
| BHKinematic () | |
| void | forwardKinematics (const BHandKin::FINGER finger) |
| void | forwardKinematics () |
| TRSF_PTR | getTrsf (const BHandKin::FINGER finger) |
| bool | getTS (const BHandKin::FINGER finger) |
| void | joint2Motor (int result[4], double joints[3], double spread) |
| Computes the motor values for all Joints without considering TS-Activation. | |
| void | joint2Motor (int result[4], double joints[8]) |
| Computes the motor values for all Joints without considering TS-Activation. | |
| void | joint2MotorJoint1 (const BHandKin::FINGER finger, double &joint, int &motor, double &joint1) |
| Computes the motor value for given joint value and the corresponding value for joint1*. | |
| int | joint2Spread (const double &joint) |
| Compputes the Motor value for a given Spead joint value. | |
| void | joint2SpreadJoint1 (double &joint, int &motor, double &joint1) |
| Computes the joint vlaues of the spread joint an the corresponding motor copunt value. | |
| void | motor2Joint (const int &finger, const int &motor, double &joint0, double &joint1) |
| void | motor2Joint (double *result, int *motorValues) |
| void | resetKinematic () |
| void | setTS (const BHandKin::FINGER finger, const bool flag=true) |
| void | showJointValues () |
| void | showTrsf (const BHandKin::FINGER finger) const |
| void | showTrsf () const |
| void | updateJointValues (int *motorValues) |
| Updates the joint values (the class internal values BHKinemtic::JointValues) form given motor values. | |
| ~BHKinematic () | |
Static Public Attributes | |
Length constants for kinematic computation | |
Constants for Motor to Joint calculation | |
| static const double | FM2JNoTorque = 1.0/125.0 |
| static const double | FM2JTorque = 4.0/375.0 |
| static const double | SM2J = 2.0/35.0 |
Constants for finger joint to Motor value calculation | |
| static const double | J2FMNoTorque = 125.0 |
| static const double | J2FMTorque = 375.0/4.0 |
| static const double | J2SM = 35.0/2.0 |
Default values for Finger Joints . | |
Rotation Axis along Joint center | |
| static const double | JOINT0MAX_DEG = 140.0 + BHKinematic::JOINT0STDVALUE_DEG |
| static const double | JOINT0MAX_RAD = 142.46 * DEGTORAD |
| static const double | JOINT0STDVALUE_DEG = 2.46 |
| static const double | JOINT0STDVALUE_RAD = 2.46 * DEGTORAD |
| static const double | JOINT1MAX_DEG = 48.0 + BHKinematic::JOINT1STDVALUE_DEG |
| static const double | JOINT1MAX_RAD = BHKinematic::JOINT1MAX_DEG * DEGTORAD |
| static const double | JOINT1STDVALUE_DEG = 45.0 |
| static const double | JOINT1STDVALUE_RAD = 45.0 * DEGTORAD |
Default values of Fingers for Kinematic. | |
Roation center along finger tip | |
| static const double | JOINT1STDVALUE_DIFF_KIN_DEG = BHKinematic::JOINT1STDVALUE_KIN_DEG - BHKinematic::JOINT1STDVALUE_DEG |
| static const double | JOINT1STDVALUE_DIFF_KIN_RAD = BHKinematic::JOINT1STDVALUE_DIFF_KIN_DEG * DEGTORAD |
| static const double | JOINT1STDVALUE_KIN_DEG = 50.0 |
| static const double | JOINT1STDVALUE_KIN_RAD = BHKinematic::JOINT1STDVALUE_KIN_DEG * DEGTORAD |
Protected Member Functions | |
Clipping functions for joint values | |
| double | clipJ0 (const double &value) const |
| double | clipJ1 (const double &value) const |
Protected Attributes | |
| FingerTransforms | FingerTrsf |
| BHandJoints | JointValues |
Add TorqueSwitch status to joint2motor methods
Inverse Kinematik must be implemented.
TorqueSwitch state must be considered.
Kinematic does not handle TorqueSwicth activation properly.
Kinematic computes somtimes false motor values :-( .
| BHKinematic::BHKinematic | ( | ) |
Default constructor
| BHKinematic::~BHKinematic | ( | ) |
Default destructor
| double BHKinematic::clipJ0 | ( | const double & | value | ) | const [inline, protected] |
Clipping function for joint 0 of fingers
| value | Value to clip |
| double BHKinematic::clipJ1 | ( | const double & | value | ) | const [inline, protected] |
Clipping function for joint 1 of fingers
| value | Value to clip |
| void BHKinematic::forwardKinematics | ( | const BHandKin::FINGER | finger | ) |
Computes the forward kinematics for one finger BarrettHand
| finger | Finger for which the kintematic should be computed |
| void BHKinematic::forwardKinematics | ( | ) |
Computes the forward kinematics for BarrettHand base on current joint values
| TRSF_PTR BHKinematic::getTrsf | ( | const BHandKin::FINGER | finger | ) | [inline] |
Retunrs TRSF_PTR for finger
| finger | Finger for the TRSF_PTR. |
| bool BHKinematic::getTS | ( | const BHandKin::FINGER | finger | ) | [inline] |
Returns the value of the TorqueSwicth falg for a finger
| finger | Finger |
| void BHKinematic::joint2Motor | ( | int | result[4], | |
| double | joints[3], | |||
| double | spread | |||
| ) |
Computes the motor values for all Joints without considering TS-Activation.
| result | The Motor counts for the four motors. The order is F1,F2,F3, Spread | |
| joints | Input of joint values (Unit: deg). Order is : F1J1, F2J1, F3J1 | |
| spread | Value of spread joint |
| void BHKinematic::joint2Motor | ( | int | result[4], | |
| double | joints[8] | |||
| ) |
Computes the motor values for all Joints without considering TS-Activation.
| result | The Motor counts for the four motors. The order is F1,F2,F3, Spread | |
| joints | Input of joint values (Unit: deg). Order is : F1J1, F1J2, F2J1, F2J2, F3J1, F3J2, Spread,-Spread |
| void BHKinematic::joint2MotorJoint1 | ( | const BHandKin::FINGER | finger, | |
| double & | joint, | |||
| int & | motor, | |||
| double & | joint1 | |||
| ) |
Computes the motor value for given joint value and the corresponding value for joint1*.
| int BHKinematic::joint2Spread | ( | const double & | joint | ) |
Compputes the Motor value for a given Spead joint value.
| joint | Joint value of Spread joint (unit: deg) |
| void BHKinematic::joint2SpreadJoint1 | ( | double & | joint, | |
| int & | motor, | |||
| double & | joint1 | |||
| ) |
Computes the joint vlaues of the spread joint an the corresponding motor copunt value.
joint The joint value aof Spread (unit deg)
| motor | The return value for the motor counts | |
| joint1 | The opposite spread joint value |
| void BHKinematic::motor2Joint | ( | const int & | finger, | |
| const int & | motor, | |||
| double & | joint0, | |||
| double & | joint1 | |||
| ) |
Computes the joint values for a finger from a given motor value
| finger | Number of Finger for which the joint values should be computed (from 1 to 4) | |
| motor | Current motor value. | |
| joint0 | Returned Joint value for joint 1 of finger. | |
| joint1 | Returned Joint value for joint 1 of finger. |
| void BHKinematic::motor2Joint | ( | double * | result, | |
| int * | motorValues | |||
| ) |
Computes the joint values for each finger based on the motor postion and TorqueSwitch status.
| result | Will contain joint angles for all 8 joints after computation. So input must be somthing like double result[8]. | |
| motorValues | Array of 4 int's which contains the motor positions (in ticks) |
| void BHKinematic::resetKinematic | ( | ) |
restes kinmeatic to std joint values and deactivates TS. Spread is set to 0
| void BHKinematic::setTS | ( | const BHandKin::FINGER | finger, | |
| const bool | flag = true | |||
| ) | [inline] |
Sets the TorqueSwitch Flag for a finger.
| finger | Finger for which the TorqueSwitch is set. | |
| flag | TorqueSwicth enabled or not |
| void BHKinematic::showJointValues | ( | ) |
Prints all Joint values for the hand on terminal
| void BHKinematic::showTrsf | ( | const BHandKin::FINGER | finger | ) | const |
Prints the Transformations of the finger on console.
| finger | Finger which transformation should be printed. |
| void BHKinematic::showTrsf | ( | ) | const |
Prints the Transformations of all fingers on console.
| void BHKinematic::updateJointValues | ( | int * | motorValues | ) |
Updates the joint values (the class internal values BHKinemtic::JointValues) form given motor values.
TS-Activation is not considered.
| motorValues | The motor values. |
FingerTransforms BHKinematic::FingerTrsf [protected] |
Container for Transformation of all fingers
const double BHKinematic::FM2JNoTorque = 1.0/125.0 [static] |
Factor to compute JointValues for fingers from Motor counts without TorqueSwicth being activated
const double BHKinematic::FM2JTorque = 4.0/375.0 [static] |
Factor to compute JointValues for fingers from Motor counts with TorqueSwicth being activated
const double BHKinematic::J2FMNoTorque = 125.0 [static] |
Factor to compute Motor counts for fingers from Finger joint vlaues counts without TorqueSwicth being activated
const double BHKinematic::J2FMTorque = 375.0/4.0 [static] |
Factor to compute Motor counts for fingers from Finger joint vlaues counts with TorqueSwicth being activated
const double BHKinematic::J2SM = 35.0/2.0 [static] |
Factor to compute Spread Motor counts form JointValues
const double BHKinematic::JOINT0MAX_DEG = 140.0 + BHKinematic::JOINT0STDVALUE_DEG [static] |
Max value for joint 1 of each finger. Unit : RAD
const double BHKinematic::JOINT0MAX_RAD = 142.46 * DEGTORAD [static] |
Max value for joint 0 of each finger. Unit : RAD
const double BHKinematic::JOINT0STDVALUE_DEG = 2.46 [static] |
Default (min) value for joint 0 of each finger. Unit : DEG
const double BHKinematic::JOINT0STDVALUE_RAD = 2.46 * DEGTORAD [static] |
Default (min) value for joint 0 of each finger. Unit : RAD
const double BHKinematic::JOINT1MAX_DEG = 48.0 + BHKinematic::JOINT1STDVALUE_DEG [static] |
Max value for joint 1 of each finger. Unit : DEG
const double BHKinematic::JOINT1MAX_RAD = BHKinematic::JOINT1MAX_DEG * DEGTORAD [static] |
Max value for joint 1 of each finger. Unit : RAD
const double BHKinematic::JOINT1STDVALUE_DEG = 45.0 [static] |
Default (min) value for joint 1 of each finger. Unit : DEG
const double BHKinematic::JOINT1STDVALUE_DIFF_KIN_DEG = BHKinematic::JOINT1STDVALUE_KIN_DEG - BHKinematic::JOINT1STDVALUE_DEG [static] |
Difference between Joint 1 default value and Kinematic value. Unit : DEG.
const double BHKinematic::JOINT1STDVALUE_DIFF_KIN_RAD = BHKinematic::JOINT1STDVALUE_DIFF_KIN_DEG * DEGTORAD [static] |
Difference between Joint 1 default value and Kinematic value. Unit : RAD.
const double BHKinematic::JOINT1STDVALUE_KIN_DEG = 50.0 [static] |
Default (min) value for joint 1 of each finger for Kinematic computation. Unit : DEG
const double BHKinematic::JOINT1STDVALUE_KIN_RAD = BHKinematic::JOINT1STDVALUE_KIN_DEG * DEGTORAD [static] |
Default (min) value for joint 1 of each finger for Kinematic computation. Unit : RAD
const double BHKinematic::JOINT1STDVALUE_RAD = 45.0 * DEGTORAD [static] |
Default (min) value for joint 1 of each finger. Unit : RAD
BHandJoints BHKinematic::JointValues [protected] |
Conatiner for Values of all joints
const double BHKinematic::SM2J = 2.0/35.0 [static] |
Factor to compute JointValues for spread from Motor counts
|
|
Generated Wed Aug 16 14:59:50 2006 by
|