Controlor for Humanoid. Walking trajectory generator, sensor reflection etc.
Dependencies: Adafruit-PWM-Servo-Driver MPU6050 RS300 mbed
OnlineMotion.h
- Committer:
- syundo0730
- Date:
- 2013-04-02
- Revision:
- 17:60de3bfdc70b
- Child:
- 18:7077bedc37eb
File content as of revision 17:60de3bfdc70b:
#ifndef ONLINEMOTION_H_2013_02_04_ #define ONLINEMOTION_H_2013_02_04_ #include "LPC17xx.h" #include "mbed.h" #include "PWM.h" const float RADTOVAL = (SRV_MAX_DUTY - SRV_MIN_DUTY) / 3.14159265; const float M_PI = 3.14159265; class OnlineMotion { public: OnlineMotion(float _T, float _TIMESTEP, unsigned char _size_num, PWM* _pwm, bool* _playing); ~OnlineMotion(); public: void step(); private: void update(); void play_online(); void invertkinematics(float* pos, uint16_t* theta); void walk(float* lpos, float* rpos, float h, float stride, float side, float up); private: PWM* pwm; uint16_t** m_data; unsigned short int m_IDX_MAX; unsigned char m_NUM_MAX; bool* playing; float t, T ,STEP; }; #endif