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

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

Committer:
syundo0730
Date:
Sun Apr 07 06:59:33 2013 +0000
Revision:
19:c2ec475367aa
Parent:
18:7077bedc37eb
New Motion read method (not good)  was added.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
syundo0730 17:60de3bfdc70b 1 #ifndef ONLINEMOTION_H_2013_02_04_
syundo0730 17:60de3bfdc70b 2 #define ONLINEMOTION_H_2013_02_04_
syundo0730 17:60de3bfdc70b 3
syundo0730 18:7077bedc37eb 4 #include <cmath>
syundo0730 18:7077bedc37eb 5
syundo0730 17:60de3bfdc70b 6 #include "LPC17xx.h"
syundo0730 17:60de3bfdc70b 7 #include "mbed.h"
syundo0730 17:60de3bfdc70b 8 #include "PWM.h"
syundo0730 17:60de3bfdc70b 9
syundo0730 17:60de3bfdc70b 10 const float RADTOVAL = (SRV_MAX_DUTY - SRV_MIN_DUTY) / 3.14159265;
syundo0730 17:60de3bfdc70b 11
syundo0730 17:60de3bfdc70b 12 const float M_PI = 3.14159265;
syundo0730 17:60de3bfdc70b 13
syundo0730 17:60de3bfdc70b 14 class OnlineMotion
syundo0730 17:60de3bfdc70b 15 {
syundo0730 17:60de3bfdc70b 16 public:
syundo0730 17:60de3bfdc70b 17 OnlineMotion(float _T, float _TIMESTEP, unsigned char _size_num, PWM* _pwm, bool* _playing);
syundo0730 17:60de3bfdc70b 18 ~OnlineMotion();
syundo0730 17:60de3bfdc70b 19 public:
syundo0730 17:60de3bfdc70b 20 void step();
syundo0730 17:60de3bfdc70b 21 private:
syundo0730 17:60de3bfdc70b 22 void update();
syundo0730 17:60de3bfdc70b 23 void play_online();
syundo0730 17:60de3bfdc70b 24 void invertkinematics(float* pos, uint16_t* theta);
syundo0730 17:60de3bfdc70b 25 void walk(float* lpos, float* rpos, float h, float stride, float side, float up);
syundo0730 17:60de3bfdc70b 26
syundo0730 17:60de3bfdc70b 27
syundo0730 17:60de3bfdc70b 28 private:
syundo0730 17:60de3bfdc70b 29 PWM* pwm;
syundo0730 18:7077bedc37eb 30 //uint16_t** m_data;
syundo0730 18:7077bedc37eb 31 //unsigned short int m_IDX_MAX;
syundo0730 17:60de3bfdc70b 32 unsigned char m_NUM_MAX;
syundo0730 17:60de3bfdc70b 33 bool* playing;
syundo0730 19:c2ec475367aa 34 volatile float t;
syundo0730 19:c2ec475367aa 35 float T ,STEP;
syundo0730 17:60de3bfdc70b 36 };
syundo0730 17:60de3bfdc70b 37
syundo0730 17:60de3bfdc70b 38 #endif