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

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

Controlor.h

Committer:
syundo0730
Date:
2013-08-19
Revision:
20:abb7852df747
Parent:
Motions.h@ 19:c2ec475367aa
Child:
21:a54bcab078ed

File content as of revision 20:abb7852df747:

#ifndef CONTROLOR_H_2013_02_02_
#define CONTROLOR_H_2013_02_02_

#include "mbed.h"
#include <string>

#include "Motion.h"
#include "OfflineMotion.h"
#include "OnlineMotion.h"

#include "SCI.h"
#include "PWM.h"

#include "CSV.h"
#include "readMotion.h"

const float TIMESTEP = 0.02;

class Controlor
{
  public:
    Controlor(uint16_t* data);
    ~Controlor();
    
  public:
    void control();
    
  private:
    void read(const string& filename, uint16_t* data);
    void set(uint16_t* data);
    bool checkid(int id);
    
  public:
    void setmotion(const int id);
    void play();
  
  private:
    uint16_t*** motions;
    int motion_size;
    int* pose_size;
    int servo_size;
    
    OfflineMotion* offline;
    OnlineMotion* online;
    Motion* motion;
    
  private:
    bool playing;
    bool attached;
    SCI* comu;
    PWM* pwm;
};

#endif