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

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

OnlineMotion.h

Committer:
syundo0730
Date:
2013-04-03
Revision:
18:7077bedc37eb
Parent:
17:60de3bfdc70b
Child:
19:c2ec475367aa

File content as of revision 18:7077bedc37eb:

#ifndef ONLINEMOTION_H_2013_02_04_
#define ONLINEMOTION_H_2013_02_04_

#include <cmath>

#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