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::SUMOTrafficToROS Class Reference

#include <sumotraffic2ros.h>

Collaboration diagram for adore::sumo_if_ros::SUMOTrafficToROS:
Collaboration graph

Public Member Functions

 SUMOTrafficToROS ()
 
 ~SUMOTrafficToROS ()
 
ros::NodeHandle * getRosNodeHandle ()
 
void run ()
 
void runCallback (const ros::TimerEvent &te)
 
bool newStep ()
 
void transferDataSumoToRos ()
 
void transferDataRosToSumo ()
 
void init_rosconnection (int argc, char **argv, double rate, std::string nodename)
 
void init_sumo ()
 
void setRosNodeHandle (ros::NodeHandle *nh)
 
void closeSumo ()
 

Protected Member Functions

int getNewIntID ()
 
void removeVehicle (std::string &id)
 
void addVehicle (std::string &id)
 
void setMaxSpeed (std::string &id, double val)
 
void setSpeed (std::string &id, double val)
 
void moveToXY (std::string &id, std::string z, int a, double x, double y, double heading, int b)
 

Protected Attributes

ROSVehicleSet rosVehicleSet_
 
ros::NodeHandle * nh_
 
ros::Publisher publisher_
 
ros::Publisher mapem_publisher_
 
ros::Publisher spatem_publisher_
 
SumoTLs2Ros sumotls2ros
 
double last_tl_update_time_
 
ros::Subscriber subscriber1_
 
ros::Subscriber subscriber2_
 
std::string sumo_rosveh_prefix_
 
std::string sumo_rosped_prefix_
 
std::vector< ros::Timer > rostimers_
 
std::unordered_map< std::string, int > sumovehid2int_
 
std::unordered_map< std::string, int > sumopedid2int_
 
int last_assigned_int_id_
 
std::map< int, std::string > replacement_ids_
 
std::vector< std::string > vehidlist_
 
std::vector< std::string > pedidlist_
 
std::vector< std::string > sumo_to_ros_ignore_list_
 
std::vector< int > ros_to_sumo_ignore_list_
 
Timer timer_
 
double tSUMO0
 
double tSUMO
 
double delta_t_
 
double min_update_period_
 
double min_tl_update_period_
 

Constructor & Destructor Documentation

◆ SUMOTrafficToROS()

adore::sumo_if_ros::SUMOTrafficToROS::SUMOTrafficToROS ( )
inline

◆ ~SUMOTrafficToROS()

adore::sumo_if_ros::SUMOTrafficToROS::~SUMOTrafficToROS ( )
inline

Member Function Documentation

◆ addVehicle()

void adore::sumo_if_ros::SUMOTrafficToROS::addVehicle ( std::string &  id)
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ closeSumo()

void adore::sumo_if_ros::SUMOTrafficToROS::closeSumo ( )
inline
Here is the caller graph for this function:

◆ getNewIntID()

int adore::sumo_if_ros::SUMOTrafficToROS::getNewIntID ( )
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRosNodeHandle()

ros::NodeHandle* adore::sumo_if_ros::SUMOTrafficToROS::getRosNodeHandle ( )
inline

◆ init_rosconnection()

void adore::sumo_if_ros::SUMOTrafficToROS::init_rosconnection ( int  argc,
char **  argv,
double  rate,
std::string  nodename 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_sumo()

void adore::sumo_if_ros::SUMOTrafficToROS::init_sumo ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveToXY()

void adore::sumo_if_ros::SUMOTrafficToROS::moveToXY ( std::string &  id,
std::string  z,
int  a,
double  x,
double  y,
double  heading,
int  b 
)
inlineprotected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ newStep()

bool adore::sumo_if_ros::SUMOTrafficToROS::newStep ( )
inline
Here is the caller graph for this function:

◆ removeVehicle()

void adore::sumo_if_ros::SUMOTrafficToROS::removeVehicle ( std::string &  id)
inlineprotected

◆ run()

void adore::sumo_if_ros::SUMOTrafficToROS::run ( )
inline
Here is the caller graph for this function:

◆ runCallback()

void adore::sumo_if_ros::SUMOTrafficToROS::runCallback ( const ros::TimerEvent &  te)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMaxSpeed()

void adore::sumo_if_ros::SUMOTrafficToROS::setMaxSpeed ( std::string &  id,
double  val 
)
inlineprotected
Here is the caller graph for this function:

◆ setRosNodeHandle()

void adore::sumo_if_ros::SUMOTrafficToROS::setRosNodeHandle ( ros::NodeHandle *  nh)
inline

◆ setSpeed()

void adore::sumo_if_ros::SUMOTrafficToROS::setSpeed ( std::string &  id,
double  val 
)
inlineprotected
Here is the caller graph for this function:

◆ transferDataRosToSumo()

void adore::sumo_if_ros::SUMOTrafficToROS::transferDataRosToSumo ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ transferDataSumoToRos()

void adore::sumo_if_ros::SUMOTrafficToROS::transferDataSumoToRos ( )
inline

<- bit array! see TraciAPI:669, VehicleSignal

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ delta_t_

double adore::sumo_if_ros::SUMOTrafficToROS::delta_t_
protected

◆ last_assigned_int_id_

int adore::sumo_if_ros::SUMOTrafficToROS::last_assigned_int_id_
protected

◆ last_tl_update_time_

double adore::sumo_if_ros::SUMOTrafficToROS::last_tl_update_time_
protected

◆ mapem_publisher_

ros::Publisher adore::sumo_if_ros::SUMOTrafficToROS::mapem_publisher_
protected

◆ min_tl_update_period_

double adore::sumo_if_ros::SUMOTrafficToROS::min_tl_update_period_
protected

◆ min_update_period_

double adore::sumo_if_ros::SUMOTrafficToROS::min_update_period_
protected

◆ nh_

ros::NodeHandle* adore::sumo_if_ros::SUMOTrafficToROS::nh_
protected

◆ pedidlist_

std::vector<std::string> adore::sumo_if_ros::SUMOTrafficToROS::pedidlist_
protected

◆ publisher_

ros::Publisher adore::sumo_if_ros::SUMOTrafficToROS::publisher_
protected

◆ replacement_ids_

std::map<int, std::string> adore::sumo_if_ros::SUMOTrafficToROS::replacement_ids_
protected

◆ ros_to_sumo_ignore_list_

std::vector<int> adore::sumo_if_ros::SUMOTrafficToROS::ros_to_sumo_ignore_list_
protected

◆ rostimers_

std::vector<ros::Timer> adore::sumo_if_ros::SUMOTrafficToROS::rostimers_
protected

◆ rosVehicleSet_

ROSVehicleSet adore::sumo_if_ros::SUMOTrafficToROS::rosVehicleSet_
protected

◆ spatem_publisher_

ros::Publisher adore::sumo_if_ros::SUMOTrafficToROS::spatem_publisher_
protected

◆ subscriber1_

ros::Subscriber adore::sumo_if_ros::SUMOTrafficToROS::subscriber1_
protected

◆ subscriber2_

ros::Subscriber adore::sumo_if_ros::SUMOTrafficToROS::subscriber2_
protected

◆ sumo_rosped_prefix_

std::string adore::sumo_if_ros::SUMOTrafficToROS::sumo_rosped_prefix_
protected

◆ sumo_rosveh_prefix_

std::string adore::sumo_if_ros::SUMOTrafficToROS::sumo_rosveh_prefix_
protected

◆ sumo_to_ros_ignore_list_

std::vector<std::string> adore::sumo_if_ros::SUMOTrafficToROS::sumo_to_ros_ignore_list_
protected

◆ sumopedid2int_

std::unordered_map<std::string, int> adore::sumo_if_ros::SUMOTrafficToROS::sumopedid2int_
protected

◆ sumotls2ros

SumoTLs2Ros adore::sumo_if_ros::SUMOTrafficToROS::sumotls2ros
protected

◆ sumovehid2int_

std::unordered_map<std::string, int> adore::sumo_if_ros::SUMOTrafficToROS::sumovehid2int_
protected

◆ timer_

Timer adore::sumo_if_ros::SUMOTrafficToROS::timer_
protected

◆ tSUMO

double adore::sumo_if_ros::SUMOTrafficToROS::tSUMO
protected

◆ tSUMO0

double adore::sumo_if_ros::SUMOTrafficToROS::tSUMO0
protected

◆ vehidlist_

std::vector<std::string> adore::sumo_if_ros::SUMOTrafficToROS::vehidlist_
protected

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