ROBOSTEP_5期 / Mbed 2 deprecated George_Master_Param

Dependencies:   mbed robot

Committer:
yuto17320508
Date:
Mon May 20 10:27:02 2019 +0000
Revision:
53:4673b85e1d2a
Parent:
52:dc3d83eb31eb
Child:
55:1b1e5839dde1
ls

Who changed what in which revision?

UserRevisionLine numberNew contents of line
eri 0:c1476d342c13 1 #include "mbed.h"
shimizuta 17:2b3fa9b1a05b 2 #include "debug.h"
eri 0:c1476d342c13 3 #include "microinfinity.h"
shimizuta 21:14133581387b 4 #include "sensors.h"
shimizuta 22:0ed9de464f40 5 #include "moves.h"
yuto17320508 48:d9f3ce701aca 6 #include <stdlib.h>
yuto17320508 48:d9f3ce701aca 7
yuto17320508 48:d9f3ce701aca 8
yuto17320508 53:4673b85e1d2a 9 #define BADRULEMODE
shimizuta 21:14133581387b 10
yuto17320508 25:c740e6fd5dab 11 void StateFlow(int i);
yuto17320508 32:aee87dcaf7ca 12 void SetMode();
yuto17320508 32:aee87dcaf7ca 13 void Start();
yuto17320508 32:aee87dcaf7ca 14 void NoHandSignal();
shimizuta 50:3e73f68c3b37 15
yuto17320508 33:2dbbe198adaf 16
yuto17320508 32:aee87dcaf7ca 17 int start_state=0;
yuto17320508 48:d9f3ce701aca 18
shimizuta 50:3e73f68c3b37 19
shimizuta 26:5fb1aa9cb7f0 20
kageyuta 1:86c4c38abe40 21 int main()
kageyuta 1:86c4c38abe40 22 {
yuto17320508 48:d9f3ce701aca 23 LoadParameter();
shimizuta 26:5fb1aa9cb7f0 24 //setup関連
shimizuta 22:0ed9de464f40 25 can1.frequency(1000000);
shimizuta 22:0ed9de464f40 26 SetupMoves();
yuto17320508 25:c740e6fd5dab 27 set_gyro();
yuto17320508 32:aee87dcaf7ca 28 printf("hand read:%d\r\n",hand.read());
yuto17320508 53:4673b85e1d2a 29 /*while(1)
yuto17320508 53:4673b85e1d2a 30 {
yuto17320508 53:4673b85e1d2a 31 printf("forward:%.2f back:%.2f\r\n",get_dist_forward(),get_dist_back());
yuto17320508 53:4673b85e1d2a 32 wait(0.01);
yuto17320508 53:4673b85e1d2a 33 }*/
shimizuta 50:3e73f68c3b37 34
shimizuta 22:0ed9de464f40 35 printf("reset standby\r\n");
shimizuta 26:5fb1aa9cb7f0 36 reset();//足をリセット位置に移動
shimizuta 22:0ed9de464f40 37 printf("bus standby\r\n");
yuto17320508 5:63462d696256 38 while(1) {
yuto17320508 5:63462d696256 39 if(bus_in.read() == 1) break;
yuto17320508 3:7a608fbd3bcd 40 }
shimizuta 22:0ed9de464f40 41 printf("bus is %d\r\n", bus_in.read());
yuto17320508 12:9a5de6adae9c 42 wait(0.5);
shimizuta 26:5fb1aa9cb7f0 43 //一歩動かして初期位置へ
yuto17320508 25:c740e6fd5dab 44 motor_lo.setDutyLimit(0.1);
yuto17320508 25:c740e6fd5dab 45 motor_li.setDutyLimit(0.1);
yuto17320508 12:9a5de6adae9c 46 straight();
shimizuta 26:5fb1aa9cb7f0 47 // mode選択
yuto17320508 32:aee87dcaf7ca 48 Start();
yuto17320508 48:d9f3ce701aca 49 #ifndef BADRULEMODE
yuto17320508 38:89d2a9e6c96f 50 if(RightOrLeft == 0) {
yuto17320508 32:aee87dcaf7ca 51 if(start_state == 0) theta0 = -degree/100.0;
yuto17320508 32:aee87dcaf7ca 52 else if(start_state == 1) theta0 = -degree/100.0 - 45;
yuto17320508 32:aee87dcaf7ca 53 else if(start_state == 2) theta0 = -degree/100.0 - 90;
yuto17320508 32:aee87dcaf7ca 54 else if(start_state == 3) theta0 = -degree/100.0 + 90;
yuto17320508 32:aee87dcaf7ca 55 else printf("state_error");
yuto17320508 38:89d2a9e6c96f 56 } else {
yuto17320508 32:aee87dcaf7ca 57 if(start_state == 0) theta0 = -degree/100.0;
yuto17320508 32:aee87dcaf7ca 58 else if(start_state == 1) theta0 = -degree/100.0 + 45;
yuto17320508 32:aee87dcaf7ca 59 else if(start_state == 2) theta0 = -degree/100.0 + 90;
yuto17320508 32:aee87dcaf7ca 60 else if(start_state == 3) theta0 = -degree/100.0 - 90;
yuto17320508 32:aee87dcaf7ca 61 else printf("state_error");
yuto17320508 32:aee87dcaf7ca 62 }
yuto17320508 48:d9f3ce701aca 63 #endif
yuto17320508 48:d9f3ce701aca 64 #ifdef BADRULEMODE
yuto17320508 53:4673b85e1d2a 65 printf("BAD RULE!!!!!!!!!\r\n");
yuto17320508 48:d9f3ce701aca 66 if(RightOrLeft == 0) {
yuto17320508 48:d9f3ce701aca 67 if(start_state == 0) theta0 = -degree/100.0;
yuto17320508 48:d9f3ce701aca 68 else if(start_state == 1) {
yuto17320508 52:dc3d83eb31eb 69 theta0 = -degree/100.0 - 90;
yuto17320508 53:4673b85e1d2a 70 printf("degree is %.2f for 90\r\n", degree0);
yuto17320508 48:d9f3ce701aca 71 motor_lo.setDutyLimit(0.6);//0.5
yuto17320508 48:d9f3ce701aca 72 motor_li.setDutyLimit(0.6);
yuto17320508 52:dc3d83eb31eb 73 turn(55.0);
yuto17320508 48:d9f3ce701aca 74 } else if(start_state == 2) {
yuto17320508 48:d9f3ce701aca 75 theta0 = -degree/100.0 - 135;
yuto17320508 53:4673b85e1d2a 76 printf("degree is %.2f for 135\r\n", degree0);
yuto17320508 48:d9f3ce701aca 77 motor_lo.setDutyLimit(0.6);//0.5
yuto17320508 48:d9f3ce701aca 78 motor_li.setDutyLimit(0.6);
yuto17320508 48:d9f3ce701aca 79 turn(100.0);
yuto17320508 48:d9f3ce701aca 80 } else if(start_state == 3) theta0 = -degree/100.0 + 90;
yuto17320508 48:d9f3ce701aca 81 else printf("state_error");
yuto17320508 48:d9f3ce701aca 82 } else {
yuto17320508 48:d9f3ce701aca 83 if(start_state == 0) theta0 = -degree/100.0;
yuto17320508 48:d9f3ce701aca 84 else if(start_state == 1) {
yuto17320508 52:dc3d83eb31eb 85 theta0 = -degree/100.0 + 90;
yuto17320508 53:4673b85e1d2a 86 printf("degree is %.2f for -90\r\n", degree0);
yuto17320508 48:d9f3ce701aca 87 //段差前旋回
yuto17320508 48:d9f3ce701aca 88 motor_lo.setDutyLimit(0.6);//0.5
yuto17320508 48:d9f3ce701aca 89 motor_li.setDutyLimit(0.6);
yuto17320508 52:dc3d83eb31eb 90 turn(-55.0);
yuto17320508 48:d9f3ce701aca 91 } else if(start_state == 2) {
yuto17320508 48:d9f3ce701aca 92 theta0 = -degree/100.0 + 135;
yuto17320508 53:4673b85e1d2a 93 printf("degree is %.2f for -135\r\n", degree0);
yuto17320508 48:d9f3ce701aca 94 motor_lo.setDutyLimit(0.6);//0.5
yuto17320508 48:d9f3ce701aca 95 motor_li.setDutyLimit(0.6);
yuto17320508 48:d9f3ce701aca 96 turn(-100.0);
yuto17320508 48:d9f3ce701aca 97 } else if(start_state == 3) theta0 = -degree/100.0 - 90;
yuto17320508 48:d9f3ce701aca 98 else printf("state_error");
yuto17320508 48:d9f3ce701aca 99 }
yuto17320508 48:d9f3ce701aca 100 #endif
yuto17320508 33:2dbbe198adaf 101 FileOpen();
yuto17320508 32:aee87dcaf7ca 102 printf("LR:%d StateFlow:%d\r\n", RightOrLeft,start_state);
yuto17320508 25:c740e6fd5dab 103 StateFlow(start_state);
yuto17320508 33:2dbbe198adaf 104 FileClose();
yuto17320508 25:c740e6fd5dab 105 }
yuto17320508 25:c740e6fd5dab 106
yuto17320508 25:c740e6fd5dab 107 void StateFlow(int i)
yuto17320508 25:c740e6fd5dab 108 {
yuto17320508 25:c740e6fd5dab 109 switch(i) {
yuto17320508 25:c740e6fd5dab 110 case 0://最初の直線
yuto17320508 25:c740e6fd5dab 111 printf("go straight!!!!!!!!!!\r\n");
yuto17320508 49:6337717484fe 112 motor_lo.setDutyLimit(params[0].duty);
yuto17320508 49:6337717484fe 113 motor_li.setDutyLimit(params[0].duty);
shimizuta 50:3e73f68c3b37 114
shimizuta 50:3e73f68c3b37 115 while(checkUW(params[1].condition, degree0, ec_lo.getCount()) == 0){
yuto17320508 49:6337717484fe 116 straightAndInfinity(params[0].argument[0], params[0].argument[1]);
yuto17320508 25:c740e6fd5dab 117 }
yuto17320508 52:dc3d83eb31eb 118 printf("get distance mode\r\n");
yuto17320508 49:6337717484fe 119
yuto17320508 49:6337717484fe 120 motor_lo.setDutyLimit(params[1].duty);
yuto17320508 49:6337717484fe 121 motor_li.setDutyLimit(params[1].duty);
yuto17320508 25:c740e6fd5dab 122 for(int i=0; i<1; ++i) {
shimizuta 50:3e73f68c3b37 123 while(Hcsr04BackWithEc() < params[1].condition) {//300
yuto17320508 49:6337717484fe 124 straightAndInfinity(params[1].argument[0], params[1].argument[1]);
yuto17320508 25:c740e6fd5dab 125 }
yuto17320508 25:c740e6fd5dab 126 }
yuto17320508 25:c740e6fd5dab 127 //段差前旋回
yuto17320508 49:6337717484fe 128 motor_lo.setDutyLimit(params[2].duty);
yuto17320508 49:6337717484fe 129 motor_li.setDutyLimit(params[2].duty);
yuto17320508 49:6337717484fe 130 if(RightOrLeft == 0) turn(params[2].argument[0]);
yuto17320508 49:6337717484fe 131 else turn(-params[2].argument[0]);
yuto17320508 25:c740e6fd5dab 132 case 1://段差前
yuto17320508 25:c740e6fd5dab 133 printf("climb!!!!!!!!!!\r\n");
yuto17320508 49:6337717484fe 134
yuto17320508 49:6337717484fe 135 motor_lo.setDutyLimit(params[3].duty);
yuto17320508 49:6337717484fe 136 motor_li.setDutyLimit(params[3].duty);
yuto17320508 38:89d2a9e6c96f 137 //段差乗り越え
yuto17320508 53:4673b85e1d2a 138 while(get_dist_forward() > params[3].condition) {
yuto17320508 49:6337717484fe 139 if(RightOrLeft == 0) straightAndInfinity(params[3].argument[0], params[3].argument[1]);
yuto17320508 49:6337717484fe 140 else straightAndInfinity(-params[3].argument[0], params[3].argument[1]);
yuto17320508 25:c740e6fd5dab 141 }
yuto17320508 49:6337717484fe 142 motor_lo.setDutyLimit(params[4].duty);
yuto17320508 49:6337717484fe 143 motor_li.setDutyLimit(params[4].duty);
yuto17320508 49:6337717484fe 144 if(RightOrLeft == 0) phasing(params[4].argument[0]);
yuto17320508 49:6337717484fe 145 else phasing(-params[4].argument[0]);
yuto17320508 49:6337717484fe 146 motor_lo.setDutyLimit(params[5].duty);
yuto17320508 49:6337717484fe 147 motor_li.setDutyLimit(params[5].duty);
yuto17320508 49:6337717484fe 148 for(int i= 0; i<(int)params[5].condition; ++i) straight();
yuto17320508 49:6337717484fe 149
yuto17320508 49:6337717484fe 150 motor_lo.setDutyLimit(params[6].duty);
yuto17320508 49:6337717484fe 151 motor_li.setDutyLimit(params[6].duty);
yuto17320508 52:dc3d83eb31eb 152 printf("start finding back block\r\n");
yuto17320508 49:6337717484fe 153 while(get_dist_back() > params[6].condition) straight();
yuto17320508 53:4673b85e1d2a 154 straight();
yuto17320508 53:4673b85e1d2a 155 int i=0;
yuto17320508 53:4673b85e1d2a 156 while(1)
yuto17320508 53:4673b85e1d2a 157 {
yuto17320508 53:4673b85e1d2a 158 i++;
yuto17320508 53:4673b85e1d2a 159 led1 = i%2;
yuto17320508 53:4673b85e1d2a 160 wait(0.5);
yuto17320508 53:4673b85e1d2a 161 }
yuto17320508 25:c740e6fd5dab 162 //段差後旋回
yuto17320508 49:6337717484fe 163 motor_lo.setDutyLimit(params[7].duty);
yuto17320508 49:6337717484fe 164 motor_li.setDutyLimit(params[7].duty);
yuto17320508 49:6337717484fe 165 if(RightOrLeft == 0) turn(params[7].argument[0]);
yuto17320508 49:6337717484fe 166 else turn(-params[7].argument[0]);
yuto17320508 38:89d2a9e6c96f 167
yuto17320508 25:c740e6fd5dab 168 case 2://段差直後
yuto17320508 25:c740e6fd5dab 169 printf("go lope!!!!!!!!!!\r\n");
yuto17320508 25:c740e6fd5dab 170 //前進
yuto17320508 49:6337717484fe 171 motor_lo.setDutyLimit(params[8].duty);
yuto17320508 49:6337717484fe 172 motor_li.setDutyLimit(params[8].duty);
yuto17320508 49:6337717484fe 173 for(int i=0; i<(int)params[8].condition; ++i) {
yuto17320508 49:6337717484fe 174 if(RightOrLeft == 0) straightAndInfinity(params[8].argument[0], params[8].argument[1]);
yuto17320508 49:6337717484fe 175 else straightAndInfinity(-params[8].argument[0], params[8].argument[1]);
yuto17320508 38:89d2a9e6c96f 176 }
yuto17320508 49:6337717484fe 177
yuto17320508 49:6337717484fe 178 motor_lo.setDutyLimit(params[9].duty);
yuto17320508 49:6337717484fe 179 motor_li.setDutyLimit(params[9].duty);
yuto17320508 25:c740e6fd5dab 180 for(int i=0; i<3; ++i) {
yuto17320508 49:6337717484fe 181 while(get_dist_forward() > params[9].condition) {
yuto17320508 49:6337717484fe 182 if(RightOrLeft == 0) straightAndInfinity(params[9].argument[0], params[9].argument[1]);
yuto17320508 49:6337717484fe 183 else straightAndInfinity(-params[9].argument[0], params[9].argument[1]);
yuto17320508 25:c740e6fd5dab 184 }
yuto17320508 25:c740e6fd5dab 185 }
yuto17320508 25:c740e6fd5dab 186 //ロープ前旋回
yuto17320508 25:c740e6fd5dab 187 printf("before roop deg:%.3f\r\n",degree0);
yuto17320508 49:6337717484fe 188 motor_lo.setDutyLimit(params[10].duty);
yuto17320508 49:6337717484fe 189 motor_li.setDutyLimit(params[10].duty);
yuto17320508 49:6337717484fe 190 if(RightOrLeft == 0) turn(params[10].argument[0]);
yuto17320508 49:6337717484fe 191 else turn(-params[10].argument[0]);
yuto17320508 48:d9f3ce701aca 192
yuto17320508 25:c740e6fd5dab 193 //ロープ位置ジャストまで前進
yuto17320508 49:6337717484fe 194 motor_lo.setDutyLimit(params[11].duty);
yuto17320508 49:6337717484fe 195 motor_li.setDutyLimit(params[11].duty);
yuto17320508 25:c740e6fd5dab 196 for(int i=0; i<3; ++i) {
yuto17320508 49:6337717484fe 197 straightAndInfinity(params[11].argument[0], params[11].argument[1]);
yuto17320508 25:c740e6fd5dab 198 }
yuto17320508 25:c740e6fd5dab 199 for(int i=0; i<2; ++i) {
yuto17320508 49:6337717484fe 200 while(get_dist_back() < params[11].condition) {
yuto17320508 49:6337717484fe 201 straightAndInfinity(params[11].argument[0], params[11].argument[1]);
yuto17320508 25:c740e6fd5dab 202 }
yuto17320508 25:c740e6fd5dab 203 }
yuto17320508 49:6337717484fe 204
yuto17320508 49:6337717484fe 205 motor_lo.setDutyLimit(params[12].duty);
yuto17320508 49:6337717484fe 206 motor_li.setDutyLimit(params[12].duty);
yuto17320508 49:6337717484fe 207 phasing(params[12].argument[0]);
yuto17320508 49:6337717484fe 208
yuto17320508 25:c740e6fd5dab 209 //ロープ
yuto17320508 49:6337717484fe 210 motor_lo.setDutyLimit(params[13].duty);
yuto17320508 49:6337717484fe 211 motor_li.setDutyLimit(params[13].duty);
yuto17320508 32:aee87dcaf7ca 212 while(switch_modes[2].read() == 0) {
yuto17320508 53:4673b85e1d2a 213 lopeAndInfinity(params[13].argument[0], params[13].argument[1]);
yuto17320508 53:4673b85e1d2a 214 //straight();
yuto17320508 25:c740e6fd5dab 215 }
yuto17320508 32:aee87dcaf7ca 216 printf("uhai stand by ok!!!!!!!!!!\r\n");
yuto17320508 32:aee87dcaf7ca 217 NoHandSignal();
yuto17320508 25:c740e6fd5dab 218 case 3://坂
yuto17320508 32:aee87dcaf7ca 219 printf("last spart!!!!!!!!");
yuto17320508 38:89d2a9e6c96f 220
yuto17320508 32:aee87dcaf7ca 221 if(RightOrLeft == 0) theta0 = -degree/100.0+90;
yuto17320508 32:aee87dcaf7ca 222 else theta0 = -degree/100.0-90;
yuto17320508 49:6337717484fe 223 motor_lo.setDutyLimit(params[14].duty);
yuto17320508 49:6337717484fe 224 motor_li.setDutyLimit(params[14].duty);
yuto17320508 49:6337717484fe 225 for(int i=0; i<(int)params[14].condition; ++i) {
yuto17320508 49:6337717484fe 226 if(RightOrLeft == 0) straightAndInfinity(params[14].argument[0], params[14].argument[1]);//straight();//climbAndInfinity(-90,5);
yuto17320508 49:6337717484fe 227 else straightAndInfinity(-params[14].argument[0], params[14].argument[1]);
yuto17320508 25:c740e6fd5dab 228 }
yuto17320508 25:c740e6fd5dab 229 printf("wall standby");
yuto17320508 49:6337717484fe 230 motor_lo.setDutyLimit(params[15].duty);
yuto17320508 49:6337717484fe 231 motor_li.setDutyLimit(params[15].duty);
yuto17320508 49:6337717484fe 232 while(get_dist_back() < params[15].condition) {
shimizuta 27:d392a95f4799 233 // straight();
yuto17320508 49:6337717484fe 234 if(RightOrLeft == 0) climbAndInfinity(params[15].argument[0], params[15].argument[1]);
yuto17320508 49:6337717484fe 235 else climbAndInfinity(-params[15].argument[0], params[15].argument[1]);
yuto17320508 25:c740e6fd5dab 236 }
yuto17320508 49:6337717484fe 237
yuto17320508 25:c740e6fd5dab 238 for(int i=0; i<1; ++i) {
yuto17320508 49:6337717484fe 239 while(get_dist_forward() > params[16].condition) {
yuto17320508 25:c740e6fd5dab 240 //straight();
yuto17320508 49:6337717484fe 241 if(RightOrLeft == 0) climbAndInfinity(params[16].argument[0], params[16].argument[1]);
yuto17320508 49:6337717484fe 242 else climbAndInfinity(-params[16].argument[0], params[16].argument[1]);
yuto17320508 25:c740e6fd5dab 243 }
yuto17320508 25:c740e6fd5dab 244 }
yuto17320508 25:c740e6fd5dab 245 hand_mode = GOAL;
shimizuta 30:231e6584afe9 246 stop();
yuto17320508 32:aee87dcaf7ca 247 printf("uhai!!!!!!!!!!!!!!!/r/n");
yuto17320508 32:aee87dcaf7ca 248 }
yuto17320508 32:aee87dcaf7ca 249 }
yuto17320508 32:aee87dcaf7ca 250 void Start()
yuto17320508 32:aee87dcaf7ca 251 {
yuto17320508 38:89d2a9e6c96f 252 if(hand.read()==0) { //開始時すでにスイッチが押されていた場合
yuto17320508 38:89d2a9e6c96f 253
yuto17320508 32:aee87dcaf7ca 254 SetMode();
yuto17320508 35:04699b49c463 255 hand_mode = G_CLOSE;
yuto17320508 32:aee87dcaf7ca 256 NoHandSignal();
yuto17320508 38:89d2a9e6c96f 257 } else {
yuto17320508 32:aee87dcaf7ca 258 SetMode();
yuto17320508 35:04699b49c463 259 hand_mode = G_OPEN;
yuto17320508 35:04699b49c463 260 stop();//ここで開くことをcanでslaveに送る
yuto17320508 48:d9f3ce701aca 261 wait(1);
yuto17320508 32:aee87dcaf7ca 262 wait_gerege();
yuto17320508 35:04699b49c463 263 hand_mode = G_CLOSE;
yuto17320508 32:aee87dcaf7ca 264 HandMove();
yuto17320508 32:aee87dcaf7ca 265 wait(0.5);
yuto17320508 38:89d2a9e6c96f 266 }
yuto17320508 32:aee87dcaf7ca 267 }
yuto17320508 32:aee87dcaf7ca 268 void SetMode()
yuto17320508 32:aee87dcaf7ca 269 {
yuto17320508 38:89d2a9e6c96f 270 while(get_dist_back() > 50.0) {
yuto17320508 32:aee87dcaf7ca 271 led1 = led2 = led3 = led4 = 0;
yuto17320508 32:aee87dcaf7ca 272 if(switch_modes[2].read()) start_state=3;
yuto17320508 32:aee87dcaf7ca 273 else if(switch_modes[1].read()) start_state=2;
yuto17320508 32:aee87dcaf7ca 274 else if(switch_modes[0].read()) start_state=1;
yuto17320508 32:aee87dcaf7ca 275 else start_state=0;
yuto17320508 38:89d2a9e6c96f 276
yuto17320508 38:89d2a9e6c96f 277 if(switch_LR.read()) RightOrLeft = 1;
yuto17320508 38:89d2a9e6c96f 278 else RightOrLeft = 0;
yuto17320508 38:89d2a9e6c96f 279
yuto17320508 32:aee87dcaf7ca 280 if(start_state==0)led4 = 1;
yuto17320508 32:aee87dcaf7ca 281 else if(start_state==1)led3 = 1;
yuto17320508 32:aee87dcaf7ca 282 else if(start_state==2)led2 = 1;
yuto17320508 32:aee87dcaf7ca 283 else if(start_state==3)led1 = 1;
yuto17320508 38:89d2a9e6c96f 284
yuto17320508 32:aee87dcaf7ca 285 }
yuto17320508 32:aee87dcaf7ca 286 printf("mode is %d RightOrLeft is %d \r\n", start_state, RightOrLeft);
yuto17320508 32:aee87dcaf7ca 287 led1 = led2 = led3 = led4 = 1;
yuto17320508 32:aee87dcaf7ca 288 }
yuto17320508 32:aee87dcaf7ca 289 void NoHandSignal()
yuto17320508 32:aee87dcaf7ca 290 {
yuto17320508 38:89d2a9e6c96f 291 while(get_dist_back() > 40.0) {
yuto17320508 32:aee87dcaf7ca 292 wait(0.01);
yuto17320508 32:aee87dcaf7ca 293 }
yuto17320508 38:89d2a9e6c96f 294 while(get_dist_back() < 40.0) {
yuto17320508 32:aee87dcaf7ca 295 wait(0.01);
shimizuta 22:0ed9de464f40 296 }
yuto17320508 48:d9f3ce701aca 297 }