11 namespace traffic_manager {
56 void Update(
const unsigned long index)
override;
60 void Reset()
override;
const BufferMap & buffer_map
const Parameters & parameters
cc::Timestamp current_timestamp
std::vector< bool > TLFrame
This class holds the state of all the vehicles in the simlation.
This file contains definitions of common data structures used in traffic manager. ...
void RemoveActor(const ActorId actor_id) override
RandomGenerator & random_device
std::unordered_map< carla::ActorId, Buffer > BufferMap
const SimulationState & simulation_state
void Update(const unsigned long index) override
const std::vector< ActorId > & vehicle_id_list
carla::road::JuncId JunctionID
std::unordered_map< JunctionID, std::deque< ActorId > > entering_vehicles_map
Variables used to handle non signalized junctions.
This class has functionality for responding to traffic lights and managing entry into non-signalized ...
TrafficLightStage(const std::vector< ActorId > &vehicle_id_list, const SimulationState &Simulation_state, const BufferMap &buffer_map, const Parameters ¶meters, const cc::World &world, TLFrame &output_array, RandomGenerator &random_device)
bool HandleNonSignalisedJunction(const ActorId ego_actor_id, const JunctionID junction_id, cc::Timestamp timestamp)
This controls all vehicle's interactions at non signalized junctions.
std::unordered_map< ActorId, JunctionID > vehicle_last_junction
Map linking the vehicles with their current junction. Used for easy access to the previous two maps...
std::unordered_map< ActorId, cc::Timestamp > vehicle_stop_time
Map containing the timestamp at which the actor first stopped at a stop sign.
JunctionID GetAffectedJunctionId(const ActorId ego_actor_id)
Get current affected junction id for the vehicle.
void AddActorToNonSignalisedJunction(const ActorId ego_actor_id, const JunctionID junction_id)
Initialized the vehicle to the non-signalized junction maps.