|
@@ -413,11 +413,6 @@ void odtolanelet::MergeSame(OpenDrive * pxodr,lanelet::LaneletMapPtr & laneletMa
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-// for(iter = laneletMap->laneletLayer.begin();iter != laneletMap->laneletLayer.end();++iter)
|
|
|
-// {
|
|
|
-// // ExecMerge(xvecotorsameID,iter);
|
|
|
-// }
|
|
|
}
|
|
|
|
|
|
|
|
@@ -524,66 +519,6 @@ void odtolanelet::ExecMerge(lanelet::LaneletMapPtr & laneletMap,std::vector<iv::
|
|
|
}
|
|
|
|
|
|
|
|
|
-void odtolanelet::ExecMerge(std::vector<std::vector<iv::LaneletSameID>> & xvecotorsameID,lanelet::LaneletLayer::iterator & iter)
|
|
|
-{
|
|
|
- unsigned int nSize = static_cast<unsigned int >(xvecotorsameID.size());
|
|
|
- unsigned int i;
|
|
|
-
|
|
|
- unsigned int iter_leftsize = static_cast<unsigned int>(iter->leftBound().size());
|
|
|
- unsigned int iter_rightsize = static_cast<unsigned int>(iter->rightBound().size());
|
|
|
-
|
|
|
- if((iter_leftsize<2)||(iter_rightsize<2))
|
|
|
- {
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
-// lanelet::Id startleftid = iter->leftBound()[0].id();
|
|
|
-// lanelet::Id startrightid = iter->rightBound()[0].id();
|
|
|
-
|
|
|
- for(i=0;i<nSize;i++)
|
|
|
- {
|
|
|
- unsigned int nSize2 = static_cast<unsigned int>(xvecotorsameID[i].size()) ;
|
|
|
- unsigned int j;
|
|
|
- for(j=1;j<nSize2;j++)
|
|
|
- {
|
|
|
-
|
|
|
- if((xvecotorsameID[i].at(j).iter == iter) &&(xvecotorsameID[i].at(j).npos == 1))
|
|
|
- {
|
|
|
- iter->leftBound().erase(iter->leftBound().begin());
|
|
|
- iter->rightBound().erase(iter->rightBound().begin());
|
|
|
- if(xvecotorsameID[i].at(0).npos == 1)
|
|
|
- {
|
|
|
- iter->leftBound().insert(iter->leftBound().begin(),xvecotorsameID[i].at(0).iter->leftBound()[0]);
|
|
|
- iter->rightBound().insert(iter->rightBound().begin(),xvecotorsameID[i].at(0).iter->rightBound()[0]);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- iter->leftBound().insert(iter->leftBound().begin(),xvecotorsameID[i].at(0).iter->leftBound()[xvecotorsameID[i].at(0).iter->leftBound().size() -1]);
|
|
|
- iter->rightBound().insert(iter->rightBound().begin(),xvecotorsameID[i].at(0).iter->rightBound()[xvecotorsameID[i].at(0).iter->leftBound().size() -1]);
|
|
|
- }
|
|
|
- std::cout<<"merge3"<<std::endl;
|
|
|
- return;
|
|
|
- }
|
|
|
- if((xvecotorsameID[i].at(j).iter == iter) &&(xvecotorsameID[i].at(j).npos == 2))
|
|
|
- {
|
|
|
- iter->leftBound().pop_back();
|
|
|
- iter->rightBound().pop_back();
|
|
|
- if(xvecotorsameID[i].at(0).npos == 1)
|
|
|
- {
|
|
|
- iter->leftBound().push_back(xvecotorsameID[i].at(0).iter->leftBound()[0]);
|
|
|
- iter->rightBound().push_back(xvecotorsameID[i].at(0).iter->rightBound()[0]);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- iter->leftBound().push_back(xvecotorsameID[i].at(0).iter->leftBound()[xvecotorsameID[i].at(0).iter->leftBound().size() -1]);
|
|
|
- iter->rightBound().push_back(xvecotorsameID[i].at(0).iter->rightBound()[xvecotorsameID[i].at(0).iter->rightBound().size() -1]);
|
|
|
- }
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
void odtolanelet::InsertSameNodeID(std::vector<std::vector<iv::LaneletSameID>> & xvecotorsameID,lanelet::Id xLeftID1,lanelet::Id xRightID1,
|
|
|
lanelet::Id xLeftID2,lanelet::Id xRightID2,lanelet::LaneletLayer::iterator & iter1,lanelet::LaneletLayer::iterator & iter2,
|
|
|
int npos1,int npos2)
|