瀏覽代碼

修改终点乱规划避障“

tianxiaosen 2 年之前
父節點
當前提交
8ea73f7285

+ 3 - 1
src/decition/decition_brain_sf_jsguide_new/decition/decide_gps_00.cpp

@@ -1898,7 +1898,7 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
     }
 
     //shiyanbizhang 0929                                      //导缆车不判定OBs速度
-    if(obsDistance>0&& (obsDistance<ServiceCarStatus.aocfDis)//&&(obs_speed_for_avoid>-8.0)&&(obs_speed_for_avoid<3.0)&&(realspeed>1)//&& (avoid_speed_flag==true)        //
+    if(obsDistance>0&& (obsDistance<ServiceCarStatus.aocfDis)&&((PathPoint+500)<gpsMapLine.size())//&&(obs_speed_for_avoid>-8.0)&&(obs_speed_for_avoid<3.0)&&(realspeed>1)//&& (avoid_speed_flag==true)        //
             &&(vehState==normalRun||vehState==backOri || vehState==avoiding) //&&(ObsTimeStart==-1)
             && (gpsMapLine[PathPoint]->runMode==1)&& (road_permit_avoid==true)&&(gpsMapLine[PathPoint]->mode2!=3000)&&(gpsMapLine[PathPoint+300]->mode2!=3000)&&(gpsMapLine[PathPoint+100]->mode2!=3000)&&(gpsMapLine[PathPoint+300]->mode2!=23)){
 //        ObsTimeStart=GetTickCount();
@@ -2049,6 +2049,8 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
                            avoidXNew,avoidXNewLast);
            //gpsTraceAvoidXY = getGpsTraceOffsetAvoid(gpsTraceOri, avoidXNew,now_gps_ins);
            gpsTraceAvoidXY = splinePlanner->chooseRoadBySpline(now_gps_ins,gpsMapLine,PathPoint,obsSpline,avoidXNew,avoidXNewLast);
+
+
            vehState = avoiding;
            startAvoidGpsIns = now_gps_ins;
            obstacle_avoid_flag=1;

+ 4 - 2
src/ui/ui_ads_hmi/ADCIntelligentVehicle.cpp

@@ -1252,7 +1252,8 @@ void ADCIntelligentVehicle::paintEvent(QPaintEvent *)
 
 #if 1
         // draw plan trace
-        penPoint.setColor(QColor(187, 255, 255, 100));
+//        penPoint.setColor(QColor(187, 255, 255, 100));
+        penPoint.setColor(QColor(255, 0, 0, 100));
         penPoint.setWidth(2);
         painter->setPen(penPoint);
         QPointF tracePoints[myplan.size()];
@@ -1269,7 +1270,8 @@ void ADCIntelligentVehicle::paintEvent(QPaintEvent *)
 #endif
 #if 1
 //        penPoint.setColor(Qt::gray);
-        penPoint.setColor(QColor(187, 255, 255, 100));
+//        penPoint.setColor(QColor(187, 255, 255, 100));
+        penPoint.setColor(QColor(255, 0, 0, 100));
         penPoint.setWidth(2);
         painter->setPen(penPoint);
         QPointF tracePoints_left[myplan_left.size()];