diff --git a/src/C++/Driver/src/KobukiDriver/CKobuki.cpp b/src/C++/Driver/src/KobukiDriver/CKobuki.cpp index 429e7f9..587c50c 100755 --- a/src/C++/Driver/src/KobukiDriver/CKobuki.cpp +++ b/src/C++/Driver/src/KobukiDriver/CKobuki.cpp @@ -509,32 +509,6 @@ void CKobuki::doRotation(long double th) { usleep(25 * 1000); } -// combines navigation to a coordinate and rotation by an angle, performs -// movement to the selected coordinate in the robot's coordinate system -void CKobuki::goToXy(long double xx, long double yy) { - long double th; - - yy = yy * -1; - - th = atan2(yy, xx); - doRotation(th); - - long double s = sqrt(pow(xx, 2) + pow(yy, 2)); - - // resetnem suradnicovu sustavu robota - x = 0; - y = 0; - iterationCount = 0; - theta = 0; - - // std::cout << "mam prejst: " << s << "[m]" << std::endl; - - goStraight(s); - - usleep(25 * 1000); - return; -} - /// @brief Makes the robot move forward for 3 seconds /// @param speedvalue How fast it will drive forward from 0 - 1024 void CKobuki::forward(int speedvalue) { diff --git a/src/C++/Driver/src/KobukiDriver/graph.h b/src/C++/Driver/src/KobukiDriver/graph.h deleted file mode 100644 index 89c963c..0000000 --- a/src/C++/Driver/src/KobukiDriver/graph.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef GRAPH1010 -#define GRAPH1010 -#include -#include -#include - -using namespace std; -#define GRAPH_ENABLED true - -class plot { -public: - FILE *gp; - bool enabled,persist; - plot(bool _persist=false,bool _enabled=GRAPH_ENABLED) { - enabled=_enabled; - persist=_persist; - if (enabled) { - if(persist) - gp=popen("gnuplot -persist","w"); - else - gp=popen("gnuplot","w"); - } - } - - void plot_data(vector x,const char* style="points",const char* title="Data") { - if(!enabled) - return; - fprintf(gp,"set title '%s' \n",title); - fprintf(gp,"plot '-' w %s \n",style); - for(int k=0;k x,vector y,const char* style="points",const char* title="Data") { - if(!enabled) - return; - fprintf(gp,"set title '%s' \n",title); - fprintf(gp,"plot '-' w %s \n",style); - for(int k=0;k x,y; - for(int k=a;k