CARLA
Public Member Functions | Private Member Functions | Private Attributes | List of all members
carla::traffic_manager::TrafficLightStage Class Reference

This class has functionality for responding to traffic lights and managing entry into non-signalized junctions. More...

#include <TrafficLightStage.h>

+ Inheritance diagram for carla::traffic_manager::TrafficLightStage:
+ Collaboration diagram for carla::traffic_manager::TrafficLightStage:

Public Member Functions

void RemoveActor (const ActorId actor_id) override
 
void Reset () override
 
 TrafficLightStage (const std::vector< ActorId > &vehicle_id_list, const SimulationState &Simulation_state, const BufferMap &buffer_map, const Parameters &parameters, const cc::World &world, TLFrame &output_array, RandomGeneratorMap &random_devices)
 
void Update (const unsigned long index) override
 

Private Member Functions

bool HandleNonSignalisedJunction (const ActorId ego_actor_id, const JunctionID junction_id, cc::Timestamp timestamp)
 
- Private Member Functions inherited from carla::traffic_manager::Stage
 Stage ()
 
 Stage (const Stage &)
 
virtual ~Stage ()
 

Private Attributes

const BufferMapbuffer_map
 
cc::Timestamp current_timestamp
 
std::unordered_map< JunctionID, cc::Timestampjunction_last_ticket
 Map containing the previous time ticket issued for junctions. More...
 
TLFrameoutput_array
 
const Parametersparameters
 
RandomGeneratorMaprandom_devices
 
const SimulationStatesimulation_state
 
const std::vector< ActorId > & vehicle_id_list
 
std::unordered_map< ActorId, JunctionIDvehicle_last_junction
 Map containing the previous junction visited by a vehicle. More...
 
std::unordered_map< ActorId, cc::Timestampvehicle_last_ticket
 Map containing the time ticket issued for vehicles. More...
 
const cc::Worldworld
 

Detailed Description

This class has functionality for responding to traffic lights and managing entry into non-signalized junctions.

Definition at line 15 of file TrafficLightStage.h.

Constructor & Destructor Documentation

◆ TrafficLightStage()

carla::traffic_manager::TrafficLightStage::TrafficLightStage ( const std::vector< ActorId > &  vehicle_id_list,
const SimulationState Simulation_state,
const BufferMap buffer_map,
const Parameters parameters,
const cc::World world,
TLFrame output_array,
RandomGeneratorMap random_devices 
)

Definition at line 13 of file TrafficLightStage.cpp.

Member Function Documentation

◆ HandleNonSignalisedJunction()

bool carla::traffic_manager::TrafficLightStage::HandleNonSignalisedJunction ( const ActorId  ego_actor_id,
const JunctionID  junction_id,
cc::Timestamp  timestamp 
)
private

Definition at line 65 of file TrafficLightStage.cpp.

References carla::traffic_manager::constants::TrafficLight::DOUBLE_NO_SIGNAL_PASSTHROUGH_INTERVAL, carla::client::Timestamp::elapsed_seconds, junction_last_ticket, vehicle_last_junction, and vehicle_last_ticket.

Referenced by Update().

+ Here is the caller graph for this function:

◆ RemoveActor()

void carla::traffic_manager::TrafficLightStage::RemoveActor ( const ActorId  actor_id)
overridevirtual

Implements carla::traffic_manager::Stage.

Definition at line 129 of file TrafficLightStage.cpp.

References vehicle_last_junction, and vehicle_last_ticket.

Referenced by carla::traffic_manager::ALSM::RemoveActor().

+ Here is the caller graph for this function:

◆ Reset()

void carla::traffic_manager::TrafficLightStage::Reset ( void  )
overridevirtual

Implements carla::traffic_manager::Stage.

Definition at line 134 of file TrafficLightStage.cpp.

References junction_last_ticket, vehicle_last_junction, and vehicle_last_ticket.

Referenced by carla::traffic_manager::TrafficManagerLocal::Stop().

+ Here is the caller graph for this function:

◆ Update()

void carla::traffic_manager::TrafficLightStage::Update ( const unsigned long  index)
overridevirtual

Member Data Documentation

◆ buffer_map

const BufferMap& carla::traffic_manager::TrafficLightStage::buffer_map
private

Definition at line 19 of file TrafficLightStage.h.

Referenced by Update().

◆ current_timestamp

cc::Timestamp carla::traffic_manager::TrafficLightStage::current_timestamp
private

Definition at line 30 of file TrafficLightStage.h.

Referenced by Update().

◆ junction_last_ticket

std::unordered_map<JunctionID, cc::Timestamp> carla::traffic_manager::TrafficLightStage::junction_last_ticket
private

Map containing the previous time ticket issued for junctions.

Definition at line 25 of file TrafficLightStage.h.

Referenced by HandleNonSignalisedJunction(), and Reset().

◆ output_array

TLFrame& carla::traffic_manager::TrafficLightStage::output_array
private

Definition at line 28 of file TrafficLightStage.h.

Referenced by Update().

◆ parameters

const Parameters& carla::traffic_manager::TrafficLightStage::parameters
private

Definition at line 20 of file TrafficLightStage.h.

Referenced by Update().

◆ random_devices

RandomGeneratorMap& carla::traffic_manager::TrafficLightStage::random_devices
private

Definition at line 29 of file TrafficLightStage.h.

Referenced by Update().

◆ simulation_state

const SimulationState& carla::traffic_manager::TrafficLightStage::simulation_state
private

Definition at line 18 of file TrafficLightStage.h.

Referenced by Update().

◆ vehicle_id_list

const std::vector<ActorId>& carla::traffic_manager::TrafficLightStage::vehicle_id_list
private

Definition at line 17 of file TrafficLightStage.h.

Referenced by Update().

◆ vehicle_last_junction

std::unordered_map<ActorId, JunctionID> carla::traffic_manager::TrafficLightStage::vehicle_last_junction
private

Map containing the previous junction visited by a vehicle.

Definition at line 27 of file TrafficLightStage.h.

Referenced by HandleNonSignalisedJunction(), RemoveActor(), and Reset().

◆ vehicle_last_ticket

std::unordered_map<ActorId, cc::Timestamp> carla::traffic_manager::TrafficLightStage::vehicle_last_ticket
private

Map containing the time ticket issued for vehicles.

Definition at line 23 of file TrafficLightStage.h.

Referenced by HandleNonSignalisedJunction(), RemoveActor(), and Reset().

◆ world

const cc::World& carla::traffic_manager::TrafficLightStage::world
private

Definition at line 21 of file TrafficLightStage.h.

Referenced by Update().


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