|
@@ -1264,17 +1264,19 @@ std::vector<PlanPoint> GetPoint(pathsection xpath,const double fspace = 0.1)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
double s1 = prg->GetLength();
|
|
double s1 = prg->GetLength();
|
|
|
|
+
|
|
switch (prg->GetGeomType()) {
|
|
switch (prg->GetGeomType()) {
|
|
case 0:
|
|
case 0:
|
|
xvectorPP = getlinepoint((GeometryLine *)prg,fspace);
|
|
xvectorPP = getlinepoint((GeometryLine *)prg,fspace);
|
|
|
|
+
|
|
break;
|
|
break;
|
|
case 1:
|
|
case 1:
|
|
xvectorPP = getspiralpoint((GeometrySpiral *)prg,fspace);
|
|
xvectorPP = getspiralpoint((GeometrySpiral *)prg,fspace);
|
|
break;
|
|
break;
|
|
case 2:
|
|
case 2:
|
|
xvectorPP = getarcpoint((GeometryArc *)prg,fspace);
|
|
xvectorPP = getarcpoint((GeometryArc *)prg,fspace);
|
|
-
|
|
|
|
break;
|
|
break;
|
|
case 3:
|
|
case 3:
|
|
|
|
|
|
@@ -1298,6 +1300,9 @@ std::vector<PlanPoint> GetPoint(pathsection xpath,const double fspace = 0.1)
|
|
for(j=0;j<xvectorPP.size();j++)
|
|
for(j=0;j<xvectorPP.size();j++)
|
|
{
|
|
{
|
|
PlanPoint pp = xvectorPP.at(j);
|
|
PlanPoint pp = xvectorPP.at(j);
|
|
|
|
+
|
|
|
|
+ pp.mfCurvature = pRoad->GetRoadCurvature(pp.mS);
|
|
|
|
+
|
|
if(((pp.dis+prg->GetS()) >= s_start) &&((pp.dis+prg->GetS()) <= s_end))
|
|
if(((pp.dis+prg->GetS()) >= s_start) &&((pp.dis+prg->GetS()) <= s_end))
|
|
{
|
|
{
|
|
if(s_start > prg->GetS())
|
|
if(s_start > prg->GetS())
|
|
@@ -1611,7 +1616,7 @@ double GetRoadWidth(std::vector<iv::lanewidthabcd> xvectorLWA,int nlane,double s
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-int GetLaneOriTotal(Road * pRoad, int nlane,double s,int & nori, int & ntotal,double & fSpeed)
|
|
|
|
|
|
+int GetLaneOriTotal(Road * pRoad, int nlane,double s,int & nori, int & ntotal,double & fSpeed,bool & bNoavoid)
|
|
{
|
|
{
|
|
if(pRoad->GetLaneSectionCount() < 1)return -1;
|
|
if(pRoad->GetLaneSectionCount() < 1)return -1;
|
|
|
|
|
|
@@ -1640,6 +1645,8 @@ int GetLaneOriTotal(Road * pRoad, int nlane,double s,int & nori, int & ntotal,do
|
|
|
|
|
|
pRoad->GetRoadSpeedMax(s,fSpeed); //Get Road Speed Limit.
|
|
pRoad->GetRoadSpeedMax(s,fSpeed); //Get Road Speed Limit.
|
|
|
|
|
|
|
|
+ pRoad->GetRoadNoavoid(s,bNoavoid);
|
|
|
|
+
|
|
int nlanecount = pLS->GetLaneCount();
|
|
int nlanecount = pLS->GetLaneCount();
|
|
for(i=0;i<nlanecount;i++)
|
|
for(i=0;i<nlanecount;i++)
|
|
{
|
|
{
|
|
@@ -2054,7 +2061,7 @@ std::vector<PlanPoint> GetLanePoint(pathsection xps,std::vector<PlanPoint> xvPP,
|
|
pp.lanmp = 0;
|
|
pp.lanmp = 0;
|
|
pp.mfDisToRoadLeft = off1*(-1);
|
|
pp.mfDisToRoadLeft = off1*(-1);
|
|
pp.mfRoadWidth = GetRoadWidth(xvectorLWA,xps.mainsel,pp.mS);
|
|
pp.mfRoadWidth = GetRoadWidth(xvectorLWA,xps.mainsel,pp.mS);
|
|
- GetLaneOriTotal(xps.mpRoad,xps.mainsel,pp.mS,pp.mnLaneori,pp.mnLaneTotal,pp.speed);
|
|
|
|
|
|
+ GetLaneOriTotal(xps.mpRoad,xps.mainsel,pp.mS,pp.mnLaneori,pp.mnLaneTotal,pp.speed,pp.mbNoavoid);
|
|
|
|
|
|
xvectorPP.push_back(pp);
|
|
xvectorPP.push_back(pp);
|
|
}
|
|
}
|
|
@@ -2102,7 +2109,7 @@ std::vector<PlanPoint> GetLanePoint(pathsection xps,std::vector<PlanPoint> xvPP,
|
|
pp.lanmp = 0;
|
|
pp.lanmp = 0;
|
|
pp.mfDisToRoadLeft = off1;
|
|
pp.mfDisToRoadLeft = off1;
|
|
pp.mfRoadWidth = GetRoadWidth(xvectorLWA,xps.mainsel,pp.mS);
|
|
pp.mfRoadWidth = GetRoadWidth(xvectorLWA,xps.mainsel,pp.mS);
|
|
- GetLaneOriTotal(xps.mpRoad,xps.mainsel,pp.mS,pp.mnLaneori,pp.mnLaneTotal,pp.speed);
|
|
|
|
|
|
+ GetLaneOriTotal(xps.mpRoad,xps.mainsel,pp.mS,pp.mnLaneori,pp.mnLaneTotal,pp.speed,pp.mbNoavoid);
|
|
|
|
|
|
pp.hdg = pp.hdg + M_PI;
|
|
pp.hdg = pp.hdg + M_PI;
|
|
xvectorPP.push_back(pp);
|
|
xvectorPP.push_back(pp);
|
|
@@ -2822,7 +2829,7 @@ int MakePlan(xodrdijkstra * pxd,OpenDrive * pxodr,const double x_now,const doubl
|
|
pp.lanmp = 0;
|
|
pp.lanmp = 0;
|
|
pp.mfDisToRoadLeft = foff *(-1.0);
|
|
pp.mfDisToRoadLeft = foff *(-1.0);
|
|
pp.mfRoadWidth = GetRoadWidth(xvectorLWA,nlane,pp.mS);
|
|
pp.mfRoadWidth = GetRoadWidth(xvectorLWA,nlane,pp.mS);
|
|
- GetLaneOriTotal(pRoad,nlane,pp.mS,pp.mnLaneori,pp.mnLaneTotal,pp.speed);
|
|
|
|
|
|
+ GetLaneOriTotal(pRoad,nlane,pp.mS,pp.mnLaneori,pp.mnLaneTotal,pp.speed,pp.mbNoavoid);
|
|
|
|
|
|
xvectorPP.push_back(pp);
|
|
xvectorPP.push_back(pp);
|
|
i++;
|
|
i++;
|
|
@@ -2840,7 +2847,7 @@ int MakePlan(xodrdijkstra * pxd,OpenDrive * pxodr,const double x_now,const doubl
|
|
pp.lanmp = 0;
|
|
pp.lanmp = 0;
|
|
pp.mfDisToRoadLeft = foff;
|
|
pp.mfDisToRoadLeft = foff;
|
|
pp.mfRoadWidth = GetRoadWidth(xvectorLWA,nlane,pp.mS);
|
|
pp.mfRoadWidth = GetRoadWidth(xvectorLWA,nlane,pp.mS);
|
|
- GetLaneOriTotal(pRoad,nlane,pp.mS,pp.mnLaneori,pp.mnLaneTotal,pp.speed);
|
|
|
|
|
|
+ GetLaneOriTotal(pRoad,nlane,pp.mS,pp.mnLaneori,pp.mnLaneTotal,pp.speed,pp.mbNoavoid);
|
|
|
|
|
|
|
|
|
|
xvectorPP.push_back(pp);
|
|
xvectorPP.push_back(pp);
|