scenario_simulator_v2 C++ API
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
traffic_simulator::TrafficLightsBase Class Referenceabstract

#include <traffic_lights_base.hpp>

Inheritance diagram for traffic_simulator::TrafficLightsBase:
Inheritance graph
[legend]
Collaboration diagram for traffic_simulator::TrafficLightsBase:
Collaboration graph
[legend]

Public Member Functions

template<typename NodeTypePointer >
 TrafficLightsBase (const NodeTypePointer &node_ptr, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils)
 
virtual ~TrafficLightsBase ()=default
 
auto startUpdate (const double update_rate) -> void
 
auto resetUpdate (const double update_rate) -> void
 
auto isAnyTrafficLightChanged () const -> bool
 
auto isRequiredStopTrafficLightState (const lanelet::Id traffic_light_id) -> bool
 
auto compareTrafficLightsState (const lanelet::Id lanelet_id, const std::string &state) -> bool
 
auto setTrafficLightsColor (const lanelet::Id lanelet_id, const traffic_simulator::TrafficLight::Color &color) -> void
 
auto setTrafficLightsState (const lanelet::Id lanelet_id, const std::string &state) -> void
 
auto setTrafficLightsConfidence (const lanelet::Id lanelet_id, const double confidence) -> void
 
auto getTrafficLightsComposedState (const lanelet::Id lanelet_id) -> std::string
 
auto generateUpdateTrafficLightsRequest () const -> simulation_api_schema::UpdateTrafficLightsRequest
 

Protected Member Functions

virtual auto update () const -> void=0
 
auto isTrafficLightAdded (const lanelet::Id traffic_light_id) const -> bool
 
auto addTrafficLight (const lanelet::Id traffic_light_id) -> void
 
auto getTrafficLight (const lanelet::Id traffic_light_id) -> TrafficLight &
 
auto getTrafficLights (const lanelet::Id lanelet_id) -> std::vector< std::reference_wrapper< TrafficLight >>
 

Protected Attributes

const std::shared_ptr< hdmap_utils::HdMapUtilshdmap_utils_
 
const rclcpp::Clock::SharedPtr clock_ptr_
 
std::unordered_map< lanelet::Id, TrafficLighttraffic_lights_map_
 
const std::unique_ptr< TrafficLightMarkerPublishermarker_publisher_ptr_
 
ConfigurableRateUpdater rate_updater_
 

Constructor & Destructor Documentation

◆ TrafficLightsBase()

template<typename NodeTypePointer >
traffic_simulator::TrafficLightsBase::TrafficLightsBase ( const NodeTypePointer &  node_ptr,
const std::shared_ptr< hdmap_utils::HdMapUtils > &  hdmap_utils 
)
inlineexplicit

◆ ~TrafficLightsBase()

virtual traffic_simulator::TrafficLightsBase::~TrafficLightsBase ( )
virtualdefault

Member Function Documentation

◆ addTrafficLight()

auto traffic_simulator::TrafficLightsBase::addTrafficLight ( const lanelet::Id  traffic_light_id) -> void
protected

◆ compareTrafficLightsState()

auto traffic_simulator::TrafficLightsBase::compareTrafficLightsState ( const lanelet::Id  lanelet_id,
const std::string &  state 
) -> bool

◆ generateUpdateTrafficLightsRequest()

auto traffic_simulator::TrafficLightsBase::generateUpdateTrafficLightsRequest ( ) const -> simulation_api_schema::UpdateTrafficLightsRequest

◆ getTrafficLight()

auto traffic_simulator::TrafficLightsBase::getTrafficLight ( const lanelet::Id  traffic_light_id) -> TrafficLight &
protected

◆ getTrafficLights()

auto traffic_simulator::TrafficLightsBase::getTrafficLights ( const lanelet::Id  lanelet_id) -> std::vector<std::reference_wrapper<TrafficLight>>
protected

◆ getTrafficLightsComposedState()

auto traffic_simulator::TrafficLightsBase::getTrafficLightsComposedState ( const lanelet::Id  lanelet_id) -> std::string

◆ isAnyTrafficLightChanged()

auto traffic_simulator::TrafficLightsBase::isAnyTrafficLightChanged ( ) const -> bool

◆ isRequiredStopTrafficLightState()

auto traffic_simulator::TrafficLightsBase::isRequiredStopTrafficLightState ( const lanelet::Id  traffic_light_id) -> bool

◆ isTrafficLightAdded()

auto traffic_simulator::TrafficLightsBase::isTrafficLightAdded ( const lanelet::Id  traffic_light_id) const -> bool
protected

◆ resetUpdate()

auto traffic_simulator::TrafficLightsBase::resetUpdate ( const double  update_rate) -> void

◆ setTrafficLightsColor()

auto traffic_simulator::TrafficLightsBase::setTrafficLightsColor ( const lanelet::Id  lanelet_id,
const traffic_simulator::TrafficLight::Color color 
) -> void

◆ setTrafficLightsConfidence()

auto traffic_simulator::TrafficLightsBase::setTrafficLightsConfidence ( const lanelet::Id  lanelet_id,
const double  confidence 
) -> void

◆ setTrafficLightsState()

auto traffic_simulator::TrafficLightsBase::setTrafficLightsState ( const lanelet::Id  lanelet_id,
const std::string &  state 
) -> void

◆ startUpdate()

auto traffic_simulator::TrafficLightsBase::startUpdate ( const double  update_rate) -> void

◆ update()

virtual auto traffic_simulator::TrafficLightsBase::update ( ) const -> void
protectedpure virtual

Member Data Documentation

◆ clock_ptr_

const rclcpp::Clock::SharedPtr traffic_simulator::TrafficLightsBase::clock_ptr_
protected

◆ hdmap_utils_

const std::shared_ptr<hdmap_utils::HdMapUtils> traffic_simulator::TrafficLightsBase::hdmap_utils_
protected

◆ marker_publisher_ptr_

const std::unique_ptr<TrafficLightMarkerPublisher> traffic_simulator::TrafficLightsBase::marker_publisher_ptr_
protected

◆ rate_updater_

ConfigurableRateUpdater traffic_simulator::TrafficLightsBase::rate_updater_
protected

◆ traffic_lights_map_

std::unordered_map<lanelet::Id, TrafficLight> traffic_simulator::TrafficLightsBase::traffic_lights_map_
protected

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