Browse Source

change decition_brain_sf_changan_shenlan.

pilot 1 year ago
parent
commit
f986817600

+ 4 - 2
src/decition/decition_brain_sf_changan_shenlan/decition/adc_controller/pid_controller.cpp

@@ -91,7 +91,7 @@ float iv::decition::PIDController::getPidAngle(float realSpeed, std::vector<Poin
     if(ServiceCarStatus.msysparam.mvehtype=="ge3" || ServiceCarStatus.msysparam.mvehtype=="vv7"){
         realSpeed > 40 ? PreviewDistance = max(6.0, realSpeed *0.6) : PreviewDistance = max(4.0, realSpeed *0.3);
     }else{
-        realSpeed > 40 ? PreviewDistance = max(6.0, realSpeed *0.6) : PreviewDistance = max(6.0, realSpeed *0.5);
+        realSpeed > 40 ? PreviewDistance = max(6.0, realSpeed *0.6) : PreviewDistance = max(4.0, realSpeed *0.3);
     }
 
 
@@ -122,10 +122,12 @@ float iv::decition::PIDController::getPidAngle(float realSpeed, std::vector<Poin
         }
     }
 
+    if((sumdis>1.0) &&(gpsIndex == 0))gpsIndex = nsize -1;
+
 
     bool bUseAutowareKappa = true;
     double wheel_base = 2.9;
-    double wheelratio = 15.6;
+    double wheelratio = 13.6;
 
     if(bUseAutowareKappa)
     {

+ 1 - 1
src/decition/decition_brain_sf_changan_shenlan/decition/adc_tools/compute_00.cpp

@@ -1924,7 +1924,7 @@ double iv::decition::Compute00::bocheCompute(GPS_INS nowGps, GPS_INS aimGps) {
     double x_2 = 0.0, y_2 = 0.0;
     double steering_angle;
     double l = 2.950;
-    double r =6;
+    double r =7.0;  //6.0
     double x_o, y_o, x_o_1, y_o_1, x_o_2, y_o_2, x_3, y_3;
     double x_t_n, y_t_n, x_t_f, y_t_f;//近切点和远切点
     double x_t_1, y_t_1, x_t_2, y_t_2;//圆形1的切点

+ 10 - 1
src/decition/decition_brain_sf_changan_shenlan/decition/brain.cpp

@@ -438,7 +438,7 @@ void iv::decition::BrainDecition::run() {
                 }
                 else
                 {
-                    decition_gps->brake = 6;//保证在进入自动驾驶的时候车辆能够泄压,否则进入自动驾驶车辆无法加速
+                    decition_gps->brake = -2;//保证在进入自动驾驶的时候车辆能够泄压,否则进入自动驾驶车辆无法加速
                 }
                 decition_gps->torque=0.0;
                 decition_gps->acc_active = 0;//ACC扭矩请求激活(为1激活,为0不激活),不激活后不执行扭矩请求,对于深蓝没什么用,因为控制模块直接给的1
@@ -909,6 +909,15 @@ void iv::decition::BrainDecition::ShareDecition(iv::decition::Decition decition)
         {
 
             iv::modulecomm::ModuleSendMsg(mpaDecition,str,nsize);
+//            else
+
+        }
+        else
+        {
+            if(ServiceCarStatus.msysparam.mvehtype=="shenlan")
+            {
+                iv::modulecomm::ModuleSendMsg(mpaDecition,str,nsize);
+            }
         }
     }
     else

+ 1 - 1
src/decition/decition_brain_sf_changan_shenlan/decition/decide_gps_00.cpp

@@ -315,7 +315,7 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
         }
 
         double dis =  GetDistance(*gpsMapLine[0], *gpsMapLine[gpsMapLine.size()-1]);
-        if(dis<15){
+        if(dis<1){
             circleMode=true;
         }else{
             circleMode=false;