Fixed bug filling the MapBuilder
This commit is contained in:
parent
7236bfc2fe
commit
a018135b0f
|
@ -80,13 +80,18 @@ namespace opendrive {
|
|||
} else {
|
||||
roadSegment.AddSuccessorID(it->second->road_link.successor->id);
|
||||
}
|
||||
}
|
||||
|
||||
if (it->second->road_link.predecessor != nullptr) {
|
||||
if (it->second->road_link.predecessor->element_type == "junction") {
|
||||
std::vector<lane_junction_t> &options =
|
||||
junctionsData[it->second->road_link.predecessor->id][it->first];
|
||||
for (size_t i = 0; i < options.size(); ++i) {
|
||||
roadSegment.AddPredecessorID(options[i].connection_road);
|
||||
}
|
||||
} else {
|
||||
roadSegment.AddPredecessorID(it->second->road_link.predecessor->id);
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < it->second->geometry_attributes.size(); ++i) {
|
||||
|
@ -142,7 +147,6 @@ namespace opendrive {
|
|||
|
||||
mapBuilder.AddRoadSegmentDefinition(roadSegment);
|
||||
}
|
||||
}
|
||||
|
||||
return mapBuilder.Build();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue