Controlor for Humanoid. Walking trajectory generator, sensor reflection etc.
Dependencies: Adafruit-PWM-Servo-Driver MPU6050 RS300 mbed
Diff: Motion/OfflineMotion.h
- Revision:
- 20:abb7852df747
- Child:
- 21:a54bcab078ed
diff -r c2ec475367aa -r abb7852df747 Motion/OfflineMotion.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Motion/OfflineMotion.h Mon Aug 19 08:10:58 2013 +0000 @@ -0,0 +1,42 @@ +#ifndef OFFLINEMOTION_H_2012_09_21_ +#define OFFLINEMOTION_H_2012_09_21_ + +#include "LPC17xx.h" +#include "mbed.h" +#include "PWM.h" +//#include "Motion.h" + +class OfflineMotion //: public Motion +{ + public: + OfflineMotion(uint16_t** data, unsigned short int size_idx, unsigned char size_num, PWM* _pwm, bool* playing); + ~OfflineMotion(); + public: + void step(); + private: + void update(); + void set_inter(); + void init_inter(); + void step_inter(); + + private: + PWM* pwm; + uint16_t** m_data; + unsigned short int m_IDX_MAX; + unsigned char m_NUM_MAX; + unsigned char m_data_num[500]; //inter + unsigned char m_mode; + bool* playing; + + private: + unsigned short int m_idx; + unsigned char m_play; + private: + double m_buf[25]; //buf + double m_d_buf[25]; //dbuf + double m_dd_buf[25]; //ddbuf + double m_brake_flg; + unsigned char m_brake_pnt; +}; + +#endif \ No newline at end of file