|
@@ -90,7 +90,7 @@ static double ki = 0.0;
|
|
static double kd = 0.0;
|
|
static double kd = 0.0;
|
|
static double MAXACC = 3.0;
|
|
static double MAXACC = 3.0;
|
|
static int64_t gnLastAccUptime = 0;
|
|
static int64_t gnLastAccUptime = 0;
|
|
-static bool gbUsePID = true;
|
|
|
|
|
|
+static bool gbUsePID = false;
|
|
static bool gbPrintPIDOut = true;
|
|
static bool gbPrintPIDOut = true;
|
|
static double TorqueRatio = 1.4;
|
|
static double TorqueRatio = 1.4;
|
|
|
|
|
|
@@ -196,11 +196,12 @@ double fpidtestmaxvel = 15.0;
|
|
|
|
|
|
void executeDecition(const iv::brain::decition &decition)
|
|
void executeDecition(const iv::brain::decition &decition)
|
|
{
|
|
{
|
|
- double fwheel = decition.wheelangle()*0.9;
|
|
|
|
|
|
+ double fwheel = decition.wheelangle();
|
|
if(fwheel<-430)fwheel = 430;
|
|
if(fwheel<-430)fwheel = 430;
|
|
if(fwheel>380)fwheel = 380;
|
|
if(fwheel>380)fwheel = 380;
|
|
|
|
|
|
double ftorque = decition.torque() * TorqueRatio;
|
|
double ftorque = decition.torque() * TorqueRatio;
|
|
|
|
+ if((ftorque>30)&&(ftorque<150))ftorque = 150;
|
|
double fbrake = decition.brake();
|
|
double fbrake = decition.brake();
|
|
|
|
|
|
#ifdef PIDTEST
|
|
#ifdef PIDTEST
|