ロボカップ2013のジャパンオープンメインプログラム

Dependencies:   PID TextLCD mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers common.h Source File

common.h

00001 
00002 enum{
00003     FRONT = 0,
00004     LEFT,
00005     BACK,
00006     RIGHT,
00007 };
00008 enum{
00009     VX = 0,
00010     VY,
00011 };
00012 
00013 const double way16[16][2] = {
00014     {0,1},
00015     {0.5,0.866},
00016     {0.707,0.707},
00017     {0.866,0.5},
00018     {1.0},
00019     {0.866,-0.5},
00020     {0.707,-0.707},
00021     {0.5,-0.866},
00022     {0,-1},
00023     {-0.5,-0.866},
00024     {-0.707,-0.707},
00025     {-0.866,-0.5},
00026     {-1,0},
00027     {-0.866,0.5},
00028     {-0.707,0.707},
00029     {-0.5,0.866}
00030     };
00031 
00032 /*距離に応じた調整値、ボールの指定範囲外なら進む向きが大きい?,
00033 範囲内なら外に出ようとする力nearに大きな
00034 調整がかかる、これも配列*/
00035 
00036 const double modulate_near[17] = {//0~4 = -5,-4,-3,-2,-1,,5 = 0,,6~16=1,2,3.....10
00037     1.20,1.1,1.05,1.02,1.01,1,1,1,1,1,1,1,1,1,1,1,1
00038     };
00039     
00040 const double modulate_go[17] = {
00041     1,1,1,1,1,1,1.01,1.02,1.03,1.05,1.07,1.08,1.10,1.12,1.15,1.15,1.15
00042     };
00043 
00044 const double modulate[17] = {
00045     1.1,1.05,1.02,1.02,1.01,1,1.01,1.02,1.03,1.05,1.07,1.08,1.15,1.15,1.15,1.15,1.20
00046     };
00047 
00048 //defense move action support.
00049 const double apply[9] = {
00050     1.4,1.4,1.3,1.2,1.15,1.15,1.10,1.05,1.0
00051     };
00052 
00053 
00054 const double near0[10][2] = {//go go goボールと一定感覚を保とうとする輩,これまた角度ではなく値を直接投げておく
00055     {-1,0},
00056     {-0.505,0.505},
00057     {-0.3,0.866},
00058     {0,1},
00059     {0.3,0.866},
00060     {0.505,0.505},
00061     {1,0},
00062     {0.3,-0.3},//0.707,-0.707
00063     {0,-1.0},
00064     {-0.3,-0.3}//-0.707,-0.707
00065     };
00066     
00067 const double near1[10][2] = {//back back back
00068     {1,0},
00069     {0.5,-0.5},
00070     {0.25,0},//0.5,-0.866
00071     {0,0.2},
00072     {-0.25,0},//-0.5,-0.866
00073     {-0.5,-0.5},
00074     {-1,0},
00075     {-0.707,0.303},//-0.707,0.707
00076     {0,0.4},
00077     {0.707,0.303}//0.707,0.707
00078     };
00079     
00080 const double go[10][2] = {//ir_numに沿ったそれぞれの動きを直接配列に投げて置く参照、ir_action0~9
00081     {0,-0.433},
00082     {-0.303,-0.757},//0.303
00083     {-0.3,0},
00084     {0,0.8},//other block
00085     {0.3,0},
00086     {0.303,-0.757},//0.303
00087     {0,-0.433},
00088     {0,-1},
00089     {0,-0.5},//other block@ir_action8
00090     {0,-1},
00091     };
00092     
00093 const int keep_dist[10] = {//ir_num[0~9]
00094     45,48,45,44,45,50,49,41,49,39//45,49,444444,
00095     };
00096     
00097 const int keep_ping[4] = {
00098     0,58,30,56
00099     };
00100     
00101 const int keep_pingSTRONG[4] = {
00102     0,40,20,36
00103     };
00104     
00105 const int keep_ball[10] = {
00106     37,33,27,27,27,30,34,31,32,32//28
00107     };
00108 
00109 const double goal_state1[12][2] = {
00110     {0.866,0.5},
00111     {0.866,0.5},
00112     {0.866,0.5},
00113     {0.866,0.5},
00114     {0.866,0.5},
00115     {0.433,0.25},
00116     {0.433,0.25},
00117     {0.433,0.25},
00118     {0.433,0},
00119     {0,0},
00120     {0,0},
00121     {0.0}
00122     };
00123 
00124 const double goal_state2[12][2] = {
00125     {0,-1},
00126     {0,-0.8},
00127     {0,-0.6},
00128     {0,-0.4},
00129     {0,-0.2},
00130     {0,0},
00131     {0,0},
00132     {0,0},
00133     {0,0},
00134     {0,0.1},
00135     {0,0.3},
00136     {0,0.4}
00137     };
00138     
00139 const double goal_state3[12][2] = {
00140     {-0.866,0.5},
00141     {-0.866,0.5},
00142     {-0.866,0.5},
00143     {-0.866,0.5},
00144     {-0.866,0.5},
00145     {-0.433,0.25},
00146     {-0.433,0.25},
00147     {-0.433,0.25},
00148     {-0.433,0},
00149     {0,0},
00150     {0,0},
00151     {0.0}
00152     };
00153 
00154 const double ball_state0[10][2] = {//ir_num[0~9]
00155     {-1,-0.5},
00156     {-0.866,0.2},
00157     {-0.707,0.5},
00158     {0,0},
00159     {0.707,0.5},
00160     {0.866,0.2},
00161     {1,-0.5},
00162     {0.7,-1},
00163     {0,-1},
00164     {-0.7,-1}
00165     };
00166     
00167 const double ball_state1[10][2] = {//ir_num[0~9]
00168     {-1.0,-0.3},
00169     {-0.9,-0.4},
00170     {-0.9,0.866},
00171     {0,1},
00172     {0.9,0.866},
00173     {0.9,-0.4},
00174     {1.0,-0.3},
00175     {-0.404,-0.7},
00176     {0,0},//other comand
00177     {0.404,-0.7}  
00178     };
00179     
00180 
00181 const double strongPing1[12][2] = {
00182     {0.866,0.5},
00183     {0.866,0.5},
00184     {0.866,0.5},
00185     {0.866,0.5},
00186     {0.577,0.5},
00187     {0.577,0.5},
00188     {0.577,0.25},
00189     {0.577,0.25},
00190     {0.433,0.1},
00191     {0.211,0.1},
00192     {0,0},
00193     {0.0}
00194     };
00195 
00196 const double strongPing2[12][2] = {
00197     {0,0},
00198     {0,0},
00199     {0,0},
00200     {0,0},
00201     {0,0},
00202     {0,0},
00203     {0,0},
00204     {0,0},
00205     {0,0},
00206     {0,0},
00207     {0,0.3},
00208     {0,0.5}
00209     };
00210    
00211 const double strongPing3[12][2] ={
00212     {-0.866,0.5},
00213     {-0.866,0.5},
00214     {-0.866,0.5},
00215     {-0.866,0.5},
00216     {-0.866,0.5},
00217     {-0.577,0.5},
00218     {-0.577,0.25},
00219     {-0.577,0.25},
00220     {-0.433,0.1},
00221     {-0.211,0.1},
00222     {0,0},
00223     {0.0}
00224   };    
00225 
00226 /*
00227 ir_number position
00228 
00229     2   3   4
00230  1 /----------\5
00231   /            \
00232 0|              |6
00233  \              /
00234 9 \____________/ 7
00235         8
00236 
00237 
00238 
00239 */