00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00026 #ifndef __utilbip_h
00027 #define __utilbip_h
00028
00029 #ifdef WINDOWS
00030 #define extern __declspec (dllexport)
00031 #endif
00032
00033
00034 #define Pi 3.14159265358979323846
00035 #define RADTODEG(rad) ((rad)*(180./Pi))
00036 #define DEGTORAD(deg) ((deg)*(Pi/180.))
00037
00038 #define ERROR -1
00039 #define OK 0
00040
00041
00042 #define ArtCheD_F 0
00043 #define ArtCheD_S 1
00044 #define ArtGenD_S 2
00045 #define ArtHanD_S 3
00046 #define ArtCheG_F 4
00047 #define ArtCheG_S 5
00048 #define ArtGenG_S 6
00049 #define ArtHanG_S 7
00050 #define ArtHanD_F 8
00051 #define ArtHanD_V 9
00052 #define ArtHanG_F 10
00053 #define ArtHanG_V 11
00054 #define ArtLomb_V 12
00055 #define ArtLomb_F 13
00056 #define ArtLomb_S 14
00057 #define BIP_DDL 15
00058
00059 #define MotCheD_E 0
00060 #define MotCheD_I 1
00061 #define MotGenD_S 2
00062 #define MotHanD_S 3
00063 #define MotCheG_I 4
00064 #define MotCheG_E 5
00065 #define MotGenG_S 6
00066 #define MotHanG_S 7
00067 #define MotHanD_F 8
00068 #define MotHanD_V 9
00069 #define MotHanG_F 10
00070 #define MotHanG_V 11
00071 #define MotLomb_V 12
00072 #define MotLomb_D 13
00073 #define MotLomb_G 14
00074 #define BIP_DOF 15
00075
00076
00077 #define RatCheD_FE 0
00078 #define RatCheD_SE 1
00079 #define RatGenD_S 2
00080 #define RatHanD_S 3
00081 #define RatCheG_FI 4
00082 #define RatCheG_SI 5
00083 #define RatGenG_S 6
00084 #define RatHanG_S 7
00085 #define RatHanD_F 8
00086 #define RatHanD_V 9
00087 #define RatHanG_F 10
00088 #define RatHanG_V 11
00089 #define RatLomb_V 12
00090 #define RatLomb_FD 13
00091 #define RatLomb_SD 14
00092 #define RatCheD_FI 15
00093 #define RatCheD_SI 16
00094 #define RatCheG_FE 17
00095 #define RatCheG_SE 18
00096 #define RatLomb_FG 19
00097 #define RatLomb_SG 20
00098 #define BIP_NUM_RATIO 21
00099
00100
00101 #define MinCheD_F -0.24
00102 #define MaxCheD_F 0.24
00103
00104 #define MinCheG_F -0.24
00105 #define MaxCheG_F 0.24
00106
00107 #define MinCheD_S -0.68
00108 #define MaxCheD_S 0.68
00109
00110 #define MinCheG_S -0.68
00111 #define MaxCheG_S 0.68
00112
00113 #define MinGenD_S 0.10
00114 #define MaxGenD_S 1.45
00115
00116 #define MinGenG_S 0.10
00117 #define MaxGenG_S 1.45
00118
00119 #define MinHanD_S -1.20
00120 #define MaxHanD_S 0.24
00121
00122 #define MinHanG_S -1.20
00123 #define MaxHanG_S 0.24
00124
00125 #define MinHanD_F -0.19
00126 #define MaxHanD_F 0.19
00127
00128 #define MinHanG_F -0.19
00129 #define MaxHanG_F 0.19
00130
00131 #define MinHanD_V -0.19
00132 #define MaxHanD_V 0.19
00133
00134 #define MinHanG_V -0.19
00135 #define MaxHanG_V 0.19
00136
00137 #define MinLomb_V -0.21
00138 #define MaxLomb_V 0.21
00139
00140 #define MinLomb_F -0.09
00141 #define MaxLomb_F 0.09
00142
00143 #define MinLomb_S -0.24
00144 #define MaxLomb_S 0.09
00145
00146
00147
00148
00149 #define MECH_MIN_ANKLE_FRON -0.3490658504
00150 #define MECH_MAX_ANKLE_FRON 0.3490658504
00151 #define MECH_MIN_ANKLE_SAGI -0.7853981635
00152 #define MECH_MAX_ANKLE_SAGI 0.7853981635
00153 #define MECH_MIN_KNEE 0.0
00154 #define MECH_MAX_KNEE 1.570796327
00155 #define MECH_MIN_HIP_FLEX -1.308996939
00156 #define MECH_MAX_HIP_FLEX 0.3490658504
00157 #define MECH_MIN_HIP_SUBD -0.2617993878
00158 #define MECH_MAX_HIP_SUBD 0.2617993878
00159 #define MECH_MIN_HIP_VERT -0.2617993878
00160 #define MECH_MAX_HIP_VERT 0.2617993878
00161 #define MECH_MIN_TRUNC_VERT -0.2617993878
00162 #define MECH_MAX_TRUNC_VERT 0.2617993878
00163 #define MECH_MIN_TRUNC_FRON -0.17453293
00164 #define MECH_MAX_TRUNC_FRON 0.17453293
00165 #define MECH_MIN_TRUNC_SAGI -0.3490658504
00166 #define MECH_MAX_TRUNC_SAGI 0.17453293
00167
00168
00169
00170
00171
00172
00173
00174
00187 extern int bipUtilCalcPosRatio(double th[BIP_DDL], double q[BIP_DDL], double ratio[BIP_NUM_RATIO]);
00188
00199 extern int bipUtilCalcPos(double th[BIP_DDL], double q[BIP_DDL]);
00200
00211 extern int bipUtilCalcRatio(double th[BIP_DDL], double ratio[BIP_NUM_RATIO]);
00212
00223 extern int bipUtilCalcMotors(double q[BIP_DDL], double th[BIP_DDL]);
00224
00225
00226 #endif