Selaa lähdekoodia

change map_lanetoxdor for fix space problem.

yuchuli 3 vuotta sitten
vanhempi
commit
a2bca8d603

+ 5 - 0
src/decition/decition_brain/decision/adc_adapter/hapo_adapter.cpp

@@ -64,6 +64,11 @@ iv::decition::Decition iv::decition::HapoAdapter::getAdapterDeciton(GPS_INS now_
             controlBrake=min(controlBrake,0.5f);
             controlSpeed=0;
         }
+         else if(abs(dSpeed-realSpeed)<3 &&(obsDistance>40 || obsDistance<0)&&ttc>=15
+                 && dSpeed>0 && !turn_around ){
+             controlBrake=0;
+             controlSpeed= 2.0* (realSpeed/15.0);
+         }
 
 
         //0110

+ 8 - 3
src/driver/driver_map_xodrload/globalplan.cpp

@@ -1041,7 +1041,7 @@ static std::vector<PlanPoint> getlinepoint(GeometryLine * pline,const double fsp
         PlanPoint pp;
         pp.x = x;
         pp.y = y;
-        pp.dis = i*0.1;
+        pp.dis = i*fspace;
         pp.hdg = pline->GetHdg();
         pp.mS = pline->GetS() + i*fspace;
         xvectorPP.push_back(pp);
@@ -1085,8 +1085,8 @@ static std::vector<PlanPoint> getarcpoint(GeometryArc * parc,const double fspace
 
         pp.x = x;
         pp.y = y;
-        pp.dis = i*0.1;
-        pp.mS = parc->GetS() + i*0.1;
+        pp.dis = i*fspace;
+        pp.mS = parc->GetS() + i*fspace;
         xvectorPP.push_back(pp);
     }
     return xvectorPP;
@@ -1906,6 +1906,11 @@ double getoff(Road * pRoad,int nlane,const double s)
                 double fds = s - s_lane - s_section;
                 double fwidth= pLW->GetA() + pLW->GetB() * fds
                         +pLW->GetC() * pow(fds,2) + pLW->GetD() * pow(fds,3);
+
+//                if((pRoad->GetRoadId() == "211210") &&(nlane == -1) &&(pLane->GetId() == -1))
+//                {
+//                    qDebug("fs is %f width is %f",fds,fwidth);
+//                }
                 if(nlane == pLane->GetId())
                 {
                     foff = foff + fwidth/2.0;