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

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

Committer:
syundo0730
Date:
Wed Feb 27 12:32:44 2013 +0000
Revision:
16:e65c192b7ecf
Parent:
14:522bb06f0f0d
Child:
17:60de3bfdc70b
ROBO-ONE 22th version

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