24 double curvStart { 0.0 };
25 double curvEnd { 0.0 };
44 std::string p_range {
"arcLength" };
53 double length { 0.0 };
54 std::string type {
"line" };
65 std::vector<Geometry> geometry;
77 geo.
road_id = node_road.attribute(
"id").as_uint();
80 geo.
s = node_geo.attribute(
"s").as_double();
81 geo.
x = node_geo.attribute(
"x").as_double();
82 geo.
y = node_geo.attribute(
"y").as_double();
83 geo.
hdg = node_geo.attribute(
"hdg").as_double();
84 geo.
length = node_geo.attribute(
"length").as_double();
89 if (geo.
type ==
"arc") {
91 }
else if (geo.
type ==
"spiral") {
94 }
else if (geo.
type ==
"poly3") {
99 }
else if (geo.
type ==
"paramPoly3") {
112 geometry.emplace_back(geo);
118 for (
auto const geo : geometry) {
120 if (geo.type ==
"line") {
122 }
else if (geo.type ==
"arc") {
123 map_builder.
AddRoadGeometryArc(road, geo.s, geo.x, geo.y, geo.hdg, geo.length, geo.arc.curvature);
124 }
else if (geo.type ==
"spiral") {
131 geo.spiral.curvStart,
133 }
else if (geo.type ==
"poly3") {
144 }
else if (geo.type ==
"paramPoly3") {
159 geo.param_poly3.p_range);
const char_t * value() const
double as_double(double def=0) const
void AddRoadGeometryParamPoly3(carla::road::Road *road, const double s, const double x, const double y, const double hdg, const double length, const double aU, const double bU, const double cU, const double dU, const double aV, const double bV, const double cV, const double dV, const std::string p_range)
Road * GetRoad(const RoadId road_id)
This file contains definitions of common data structures used in traffic manager. ...
xml_attribute attribute(const char_t *name) const
void AddRoadGeometrySpiral(carla::road::Road *road, const double s, const double x, const double y, const double hdg, const double length, const double curvStart, const double curvEnd)
void AddRoadGeometryArc(carla::road::Road *road, const double s, const double x, const double y, const double hdg, const double length, const double curvature)
xml_node child(const char_t *name) const
GeometryParamPoly3 param_poly3
xml_node first_child() const
const char_t * name() const
void AddRoadGeometryPoly3(carla::road::Road *road, const double s, const double x, const double y, const double hdg, const double length, const double a, const double b, const double c, const double d)
static void Parse(const pugi::xml_document &xml, carla::road::MapBuilder &map_builder)
void AddRoadGeometryLine(carla::road::Road *road, const double s, const double x, const double y, const double hdg, const double length)
xml_object_range< xml_node_iterator > children() const