test

Dependencies:   mbed ros_lib_kinetic nhk19mr2_can_info splitData SerialHalfDuplex_HM

Revision:
11:e81425872740
Child:
13:e7ecdb20665a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Walk/Walk.h	Mon Feb 11 12:56:00 2019 +0000
@@ -0,0 +1,36 @@
+#ifndef INCLUDED_WALK_H
+#define INCLUDED_WALK_H
+#include "OneLeg.h"
+
+//足の軌道を設定するクラス。
+class Orbit
+{
+    float stridetime_s_;
+    float risetime_s_;
+    float stride_m_;
+    float height_m_; //足の上げ幅
+    float ground_m_; //着地するときの高さ
+    OneLeg StrideLine_(OneLeg leg, float phasetime_s);
+    OneLeg RiseEllipse_(OneLeg leg, float phasetime_s);
+    OneLeg OrbitEllipse_(OneLeg leg, float phasetime_s);
+
+  public:
+    Orbit(){};
+    Orbit(float stridetime_s, float risetime_s, float stride_m, float height_m, float ground_m);
+    OneLeg GetOrbit(OneLeg leg, float phasetime_s);
+    float GetOneWalkTime(); //足一周の時間
+};
+
+//4足の足の動かし方を保存するクラス
+class Walk
+{
+    float phasetime_s_;
+    float offsettime_s_[4];
+
+  public:
+    Walk(Orbit orbit[4], float offsettime_s[4], float cycletime_s);
+    float cycletime_s_;
+    Orbit orbit_[4];
+    void Cal4LegsPosi(OneLeg (&leg)[4]);
+};
+#endif
\ No newline at end of file