CARLA
TrafficGroupParser.cpp
Go to the documentation of this file.
1 // Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2 // de Barcelona (UAB).
3 //
4 // This work is licensed under the terms of the MIT license.
5 // For a copy, see <https://opensource.org/licenses/MIT>.
6 
8 
10 
11 #include <pugixml/pugixml.hpp>
12 
13 namespace carla {
14 namespace opendrive {
15 namespace parser {
16 
17  /*
18  <userData>
19  <trafficGroup id="137" type="trafficGroup" redTime="10" yellowTime="5" greenTime="5"/>
20  <trafficGroup id="138" type="trafficGroup" redTime="10" yellowTime="5" greenTime="5"/>
21  <trafficGroup id="139" type="trafficGroup" redTime="10" yellowTime="5" greenTime="5"/>
22  <trafficGroup id="140" type="trafficGroup" redTime="10" yellowTime="5" greenTime="5"/>
23  <trafficGroup id="141" type="trafficGroup" redTime="10" yellowTime="5" greenTime="5"/>
24  </userData>
25  */
26 
28  const pugi::xml_document & /*xml*/,
29  carla::road::MapBuilder & /* map_builder */) {
30  // pugi::xml_node opendrive_node = xml.child("OpenDRIVE");
31  // for (pugi::xml_node userdata_node = opendrive_node.child("userData");
32  // userdata_node;
33  // userdata_node = userdata_node.next_sibling("userData")) {
34  // for (pugi::xml_node trafficgroup_node = userdata_node.child("trafficGroup");
35  // trafficgroup_node;
36  // trafficgroup_node = trafficgroup_node.next_sibling("trafficGroup")) {
37  // uint16_t id = trafficgroup_node.attribute("id").as_int(0);
38  // uint16_t redTime = trafficgroup_node.attribute("redTime").as_int(0);
39  // uint16_t yellowTime = trafficgroup_node.attribute("yellowTime").as_int(0);
40  // uint16_t greenTime = trafficgroup_node.attribute("greenTime").as_int(0);
41  // log_debug("Found TrafficGroup with ID: ",
42  // id,
43  // "Times (",
44  // redTime,
45  // ", ",
46  // yellowTime,
47  // ", ",
48  // greenTime,
49  // ")");
50  // }
51  // map_builder.AddTrafficGroup(id, redTime, yellowTime, greenTime);
52  // }
53  }
54 
55 } // namespace parser
56 } // namespace opendrive
57 } // namespace carla
static void Parse(const pugi::xml_document &xml, carla::road::MapBuilder &map_builder)
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133