2021年地区大会船ロボット「明石工船」 import時ライブラリの更新をしないでください
Dependencies: mbed arrc_mbed BNO055 take_mbed_old SDFileSystem ros_lib_melodic_buffer_increase
Diff: main.cpp
- Revision:
- 2:4e7ec0816a91
- Parent:
- 1:aa9cc4250220
- Child:
- 4:0038da6cdc9a
--- a/main.cpp Thu Oct 21 16:16:24 2021 +0000 +++ b/main.cpp Fri Oct 22 07:45:16 2021 +0000 @@ -120,7 +120,7 @@ NextP.theta -= M_PI/2.0; getVelocity(&v,n-1); if(n < POINTS)getPoint(&subP,n+1); - if(v > 0.0) v *= 1.5; + if(v > 0.0) v *= 2.0; if(v >= 1400) v = 1400; //v = 20.0; if(n == POINTS) v = 20.0; @@ -129,7 +129,7 @@ if(n == POINTS and incircle(pos,NextP,1.0)) v = 0.0; double etheta = atan2(NextP.y-pos.y,NextP.x-pos.x); RBT.PIDs[5]->Update(pos.theta,NextP.theta,0.02,false); - RBT.sendVelocity(v*cos(etheta),v*sin(etheta),RBT.PIDs[5]->getmv()); + //RBT.sendVelocity(v*cos(etheta),v*sin(etheta),RBT.PIDs[5]->getmv()); //printf("%lf,%lf\n",pos.theta,NextP.theta); //RBT.sendVelocity(200.0,-200.0,0.0); printf("x:%lf,y:%lf,theta:%lf,n:%d\n",pos.x,pos.y,pos.theta,n);