Controlor for Humanoid. Walking trajectory generator, sensor reflection etc.

Dependencies:   Adafruit-PWM-Servo-Driver MPU6050 RS300 mbed

Revision:
20:abb7852df747
Parent:
19:c2ec475367aa
Child:
21:a54bcab078ed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Motion/OnlineMotion.h	Mon Aug 19 08:10:58 2013 +0000
@@ -0,0 +1,36 @@
+#ifndef ONLINEMOTION_H_2013_02_04_
+#define ONLINEMOTION_H_2013_02_04_
+
+#include <cmath>
+
+#include "LPC17xx.h"
+#include "mbed.h"
+#include "PWM.h"
+//#include "Motion.h"
+
+const float RADTOVAL = (SRV_MAX_DUTY - SRV_MIN_DUTY) / 3.14159265;
+
+const float M_PI = 3.14159265;
+
+class OnlineMotion //: public Motion
+{
+  public:
+    OnlineMotion(float _T, float _TIMESTEP, unsigned char _size_num, PWM* _pwm, bool* _playing);
+    ~OnlineMotion();
+  public:
+    void step();
+  private:
+    void update();
+    void play_online();
+    void invertkinematics(float* pos, uint16_t* theta);
+    void walk(float* lpos, float* rpos, float h, float stride, float side, float up);
+    
+  private:
+    PWM* pwm;
+    unsigned char m_NUM_MAX;
+    bool* playing;
+    volatile float t;
+    float T ,STEP;
+};
+
+#endif
\ No newline at end of file