24 road::LaneId lane_id = lane_node.attribute(
"id").as_int();
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;
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();
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();
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();
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();
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();
158 const double s_offset = lane_access_node.attribute(
"sOffset").as_double();
159 const std::string restriction = lane_access_node.attribute(
"restriction").value();
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();
177 const double s_offset = lane_rule_node.attribute(
"sOffset").as_double();
178 const std::string value = lane_rule_node.attribute(
"value").value();
200 double s = lane_section_node.attribute(
"s").as_double();
203 ParseLanes(road_id, s, left_node, map_builder);
208 ParseLanes(road_id, s, center_node, map_builder);
213 ParseLanes(road_id, s, right_node, map_builder);
const char_t * value() const
void CreateLaneWidth(Lane *lane, const double s, const double a, const double b, const double c, const double d)
double as_double(double def=0) const
unsigned int as_uint(unsigned int def=0) const
void CreateLaneRule(Lane *lane, const double s, const std::string value)
This file contains definitions of common data structures used in traffic manager. ...
Lane * GetLane(const RoadId road_id, const LaneId lane_id, const double s)
xml_attribute attribute(const char_t *name) const
void CreateLaneVisibility(Lane *lane, const double s, const double forward, const double back, const double left, const double right)
void CreateLaneBorder(Lane *lane, const double s, const double a, const double b, const double c, const double d)
xml_node child(const char_t *name) const
void CreateRoadMarkTypeLine(Lane *lane, const int road_mark_id, const double length, const double space, const double tOffset, const double s, const std::string rule, const double width)
void CreateLaneMaterial(Lane *lane, const double s, const std::string surface, const double friction, const double roughness)
void CreateLaneSpeed(Lane *lane, const double s, const double max, const std::string unit)
void CreateLaneHeight(Lane *lane, const double s, const double inner, const double outer)
static void ParseLanes(road::RoadId road_id, double s, const pugi::xml_node &parent_node, carla::road::MapBuilder &map_builder)
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)
static void Parse(const pugi::xml_document &xml, carla::road::MapBuilder &map_builder)
void CreateLaneAccess(Lane *lane, const double s, const std::string restriction)
xml_object_range< xml_node_iterator > children() const