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

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

Committer:
syundo0730
Date:
Thu Feb 21 14:27:19 2013 +0000
Revision:
14:522bb06f0f0d
Parent:
13:711f74b2fa33
Child:
16:e65c192b7ecf
suicide

Who changed what in which revision?

UserRevisionLine numberNew contents of line
syundo0730 12:6cd135bf03bd 1 #ifndef MOTIONS_H_2013_02_02_
syundo0730 12:6cd135bf03bd 2 #define MOTIONS_H_2013_02_02_
syundo0730 12:6cd135bf03bd 3
syundo0730 12:6cd135bf03bd 4 #include "mbed.h"
syundo0730 12:6cd135bf03bd 5 #include "Motion.h"
syundo0730 12:6cd135bf03bd 6 #include "SCI.h"
syundo0730 12:6cd135bf03bd 7 #include <string>
syundo0730 12:6cd135bf03bd 8
syundo0730 14:522bb06f0f0d 9 const float TIMESTEP = 0.02;
syundo0730 14:522bb06f0f0d 10
syundo0730 12:6cd135bf03bd 11 class Motions
syundo0730 12:6cd135bf03bd 12 {
syundo0730 12:6cd135bf03bd 13 public:
syundo0730 12:6cd135bf03bd 14 Motions(uint16_t* data);
syundo0730 12:6cd135bf03bd 15 ~Motions();
syundo0730 12:6cd135bf03bd 16
syundo0730 12:6cd135bf03bd 17 public:
syundo0730 12:6cd135bf03bd 18 void control();
syundo0730 12:6cd135bf03bd 19
syundo0730 12:6cd135bf03bd 20 private:
syundo0730 12:6cd135bf03bd 21 void read(const string& filename, uint16_t* data);
syundo0730 12:6cd135bf03bd 22 void set(uint16_t* data);
syundo0730 13:711f74b2fa33 23 bool checkid(int id);
syundo0730 13:711f74b2fa33 24
syundo0730 13:711f74b2fa33 25 public:
syundo0730 13:711f74b2fa33 26 void setmotion(const int id);
syundo0730 12:6cd135bf03bd 27 void play();
syundo0730 12:6cd135bf03bd 28
syundo0730 12:6cd135bf03bd 29 private:
syundo0730 12:6cd135bf03bd 30 uint16_t*** motions;
syundo0730 12:6cd135bf03bd 31 int motion_size;
syundo0730 12:6cd135bf03bd 32 int* pose_size;
syundo0730 12:6cd135bf03bd 33 int servo_size;
syundo0730 12:6cd135bf03bd 34
syundo0730 12:6cd135bf03bd 35 private:
syundo0730 12:6cd135bf03bd 36 Motion* inter;
syundo0730 12:6cd135bf03bd 37 bool playing;
syundo0730 12:6cd135bf03bd 38 SCI* comu;
syundo0730 12:6cd135bf03bd 39 //LocalFileSystem* local;
syundo0730 12:6cd135bf03bd 40 };
syundo0730 12:6cd135bf03bd 41
syundo0730 12:6cd135bf03bd 42 #endif