23 #include <unordered_map>
24 #include <adore_v2x_sim/SimMAPEM.h>
25 #include <adore_v2x_sim/SimSPATEM.h>
27 #include <libsumo/libsumo.h>
40 template <
class T1,
class T2>
43 auto lhs = std::hash<T1>{}(p.first);
44 auto rhs = std::hash<T2>{}(p.second);
46 lhs ^= rhs + 0x9e3779b9 + (lhs << 6) + (lhs >> 2);
60 std::unordered_map<std::string, adore::sumo_if_ros::MAPEMIntersection>
intersections_;
63 std::unordered_map<int, adore_v2x_sim::SimMAPEM>
_MAPEM;
69 std::vector<adore::sumo_if_ros::Coordinate>
getNodesFromSUMOLane(libsumo::TraCIPositionVector & lane,
int nodeCount = 5);
72 void getGeoreferencedLinks(std::string sumoIntersectionID, std::unordered_map<std::string, std::vector<std::string>>& linklist, std::unordered_map<std::string, std::vector<adore::sumo_if_ros::Coordinate>> & id_2_shape);
80 std::unordered_map<int, adore_v2x_sim::SimMAPEM>
convertToROSMsg(std::unordered_map<std::string, adore::sumo_if_ros::MAPEMIntersection> mapem_data,
double time = 0,
double power = 23);
83 double wgs84_distance(
double lat1,
double lon1,
double lat2,
double lon2);
87 int32_t
getMOY(
double time);
96 std::unordered_map<int, adore_v2x_sim::SimMAPEM>
getMAPEMFromSUMO(
double time,
double power=23);
99 std::vector<adore_v2x_sim::SimSPATEM>
getSPATEMFromSUMO(
double time,
double power=23);
Definition: sumotls2ros.h:36
void autofill_bit_string(std::size_t size, std::vector< uint8_t > &items)
Definition: sumotls2ros.cpp:760
bool _generate_spat_timing
Definition: sumotls2ros.h:113
std::unordered_map< std::string, adore::sumo_if_ros::MAPEMIntersection > generateMAPEMFromSUMO()
Definition: sumotls2ros.cpp:355
std::vector< adore_v2x_sim::SimSPATEM > getSPATEMFromSUMO(double time, double power=23)
Definition: sumotls2ros.cpp:546
int getIntersectionIDForSUMOString(std::string sumo_intersection_id)
Definition: sumotls2ros.cpp:733
double getSystemTime()
Definition: sumotls2ros.cpp:87
int getLeapYearSeconds(double time)
Definition: sumotls2ros.cpp:526
bool is_south_hemi_
Definition: sumotls2ros.h:109
std::unordered_map< std::pair< std::string, std::string >, uint8_t, SumoTLs2Ros::hash_pair > sumo_signal_group_id_mapping_
Definition: sumotls2ros.h:66
std::unordered_map< int, adore_v2x_sim::SimMAPEM > _MAPEM
Definition: sumotls2ros.h:63
void getGeoreferencedLinks(std::string sumoIntersectionID, std::unordered_map< std::string, std::vector< std::string >> &linklist, std::unordered_map< std::string, std::vector< adore::sumo_if_ros::Coordinate >> &id_2_shape)
Definition: sumotls2ros.cpp:22
std::unordered_map< std::string, uint8_t > sumo_lane_id_mapping_
Definition: sumotls2ros.h:54
SumoTLs2Ros()
Definition: sumotls2ros.h:105
double wgs84_distance(double lat1, double lon1, double lat2, double lon2)
Definition: sumotls2ros.cpp:768
std::unordered_map< int, adore_v2x_sim::SimMAPEM > convertToROSMsg(std::unordered_map< std::string, adore::sumo_if_ros::MAPEMIntersection > mapem_data, double time=0, double power=23)
Definition: sumotls2ros.cpp:122
std::unordered_map< std::string, int > sumo_intersection_id_mapping_
Definition: sumotls2ros.h:57
double getSecondOfYearFromUTC(double time)
Definition: sumotls2ros.cpp:536
std::unordered_map< int, adore_v2x_sim::SimMAPEM > getMAPEMFromSUMO(double time, double power=23)
Definition: sumotls2ros.cpp:95
int utm_zone_
Definition: sumotls2ros.h:105
std::string getSUMOStringFromIntersectionID(int intersection_id)
Definition: sumotls2ros.cpp:749
bool _use_system_time
Definition: sumotls2ros.h:111
int32_t getMOY(double time)
Definition: sumotls2ros.cpp:541
std::unordered_map< std::string, adore::sumo_if_ros::MAPEMIntersection > intersections_
Definition: sumotls2ros.h:60
std::vector< adore::sumo_if_ros::Coordinate > getNodesFromSUMOLane(libsumo::TraCIPositionVector &lane, int nodeCount=5)
Definition: sumotls2ros.cpp:511
Definition: areaofeffectconverter.h:20
Definition: sumotls2ros.h:39
size_t operator()(const std::pair< T1, T2 > &p) const
Definition: sumotls2ros.h:41