• R/O
  • SSH
  • HTTPS

fujiwing2017: Commit


Commit MetaInfo

Revision86 (tree)
Zeit2017-11-24 12:47:38
Autoryus_suzuki

Log Message

CS大会本番で使用した、最終コードです。
やるだけのことはやりました。お疲れ様でした。
多大なご助力ありがとうございました。

Ändern Zusammenfassung

Diff

--- branches/CS_0922_LPF/sdk/OBJ/app.cpp (revision 85)
+++ branches/CS_0922_LPF/sdk/OBJ/app.cpp (revision 86)
@@ -138,13 +138,13 @@
138138 CGyroSensor *m_CGyroSensor;
139139 m_CGyroSensor = m_CSensorFactory->getGyroSensor();
140140
141+ //ev3_lcd_fill_rect(0, 0, EV3_LCD_WIDTH, EV3_LCD_HEIGHT, EV3_LCD_WHITE);
142+ //ev3_lcd_draw_string("Factory Created! ", 0, CALIB_FONT_HEIGHT*2);
143+ //tslp_tsk(500); /* 10msecウェイト */
144+
141145 ev3_lcd_fill_rect(0, 0, EV3_LCD_WIDTH, EV3_LCD_HEIGHT, EV3_LCD_WHITE);
142- ev3_lcd_draw_string("Factory Created! ", 0, CALIB_FONT_HEIGHT*2);
146+ ev3_lcd_draw_string("AreaSwitching Get! ", 0, CALIB_FONT_HEIGHT*2);
143147 tslp_tsk(1000); /* 1000msecウェイト */
144-
145-// ev3_lcd_fill_rect(0, 0, EV3_LCD_WIDTH, EV3_LCD_HEIGHT, EV3_LCD_WHITE);
146-// ev3_lcd_draw_string("AreaSwitching Get! ", 0, CALIB_FONT_HEIGHT*2);
147-// tslp_tsk(500); /* 10msecウェイト */
148148
149149 // ジャイロと倒立振子を初期化.
150150 m_CGyroSensor->reset();
@@ -154,9 +154,9 @@
154154 m_CLRMotorPowerControl->LRControl(0, 0, 0);
155155 //m_CTailMotorOutput->Output(0);
156156
157- ev3_lcd_fill_rect(0, 0, EV3_LCD_WIDTH, EV3_LCD_HEIGHT, EV3_LCD_WHITE);
158- ev3_lcd_draw_string("Reset Complete! ", 0, CALIB_FONT_HEIGHT*2);
159- tslp_tsk(500); /* 10msecウェイト */
157+ //ev3_lcd_fill_rect(0, 0, EV3_LCD_WIDTH, EV3_LCD_HEIGHT, EV3_LCD_WHITE);
158+ //ev3_lcd_draw_string("Reset Complete! ", 0, CALIB_FONT_HEIGHT*2);
159+ //tslp_tsk(500); /* 10msecウェイト */
160160
161161 // Bluetooth起動.
162162 CGlobalVariable::getInstance()->global_bluetooth = ev3_serial_open_file(EV3_SERIAL_BT);
@@ -270,7 +270,7 @@
270270 ev3_lcd_fill_rect(0, 0, EV3_LCD_WIDTH, EV3_LCD_HEIGHT, EV3_LCD_WHITE);
271271 ev3_lcd_draw_string("return false", 0, 24);
272272 tslp_tsk(500); /* 10msecウェイト */
273- ev3_speaker_set_volume(50);
273+ ev3_speaker_set_volume(150);
274274 ev3_speaker_play_tone(261.63, 1000);
275275 break;
276276
--- branches/CS_0922_LPF/sdk/workspace/L_ETRobo2017_0916_suzuki/GlobalVariable.h (revision 85)
+++ branches/CS_0922_LPF/sdk/workspace/L_ETRobo2017_0916_suzuki/GlobalVariable.h (revision 86)
@@ -55,7 +55,8 @@
5555 //走行距離検知で使う、エリアごとの設定距離(mm).
5656 #define B3_MILEAGE 100 //スタート.
5757 #define B4_MILEAGE 150 //加速.
58-#define B5_MILEAGE 1800 //直線.
58+#define B5_MILEAGE 1820 //直線.
59+//#define B5_MILEAGE 1800 //直線.
5960 #define B6_MILEAGE 1650 //外カーブ.
6061 #define B7_MILEAGE 1850 //内カーブ.
6162 #define B8_MILEAGE 1400 //内緩カーブ.
@@ -63,7 +64,8 @@
6364 #define B10_MILEAGE 1000//外急カーブ.
6465 #define B11ACC_MILEAGE 100//直線.
6566 #define B11ACC2_MILEAGE 100//直線.
66-#define B11_MILEAGE 1220//直線.
67+#define B11_MILEAGE 1230//直線.
68+//#define B11_MILEAGE 1220//直線.
6769
6870
6971 //ベーシックゴールから階段まで移動
--- branches/CS_0922_LPF/sdk/workspace/L_ETRobo2017_0916_suzuki/Manager/AreaControl/Area/CAreaFactory.cpp (revision 85)
+++ branches/CS_0922_LPF/sdk/workspace/L_ETRobo2017_0916_suzuki/Manager/AreaControl/Area/CAreaFactory.cpp (revision 86)
@@ -272,7 +272,7 @@
272272 //スタート.
273273 struct PID_Gain B3_LightPID_Gain = {0.07, 0.001, 0.3};
274274 // struct RUN_information B3_RUN_information = {40, 45, 10, 0};
275- struct RUN_information B3_RUN_information = {50, 50, 30, 0, 5};
275+ struct RUN_information B3_RUN_information = {40, 40, 30, 0, 5};
276276 m_CDrivingB3Area = new CDrivingArea(B3_RUN_information, B3_LightPID_Gain, m_StopDetection,
277277 m_B3AreaMileageDetection, m_CTailMotorControl, m_CLightPIDControl, m_CTwoWheelBalanceControl);
278278
--- branches/CS_0922_LPF/sdk/workspace/L_ETRobo2017_0916_suzuki/Work/Control/LightPIDControl/CLightPIDControl.cpp (revision 85)
+++ branches/CS_0922_LPF/sdk/workspace/L_ETRobo2017_0916_suzuki/Work/Control/LightPIDControl/CLightPIDControl.cpp (revision 86)
@@ -8,15 +8,18 @@
88 #include "ev3api.h"
99 #include "CLightPIDControl.h"
1010
11-rgb_raw_t CLightPIDControl::rgb_tmpLight = {0, 0, 52};
11+//rgb_raw_t CLightPIDControl::rgb_tmpLight = {0, 0, 52};
12+rgb_raw_t CLightPIDControl::rgb_tmpLight = {0, 0, 46};
1213 //rgb_raw_t CLightPIDControl::rgb_tmpLight.g = 0;
1314 //rgb_raw_t CLightPIDControl::rgb_tmpLight.b = 0;
1415
15-rgb_raw_t CLightPIDControl::rgb_GraytmpLight = {0, 0, 70};
16+//rgb_raw_t CLightPIDControl::rgb_GraytmpLight = {0, 0, 70};
17+rgb_raw_t CLightPIDControl::rgb_GraytmpLight = {0, 0, 62};
1618 //rgb_raw_t CLightPIDControl::rgb_P1tmpLight.g = 0;
1719 //rgb_raw_t CLightPIDControl::rgb_P1tmpLight.b = 0;
1820
19-rgb_raw_t CLightPIDControl::rgb_SteptmpLight = { 0, 0, 40};
21+//rgb_raw_t CLightPIDControl::rgb_SteptmpLight = { 0, 0, 40};
22+rgb_raw_t CLightPIDControl::rgb_SteptmpLight = { 0, 0, 36};
2023 //rgb_raw_t CLightPIDControl::rgb_P1tmpLight.g = 0;
2124 //rgb_raw_t CLightPIDControl::rgb_P1tmpLight.b = 0;
2225
--- branches/CS_0922_LPF/sdk/workspace/R_ETRobo2017_0916_azuma/Manager/AreaControl/Area/CAreaFactory.cpp (revision 85)
+++ branches/CS_0922_LPF/sdk/workspace/R_ETRobo2017_0916_azuma/Manager/AreaControl/Area/CAreaFactory.cpp (revision 86)
@@ -277,9 +277,9 @@
277277
278278 //B3区間.
279279 //RUN_information m_RUN_information = {左モータパワー, 右モータパワー, 尻尾角度, 旋回角度};.
280- struct PID_Gain B3_2_LightPID_Gain = {0.09, 0.001, 0.3};
280+ struct PID_Gain B3_2_LightPID_Gain = {0.07, 0.001, 0.3};
281281 //struct RUN_information B3_RUN_information = {40, 45, 10, 0};
282- struct RUN_information B3_2_RUN_information = {50, 50, 10, 0, 2};
282+ struct RUN_information B3_2_RUN_information = {30, 30, 10, 0, 2};
283283 // struct RUN_information B3_2_RUN_information = {22, 22, 10, 0};
284284 m_CDrivingB3_2Area = new CDrivingArea(B3_2_RUN_information, B3_LightPID_Gain, m_StopDetection,
285285 m_B3AreaMileageDetection, m_CTailMotorControl, m_CLightPIDControl, m_CTwoWheelBalanceControl);
@@ -289,9 +289,9 @@
289289 //加速.
290290 //B4区間.
291291 //RUN_information m_RUN_information = {左モータパワー, 右モータパワー, 尻尾角度, 旋回角度};.
292- struct PID_Gain B4_LightPID_Gain = {0.07, 0.001, 0.2};
292+ struct PID_Gain B4_LightPID_Gain = {0.05, 0.001, 0.2};
293293 // struct RUN_information B4_RUN_information = {65, 70, 10, 0};
294- struct RUN_information B4_RUN_information = {75, 75, 10, 0, 2};
294+ struct RUN_information B4_RUN_information = {60, 60, 10, 0, 2};
295295 m_CDrivingB4Area = new CDrivingArea(B4_RUN_information, B4_LightPID_Gain, m_StopDetection,
296296 m_B4AreaMileageDetection, m_CTailBrakeControl, m_CLightPIDControl, m_CTwoWheelBalanceControl);
297297
@@ -298,7 +298,7 @@
298298 //直線.
299299 //B5区間.
300300 //RUN_information m_RUN_information = {左モータパワー, 右モータパワー, 尻尾角度, 旋回角度};.
301- struct PID_Gain B5_LightPID_Gain = {0.08, 0.001, 0.6};
301+ struct PID_Gain B5_LightPID_Gain = {0.08, 0.001, 0.4};
302302 struct RUN_information B5_RUN_information = {140, 140, 10, 0};
303303 //struct RUN_information B5_RUN_information = {80, 76, 10, 0};
304304 m_CDrivingB5Area = new CDrivingArea(B5_RUN_information, B5_LightPID_Gain, m_StopDetection,
@@ -307,8 +307,8 @@
307307 //外カーブ.
308308 //B6区間.
309309 //RUN_information m_RUN_information = {左モータパワー, 右モータパワー, 尻尾角度, 旋回角度};.
310- struct PID_Gain B6_LightPID_Gain = {0.16, 0.001, 2.7};
311- struct RUN_information B6_RUN_information = {140, 90, 10, 0};
310+ struct PID_Gain B6_LightPID_Gain = {0.18, 0.001, 2.7};
311+ struct RUN_information B6_RUN_information = {130, 90, 10, 0};
312312 // struct RUN_information B6_RUN_information = {80, 60, 10, 0};
313313 m_CDrivingB6Area = new CDrivingArea(B6_RUN_information, B6_LightPID_Gain, m_StopDetection,
314314 m_B6AreaMileageDetection, m_CTailBrakeControl, m_CLightPIDControl, m_CTwoWheelBalanceControl);
@@ -317,7 +317,7 @@
317317 //B7区間.
318318 //RUN_information m_RUN_information = {左モータパワー, 右モータパワー, 尻尾角度, 旋回角度};.
319319 struct PID_Gain B7_LightPID_Gain = {0.20, 0.001, 2.7};
320- struct RUN_information B7_RUN_information = {70, 130, 10, 0};
320+ struct RUN_information B7_RUN_information = {70, 120, 10, 0};
321321 // struct RUN_information B7_RUN_information = {60, 80, 10, 0};
322322 m_CDrivingB7Area = new CDrivingArea(B7_RUN_information, B7_LightPID_Gain, m_StopDetection,
323323 m_B7AreaMileageDetection, m_CTailBrakeControl, m_CLightPIDControl, m_CTwoWheelBalanceControl);
@@ -327,7 +327,7 @@
327327 //RUN_information m_RUN_information = {左モータパワー, 右モータパワー, 尻尾角度, 旋回角度};.
328328 struct PID_Gain B8_LightPID_Gain = {0.35, 0.001, 3.5};
329329 // struct RUN_information B8_RUN_information = {40, 80, 10, 0};
330- struct RUN_information B8_RUN_information = {50, 120, 10, 0};
330+ struct RUN_information B8_RUN_information = {50, 100, 10, 0};
331331 // struct RUN_information B8_RUN_information = {48, 80, 10, 0};
332332 m_CDrivingB8Area = new CDrivingArea(B8_RUN_information, B8_LightPID_Gain, m_StopDetection,
333333 m_B8AreaMileageDetection, m_CTailBrakeControl, m_CLightPIDControl, m_CTwoWheelBalanceControl);
@@ -344,7 +344,7 @@
344344 //直線(ベーシックラスト).
345345 //B10区間.
346346 //RUN_information m_RUN_information = {左モータパワー, 右モータパワー, 尻尾角度, 旋回角度};.
347- struct PID_Gain B10_LightPID_Gain = {0.07, 0.001, 0.6};
347+ struct PID_Gain B10_LightPID_Gain = {0.06, 0.001, 0.6};
348348 struct RUN_information B10_RUN_information = {140, 140, 10, 0};
349349 // struct RUN_information B10_RUN_information = {80, 76, 10, 0};
350350 m_CDrivingB10Area = new CDrivingArea(B10_RUN_information, B10_LightPID_Gain, m_StopDetection,
@@ -541,7 +541,7 @@
541541 struct PID_Gain LG21_LightPID_Gain = {0.2, 0.01, 0};
542542 struct RUN_information LG21_RUN_information = {9, 10, 35, 0};
543543 m_CDrivingLG21Area = new CDrivingArea(LG21_RUN_information, LG21_LightPID_Gain, m_StopDetection,
544- m_LG12AreaMileageDetection, m_CTailBrakeControl, m_C180DirectionCorrectControl, m_CLRMotorPowerControl);
544+ m_LG12AreaMileageDetection, m_CTailBrakeControl, m_C0DirectionCorrectControl, m_CLRMotorPowerControl);
545545
546546 //LG24区間.. .
547547 //RUN_information m_RUN_information = {左モータパワー, 右モータパワー, 尻尾角度, 旋回角度};.
--- branches/CS_0922_LPF/sdk/workspace/R_ETRobo2017_0916_azuma/Work/Control/LightPIDControl/CLightPIDControl.cpp (revision 85)
+++ branches/CS_0922_LPF/sdk/workspace/R_ETRobo2017_0916_azuma/Work/Control/LightPIDControl/CLightPIDControl.cpp (revision 86)
@@ -8,12 +8,14 @@
88 #include "ev3api.h"
99 #include "CLightPIDControl.h"
1010
11-rgb_raw_t CLightPIDControl::rgb_tmpLight = {0, 0, 64};
11+//rgb_raw_t CLightPIDControl::rgb_tmpLight = {0, 0, 64};
12+rgb_raw_t CLightPIDControl::rgb_tmpLight = {0, 0, 60};
1213 //rgb_raw_t CLightPIDControl::rgb_tmpLight = {0, 0, 158};
1314 //rgb_raw_t CLightPIDControl::rgb_tmpLight.g = 0;
1415 //rgb_raw_t CLightPIDControl::rgb_tmpLight.b = 0;
1516
16-rgb_raw_t CLightPIDControl::rgb_GraytmpLight = {0, 0, 70};
17+//rgb_raw_t CLightPIDControl::rgb_GraytmpLight = {0, 0, 70};
18+rgb_raw_t CLightPIDControl::rgb_GraytmpLight = {0, 0, 62};
1719 //rgb_raw_t CLightPIDControl::rgb_GraytmpLight = {0, 0, 84};
1820 //rgb_raw_t CLightPIDControl::rgb_P1tmpLight.g = 0;
1921 //rgb_raw_t CLightPIDControl::rgb_P1tmpLight.b = 0;
--- branches/CS_0922_LPF/sdk/workspace/R_ETRobo2017_0916_azuma/GlobalVariable.h (revision 85)
+++ branches/CS_0922_LPF/sdk/workspace/R_ETRobo2017_0916_azuma/GlobalVariable.h (revision 86)
@@ -54,20 +54,21 @@
5454 //★ラインは右側トレースです.
5555 //走行距離検知で使う、エリアごとの設定距離(mm).
5656 #define B3_MILEAGE 100 //スタート.
57-#define B4_MILEAGE 150 //加速.
58-#define B5_MILEAGE 1900 //直線.
57+#define B4_MILEAGE 120 //加速.
58+#define B5_MILEAGE 1930 //直線.
5959 #define B6_MILEAGE 3120 //外カーブ.
6060 #define B7_MILEAGE 850 //内カーブ.
6161 #define B8_MILEAGE 950 //内急カーブ.
62-#define B9_MILEAGE 1475 //外カーブ. //1295
63-#define B10_MILEAGE 1550//直線. //1650
62+#define B9_MILEAGE 1485 //外カーブ. //1295
63+//#define B10_MILEAGE 1540//直線. //1650
64+#define B10_MILEAGE 1560//直線. //1650
6465
6566 //ベーシックゴールからゲートまで移動
6667 #define LG01_MILEAGE 215
67-#define LG02_MILEAGE 1340
68+#define LG02_MILEAGE 1330
6869
6970 //ルックアップゲート動作開始
70-#define LG03_MILEAGE 210
71+#define LG03_MILEAGE 230
7172 #define LG04_MILEAGE 195
7273 #define LG05_MILEAGE 20
7374 #define LG06_MILEAGE 20
@@ -79,7 +80,7 @@
7980 #define LG12_MILEAGE 175
8081 #define LG13_MILEAGE 60
8182 #define LG14_MILEAGE 200
82-#define LG15_MILEAGE 250//ゲート前からゴールまで.
83+#define LG15_MILEAGE 255//ゲート前からゴールまで.
8384 #define LG16_MILEAGE -10
8485 #define LG17_MILEAGE 100
8586 #define LG18_MILEAGE 50
Show on old repository browser