Controlor for Humanoid. Walking trajectory generator, sensor reflection etc.
Dependencies: Adafruit-PWM-Servo-Driver MPU6050 RS300 mbed
Controlor.h@21:a54bcab078ed, 2013-09-04 (annotated)
- Committer:
- syundo0730
- Date:
- Wed Sep 04 03:59:40 2013 +0000
- Revision:
- 21:a54bcab078ed
- Parent:
- 20:abb7852df747
- Child:
- 22:bf5aa20b9df0
Motion handling was moved to out of motion class
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
syundo0730 | 20:abb7852df747 | 1 | #ifndef CONTROLOR_H_2013_02_02_ |
syundo0730 | 20:abb7852df747 | 2 | #define CONTROLOR_H_2013_02_02_ |
syundo0730 | 12:6cd135bf03bd | 3 | |
syundo0730 | 12:6cd135bf03bd | 4 | #include "mbed.h" |
syundo0730 | 17:60de3bfdc70b | 5 | #include <string> |
syundo0730 | 17:60de3bfdc70b | 6 | |
syundo0730 | 12:6cd135bf03bd | 7 | #include "Motion.h" |
syundo0730 | 20:abb7852df747 | 8 | #include "OfflineMotion.h" |
syundo0730 | 17:60de3bfdc70b | 9 | #include "OnlineMotion.h" |
syundo0730 | 17:60de3bfdc70b | 10 | |
syundo0730 | 12:6cd135bf03bd | 11 | #include "SCI.h" |
syundo0730 | 21:a54bcab078ed | 12 | //#include "PWM.h" |
syundo0730 | 21:a54bcab078ed | 13 | #include "Adafruit_PWMServoDriver.h" |
syundo0730 | 17:60de3bfdc70b | 14 | |
syundo0730 | 17:60de3bfdc70b | 15 | #include "CSV.h" |
syundo0730 | 19:c2ec475367aa | 16 | #include "readMotion.h" |
syundo0730 | 12:6cd135bf03bd | 17 | |
syundo0730 | 20:abb7852df747 | 18 | class Controlor |
syundo0730 | 12:6cd135bf03bd | 19 | { |
syundo0730 | 12:6cd135bf03bd | 20 | public: |
syundo0730 | 20:abb7852df747 | 21 | Controlor(uint16_t* data); |
syundo0730 | 20:abb7852df747 | 22 | ~Controlor(); |
syundo0730 | 12:6cd135bf03bd | 23 | |
syundo0730 | 12:6cd135bf03bd | 24 | public: |
syundo0730 | 12:6cd135bf03bd | 25 | void control(); |
syundo0730 | 12:6cd135bf03bd | 26 | |
syundo0730 | 12:6cd135bf03bd | 27 | private: |
syundo0730 | 12:6cd135bf03bd | 28 | void read(const string& filename, uint16_t* data); |
syundo0730 | 12:6cd135bf03bd | 29 | void set(uint16_t* data); |
syundo0730 | 13:711f74b2fa33 | 30 | bool checkid(int id); |
syundo0730 | 13:711f74b2fa33 | 31 | |
syundo0730 | 13:711f74b2fa33 | 32 | public: |
syundo0730 | 13:711f74b2fa33 | 33 | void setmotion(const int id); |
syundo0730 | 12:6cd135bf03bd | 34 | void play(); |
syundo0730 | 12:6cd135bf03bd | 35 | |
syundo0730 | 12:6cd135bf03bd | 36 | private: |
syundo0730 | 12:6cd135bf03bd | 37 | uint16_t*** motions; |
syundo0730 | 12:6cd135bf03bd | 38 | int motion_size; |
syundo0730 | 12:6cd135bf03bd | 39 | int* pose_size; |
syundo0730 | 12:6cd135bf03bd | 40 | int servo_size; |
syundo0730 | 12:6cd135bf03bd | 41 | |
syundo0730 | 20:abb7852df747 | 42 | OfflineMotion* offline; |
syundo0730 | 17:60de3bfdc70b | 43 | OnlineMotion* online; |
syundo0730 | 20:abb7852df747 | 44 | Motion* motion; |
syundo0730 | 17:60de3bfdc70b | 45 | |
syundo0730 | 12:6cd135bf03bd | 46 | private: |
syundo0730 | 12:6cd135bf03bd | 47 | bool playing; |
syundo0730 | 20:abb7852df747 | 48 | bool attached; |
syundo0730 | 12:6cd135bf03bd | 49 | SCI* comu; |
syundo0730 | 21:a54bcab078ed | 50 | //PWM* pwm; |
syundo0730 | 21:a54bcab078ed | 51 | Adafruit_PWMServoDriver* pwm; |
syundo0730 | 12:6cd135bf03bd | 52 | }; |
syundo0730 | 12:6cd135bf03bd | 53 | |
syundo0730 | 12:6cd135bf03bd | 54 | #endif |