Fixed missing laneChange record in OSM converted OpenDRIVE maps.
This commit is contained in:
parent
14c22d9267
commit
383c0ebb74
|
@ -24,6 +24,7 @@
|
|||
* Fixed bug causing camera-based sensors to stop sending data
|
||||
* Added `WorldSettings.deterministic_ragdolls` to enable deterministic or physically based ragdolls
|
||||
* Fixed the lack of determinism on the output of raycast sensors
|
||||
* Fixed missing `laneChange` record in converted OSM maps
|
||||
* Fixed bug in the actor's id returned by the semantic lidar
|
||||
* Fixed error when using `--config` parameter in `make package`
|
||||
* Fixed dependency of library **Xerces-c** on package
|
||||
|
|
|
@ -286,7 +286,8 @@ NWWriter_OpenDrive::writeNormalEdge(OutputDevice& device, const NBEdge* e,
|
|||
writeEmptyCenterLane(device, centerMark, 0.13);
|
||||
device << " <right>\n";
|
||||
for (int j = e->getNumLanes(); --j >= 0;) {
|
||||
device << " <lane id=\"-" << e->getNumLanes() - j << "\" type=\"" << getLaneType(e->getPermissions(j)) << "\" level=\"true\">\n";
|
||||
std::string laneType = getLaneType(e->getPermissions(j));
|
||||
device << " <lane id=\"-" << e->getNumLanes() - j << "\" type=\"" << laneType << "\" level=\"true\">\n";
|
||||
device << " <link/>\n";
|
||||
// this could be used for geometry-link junctions without u-turn,
|
||||
// predecessor and sucessors would be lane indices,
|
||||
|
@ -307,7 +308,15 @@ NWWriter_OpenDrive::writeNormalEdge(OutputDevice& device, const NBEdge* e,
|
|||
// solid road mark to the right of a forbidden lane
|
||||
markType = "solid";
|
||||
}
|
||||
device << " <roadMark sOffset=\"0\" type=\"" << markType << "\" weight=\"standard\" color=\"standard\" width=\"0.13\"/>\n";
|
||||
std::string laneChange = "both";
|
||||
if (j == 0) {
|
||||
laneChange = "none";
|
||||
} else if (getLaneType(e->getPermissions(j - 1)) == laneType) {
|
||||
laneChange = "both";
|
||||
} else {
|
||||
laneChange = "none";
|
||||
}
|
||||
device << " <roadMark sOffset=\"0\" type=\"" << markType << "\" weight=\"standard\" color=\"standard\" width=\"0.13\" laneChange=\"" << laneChange << "\"/>\n";
|
||||
device << " <speed sOffset=\"0\" max=\"" << lanes[j].speed << "\"/>\n";
|
||||
device << " </lane>\n";
|
||||
}
|
||||
|
@ -509,7 +518,8 @@ NWWriter_OpenDrive::writeEmptyCenterLane(OutputDevice& device, const std::string
|
|||
device << " <center>\n";
|
||||
device << " <lane id=\"0\" type=\"none\" level=\"true\">\n";
|
||||
device << " <link/>\n";
|
||||
device << " <roadMark sOffset=\"0\" type=\"" << mark << "\" weight=\"standard\" color=\"standard\" width=\"" << markWidth << "\"/>\n";
|
||||
// laneChange = none as roads contain lanes in one direction only
|
||||
device << " <roadMark sOffset=\"0\" type=\"" << mark << "\" weight=\"standard\" color=\"standard\" width=\"" << markWidth << "\" laneChange=\"none\"/>\n";
|
||||
device << " </lane>\n";
|
||||
device << " </center>\n";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue