ArmUtil.hGo to the documentation of this file.00001 #ifndef ARMUTIL_H 00002 #define ARMUTIL_H 00003 00004 00006 struct jointAnglesType 00007 { 00008 double angles[6]; 00009 }; 00010 00011 00013 00017 struct opCoordinatesType 00018 { 00019 double r; 00020 double z; 00021 double alpha; 00022 double beta; 00023 double gamma; 00024 double gripperAngle; 00025 }; 00026 00027 00029 00033 struct motorLoadType 00034 { 00035 double load[6]; 00036 }; 00037 00038 00040 struct armDataType 00041 { 00042 jointAnglesType joints; 00043 opCoordinatesType op; 00044 motorLoadType ml; 00045 }; 00046 00047 00049 00052 class ArmUtil 00053 { 00054 public: 00055 00056 double L1; 00057 double L2; 00058 double L3; 00059 double e2d[6]; 00060 int zeroEnc[6]; 00061 00062 00064 ArmUtil(); 00065 00066 00068 00075 ArmUtil(double l1, double l2, double l3, double *e_2_d, int *zero_Enc); 00076 00077 00079 double radToDeg(double rad); 00080 00081 00083 double degToRad(double deg); 00084 00085 00087 00091 double mod2Pi(double deg); 00092 00093 00095 00099 jointAnglesType opToJoint(opCoordinatesType o); 00100 00101 00103 00107 opCoordinatesType jointToOp(jointAnglesType j); 00108 00109 00111 00115 int degToEnc(int m, double deg); 00116 00117 00119 00123 double encToDeg(int m, int motPos); 00124 00125 00127 void printJointAngles(jointAnglesType j); 00128 00129 00131 void printOpCoordinates(opCoordinatesType o); 00132 00133 00135 void printMotorLoad(motorLoadType m); 00136 00137 00139 void printArmData(armDataType arm); 00140 00141 00143 00147 bool jointLimitCheck(int i, double deg); 00148 00149 00151 00154 bool jointLimitCheck(jointAnglesType j); 00155 00156 00157 double processAngle(int m,double x); 00158 }; 00159 #endif Generated on Tue Jan 10 17:29:19 2006 for Stanford AI Robot (STAIR) by ![]() |