
めいん
Diff: header.h
- Revision:
- 1:a1e592eca305
- Parent:
- 0:df2659fd8031
- Child:
- 2:b204cf2f9b60
- Child:
- 3:3a1b0dda8c6c
diff -r df2659fd8031 -r a1e592eca305 header.h --- a/header.h Sun Aug 28 17:03:34 2016 +0000 +++ b/header.h Tue Aug 30 06:51:41 2016 +0000 @@ -130,44 +130,4 @@ } -void extraordinary(){ - int x, y,targetx,targety; - float theta, phi; - - targetx=sensor()*1819; - targety=1750; - moveto(targetx,0); - - //よく使うかたまり - x = coordinateX(); - y = coordinateY(); - theta = coordinateTheta();//自己位置取得 - phi = atan(double(targety - y) / double(targetx - x));//目的地への角度phi取得 - int goalx = 0, goaly = blue()*1200;//受け渡しゾーンの中心 - - //まず目的地方面に回転。今回は必ず時計回りで位置合わせするが今後最短経路に直す - while (1){ - x = coordinateX(); - y = coordinateY(); - theta = coordinateTheta(); - phi = atan(double(targety - y) / double(targetx - x)); - - move((-1)*speed, speed); - if (phi - allowdegree < theta&&theta< phi + allowdegree){ break; }//thetaにpiを足して逆ベクトルを判定 - } - - open_arm(); - open_hand(); - - moveto(targetx,1750); - - close_hand(); - close_arm(); - lift(1); - - moveto(goalx,goaly); -} - - -