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

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

Committer:
syundo0730
Date:
Wed Sep 04 03:59:40 2013 +0000
Revision:
21:a54bcab078ed
Parent:
20:abb7852df747
Motion handling was moved to out of motion class

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 21:a54bcab078ed 9 #include "Adafruit_PWMServoDriver.h"
syundo0730 20:abb7852df747 10 //#include "Motion.h"
syundo0730 17:60de3bfdc70b 11
syundo0730 17:60de3bfdc70b 12
syundo0730 17:60de3bfdc70b 13 const float M_PI = 3.14159265;
syundo0730 17:60de3bfdc70b 14
syundo0730 20:abb7852df747 15 class OnlineMotion //: public Motion
syundo0730 17:60de3bfdc70b 16 {
syundo0730 17:60de3bfdc70b 17 public:
syundo0730 21:a54bcab078ed 18 OnlineMotion(float _T, float _TIMESTEP, unsigned char _size_num, Adafruit_PWMServoDriver* _pwm, bool* _playing);
syundo0730 17:60de3bfdc70b 19 ~OnlineMotion();
syundo0730 17:60de3bfdc70b 20 public:
syundo0730 17:60de3bfdc70b 21 void step();
syundo0730 17:60de3bfdc70b 22 private:
syundo0730 17:60de3bfdc70b 23 void update();
syundo0730 17:60de3bfdc70b 24 void play_online();
syundo0730 17:60de3bfdc70b 25 void invertkinematics(float* pos, uint16_t* theta);
syundo0730 17:60de3bfdc70b 26 void walk(float* lpos, float* rpos, float h, float stride, float side, float up);
syundo0730 17:60de3bfdc70b 27
syundo0730 17:60de3bfdc70b 28 private:
syundo0730 21:a54bcab078ed 29 Adafruit_PWMServoDriver* pwm;
syundo0730 21:a54bcab078ed 30 //PWM* pwm;
syundo0730 17:60de3bfdc70b 31 unsigned char m_NUM_MAX;
syundo0730 17:60de3bfdc70b 32 bool* playing;
syundo0730 19:c2ec475367aa 33 volatile float t;
syundo0730 19:c2ec475367aa 34 float T ,STEP;
syundo0730 17:60de3bfdc70b 35 };
syundo0730 17:60de3bfdc70b 36
syundo0730 17:60de3bfdc70b 37 #endif