esc.h
Go to the documentation of this file.
00001 /*
00002  * esc.h
00003  *
00004  *  Created on: Jul 26, 2012
00005  *      Author: Berk Calli, Wouter Caarls
00006  *      Organization: Delft Biorobotics Lab., Delft University of Technology
00007  *              Contact info: b.calli@tudelft.nl, web: www.dbl.tudelft.nl
00008  *
00009  * Superclass for extremum seeking control algorithms
00010  */
00011 
00012 #ifndef ESC_H_
00013 #define ESC_H_
00014 #include <vector>
00015 #include <string>
00016 #define PI 3.141592654
00017 
00019 class ESC
00020 {
00021   public:
00023     enum inputType
00024     {
00025       inputStateValue, 
00026       inputValue       
00027     };
00028         
00030     enum outputType
00031     {
00032       outputVelocity,  
00033       outputPosition   
00034     };
00035 
00036 public:
00037     virtual ~ESC() { }
00038 
00040     virtual std::vector<std::string> monitorNames() { return std::vector<std::string>(); }
00041         
00043     virtual std::vector<double> monitor() { return std::vector<double>(); }
00044 
00046     virtual inputType getInputType() = 0;
00047         
00049     virtual outputType getOutputType() = 0;
00050 
00052     virtual std::vector<double> step(std::vector<double> state, double obj_val)
00053     {
00054       return step(obj_val);
00055     }
00056 
00058     virtual std::vector<double> step(double obj_val)
00059     {
00060       return std::vector<double>();
00061     }
00062 
00064     virtual void reset() = 0;
00065 
00067     virtual bool isStoppingConditionsMet(){
00068         return false;
00069     }
00070 };
00071 
00072 #endif /* ESC_H_ */


esc_common
Author(s): Berk Calli and Wouter Caarls
autogenerated on Sun Jan 5 2014 11:06:58