![](/media/cache/profiles/P1030212_resized.JPG.50x50_q85.jpg)
STM32足回りプログラム
Dependencies: mbed ros_lib_kinetic
Revision 3:012e5d7bbfd5, committed 2019-07-09
- Comitter:
- TanakaRobo
- Date:
- Tue Jul 09 16:00:03 2019 +0000
- Parent:
- 2:c040883ea536
- Commit message:
- first commit
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r c040883ea536 -r 012e5d7bbfd5 main.cpp --- a/main.cpp Tue Jul 09 15:57:00 2019 +0000 +++ b/main.cpp Tue Jul 09 16:00:03 2019 +0000 @@ -252,8 +252,8 @@ X += diff[0]*cos_yaw_2 - diff[1]*sin_yaw_2 - diff[2]*cos_yaw_2 + diff[3]*sin_yaw_2; Y += diff[0]*sin_yaw_2 + diff[1]*cos_yaw_2 - diff[2]*sin_yaw_2 - diff[3]*cos_yaw_2; T += diff[0]/Rotary_L/4 + diff[1]/Rotary_L/4 + diff[2]/Rotary_L/4 + diff[3]/Rotary_L/4; - cos_yaw_2 = cos(Yaw+PI_4)/2.0; - sin_yaw_2 = sin(Yaw+PI_4)/2.0; + cos_yaw_2 = cos(Yaw)/2.0; + sin_yaw_2 = sin(Yaw)/2.0; nowVx = Pspeed[0]*cos_yaw_2 - Pspeed[1]*sin_yaw_2 - Pspeed[2]*cos_yaw_2 + Pspeed[3]*sin_yaw_2; nowVy = Pspeed[0]*sin_yaw_2 + Pspeed[1]*cos_yaw_2 - Pspeed[2]*sin_yaw_2 - Pspeed[3]*cos_yaw_2; nowVt = Pspeed[0]/Rotary_L/4 + Pspeed[1]/Rotary_L/4 + Pspeed[2]/Rotary_L/4 + Pspeed[3]/Rotary_L/4;