20 #include <adore_if_ros_msg/TrafficLightSimulation.h>
39 simTLPublisher_ = n->advertise<adore_if_ros_msg::TrafficLightSimulation>(tlSimTopic,qsize);
50 adore_if_ros_msg::TrafficLightSimulation msg_simtl;
62 msg_simtl.tl.tcd.id = value.
getID();
71 msg_simtl.tl.tlstate = (int) (status->getCurrentColor());
81 return std::string(
"Node will write to ROS-topic: ").append(
simTLPublisher_.getTopic());
116 coord.
m_X = msg.tl.tcd.pose.position.x;
117 coord.
m_Y = msg.tl.tcd.pose.position.y;
118 coord.
m_Z = msg.tl.tcd.pose.position.z;
132 n->param(
"/tcp_no_delay", no_delay,
false);
Definition: trafficlight.h:219
int time_to_yellow_
Definition: trafficlight.h:238
int yellow_red_duration_
Definition: trafficlight.h:230
TrafficLightColor start_state_
Definition: trafficlight.h:232
int time_to_red_
Definition: trafficlight.h:234
int green_duration_
Definition: trafficlight.h:228
int time_to_red_yellow_
Definition: trafficlight.h:236
int time_to_green_
Definition: trafficlight.h:240
int red_duration_
Definition: trafficlight.h:221
int yellow_duration_
Definition: trafficlight.h:226
void setType(TCDType type)
Definition: trafficcontroldevice.h:150
BorderBased::Coordinate getCoordinate() const
Definition: trafficcontroldevice.h:175
void setCoordinate(BorderBased::Coordinate coordinate)
Definition: trafficcontroldevice.h:170
int getID() const
Definition: trafficcontroldevice.h:146
@ TRAFFIC_LIGHT
Definition: trafficcontroldevice.h:29
void setCurrentColor(TrafficLightColor color)
Definition: trafficlight.h:89
int intersection_id_
Definition: trafficlight.h:183
virtual TrafficLightStatus * getStatus()
Definition: trafficlight.h:190
int movement_id_
Definition: trafficlight.h:178
Definition: trafficlightsimconverter.h:90
void receive_simTL(adore_if_ros_msg::TrafficLightSimulation msg)
Definition: trafficlightsimconverter.h:98
TrafficLightSimReader(ros::NodeHandle *n, const std::string &topic_tlsim, int qsize)
Definition: trafficlightsimconverter.h:128
bool hasUpdate() const override
Definition: trafficlightsimconverter.h:139
virtual bool hasData() const override
Definition: trafficlightsimconverter.h:135
adore::env::SimTrafficLightMap data_
Definition: trafficlightsimconverter.h:92
virtual void getData(adore::env::SimTrafficLightMap &value) override
Definition: trafficlightsimconverter.h:143
ros::Subscriber simTLSubscriber_
Definition: trafficlightsimconverter.h:94
bool changed_
Definition: trafficlightsimconverter.h:96
Definition: trafficlightsimconverter.h:32
ros::Publisher simTLPublisher_
Definition: trafficlightsimconverter.h:34
virtual void write(const adore::env::SimTrafficLight &value) override
write sends out data value
Definition: trafficlightsimconverter.h:48
TrafficLightSimWriter(ros::NodeHandle *n, const std::string tlSimTopic, int qsize)
Definition: trafficlightsimconverter.h:37
virtual bool canWriteMore() const override
canWriteMore indicates whether more data can be written
Definition: trafficlightsimconverter.h:43
virtual std::string getDesc() override
Definition: trafficlightsimconverter.h:79
Definition: com_patterns.h:68
Definition: com_patterns.h:97
TrafficLightColor
Definition: trafficlight.h:50
std::unordered_map< adore::env::BorderBased::Coordinate, adore::env::SimTrafficLight, adore::env::BorderBased::CoordinateHasher > SimTrafficLightMap
Definition: trafficlight.h:244
Definition: areaofeffectconverter.h:20
This struct represents 3-dimensional coordines.
Definition: coordinate.h:34
double m_Y
Definition: coordinate.h:35
double m_Z
Definition: coordinate.h:35
double m_X
Definition: coordinate.h:35