utilBip.h

Go to the documentation of this file.
00001 /* Copyright (C) INRIA 1999-2005
00002 ** 
00003 ** This program is free software; you can redistribute it and/or modify it
00004 ** under the terms of the GNU General Public License version 2 as published
00005 ** by the Free Software Foundation.
00006 ** 
00007 ** This program is distributed in the hope that it will be useful, but
00008 ** WITHOUT ANY WARRANTY; without even the implied warranty of
00009 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
00010 ** Public License for more details.
00011 ** 
00012 ** You should have received a copy of the GNU General Public License along
00013 ** with this program; if not, write to the Free Software Foundation, Inc.,
00014 ** 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00015 **
00016 */
00026 #ifndef __utilbip_h
00027 #define __utilbip_h
00028 
00029 #ifdef WINDOWS
00030 #define extern __declspec (dllexport)
00031 #endif
00032 
00033 /* Define and Macros               */
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 /* Name and index of each joints   */
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 /* Name and index of each ratio   */
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 /* Min and max of each joints (meme valeur a droite et a gauche)  */
00101 #define   MinCheD_F   -0.24   /* -14 deg */
00102 #define   MaxCheD_F    0.24   /* +14 deg */
00103 
00104 #define   MinCheG_F   -0.24   /* -14 deg */
00105 #define   MaxCheG_F    0.24   /* +14 deg */
00106 
00107 #define   MinCheD_S   -0.68   /* -39 deg */
00108 #define   MaxCheD_S    0.68   /* +39 deg */
00109 
00110 #define   MinCheG_S   -0.68   /* -39 deg */
00111 #define   MaxCheG_S    0.68   /* +39 deg */
00112 
00113 #define   MinGenD_S    0.10   /* + 6 deg */
00114 #define   MaxGenD_S    1.45   /* +83 deg */
00115 
00116 #define   MinGenG_S    0.10   /* + 6 deg */
00117 #define   MaxGenG_S    1.45   /* +83 deg */
00118 
00119 #define   MinHanD_S   -1.20   /* -69 deg */
00120 #define   MaxHanD_S    0.24   /*  14 deg */
00121 
00122 #define   MinHanG_S   -1.20   /* -69 deg */
00123 #define   MaxHanG_S    0.24   /*  14 deg */
00124 
00125 #define   MinHanD_F   -0.19   /* -11 deg */
00126 #define   MaxHanD_F    0.19   /* +11 deg */
00127 
00128 #define   MinHanG_F   -0.19   /* -11 deg */
00129 #define   MaxHanG_F    0.19   /* +11 deg */
00130 
00131 #define   MinHanD_V   -0.19   /* -11 deg */
00132 #define   MaxHanD_V    0.19   /* +11 deg */
00133 
00134 #define   MinHanG_V   -0.19   /* -11 deg */
00135 #define   MaxHanG_V    0.19   /* +11 deg */
00136 
00137 #define   MinLomb_V   -0.21   /* -12 deg */
00138 #define   MaxLomb_V    0.21   /* +12 deg */
00139 
00140 #define   MinLomb_F   -0.09   /*  -5 deg */
00141 #define   MaxLomb_F    0.09   /*  +5 deg */
00142 
00143 #define   MinLomb_S   -0.24   /* -14 deg */
00144 #define   MaxLomb_S    0.09   /*  +5 deg */
00145 
00146 /*
00147  Bipede Articulation Mechanical min and max
00148  */
00149 #define   MECH_MIN_ANKLE_FRON              -0.3490658504 /* -20.0 deg  */
00150 #define   MECH_MAX_ANKLE_FRON               0.3490658504 /*  20.0 deg  */
00151 #define   MECH_MIN_ANKLE_SAGI              -0.7853981635 /* -45.0 deg  */
00152 #define   MECH_MAX_ANKLE_SAGI               0.7853981635 /*  45.0 deg  */
00153 #define   MECH_MIN_KNEE                     0.0
00154 #define   MECH_MAX_KNEE                     1.570796327  /*  90.0 deg */
00155 #define   MECH_MIN_HIP_FLEX                -1.308996939  /* -75.0 deg */
00156 #define   MECH_MAX_HIP_FLEX                 0.3490658504 /*  20.0 deg */
00157 #define   MECH_MIN_HIP_SUBD                -0.2617993878 /* -15 deg   */
00158 #define   MECH_MAX_HIP_SUBD                 0.2617993878 /*  15 deg   */
00159 #define   MECH_MIN_HIP_VERT                -0.2617993878 /* -15 deg   */
00160 #define   MECH_MAX_HIP_VERT                 0.2617993878 /*  15 deg   */
00161 #define   MECH_MIN_TRUNC_VERT              -0.2617993878 /* -15 deg   */
00162 #define   MECH_MAX_TRUNC_VERT               0.2617993878 /*  15 deg   */
00163 #define   MECH_MIN_TRUNC_FRON              -0.17453293   /* -10.0 deg */
00164 #define   MECH_MAX_TRUNC_FRON               0.17453293   /*  10.0 deg */
00165 #define   MECH_MIN_TRUNC_SAGI               -0.3490658504/* -20.0 deg */
00166 #define   MECH_MAX_TRUNC_SAGI                0.17453293  /*  10.0 deg */
00167 
00168 
00169 /*
00170  Prototypes of the procedures
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

HuMAnS

humans-users@inrialpes.fr


Generated on Tue Mar 6 14:12:05 2007 for HuMAnS by doxygen 1.4.7