|
@@ -59,7 +59,7 @@ iv::decition::Decition iv::decition::ZhongcheAdapter::getAdapterDeciton(GPS_INS
|
|
|
if(ttc>10 && (obsDistance>10||obsDistance<0)){
|
|
|
|
|
|
|
|
|
-
|
|
|
+ float controlSpeed=0;
|
|
|
|
|
|
|
|
|
if(DecideGps00::minDecelerate<0){
|
|
@@ -67,7 +67,25 @@ iv::decition::Decition iv::decition::ZhongcheAdapter::getAdapterDeciton(GPS_INS
|
|
|
(*decition)->brake = max((0-DecideGps00::minDecelerate)*90, (*decition)->brake);
|
|
|
dSpeed=10.0;
|
|
|
}else{
|
|
|
- (*decition)->torque=90;
|
|
|
+
|
|
|
+ if(dSpeed-realSpeed>2){
|
|
|
+
|
|
|
+ if(lastTorque==0 ){
|
|
|
+ controlSpeed=40;
|
|
|
+ }else{
|
|
|
+ controlSpeed = lastTorque+(accAim-accNow)*500*0.1;
|
|
|
+ }
|
|
|
+ if(controlSpeed>lastTorque){
|
|
|
+ controlSpeed=lastTorque+4;
|
|
|
+ }else if(controlSpeed>lastTorque){
|
|
|
+ controlSpeed=lastTorque-4;
|
|
|
+ }
|
|
|
+ (*decition)->torque=controlSpeed;
|
|
|
+ }else{
|
|
|
+ (*decition)->torque=realSpeed*8+10;
|
|
|
+ }
|
|
|
+ (*decition)->torque=max( (*decition)->torque,40.0f);
|
|
|
+ (*decition)->torque=min( (*decition)->torque,90.0f);
|
|
|
(*decition)->brake=0;
|
|
|
}
|
|
|
|