15 #ifndef TRAFFIC_SIMULATOR__TRAFFIC_LIGHTS__TRAFFIC_LIGHT_PUBLISHER_HPP_
16 #define TRAFFIC_SIMULATOR__TRAFFIC_LIGHTS__TRAFFIC_LIGHT_PUBLISHER_HPP_
19 #include <rclcpp/rclcpp.hpp>
31 const rclcpp::Time & current_ros_time,
32 const simulation_api_schema::UpdateTrafficLightsRequest & request)
const ->
void = 0;
37 template <
typename MessageType>
41 template <
typename NodeTypePo
inter>
43 const NodeTypePointer & node_ptr,
const std::string & topic_name,
47 traffic_light_state_array_publisher_(rclcpp::create_publisher<MessageType>(
48 node_ptr, topic_name, rclcpp::QoS(10).transient_local()))
55 const rclcpp::Time &,
const simulation_api_schema::UpdateTrafficLightsRequest & request,
56 const std::string & frame =
"") -> std::unique_ptr<MessageType>;
59 const rclcpp::Time & current_ros_time,
60 const simulation_api_schema::UpdateTrafficLightsRequest & request)
const ->
void override
62 traffic_light_state_array_publisher_->publish(
69 const typename rclcpp::Publisher<MessageType>::SharedPtr traffic_light_state_array_publisher_;
Definition: traffic_light_publisher.hpp:28
virtual ~TrafficLightPublisherBase()=default
virtual auto publish(const rclcpp::Time ¤t_ros_time, const simulation_api_schema::UpdateTrafficLightsRequest &request) const -> void=0
Definition: traffic_light_publisher.hpp:39
auto publish(const rclcpp::Time ¤t_ros_time, const simulation_api_schema::UpdateTrafficLightsRequest &request) const -> void override
Definition: traffic_light_publisher.hpp:58
~TrafficLightPublisher() override=default
static auto generateMessage(const rclcpp::Time &, const simulation_api_schema::UpdateTrafficLightsRequest &request, const std::string &frame="") -> std::unique_ptr< MessageType >
TrafficLightPublisher(const NodeTypePointer &node_ptr, const std::string &topic_name, const std::string &frame="camera_link")
Definition: traffic_light_publisher.hpp:42
std::string string
Definition: junit5.hpp:26