Trim trailing spaces
This commit is contained in:
parent
676c1cbc5d
commit
16e2df882f
|
@ -19,17 +19,17 @@ namespace parser {
|
||||||
void ObjectParser::Parse(
|
void ObjectParser::Parse(
|
||||||
const pugi::xml_document &xml,
|
const pugi::xml_document &xml,
|
||||||
carla::road::MapBuilder &map_builder) {
|
carla::road::MapBuilder &map_builder) {
|
||||||
|
|
||||||
std::vector<road::element::CrosswalkPoint> points;
|
std::vector<road::element::CrosswalkPoint> points;
|
||||||
|
|
||||||
for (pugi::xml_node node_road : xml.child("OpenDRIVE").children("road")) {
|
for (pugi::xml_node node_road : xml.child("OpenDRIVE").children("road")) {
|
||||||
|
|
||||||
// parse all objects
|
// parse all objects
|
||||||
pugi::xml_node node_objects = node_road.child("objects");
|
pugi::xml_node node_objects = node_road.child("objects");
|
||||||
if (node_objects) {
|
if (node_objects) {
|
||||||
|
|
||||||
for (pugi::xml_node node_object : node_objects.children("object")) {
|
for (pugi::xml_node node_object : node_objects.children("object")) {
|
||||||
|
|
||||||
// type Crosswalk
|
// type Crosswalk
|
||||||
std::string type = node_object.attribute("type").as_string();
|
std::string type = node_object.attribute("type").as_string();
|
||||||
if (type == "crosswalk") {
|
if (type == "crosswalk") {
|
||||||
|
@ -47,7 +47,7 @@ namespace parser {
|
||||||
// get road id
|
// get road id
|
||||||
road::RoadId road_id = node_road.attribute("id").as_uint();
|
road::RoadId road_id = node_road.attribute("id").as_uint();
|
||||||
road::Road *road = map_builder.GetRoad(road_id);
|
road::Road *road = map_builder.GetRoad(road_id);
|
||||||
|
|
||||||
// create the object
|
// create the object
|
||||||
map_builder.AddRoadObjectCrosswalk(road,
|
map_builder.AddRoadObjectCrosswalk(road,
|
||||||
node_object.attribute("name").as_string(),
|
node_object.attribute("name").as_string(),
|
||||||
|
@ -65,7 +65,7 @@ namespace parser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // namespace parser
|
} // namespace parser
|
||||||
} // namespace opendrive
|
} // namespace opendrive
|
||||||
|
|
|
@ -108,7 +108,7 @@ namespace road {
|
||||||
const T container,
|
const T container,
|
||||||
const double s,
|
const double s,
|
||||||
const LaneId lane_id) {
|
const LaneId lane_id) {
|
||||||
|
|
||||||
// lane_id can't be 0
|
// lane_id can't be 0
|
||||||
RELEASE_ASSERT(lane_id != 0);
|
RELEASE_ASSERT(lane_id != 0);
|
||||||
|
|
||||||
|
@ -261,7 +261,7 @@ namespace road {
|
||||||
|
|
||||||
float lane_width = 0.0f;
|
float lane_width = 0.0f;
|
||||||
float lane_tangent = 0.0f;
|
float lane_tangent = 0.0f;
|
||||||
|
|
||||||
if (waypoint.lane_id < 0) {
|
if (waypoint.lane_id < 0) {
|
||||||
// right lane
|
// right lane
|
||||||
const auto side_lanes = MakeListView(
|
const auto side_lanes = MakeListView(
|
||||||
|
@ -415,7 +415,7 @@ namespace road {
|
||||||
pivot.TransformPoint(v2);
|
pivot.TransformPoint(v2);
|
||||||
result.push_back(v2);
|
result.push_back(v2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -86,7 +86,7 @@ namespace road {
|
||||||
const double t,
|
const double t,
|
||||||
const double zOffset,
|
const double zOffset,
|
||||||
const double hdg,
|
const double hdg,
|
||||||
const double pitch,
|
const double pitch,
|
||||||
const double roll,
|
const double roll,
|
||||||
const std::string orientation,
|
const std::string orientation,
|
||||||
const double width,
|
const double width,
|
||||||
|
|
Loading…
Reference in New Issue