yei
Dependencies: interface mbed enc_1multi calPID motorout KondoServoLibrary
Fork of cat18_operate by
Diff: workinfo/workinfo.cpp
- Revision:
- 33:3902febe8c45
- Parent:
- 32:21229c96144a
- Child:
- 34:722ab43f7cbd
--- a/workinfo/workinfo.cpp Wed Sep 05 00:52:43 2018 +0000 +++ b/workinfo/workinfo.cpp Wed Sep 05 01:18:05 2018 +0000 @@ -62,7 +62,7 @@ const int kPitchWorkAreaDegree = -90; const int kPitchCommonAreaDegree = -5; -const int kPitchBoxDegree = 45; +const int kPitchBoxDegree = 10; ////////////////////////////// //配列のスタート番号 const int kWorkStart = 0; @@ -151,8 +151,9 @@ shootingbox[i*3+1].position[1]=160+80*i + kHandCenter; shootingbox[i*3+2].position[1]=160+80*i + kHandCenter; } + for(int i = 0; i < kBoxNum; i++) shootingbox[i].position[1] -= kArmLength[3] *(1 - cos(kPitchBoxDegree * kDegreeToRad)); //z座標 - for(int i=0; i<sizeof(shootingbox)/sizeof(shootingbox[0]); i++) shootingbox[i].position[2]=125; + for(int i=0; i<sizeof(shootingbox)/sizeof(shootingbox[0]); i++) shootingbox[i].position[2]=125 + kArmLength[3] * sin(kPitchBoxDegree * kDegreeToRad); for(int i = 0; i < kBoxNum; i++) { for(int j = 0; j < 3; j++) shootingbox[kBoxIndex[i]].position[j] += kBoxCorrect[i][j]; }