ライブラリ化を行った後

Dependencies:   QEI accelerator bit_test cyclic_io cyclic_var cylinder event_var limit mbed mecanum motor_drive pid pid_encoder rs422_put sbdbt servo

Fork of 17robo_Practice1 by kusano kiyoshige

Revision:
55:2dd2f161ebaf
Parent:
52:f5ae47e683fa
Child:
56:a7bd860b85b6
diff -r a88208d9bc1d -r 2dd2f161ebaf mecanum.h
--- a/mecanum.h	Sat Sep 16 01:05:23 2017 +0000
+++ b/mecanum.h	Sat Sep 16 05:59:00 2017 +0000
@@ -21,6 +21,7 @@
 */
 
 #define rotaPower 0.6
+#define rotaStickPower 0.2
 #define boost_A 0.5
 #define boost_K 0.9
 #define PI 3.141592
@@ -37,10 +38,10 @@
             vx = Vx / 2 * cos(rad) - Vy / 2 * sin(rad);
             vy = Vx / 2 * sin(rad) + Vy / 2 * cos(rad);
 
-            V1 =   vx + vy + rotaPower * (l1 - r1) + w;
-            V2 =  -vx - vy + rotaPower * (l1 - r1) + w;
-            V3 =  -vx + vy + rotaPower * (l1 - r1) + w;
-            V4 =   vx - vy + rotaPower * (l1 - r1) + w;
+            V1 =   vx + vy + rotaPower * (l1 - r1) + rotaStickPower * w;
+            V2 =  -vx - vy + rotaPower * (l1 - r1) + rotaStickPower * w;
+            V3 =  -vx + vy + rotaPower * (l1 - r1) + rotaStickPower * w;
+            V4 =   vx - vy + rotaPower * (l1 - r1) + rotaStickPower * w;
             
         }