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

The function of this class is to integrate all the various stages of the traffic manager appropriately using messengers. More...

#include <TrafficManagerLocal.h>

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

Public Member Functions

carla::client::detail::EpisodeProxyGetEpisodeProxy ()
 Get CARLA episode information. More...
 
std::vector< ActorIdGetRegisteredVehiclesIDs ()
 Get list of all registered vehicles. More...
 
void RegisterVehicles (const std::vector< ActorPtr > &actor_list)
 This method registers a vehicle with the traffic manager. More...
 
void Release ()
 To release the traffic manager. More...
 
void Reset ()
 To reset the traffic manager. More...
 
void Run ()
 Initiates thread to run the TrafficManager sequentially. More...
 
void SetAutoLaneChange (const ActorPtr &actor, const bool enable)
 Enable/disable automatic lane change on a vehicle. More...
 
void SetCollisionDetection (const ActorPtr &reference_actor, const ActorPtr &other_actor, const bool detect_collision)
 Method to set collision detection rules between vehicles. More...
 
void SetDistanceToLeadingVehicle (const ActorPtr &actor, const float distance)
 Method to specify how much distance a vehicle should maintain to the leading vehicle. More...
 
void SetForceLaneChange (const ActorPtr &actor, const bool direction)
 Method to force lane change on a vehicle. More...
 
void SetGlobalDistanceToLeadingVehicle (const float distance)
 Method to specify how much distance a vehicle should maintain to the Global leading vehicle. More...
 
void SetGlobalPercentageSpeedDifference (float const percentage)
 Methos to set a global % decrease in velocity with respect to the speed limit. More...
 
void SetHybridPhysicsMode (const bool mode_switch)
 Method to set hybrid physics mode. More...
 
void SetHybridPhysicsRadius (const float radius)
 Method to set hybrid physics radius. More...
 
void SetKeepRightPercentage (const ActorPtr &actor, const float percentage)
 Method to set probabilistic preference to keep on the right lane. More...
 
void SetOSMMode (const bool mode_switch)
 Method to set Open Street Map mode. More...
 
void SetPercentageIgnoreVehicles (const ActorPtr &actor, const float perc)
 Method to specify the % chance of ignoring collisions with any vehicle. More...
 
void SetPercentageIgnoreWalkers (const ActorPtr &actor, const float perc)
 Method to specify the % chance of ignoring collisions with any walker. More...
 
void SetPercentageRunningLight (const ActorPtr &actor, const float perc)
 Method to specify the % chance of running any traffic light. More...
 
void SetPercentageRunningSign (const ActorPtr &actor, const float perc)
 Method to specify the % chance of running any traffic sign. More...
 
void SetPercentageSpeedDifference (const ActorPtr &actor, const float percentage)
 Method to set a vehicle's % decrease in velocity with respect to the speed limit. More...
 
void SetRandomDeviceSeed (const uint64_t _seed)
 Method to set randomization seed. More...
 
void SetSynchronousMode (bool mode)
 Method to switch traffic manager into synchronous execution. More...
 
void SetSynchronousModeTimeOutInMiliSecond (double time)
 Method to set Tick timeout for synchronous execution. More...
 
void SetupLocalMap ()
 Method to setup InMemoryMap. More...
 
void Start ()
 To start the TrafficManager. More...
 
void Stop ()
 To stop the TrafficManager. More...
 
bool SynchronousTick ()
 Method to provide synchronous tick. More...
 
 TrafficManagerLocal (std::vector< float > longitudinal_PID_parameters, std::vector< float > longitudinal_highway_PID_parameters, std::vector< float > lateral_PID_parameters, std::vector< float > lateral_highway_PID_parameters, float perc_decrease_from_limit, cc::detail::EpisodeProxy &episode_proxy, uint16_t &RPCportTM)
 Private constructor for singleton lifecycle management. More...
 
void UnregisterVehicles (const std::vector< ActorPtr > &actor_list)
 This method unregisters a vehicle from traffic manager. More...
 
virtual ~TrafficManagerLocal ()
 Destructor. More...
 
- Public Member Functions inherited from carla::traffic_manager::TrafficManagerBase
 TrafficManagerBase ()
 Protected constructor for singleton lifecycle management. More...
 
virtual ~TrafficManagerBase ()
 Destructor. More...
 

Private Member Functions

bool CheckAllFrozen (TLGroup tl_to_freeze)
 Method to check if all traffic lights are frozen in a group. More...
 

Private Attributes

ALSM alsm
 
BufferMap buffer_map
 Structures to hold waypoint buffers for all vehicles. More...
 
CollisionFrame collision_frame
 Array to hold output data of collision avoidance. More...
 
CollisionStage collision_stage
 
ControlFrame control_frame
 Array to hold output data of motion planning. More...
 
uint64_t current_reserved_capacity {0u}
 Variable to keep track of currently reserved array space for frames. More...
 
cc::DebugHelper debug_helper
 Carla's debug helper object. More...
 
carla::client::detail::EpisodeProxy episode_proxy
 Carla's client connection object. More...
 
std::vector< float > lateral_highway_PID_parameters
 
std::vector< float > lateral_PID_parameters
 
LocalMapPtr local_map
 Pointer to local map cache. More...
 
LocalizationFrame localization_frame
 Array to hold output data of localization stage. More...
 
LocalizationStage localization_stage
 Various stages representing core operations of traffic manager. More...
 
std::vector< float > longitudinal_highway_PID_parameters
 
std::vector< float > longitudinal_PID_parameters
 PID controller parameters. More...
 
std::vector< ActorIdmarked_for_removal
 
MotionPlanStage motion_plan_stage
 
Parameters parameters
 Parameterization object. More...
 
TimePoint previous_update_instance
 Time instance used to calculate dt in asynchronous mode. More...
 
RandomGeneratorMap random_devices
 Structure holding random devices per vehicle. More...
 
AtomicActorSet registered_vehicles
 Set of all actors registered with traffic manager. More...
 
int registered_vehicles_state
 State counter to track changes in registered actors. More...
 
std::mutex registration_mutex
 Mutex to prevent vehicle registration during frame array re-allocation. More...
 
std::atomic< bool > run_traffic_manger {true}
 Switch to turn on / turn off traffic manager. More...
 
uint64_t seed {static_cast<uint64_t>(time(NULL))}
 Randomization seed. More...
 
TrafficManagerServer server
 Traffic manager server instance. More...
 
SimulationState simulation_state
 Type containing the current state of all actors involved in the simulation. More...
 
std::atomic< bool > step_begin {false}
 Flags to signal step begin and end. More...
 
std::condition_variable step_begin_trigger
 Condition variables for progressing synchronous execution. More...
 
std::atomic< bool > step_end {false}
 
std::condition_variable step_end_trigger
 
std::mutex step_execution_mutex
 Mutex for progressing synchronous execution. More...
 
TLFrame tl_frame
 Array to hold output data of traffic light response. More...
 
TrackTraffic track_traffic
 Object for tracking paths of the traffic vehicles. More...
 
TrafficLightStage traffic_light_stage
 
std::vector< ActorIdvehicle_id_list
 List of vehicles registered with the traffic manager in current update cycle. More...
 
std::unique_ptr< std::thread > worker_thread
 Single worker thread for sequential execution of sub-components. More...
 
cc::World world
 Carla client and object. More...
 

Detailed Description

The function of this class is to integrate all the various stages of the traffic manager appropriately using messengers.

Definition at line 51 of file TrafficManagerLocal.h.

Constructor & Destructor Documentation

◆ TrafficManagerLocal()

carla::traffic_manager::TrafficManagerLocal::TrafficManagerLocal ( std::vector< float >  longitudinal_PID_parameters,
std::vector< float >  longitudinal_highway_PID_parameters,
std::vector< float >  lateral_PID_parameters,
std::vector< float >  lateral_highway_PID_parameters,
float  perc_decrease_from_limit,
cc::detail::EpisodeProxy &  episode_proxy,
uint16_t &  RPCportTM 
)

Private constructor for singleton lifecycle management.

Definition at line 18 of file TrafficManagerLocal.cpp.

References parameters, registered_vehicles_state, carla::traffic_manager::Parameters::SetGlobalPercentageSpeedDifference(), SetupLocalMap(), and Start().

+ Here is the call graph for this function:

◆ ~TrafficManagerLocal()

carla::traffic_manager::TrafficManagerLocal::~TrafficManagerLocal ( )
virtual

Destructor.

Definition at line 104 of file TrafficManagerLocal.cpp.

References episode_proxy, carla::client::detail::EpisodeProxyImpl< PointerT >::Lock(), carla::traffic_manager::TrafficManagerServer::port(), Release(), and server.

+ Here is the call graph for this function:

Member Function Documentation

◆ CheckAllFrozen()

bool carla::traffic_manager::TrafficManagerLocal::CheckAllFrozen ( TLGroup  tl_to_freeze)
private

Method to check if all traffic lights are frozen in a group.

Definition at line 359 of file TrafficManagerLocal.cpp.

References carla::rpc::Red.

◆ GetEpisodeProxy()

carla::client::detail::EpisodeProxy & carla::traffic_manager::TrafficManagerLocal::GetEpisodeProxy ( )
virtual

Get CARLA episode information.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 381 of file TrafficManagerLocal.cpp.

References episode_proxy.

◆ GetRegisteredVehiclesIDs()

std::vector< ActorId > carla::traffic_manager::TrafficManagerLocal::GetRegisteredVehiclesIDs ( )

Get list of all registered vehicles.

Definition at line 385 of file TrafficManagerLocal.cpp.

References carla::traffic_manager::AtomicActorSet::GetIDList(), and registered_vehicles.

+ Here is the call graph for this function:

◆ RegisterVehicles()

void carla::traffic_manager::TrafficManagerLocal::RegisterVehicles ( const std::vector< ActorPtr > &  actor_list)
virtual

This method registers a vehicle with the traffic manager.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 283 of file TrafficManagerLocal.cpp.

References carla::traffic_manager::AtomicActorSet::Insert(), random_devices, registered_vehicles, registration_mutex, and seed.

+ Here is the call graph for this function:

◆ Release()

void carla::traffic_manager::TrafficManagerLocal::Release ( )
virtual

To release the traffic manager.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 267 of file TrafficManagerLocal.cpp.

References local_map, and Stop().

Referenced by Reset(), and ~TrafficManagerLocal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Reset()

void carla::traffic_manager::TrafficManagerLocal::Reset ( void  )
virtual

To reset the traffic manager.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 274 of file TrafficManagerLocal.cpp.

References episode_proxy, carla::client::detail::EpisodeProxyImpl< PointerT >::Lock(), Release(), SetupLocalMap(), Start(), and world.

+ Here is the call graph for this function:

◆ Run()

void carla::traffic_manager::TrafficManagerLocal::Run ( )

Initiates thread to run the TrafficManager sequentially.

Definition at line 120 of file TrafficManagerLocal.cpp.

References alsm, carla::traffic_manager::CollisionStage::ClearCycleCache(), collision_frame, collision_stage, control_frame, current_reserved_capacity, episode_proxy, carla::traffic_manager::Parameters::GetHybridPhysicsMode(), carla::traffic_manager::AtomicActorSet::GetIDList(), carla::traffic_manager::AtomicActorSet::GetState(), carla::traffic_manager::Parameters::GetSynchronousMode(), carla::traffic_manager::constants::FrameMemory::GROWTH_STEP_SIZE, carla::traffic_manager::constants::HybridMode::HYBRID_MODE_DT, carla::traffic_manager::constants::FrameMemory::INITIAL_SIZE, carla::traffic_manager::constants::FrameMemory::INV_GROWTH_STEP_SIZE, localization_frame, localization_stage, carla::client::detail::EpisodeProxyImpl< PointerT >::Lock(), motion_plan_stage, parameters, previous_update_instance, registered_vehicles, registered_vehicles_state, registration_mutex, run_traffic_manger, carla::traffic_manager::AtomicActorSet::Size(), sort(), step_begin, step_begin_trigger, step_end, step_end_trigger, step_execution_mutex, tl_frame, traffic_light_stage, carla::traffic_manager::TrafficLightStage::Update(), carla::traffic_manager::MotionPlanStage::Update(), carla::traffic_manager::LocalizationStage::Update(), carla::traffic_manager::CollisionStage::Update(), carla::traffic_manager::ALSM::Update(), and vehicle_id_list.

Referenced by Start().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetAutoLaneChange()

void carla::traffic_manager::TrafficManagerLocal::SetAutoLaneChange ( const ActorPtr actor,
const bool  enable 
)
virtual

Enable/disable automatic lane change on a vehicle.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 315 of file TrafficManagerLocal.cpp.

References parameters, and carla::traffic_manager::Parameters::SetAutoLaneChange().

+ Here is the call graph for this function:

◆ SetCollisionDetection()

void carla::traffic_manager::TrafficManagerLocal::SetCollisionDetection ( const ActorPtr reference_actor,
const ActorPtr other_actor,
const bool  detect_collision 
)
virtual

Method to set collision detection rules between vehicles.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 307 of file TrafficManagerLocal.cpp.

References parameters, and carla::traffic_manager::Parameters::SetCollisionDetection().

+ Here is the call graph for this function:

◆ SetDistanceToLeadingVehicle()

void carla::traffic_manager::TrafficManagerLocal::SetDistanceToLeadingVehicle ( const ActorPtr actor,
const float  distance 
)
virtual

Method to specify how much distance a vehicle should maintain to the leading vehicle.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 319 of file TrafficManagerLocal.cpp.

References parameters, and carla::traffic_manager::Parameters::SetDistanceToLeadingVehicle().

+ Here is the call graph for this function:

◆ SetForceLaneChange()

void carla::traffic_manager::TrafficManagerLocal::SetForceLaneChange ( const ActorPtr actor,
const bool  direction 
)
virtual

Method to force lane change on a vehicle.

Direction flag can be set to true for left and false for right.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 311 of file TrafficManagerLocal.cpp.

References parameters, and carla::traffic_manager::Parameters::SetForceLaneChange().

+ Here is the call graph for this function:

◆ SetGlobalDistanceToLeadingVehicle()

void carla::traffic_manager::TrafficManagerLocal::SetGlobalDistanceToLeadingVehicle ( const float  distance)
virtual

Method to specify how much distance a vehicle should maintain to the Global leading vehicle.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 323 of file TrafficManagerLocal.cpp.

References parameters, and carla::traffic_manager::Parameters::SetGlobalDistanceToLeadingVehicle().

+ Here is the call graph for this function:

◆ SetGlobalPercentageSpeedDifference()

void carla::traffic_manager::TrafficManagerLocal::SetGlobalPercentageSpeedDifference ( float const  percentage)
virtual

Methos to set a global % decrease in velocity with respect to the speed limit.

If less than 0, it's a % increase.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 303 of file TrafficManagerLocal.cpp.

References parameters, and carla::traffic_manager::Parameters::SetGlobalPercentageSpeedDifference().

+ Here is the call graph for this function:

◆ SetHybridPhysicsMode()

void carla::traffic_manager::TrafficManagerLocal::SetHybridPhysicsMode ( const bool  mode_switch)
virtual

Method to set hybrid physics mode.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 347 of file TrafficManagerLocal.cpp.

References parameters, and carla::traffic_manager::Parameters::SetHybridPhysicsMode().

+ Here is the call graph for this function:

◆ SetHybridPhysicsRadius()

void carla::traffic_manager::TrafficManagerLocal::SetHybridPhysicsRadius ( const float  radius)
virtual

Method to set hybrid physics radius.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 351 of file TrafficManagerLocal.cpp.

References parameters, and carla::traffic_manager::Parameters::SetHybridPhysicsRadius().

+ Here is the call graph for this function:

◆ SetKeepRightPercentage()

void carla::traffic_manager::TrafficManagerLocal::SetKeepRightPercentage ( const ActorPtr actor,
const float  percentage 
)
virtual

Method to set probabilistic preference to keep on the right lane.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 343 of file TrafficManagerLocal.cpp.

References parameters, and carla::traffic_manager::Parameters::SetKeepRightPercentage().

+ Here is the call graph for this function:

◆ SetOSMMode()

void carla::traffic_manager::TrafficManagerLocal::SetOSMMode ( const bool  mode_switch)
virtual

Method to set Open Street Map mode.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 355 of file TrafficManagerLocal.cpp.

References parameters, and carla::traffic_manager::Parameters::SetOSMMode().

+ Here is the call graph for this function:

◆ SetPercentageIgnoreVehicles()

void carla::traffic_manager::TrafficManagerLocal::SetPercentageIgnoreVehicles ( const ActorPtr actor,
const float  perc 
)
virtual

Method to specify the % chance of ignoring collisions with any vehicle.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 331 of file TrafficManagerLocal.cpp.

References parameters, and carla::traffic_manager::Parameters::SetPercentageIgnoreVehicles().

+ Here is the call graph for this function:

◆ SetPercentageIgnoreWalkers()

void carla::traffic_manager::TrafficManagerLocal::SetPercentageIgnoreWalkers ( const ActorPtr actor,
const float  perc 
)
virtual

Method to specify the % chance of ignoring collisions with any walker.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 327 of file TrafficManagerLocal.cpp.

References parameters, and carla::traffic_manager::Parameters::SetPercentageIgnoreWalkers().

+ Here is the call graph for this function:

◆ SetPercentageRunningLight()

void carla::traffic_manager::TrafficManagerLocal::SetPercentageRunningLight ( const ActorPtr actor,
const float  perc 
)
virtual

Method to specify the % chance of running any traffic light.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 335 of file TrafficManagerLocal.cpp.

References parameters, and carla::traffic_manager::Parameters::SetPercentageRunningLight().

+ Here is the call graph for this function:

◆ SetPercentageRunningSign()

void carla::traffic_manager::TrafficManagerLocal::SetPercentageRunningSign ( const ActorPtr actor,
const float  perc 
)
virtual

Method to specify the % chance of running any traffic sign.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 339 of file TrafficManagerLocal.cpp.

References parameters, and carla::traffic_manager::Parameters::SetPercentageRunningSign().

+ Here is the call graph for this function:

◆ SetPercentageSpeedDifference()

void carla::traffic_manager::TrafficManagerLocal::SetPercentageSpeedDifference ( const ActorPtr actor,
const float  percentage 
)
virtual

Method to set a vehicle's % decrease in velocity with respect to the speed limit.

If less than 0, it's a % increase.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 299 of file TrafficManagerLocal.cpp.

References parameters, and carla::traffic_manager::Parameters::SetPercentageSpeedDifference().

+ Here is the call graph for this function:

◆ SetRandomDeviceSeed()

void carla::traffic_manager::TrafficManagerLocal::SetRandomDeviceSeed ( const uint64_t  _seed)
virtual

Method to set randomization seed.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 389 of file TrafficManagerLocal.cpp.

References carla::client::World::ResetAllTrafficLights(), seed, and world.

+ Here is the call graph for this function:

◆ SetSynchronousMode()

void carla::traffic_manager::TrafficManagerLocal::SetSynchronousMode ( bool  mode)
virtual

Method to switch traffic manager into synchronous execution.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 368 of file TrafficManagerLocal.cpp.

References carla::traffic_manager::Parameters::GetSynchronousMode(), parameters, carla::traffic_manager::Parameters::SetSynchronousMode(), step_begin, and step_begin_trigger.

+ Here is the call graph for this function:

◆ SetSynchronousModeTimeOutInMiliSecond()

void carla::traffic_manager::TrafficManagerLocal::SetSynchronousModeTimeOutInMiliSecond ( double  time)
virtual

Method to set Tick timeout for synchronous execution.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 377 of file TrafficManagerLocal.cpp.

References parameters, and carla::traffic_manager::Parameters::SetSynchronousModeTimeOutInMiliSecond().

+ Here is the call graph for this function:

◆ SetupLocalMap()

void carla::traffic_manager::TrafficManagerLocal::SetupLocalMap ( )

Method to setup InMemoryMap.

Definition at line 109 of file TrafficManagerLocal.cpp.

References carla::client::World::GetMap(), local_map, and world.

Referenced by Reset(), and TrafficManagerLocal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Start()

void carla::traffic_manager::TrafficManagerLocal::Start ( )
virtual

To start the TrafficManager.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 115 of file TrafficManagerLocal.cpp.

References Run(), run_traffic_manger, and worker_thread.

Referenced by Reset(), and TrafficManagerLocal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Stop()

void carla::traffic_manager::TrafficManagerLocal::Stop ( void  )
virtual

◆ SynchronousTick()

bool carla::traffic_manager::TrafficManagerLocal::SynchronousTick ( )
virtual

Method to provide synchronous tick.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 216 of file TrafficManagerLocal.cpp.

References carla::traffic_manager::Parameters::GetSynchronousMode(), parameters, step_begin, step_begin_trigger, step_end, step_end_trigger, and step_execution_mutex.

+ Here is the call graph for this function:

◆ UnregisterVehicles()

void carla::traffic_manager::TrafficManagerLocal::UnregisterVehicles ( const std::vector< ActorPtr > &  actor_list)
virtual

This method unregisters a vehicle from traffic manager.

Implements carla::traffic_manager::TrafficManagerBase.

Definition at line 291 of file TrafficManagerLocal.cpp.

References alsm, registration_mutex, and carla::traffic_manager::ALSM::RemoveActor().

+ Here is the call graph for this function:

Member Data Documentation

◆ alsm

ALSM carla::traffic_manager::TrafficManagerLocal::alsm
private

Definition at line 99 of file TrafficManagerLocal.h.

Referenced by Run(), and UnregisterVehicles().

◆ buffer_map

BufferMap carla::traffic_manager::TrafficManagerLocal::buffer_map
private

Structures to hold waypoint buffers for all vehicles.

Definition at line 73 of file TrafficManagerLocal.h.

Referenced by Stop().

◆ collision_frame

CollisionFrame carla::traffic_manager::TrafficManagerLocal::collision_frame
private

Array to hold output data of collision avoidance.

Definition at line 87 of file TrafficManagerLocal.h.

Referenced by Run(), and Stop().

◆ collision_stage

CollisionStage carla::traffic_manager::TrafficManagerLocal::collision_stage
private

Definition at line 96 of file TrafficManagerLocal.h.

Referenced by Run(), and Stop().

◆ control_frame

ControlFrame carla::traffic_manager::TrafficManagerLocal::control_frame
private

Array to hold output data of motion planning.

Definition at line 91 of file TrafficManagerLocal.h.

Referenced by Run(), and Stop().

◆ current_reserved_capacity

uint64_t carla::traffic_manager::TrafficManagerLocal::current_reserved_capacity {0u}
private

Variable to keep track of currently reserved array space for frames.

Definition at line 93 of file TrafficManagerLocal.h.

Referenced by Run(), and Stop().

◆ debug_helper

cc::DebugHelper carla::traffic_manager::TrafficManagerLocal::debug_helper
private

Carla's debug helper object.

Definition at line 75 of file TrafficManagerLocal.h.

◆ episode_proxy

carla::client::detail::EpisodeProxy carla::traffic_manager::TrafficManagerLocal::episode_proxy
private

Carla's client connection object.

Definition at line 60 of file TrafficManagerLocal.h.

Referenced by GetEpisodeProxy(), Reset(), Run(), and ~TrafficManagerLocal().

◆ lateral_highway_PID_parameters

std::vector<float> carla::traffic_manager::TrafficManagerLocal::lateral_highway_PID_parameters
private

Definition at line 58 of file TrafficManagerLocal.h.

◆ lateral_PID_parameters

std::vector<float> carla::traffic_manager::TrafficManagerLocal::lateral_PID_parameters
private

Definition at line 57 of file TrafficManagerLocal.h.

◆ local_map

LocalMapPtr carla::traffic_manager::TrafficManagerLocal::local_map
private

Pointer to local map cache.

Definition at line 71 of file TrafficManagerLocal.h.

Referenced by Release(), and SetupLocalMap().

◆ localization_frame

LocalizationFrame carla::traffic_manager::TrafficManagerLocal::localization_frame
private

Array to hold output data of localization stage.

Definition at line 85 of file TrafficManagerLocal.h.

Referenced by Run(), and Stop().

◆ localization_stage

LocalizationStage carla::traffic_manager::TrafficManagerLocal::localization_stage
private

Various stages representing core operations of traffic manager.

Definition at line 95 of file TrafficManagerLocal.h.

Referenced by Run(), and Stop().

◆ longitudinal_highway_PID_parameters

std::vector<float> carla::traffic_manager::TrafficManagerLocal::longitudinal_highway_PID_parameters
private

Definition at line 56 of file TrafficManagerLocal.h.

◆ longitudinal_PID_parameters

std::vector<float> carla::traffic_manager::TrafficManagerLocal::longitudinal_PID_parameters
private

PID controller parameters.

Definition at line 55 of file TrafficManagerLocal.h.

◆ marked_for_removal

std::vector<ActorId> carla::traffic_manager::TrafficManagerLocal::marked_for_removal
private

Definition at line 118 of file TrafficManagerLocal.h.

◆ motion_plan_stage

MotionPlanStage carla::traffic_manager::TrafficManagerLocal::motion_plan_stage
private

Definition at line 98 of file TrafficManagerLocal.h.

Referenced by Run(), and Stop().

◆ parameters

Parameters carla::traffic_manager::TrafficManagerLocal::parameters
private

◆ previous_update_instance

TimePoint carla::traffic_manager::TrafficManagerLocal::previous_update_instance
private

Time instance used to calculate dt in asynchronous mode.

Definition at line 81 of file TrafficManagerLocal.h.

Referenced by Run(), and Stop().

◆ random_devices

RandomGeneratorMap carla::traffic_manager::TrafficManagerLocal::random_devices
private

Structure holding random devices per vehicle.

Definition at line 115 of file TrafficManagerLocal.h.

Referenced by RegisterVehicles(), and Stop().

◆ registered_vehicles

AtomicActorSet carla::traffic_manager::TrafficManagerLocal::registered_vehicles
private

Set of all actors registered with traffic manager.

Definition at line 64 of file TrafficManagerLocal.h.

Referenced by GetRegisteredVehiclesIDs(), RegisterVehicles(), Run(), and Stop().

◆ registered_vehicles_state

int carla::traffic_manager::TrafficManagerLocal::registered_vehicles_state
private

State counter to track changes in registered actors.

Definition at line 66 of file TrafficManagerLocal.h.

Referenced by Run(), Stop(), and TrafficManagerLocal().

◆ registration_mutex

std::mutex carla::traffic_manager::TrafficManagerLocal::registration_mutex
private

Mutex to prevent vehicle registration during frame array re-allocation.

Definition at line 120 of file TrafficManagerLocal.h.

Referenced by RegisterVehicles(), Run(), and UnregisterVehicles().

◆ run_traffic_manger

std::atomic<bool> carla::traffic_manager::TrafficManagerLocal::run_traffic_manger {true}
private

Switch to turn on / turn off traffic manager.

Definition at line 103 of file TrafficManagerLocal.h.

Referenced by Run(), Start(), and Stop().

◆ seed

uint64_t carla::traffic_manager::TrafficManagerLocal::seed {static_cast<uint64_t>(time(NULL))}
private

Randomization seed.

Definition at line 117 of file TrafficManagerLocal.h.

Referenced by RegisterVehicles(), and SetRandomDeviceSeed().

◆ server

TrafficManagerServer carla::traffic_manager::TrafficManagerLocal::server
private

Traffic manager server instance.

Definition at line 101 of file TrafficManagerLocal.h.

Referenced by ~TrafficManagerLocal().

◆ simulation_state

SimulationState carla::traffic_manager::TrafficManagerLocal::simulation_state
private

Type containing the current state of all actors involved in the simulation.

Definition at line 79 of file TrafficManagerLocal.h.

Referenced by Stop().

◆ step_begin

std::atomic<bool> carla::traffic_manager::TrafficManagerLocal::step_begin {false}
private

Flags to signal step begin and end.

Definition at line 105 of file TrafficManagerLocal.h.

Referenced by Run(), SetSynchronousMode(), Stop(), and SynchronousTick().

◆ step_begin_trigger

std::condition_variable carla::traffic_manager::TrafficManagerLocal::step_begin_trigger
private

Condition variables for progressing synchronous execution.

Definition at line 110 of file TrafficManagerLocal.h.

Referenced by Run(), SetSynchronousMode(), Stop(), and SynchronousTick().

◆ step_end

std::atomic<bool> carla::traffic_manager::TrafficManagerLocal::step_end {false}
private

Definition at line 106 of file TrafficManagerLocal.h.

Referenced by Run(), Stop(), and SynchronousTick().

◆ step_end_trigger

std::condition_variable carla::traffic_manager::TrafficManagerLocal::step_end_trigger
private

Definition at line 111 of file TrafficManagerLocal.h.

Referenced by Run(), and SynchronousTick().

◆ step_execution_mutex

std::mutex carla::traffic_manager::TrafficManagerLocal::step_execution_mutex
private

Mutex for progressing synchronous execution.

Definition at line 108 of file TrafficManagerLocal.h.

Referenced by Run(), and SynchronousTick().

◆ tl_frame

TLFrame carla::traffic_manager::TrafficManagerLocal::tl_frame
private

Array to hold output data of traffic light response.

Definition at line 89 of file TrafficManagerLocal.h.

Referenced by Run(), and Stop().

◆ track_traffic

TrackTraffic carla::traffic_manager::TrafficManagerLocal::track_traffic
private

Object for tracking paths of the traffic vehicles.

Definition at line 77 of file TrafficManagerLocal.h.

Referenced by Stop().

◆ traffic_light_stage

TrafficLightStage carla::traffic_manager::TrafficManagerLocal::traffic_light_stage
private

Definition at line 97 of file TrafficManagerLocal.h.

Referenced by Run(), and Stop().

◆ vehicle_id_list

std::vector<ActorId> carla::traffic_manager::TrafficManagerLocal::vehicle_id_list
private

List of vehicles registered with the traffic manager in current update cycle.

Definition at line 69 of file TrafficManagerLocal.h.

Referenced by Run(), and Stop().

◆ worker_thread

std::unique_ptr<std::thread> carla::traffic_manager::TrafficManagerLocal::worker_thread
private

Single worker thread for sequential execution of sub-components.

Definition at line 113 of file TrafficManagerLocal.h.

Referenced by Start(), and Stop().

◆ world

cc::World carla::traffic_manager::TrafficManagerLocal::world
private

Carla client and object.

Definition at line 62 of file TrafficManagerLocal.h.

Referenced by Reset(), SetRandomDeviceSeed(), and SetupLocalMap().


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