00001 #include "uvsim/control/ServoController.h" 00002 #include <pthread.h> 00003 #include <ctime> 00004 #include <cmath> 00005 #include <iostream> 00006 00007 int main (int argc, char const* argv[]) 00008 { 00009 uvsim::ServoController strCtrl(0.833 , 20.0, -1, 1); 00010 strCtrl.initialize(); 00011 //static const float kP0 = 2.57, kI0 = 0, kD0 = 1.31; 00012 //float cmd = 1.1, feedback = 2.0; 00013 double t = 0; 00014 for (;;) 00015 { 00016 strCtrl.update(sin(t), 0, 1, 0, 0); 00017 t++; 00018 } 00019 return 0; 00020 } 00021 // vim:ts=4:sw=4 00022