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) {
43 if (lane->
GetId() != 0) {
44 std::cout <<
"WARNING: In road " << lane->
GetRoad()->GetId() <<
" lane " << lane->
GetId() <<
45 " no \"<width>\" parameter found under \"<lane>\" tag. Using default values." << std::endl;
50 for (
pugi::xml_node lane_border_node : lane_node.children(
"border")) {
51 const double s_offset = lane_border_node.attribute(
"sOffset").as_double();
52 const double a = lane_border_node.attribute(
"a").as_double();
53 const double b = lane_border_node.attribute(
"b").as_double();
54 const double c = lane_border_node.attribute(
"c").as_double();
55 const double d = lane_border_node.attribute(
"d").as_double();
63 for (
pugi::xml_node lane_road_mark : lane_node.children(
"roadMark")) {
67 const std::string type = lane_road_mark.attribute(
"type").value();
68 const std::string weight = lane_road_mark.attribute(
"weight").value();
69 const std::string color = lane_road_mark.attribute(
"color").value();
70 const std::string material = lane_road_mark.attribute(
"material").value();
71 const double width = lane_road_mark.attribute(
"width").as_double();
72 const std::string lane_change = lane_road_mark.attribute(
"laneChange").value();
73 const double height = lane_road_mark.attribute(
"height").as_double();
77 std::string type_name =
"";
78 double type_width = 0.0;
79 road_mark_type = lane_road_mark.
child(
"type");
85 bool is_rht = lane->
GetRoad()->IsRHT();
105 const double length = road_mark_type_line_node.attribute(
"length").as_double();
106 const double space = road_mark_type_line_node.attribute(
"space").as_double();
107 const double t = road_mark_type_line_node.attribute(
"tOffset").as_double();
108 const double s_offset = road_mark_type_line_node.attribute(
"sOffset").as_double();
109 const std::string rule = road_mark_type_line_node.attribute(
"rule").value();
110 const double width = road_mark_type_line_node.attribute(
"width").as_double();
127 for (
pugi::xml_node lane_material_node : lane_node.children(
"material")) {
129 const double s_offset = lane_material_node.attribute(
"sOffset").as_double();
130 const std::string surface = lane_material_node.attribute(
"surface").value();
131 const double friction = lane_material_node.attribute(
"friction").as_double();
132 const double roughness = lane_material_node.attribute(
"roughness").as_double();
139 for (
pugi::xml_node lane_visibility_node : lane_node.children(
"visibility")) {
140 const double s_offset = lane_visibility_node.attribute(
"sOffset").as_double();
141 const double forward = lane_visibility_node.attribute(
"forward").as_double();
142 const double back = lane_visibility_node.attribute(
"back").as_double();
143 const double left = lane_visibility_node.attribute(
"left").as_double();
144 const double right = lane_visibility_node.attribute(
"right").as_double();
151 for (
pugi::xml_node lane_speed_node : lane_node.children(
"speed")) {
152 const double s_offset = lane_speed_node.attribute(
"sOffset").as_double();
153 const double max = lane_speed_node.attribute(
"max").as_double();
154 std::string unit = lane_speed_node.attribute(
"unit").value();
161 for (
pugi::xml_node lane_access_node : lane_node.children(
"access")) {
162 const double s_offset = lane_access_node.attribute(
"sOffset").as_double();
163 const std::string restriction = lane_access_node.attribute(
"restriction").value();
170 for (
pugi::xml_node lane_height_node : lane_node.children(
"height")) {
171 const double s_offset = lane_height_node.attribute(
"sOffset").as_double();
172 const double inner = lane_height_node.attribute(
"inner").as_double();
173 const double outer = lane_height_node.attribute(
"outer").as_double();
180 for (
pugi::xml_node lane_rule_node : lane_node.children(
"rule")) {
181 const double s_offset = lane_rule_node.attribute(
"sOffset").as_double();
182 const std::string value = lane_rule_node.attribute(
"value").value();
void CreateRoadMark(Lane *lane, const int road_mark_id, const double s, const std::string type, const std::string weight, const std::string color, const std::string material, const double width, const std::string lane_change, const double height, const std::string type_name, const double type_width, const bool is_rht)