test

Dependencies:   mbed ros_lib_kinetic nhk19mr2_can_info splitData SerialHalfDuplex_HM

Revision:
26:24ae5a4f5b1f
Parent:
24:dec983da455c
Child:
27:79b4b932a6dd
--- a/Walk/Walk.cpp	Mon Feb 18 10:20:09 2019 +0000
+++ b/Walk/Walk.cpp	Fri Feb 22 05:20:28 2019 +0000
@@ -25,6 +25,9 @@
     ground_m_ = ground_m;
     ellipse_center_x_m_ = 0;
     ellipse_center_y_m_ = ground_m;
+    
+    ellipse_long_m_=stride_m*0.5/cosf(asinf(ground_m_-ellipse_center_y_m_)); 
+    ellipse_short_m_=2*(height_m_-grounf_m_+ellipse_center_y_m_);
 }
 
 //着地中の動き.直線軌道.等速
@@ -40,12 +43,12 @@
 OneLeg Orbit::StrideLineAccel_(OneLeg leg, float phasetime_s)
 {
      ///////////x,yを計算.注:計算は正しくないので直す必要がある。
-    float s0=stride_m_*0.5+ellipse_center_x_m_
-    float s1=-stride_m_*0.5+ellipse_center_x_m_
+    float s0=stride_m_*0.5+ellipse_center_x_m_;
+    float s1=-stride_m_*0.5+ellipse_center_x_m_;
     
     float gravity=9.8;
     float g_h=sqrtf(gravity/ground_m_);
-    float t=phasetime_s/stride_time_s_;
+    float t=phasetime_s/stridetime_s_;
     float denominator=expf(g_h)-expf(-g_h);//分母
     
     float x_m = -(s0*expf(-g_h)-s1)*expf(g_h*t)/denominator + (s0*expf(g_h)-s1)*expf(-g_h*t)/denominator;