ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
adore::sumo_if_ros::SumoTLs2Ros Class Reference

#include <sumotls2ros.h>

Collaboration diagram for adore::sumo_if_ros::SumoTLs2Ros:
Collaboration graph

Classes

struct  hash_pair
 

Public Member Functions

std::unordered_map< int, adore_v2x_sim::SimMAPEM > getMAPEMFromSUMO (double time, double power=23)
 
std::vector< adore_v2x_sim::SimSPATEM > getSPATEMFromSUMO (double time, double power=23)
 
int getIntersectionIDForSUMOString (std::string sumo_intersection_id)
 
std::string getSUMOStringFromIntersectionID (int intersection_id)
 
 SumoTLs2Ros ()
 

Public Attributes

int utm_zone_
 
bool is_south_hemi_
 
bool _use_system_time
 
bool _generate_spat_timing
 

Private Member Functions

std::vector< adore::sumo_if_ros::CoordinategetNodesFromSUMOLane (libsumo::TraCIPositionVector &lane, int nodeCount=5)
 
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)
 
void autofill_bit_string (std::size_t size, std::vector< uint8_t > &items)
 
std::unordered_map< std::string, adore::sumo_if_ros::MAPEMIntersectiongenerateMAPEMFromSUMO ()
 
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)
 
double wgs84_distance (double lat1, double lon1, double lat2, double lon2)
 
double getSystemTime ()
 
int32_t getMOY (double time)
 
int getLeapYearSeconds (double time)
 
double getSecondOfYearFromUTC (double time)
 

Private Attributes

std::unordered_map< std::string, uint8_t > sumo_lane_id_mapping_
 
std::unordered_map< std::string, int > sumo_intersection_id_mapping_
 
std::unordered_map< std::string, adore::sumo_if_ros::MAPEMIntersectionintersections_
 
std::unordered_map< int, adore_v2x_sim::SimMAPEM > _MAPEM
 
std::unordered_map< std::pair< std::string, std::string >, uint8_t, SumoTLs2Ros::hash_pairsumo_signal_group_id_mapping_
 

Detailed Description

generates MAPEM and SPATEM messages from sumo simulation

Constructor & Destructor Documentation

◆ SumoTLs2Ros()

adore::sumo_if_ros::SumoTLs2Ros::SumoTLs2Ros ( )
inline

Member Function Documentation

◆ autofill_bit_string()

void SumoTLs2Ros::autofill_bit_string ( std::size_t  size,
std::vector< uint8_t > &  items 
)
private
Here is the caller graph for this function:

◆ convertToROSMsg()

std::unordered_map< int, adore_v2x_sim::SimMAPEM > SumoTLs2Ros::convertToROSMsg ( std::unordered_map< std::string, adore::sumo_if_ros::MAPEMIntersection mapem_data,
double  time = 0,
double  power = 23 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ generateMAPEMFromSUMO()

std::unordered_map< std::string, adore::sumo_if_ros::MAPEMIntersection > SumoTLs2Ros::generateMAPEMFromSUMO ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGeoreferencedLinks()

void SumoTLs2Ros::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 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getIntersectionIDForSUMOString()

int SumoTLs2Ros::getIntersectionIDForSUMOString ( std::string  sumo_intersection_id)
Here is the caller graph for this function:

◆ getLeapYearSeconds()

int SumoTLs2Ros::getLeapYearSeconds ( double  time)
private
Here is the caller graph for this function:

◆ getMAPEMFromSUMO()

std::unordered_map< int, adore_v2x_sim::SimMAPEM > SumoTLs2Ros::getMAPEMFromSUMO ( double  time,
double  power = 23 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMOY()

int32_t SumoTLs2Ros::getMOY ( double  time)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNodesFromSUMOLane()

std::vector< adore::sumo_if_ros::Coordinate > SumoTLs2Ros::getNodesFromSUMOLane ( libsumo::TraCIPositionVector &  lane,
int  nodeCount = 5 
)
private
Here is the caller graph for this function:

◆ getSecondOfYearFromUTC()

double SumoTLs2Ros::getSecondOfYearFromUTC ( double  time)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSPATEMFromSUMO()

std::vector< adore_v2x_sim::SimSPATEM > SumoTLs2Ros::getSPATEMFromSUMO ( double  time,
double  power = 23 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSUMOStringFromIntersectionID()

std::string SumoTLs2Ros::getSUMOStringFromIntersectionID ( int  intersection_id)

◆ getSystemTime()

double SumoTLs2Ros::getSystemTime ( )
private
Here is the caller graph for this function:

◆ wgs84_distance()

double SumoTLs2Ros::wgs84_distance ( double  lat1,
double  lon1,
double  lat2,
double  lon2 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _generate_spat_timing

bool adore::sumo_if_ros::SumoTLs2Ros::_generate_spat_timing

◆ _MAPEM

std::unordered_map<int, adore_v2x_sim::SimMAPEM> adore::sumo_if_ros::SumoTLs2Ros::_MAPEM
private

◆ _use_system_time

bool adore::sumo_if_ros::SumoTLs2Ros::_use_system_time

◆ intersections_

std::unordered_map<std::string, adore::sumo_if_ros::MAPEMIntersection> adore::sumo_if_ros::SumoTLs2Ros::intersections_
private

◆ is_south_hemi_

bool adore::sumo_if_ros::SumoTLs2Ros::is_south_hemi_

◆ sumo_intersection_id_mapping_

std::unordered_map<std::string, int> adore::sumo_if_ros::SumoTLs2Ros::sumo_intersection_id_mapping_
private

◆ sumo_lane_id_mapping_

std::unordered_map<std::string, uint8_t> adore::sumo_if_ros::SumoTLs2Ros::sumo_lane_id_mapping_
private

◆ sumo_signal_group_id_mapping_

std::unordered_map<std::pair<std::string,std::string>, uint8_t, SumoTLs2Ros::hash_pair> adore::sumo_if_ros::SumoTLs2Ros::sumo_signal_group_id_mapping_
private

◆ utm_zone_

int adore::sumo_if_ros::SumoTLs2Ros::utm_zone_

The documentation for this class was generated from the following files: