27 std::string side {
"both" };
41 std::string type {
"superelevation" };
50 std::vector<ElevationProfile> elevation_profile;
51 std::vector<LateralProfile> lateral_profile;
57 uint64_t number_profiles = 0;
64 road::RoadId road_id = node_road.attribute(
"id").as_uint();
68 elev.
s = node_elevation.attribute(
"s").as_double();
69 elev.
a = node_elevation.attribute(
"a").as_double();
70 elev.
b = node_elevation.attribute(
"b").as_double();
71 elev.
c = node_elevation.attribute(
"c").as_double();
72 elev.
d = node_elevation.attribute(
"d").as_double();
75 elevation_profile.emplace_back(elev);
80 if(number_profiles == 0){
82 road::RoadId road_id = node_road.attribute(
"id").as_uint();
93 elevation_profile.emplace_back(elev);
97 node_profile = node_road.
child(
"lateralProfile");
103 road::RoadId road_id = node_road.attribute(
"id").as_uint();
107 lateral.
s = node.attribute(
"s").as_double();
108 lateral.
a = node.attribute(
"a").as_double();
109 lateral.
b = node.attribute(
"b").as_double();
110 lateral.
c = node.attribute(
"c").as_double();
111 lateral.
d = node.attribute(
"d").as_double();
114 lateral.
type = node.name();
115 if (lateral.
type ==
"crossfall") {
116 lateral.
cross.
side = node.attribute(
"side").value();
117 }
else if (lateral.
type ==
"shape") {
118 lateral.
shape.
t = node.attribute(
"t").as_double();
122 lateral_profile.emplace_back(lateral);
128 for (
auto const pro : elevation_profile) {
Road * GetRoad(const RoadId road_id)
void AddRoadElevationProfile(Road *road, const double s, const double a, const double b, const double c, const double d)
This file contains definitions of common data structures used in traffic manager. ...
xml_node child(const char_t *name) const
static void Parse(const pugi::xml_document &xml, carla::road::MapBuilder &map_builder)
xml_object_range< xml_node_iterator > children() const