24 road::LaneId lane_id = lane_node.attribute(
"id").as_int();
30 for (
pugi::xml_node lane_width_node : lane_node.children(
"width")) {
31 const double s_offset = lane_width_node.attribute(
"sOffset").as_double();
32 const double a = lane_width_node.attribute(
"a").as_double();
33 const double b = lane_width_node.attribute(
"b").as_double();
34 const double c = lane_width_node.attribute(
"c").as_double();
35 const double d = lane_width_node.attribute(
"d").as_double();
41 if (width_count == 0 && lane->
GetId() != 0) {
43 std::cout <<
"WARNING: In road " << lane->
GetRoad()->GetId() <<
" lane " << lane->
GetId() <<
44 " no \"<width>\" parameter found under \"<lane>\" tag. Using default values." << std::endl;
48 for (
pugi::xml_node lane_border_node : lane_node.children(
"border")) {
49 const double s_offset = lane_border_node.attribute(
"sOffset").as_double();
50 const double a = lane_border_node.attribute(
"a").as_double();
51 const double b = lane_border_node.attribute(
"b").as_double();
52 const double c = lane_border_node.attribute(
"c").as_double();
53 const double d = lane_border_node.attribute(
"d").as_double();
61 for (
pugi::xml_node lane_road_mark : lane_node.children(
"roadMark")) {
65 const std::string type = lane_road_mark.attribute(
"type").value();
66 const std::string weight = lane_road_mark.attribute(
"weight").value();
67 const std::string color = lane_road_mark.attribute(
"color").value();
68 const std::string material = lane_road_mark.attribute(
"material").value();
69 const double width = lane_road_mark.attribute(
"width").as_double();
70 const std::string lane_change = lane_road_mark.attribute(
"laneChange").value();
71 const double height = lane_road_mark.attribute(
"height").as_double();
75 std::string type_name =
"";
76 double type_width = 0.0;
77 road_mark_type = lane_road_mark.
child(
"type");
101 const double length = road_mark_type_line_node.attribute(
"length").as_double();
102 const double space = road_mark_type_line_node.attribute(
"space").as_double();
103 const double t = road_mark_type_line_node.attribute(
"tOffset").as_double();
104 const double s_offset = road_mark_type_line_node.attribute(
"sOffset").as_double();
105 const std::string rule = road_mark_type_line_node.attribute(
"rule").value();
106 const double width = road_mark_type_line_node.attribute(
"width").as_double();
123 for (
pugi::xml_node lane_material_node : lane_node.children(
"material")) {
125 const double s_offset = lane_material_node.attribute(
"sOffset").as_double();
126 const std::string surface = lane_material_node.attribute(
"surface").value();
127 const double friction = lane_material_node.attribute(
"friction").as_double();
128 const double roughness = lane_material_node.attribute(
"roughness").as_double();
135 for (
pugi::xml_node lane_visibility_node : lane_node.children(
"visibility")) {
136 const double s_offset = lane_visibility_node.attribute(
"sOffset").as_double();
137 const double forward = lane_visibility_node.attribute(
"forward").as_double();
138 const double back = lane_visibility_node.attribute(
"back").as_double();
139 const double left = lane_visibility_node.attribute(
"left").as_double();
140 const double right = lane_visibility_node.attribute(
"right").as_double();
147 for (
pugi::xml_node lane_speed_node : lane_node.children(
"speed")) {
148 const double s_offset = lane_speed_node.attribute(
"sOffset").as_double();
149 const double max = lane_speed_node.attribute(
"max").as_double();
150 std::string unit = lane_speed_node.attribute(
"unit").value();
157 for (
pugi::xml_node lane_access_node : lane_node.children(
"access")) {
158 const double s_offset = lane_access_node.attribute(
"sOffset").as_double();
159 const std::string restriction = lane_access_node.attribute(
"restriction").value();
166 for (
pugi::xml_node lane_height_node : lane_node.children(
"height")) {
167 const double s_offset = lane_height_node.attribute(
"sOffset").as_double();
168 const double inner = lane_height_node.attribute(
"inner").as_double();
169 const double outer = lane_height_node.attribute(
"outer").as_double();
176 for (
pugi::xml_node lane_rule_node : lane_node.children(
"rule")) {
177 const double s_offset = lane_rule_node.attribute(
"sOffset").as_double();
178 const std::string value = lane_rule_node.attribute(
"value").value();