mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-04 04:14:58 +00:00
trying to fix calibration for rotation
This commit is contained in:
@@ -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 u = 0; // controlled variable, angular speed of the robot during movement
|
||||||
long double w = th; // desired value in radians
|
long double w = th; // desired value in radians
|
||||||
long double Kp = PI;
|
long double Kp = PI * 2;
|
||||||
long double e = 0;
|
long double e = 0;
|
||||||
int thresh = PI / 2;
|
int thresh = PI;
|
||||||
|
|
||||||
theta = 0;
|
theta = 0;
|
||||||
x = 0;
|
x = 0;
|
||||||
@@ -720,8 +720,8 @@ void CKobuki::doRotation(long double th)
|
|||||||
|
|
||||||
if (u > thresh)
|
if (u > thresh)
|
||||||
u = thresh;
|
u = thresh;
|
||||||
if (u < 0.4)
|
if (u < 0.6)
|
||||||
u = 0.4;
|
u = 0.6;
|
||||||
|
|
||||||
if (i < u)
|
if (i < u)
|
||||||
{
|
{
|
||||||
@@ -743,8 +743,8 @@ void CKobuki::doRotation(long double th)
|
|||||||
|
|
||||||
if (u > thresh)
|
if (u > thresh)
|
||||||
u = thresh;
|
u = thresh;
|
||||||
if (u < 0.4)
|
if (u < 0.6)
|
||||||
u = 0.4;
|
u = 0.6;
|
||||||
|
|
||||||
if (i < u)
|
if (i < u)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user