Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ArmUtil Class Reference

#include <ArmUtil.h>

List of all members.


Detailed Description

Class containing common utility functions.

provides functionality such as converting from joint angles to encoder values, conversion between joints and operational coordinates, print functionality etc.


Public Methods

 ArmUtil ()
 Constructor using default parameters.

 ArmUtil (double l1, double l2, double l3, double *e_2_d, int *zero_Enc)
 Constructor with specificed parameters.

double radToDeg (double rad)
 radian to degree conversion

double degToRad (double deg)
 degree to radian conversion

double mod2Pi (double deg)
 remainder when a number is divided by 360 degrees

jointAnglesType opToJoint (opCoordinatesType o)
 Operational co-ordinate to joint co-ordinates conversion.

opCoordinatesType jointToOp (jointAnglesType j)
 degree to encoder value conversion

int degToEnc (int m, double deg)
 encoder to degree value conversion

double encToDeg (int m, int motPos)
void printJointAngles (jointAnglesType j)
 Print joint angles.

void printOpCoordinates (opCoordinatesType o)
 Print operational coordinates.

void printMotorLoad (motorLoadType m)
 Print motor load.

void printArmData (armDataType arm)
 Print arm data.

bool jointLimitCheck (int i, double deg)
 check if a particular joint angle can be reached

bool jointLimitCheck (jointAnglesType j)
 checking if a particular joint angle configuration can be reached

double processAngle (int m, double x)

Public Attributes

double L1
 Arm length joining joint 1 and joint 2.

double L2
 Arm length joining joint 2 and joint 3.

double L3
 Arm length joining joint 3 and joint 4.

double e2d [6]
 An array containing encoder to degree map for each motor.

int zeroEnc [6]
 An array containing encoder offset for 0 degree for each motor.


Constructor & Destructor Documentation

ArmUtil::ArmUtil  
 

Constructor using default parameters.

ArmUtil::ArmUtil double    l1,
double    l2,
double    l3,
double *    e_2_d,
int *    zero_Enc
 

Constructor with specificed parameters.

Parameters:
l1  Arm length joining joint 1 and joint 2.
l2  Arm length joining joint 2 and joint 3.
l3  Arm length joining joint 3 and joint 4.
e_2_d  pointer to an array of size 6 containing encoder to degrees map for each motors.
zero_Enc  pointer to an array of size 6 containing encoder offset for 0 degrees for each motors.

Member Function Documentation

double ArmUtil::radToDeg double    rad
 

radian to degree conversion

double ArmUtil::degToRad double    deg
 

degree to radian conversion

double ArmUtil::mod2Pi double    deg
 

remainder when a number is divided by 360 degrees

Parameters:
deg  value in degrees
Returns :
value between -180 to 180 degrees

jointAnglesType ArmUtil::opToJoint opCoordinatesType    o
 

Operational co-ordinate to joint co-ordinates conversion.

Parameters:
o  an instance of structure opCoordinatesType containing operational coordinates
Returns :
an instance of structure jointAnglesType containing corresponding joint coordinates\

opCoordinatesType ArmUtil::jointToOp jointAnglesType    j
 

degree to encoder value conversion

Parameters:
j  an instance of structure jointAnglesType containing joint angles
Returns :
an instance of structure opCoordinatesType containing corresponding operational coordinates

int ArmUtil::degToEnc int    m,
double    deg
 

encoder to degree value conversion

Parameters:
m  joint (or motor) number, can take values from 0 to 5
deg  joint angle in degrees

double ArmUtil::encToDeg int    m,
int    motPos
 

Parameters:
m  joint (or motor) number, can take values from 0 to 5
motPos  motor position in encoder units

void ArmUtil::printJointAngles jointAnglesType    j
 

Print joint angles.

void ArmUtil::printOpCoordinates opCoordinatesType    o
 

Print operational coordinates.

void ArmUtil::printMotorLoad motorLoadType    m
 

Print motor load.

void ArmUtil::printArmData armDataType    arm
 

Print arm data.

bool ArmUtil::jointLimitCheck int    i,
double    deg
 

check if a particular joint angle can be reached

Parameters:
i  joint number
deg  joint angle in degree

bool ArmUtil::jointLimitCheck jointAnglesType    j
 

checking if a particular joint angle configuration can be reached

Returns :
true only when all joint angles can be reached

double ArmUtil::processAngle int    m,
double    x
 


Member Data Documentation

double ArmUtil::L1
 

Arm length joining joint 1 and joint 2.

double ArmUtil::L2
 

Arm length joining joint 2 and joint 3.

double ArmUtil::L3
 

Arm length joining joint 3 and joint 4.

double ArmUtil::e2d[6]
 

An array containing encoder to degree map for each motor.

int ArmUtil::zeroEnc[6]
 

An array containing encoder offset for 0 degree for each motor.


The documentation for this class was generated from the following files:
Generated on Tue Jan 10 17:29:20 2006 for Stanford AI Robot (STAIR) by doxygen1.2.17