From 50ba162717c6549cc1dfe26518a6be430bcf0058 Mon Sep 17 00:00:00 2001 From: "ishak jmilou.ishak" Date: Mon, 7 Oct 2024 10:26:00 +0200 Subject: [PATCH] trying to fix calibration for rotation --- src/C++/Driver/src/CKobuki.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/C++/Driver/src/CKobuki.cpp b/src/C++/Driver/src/CKobuki.cpp index ffde869..87f9954 100755 --- a/src/C++/Driver/src/CKobuki.cpp +++ b/src/C++/Driver/src/CKobuki.cpp @@ -700,9 +700,9 @@ void CKobuki::doRotation(long double th) { long double u = 0; // controlled variable, angular speed of the robot during movement long double w = th; // desired value in radians - long double Kp = PI; + long double Kp = PI * 2; long double e = 0; - int thresh = PI / 2; + int thresh = PI; theta = 0; x = 0; @@ -720,8 +720,8 @@ void CKobuki::doRotation(long double th) if (u > thresh) u = thresh; - if (u < 0.4) - u = 0.4; + if (u < 0.6) + u = 0.6; if (i < u) { @@ -743,8 +743,8 @@ void CKobuki::doRotation(long double th) if (u > thresh) u = thresh; - if (u < 0.4) - u = 0.4; + if (u < 0.6) + u = 0.6; if (i < u) {