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);
static void Parse(const pugi::xml_document &xml, carla::road::MapBuilder &map_builder)
void AddRoadGeometryArc(carla::road::Road *road, const double s, const double x, const double y, const double hdg, const double length, const double curvature)
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)
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)
Road * GetRoad(const RoadId road_id)
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 AddRoadGeometryLine(carla::road::Road *road, const double s, const double x, const double y, const double hdg, const double length)
double as_double(double def=0) const
const char_t * value() const
xml_node child(const char_t *name) const
xml_node first_child() const
xml_object_range< xml_node_iterator > children() const
xml_attribute attribute(const char_t *name) const
const char_t * name() const
This file contains definitions of common data structures used in traffic manager.
GeometryParamPoly3 param_poly3