| 31 | } |
| 32 | |
| 33 | static geom::Vector2D parse_coordinates(const std::string& s) { |
| 34 | if (s.empty()) return geom::Vector2D(0, 0); |
| 35 | |
| 36 | std::vector<std::string> split_list; |
| 37 | boost::split( |
| 38 | split_list, |
| 39 | s, |
| 40 | boost::is_any_of(","), |
| 41 | boost::token_compress_on); |
| 42 | |
| 43 | // Swap x, y for SUMO -> CARLA. |
| 44 | return geom::Vector2D(std::stof(split_list[1]), std::stof(split_list[0])); |
| 45 | } |
| 46 | |
| 47 | static std::pair<geom::Vector2D, geom::Vector2D> parse_bounds(const std::string& s) { |
| 48 | std::vector<std::string> split_list; |