Controlor for Humanoid. Walking trajectory generator, sensor reflection etc.
Dependencies: Adafruit-PWM-Servo-Driver MPU6050 RS300 mbed
Motions.h@13:711f74b2fa33, 2013-02-03 (annotated)
- Committer:
- syundo0730
- Date:
- Sun Feb 03 21:22:21 2013 +0000
- Revision:
- 13:711f74b2fa33
- Parent:
- 12:6cd135bf03bd
- Child:
- 14:522bb06f0f0d
play motion by signal from serial port
Who changed what in which revision?
User | Revision | Line number | New 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 | 12:6cd135bf03bd | 9 | class Motions |
syundo0730 | 12:6cd135bf03bd | 10 | { |
syundo0730 | 12:6cd135bf03bd | 11 | public: |
syundo0730 | 12:6cd135bf03bd | 12 | Motions(uint16_t* data); |
syundo0730 | 12:6cd135bf03bd | 13 | ~Motions(); |
syundo0730 | 12:6cd135bf03bd | 14 | |
syundo0730 | 12:6cd135bf03bd | 15 | public: |
syundo0730 | 12:6cd135bf03bd | 16 | void control(); |
syundo0730 | 12:6cd135bf03bd | 17 | |
syundo0730 | 12:6cd135bf03bd | 18 | private: |
syundo0730 | 12:6cd135bf03bd | 19 | void read(const string& filename, uint16_t* data); |
syundo0730 | 12:6cd135bf03bd | 20 | void set(uint16_t* data); |
syundo0730 | 13:711f74b2fa33 | 21 | bool checkid(int id); |
syundo0730 | 13:711f74b2fa33 | 22 | |
syundo0730 | 13:711f74b2fa33 | 23 | public: |
syundo0730 | 13:711f74b2fa33 | 24 | void setmotion(const int id); |
syundo0730 | 12:6cd135bf03bd | 25 | void play(); |
syundo0730 | 12:6cd135bf03bd | 26 | |
syundo0730 | 12:6cd135bf03bd | 27 | private: |
syundo0730 | 12:6cd135bf03bd | 28 | uint16_t*** motions; |
syundo0730 | 12:6cd135bf03bd | 29 | int motion_size; |
syundo0730 | 12:6cd135bf03bd | 30 | int* pose_size; |
syundo0730 | 12:6cd135bf03bd | 31 | int servo_size; |
syundo0730 | 12:6cd135bf03bd | 32 | |
syundo0730 | 12:6cd135bf03bd | 33 | private: |
syundo0730 | 12:6cd135bf03bd | 34 | Motion* inter; |
syundo0730 | 12:6cd135bf03bd | 35 | bool playing; |
syundo0730 | 12:6cd135bf03bd | 36 | SCI* comu; |
syundo0730 | 12:6cd135bf03bd | 37 | //LocalFileSystem* local; |
syundo0730 | 12:6cd135bf03bd | 38 | }; |
syundo0730 | 12:6cd135bf03bd | 39 | |
syundo0730 | 12:6cd135bf03bd | 40 | #endif |