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/Controlor.h	Mon Aug 19 08:10:58 2013 +0000
@@ -0,0 +1,54 @@
+#ifndef CONTROLOR_H_2013_02_02_
+#define CONTROLOR_H_2013_02_02_
+
+#include "mbed.h"
+#include <string>
+
+#include "Motion.h"
+#include "OfflineMotion.h"
+#include "OnlineMotion.h"
+
+#include "SCI.h"
+#include "PWM.h"
+
+#include "CSV.h"
+#include "readMotion.h"
+
+const float TIMESTEP = 0.02;
+
+class Controlor
+{
+  public:
+    Controlor(uint16_t* data);
+    ~Controlor();
+    
+  public:
+    void control();
+    
+  private:
+    void read(const string& filename, uint16_t* data);
+    void set(uint16_t* data);
+    bool checkid(int id);
+    
+  public:
+    void setmotion(const int id);
+    void play();
+  
+  private:
+    uint16_t*** motions;
+    int motion_size;
+    int* pose_size;
+    int servo_size;
+    
+    OfflineMotion* offline;
+    OnlineMotion* online;
+    Motion* motion;
+    
+  private:
+    bool playing;
+    bool attached;
+    SCI* comu;
+    PWM* pwm;
+};
+
+#endif
\ No newline at end of file