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

This class integrates all the various stages of the traffic manager appropriately using messengers. More...

#include <TrafficManager.h>

+ Collaboration diagram for carla::traffic_manager::TrafficManager:

Public Member Functions

ActionBuffer GetActionBuffer (const ActorId &actor_id)
 Method to get the action buffer. More...
 
Action GetNextAction (const ActorId &actor_id)
 Method to get the next action. More...
 
bool IsValidPort () const
 
TrafficManageroperator= (const TrafficManager &)=default
 
TrafficManageroperator= (TrafficManager &&)=default
 
uint16_t Port () const
 
void RegisterVehicles (const std::vector< ActorPtr > &actor_list)
 This method registers a vehicle with the traffic manager. More...
 
void RemoveImportedRoute (const ActorId &actor_id, const bool remove_path)
 Method to remove a route. More...
 
void RemoveUploadPath (const ActorId &actor_id, const bool remove_path)
 Method to remove a path. More...
 
void SetAutoLaneChange (const ActorPtr &actor, const bool enable)
 Enable/disable automatic lane change on a vehicle. More...
 
void SetBoundariesRespawnDormantVehicles (const float lower_bound, const float upper_bound)
 Method to set boundaries for respawning vehicles. 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 SetCustomPath (const ActorPtr &actor, const Path path, const bool empty_buffer)
 Method to set our own imported path. More...
 
void SetDesiredSpeed (const ActorPtr &actor, const float value)
 Set a vehicle's exact desired velocity. 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 Set Global distance to Leading vehicle. More...
 
void SetGlobalLaneOffset (float const offset)
 Method to set a global lane offset displacement from the center line. More...
 
void SetGlobalPercentageSpeedDifference (float const percentage)
 Set a global % decrease in velocity with respect to the speed limit. More...
 
void SetHybridPhysicsMode (const bool mode_switch)
 This method sets the hybrid physics mode. More...
 
void SetHybridPhysicsRadius (const float radius)
 This method sets the hybrid physics radius. More...
 
void SetImportedRoute (const ActorPtr &actor, const Route route, const bool empty_buffer)
 Method to set our own imported route. More...
 
void SetKeepRightPercentage (const ActorPtr &actor, const float percentage)
 Method to set % to keep on the right lane. More...
 
void SetLaneOffset (const ActorPtr &actor, const float offset)
 Method to set a lane offset displacement from the center line. More...
 
void SetMaxBoundaries (const float lower, const float upper)
 Method to set boundaries for respawning vehicles. 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 a light. More...
 
void SetPercentageRunningSign (const ActorPtr &actor, const float perc)
 Method to specify the % chance of running a sign. More...
 
void SetPercentageSpeedDifference (const ActorPtr &actor, const float percentage)
 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 SetRandomLeftLaneChangePercentage (const ActorPtr &actor, const float percentage)
 Method to set % to randomly do a left lane change. More...
 
void SetRandomRightLaneChangePercentage (const ActorPtr &actor, const float percentage)
 Method to set % to randomly do a right lane change. More...
 
void SetRespawnDormantVehicles (const bool mode_switch)
 Method to set if we are automatically respawning vehicles. 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 SetUpdateVehicleLights (const ActorPtr &actor, const bool do_update)
 Set the automatic management of the vehicle lights. More...
 
void ShutDown ()
 
bool SynchronousTick ()
 Method to provide synchronous tick. More...
 
 TrafficManager (carla::client::detail::EpisodeProxy episode_proxy, uint16_t port=TM_DEFAULT_PORT)
 Public constructor for singleton life cycle management. More...
 
 TrafficManager (const TrafficManager &other)
 
 TrafficManager ()
 
 TrafficManager (TrafficManager &&)=default
 
void UnregisterVehicles (const std::vector< ActorPtr > &actor_list)
 This method unregisters a vehicle from traffic manager. More...
 
void UpdateImportedRoute (const ActorId &actor_id, const Route route)
 Method to update an already set route. More...
 
void UpdateUploadPath (const ActorId &actor_id, const Path path)
 Method to update an already set path. More...
 

Static Public Member Functions

static void Release ()
 
static void Reset ()
 
static void Tick ()
 

Private Member Functions

bool CreateTrafficManagerClient (carla::client::detail::EpisodeProxy episode_proxy, uint16_t port)
 
void CreateTrafficManagerServer (carla::client::detail::EpisodeProxy episode_proxy, uint16_t port)
 
TrafficManagerBaseGetTM (uint16_t port) const
 

Private Attributes

uint16_t _port = 0
 

Static Private Attributes

static std::mutex _mutex
 
static std::map< uint16_t, TrafficManagerBase * > _tm_map
 

Detailed Description

This class integrates all the various stages of the traffic manager appropriately using messengers.

Definition at line 26 of file TrafficManager.h.

Constructor & Destructor Documentation

◆ TrafficManager() [1/4]

carla::traffic_manager::TrafficManager::TrafficManager ( carla::client::detail::EpisodeProxy  episode_proxy,
uint16_t  port = TM_DEFAULT_PORT 
)
explicit

Public constructor for singleton life cycle management.

Definition at line 31 of file TrafficManager.cpp.

References _port, CreateTrafficManagerClient(), CreateTrafficManagerServer(), and GetTM().

+ Here is the call graph for this function:

◆ TrafficManager() [2/4]

carla::traffic_manager::TrafficManager::TrafficManager ( const TrafficManager other)
inline

Definition at line 34 of file TrafficManager.h.

References _port.

◆ TrafficManager() [3/4]

carla::traffic_manager::TrafficManager::TrafficManager ( )
inline

Definition at line 38 of file TrafficManager.h.

References operator=(), Release(), Reset(), and Tick().

+ Here is the call graph for this function:

◆ TrafficManager() [4/4]

carla::traffic_manager::TrafficManager::TrafficManager ( TrafficManager &&  )
default

Member Function Documentation

◆ CreateTrafficManagerClient()

bool carla::traffic_manager::TrafficManager::CreateTrafficManagerClient ( carla::client::detail::EpisodeProxy  episode_proxy,
uint16_t  port 
)
private

Get TM server info (Remote IP & PORT)

Set remote TM server IP and port

Try to connect to remote TM server

Check memory allocated or not

Try to reset all traffic lights

Set the pointer of the instance

If Connection error occurred

Clear previously allocated memory

Definition at line 176 of file TrafficManager.cpp.

References _tm_map, carla::traffic_manager::TrafficManagerRemote::HealthCheckRemoteTM(), and carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

Referenced by GetActionBuffer(), and TrafficManager().

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

◆ CreateTrafficManagerServer()

void carla::traffic_manager::TrafficManager::CreateTrafficManagerServer ( carla::client::detail::EpisodeProxy  episode_proxy,
uint16_t  port 
)
private

Define local constants

Create local instance of TM

Get TM server info (Local IP & PORT)

Set this client as the TM to server

Set the pointer of the instance

Definition at line 82 of file TrafficManager.cpp.

References _tm_map, carla::traffic_manager::constants::SpeedThreshold::INITIAL_PERCENTAGE_SPEED_DIFFERENCE, IP_DATA_BUFFER_SIZE, carla::traffic_manager::constants::PID::LATERAL_HIGHWAY_PARAM, carla::traffic_manager::constants::PID::LATERAL_PARAM, carla::client::detail::EpisodeProxyImpl< PointerT >::Lock(), carla::traffic_manager::constants::PID::LONGITUDIAL_HIGHWAY_PARAM, carla::traffic_manager::constants::PID::LONGITUDIAL_PARAM, and SOCK_INVALID_INDEX.

Referenced by GetActionBuffer(), and TrafficManager().

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

◆ GetActionBuffer()

ActionBuffer carla::traffic_manager::TrafficManager::GetActionBuffer ( const ActorId actor_id)
inline

Method to get the action buffer.

Definition at line 368 of file TrafficManager.h.

References _port, CreateTrafficManagerClient(), CreateTrafficManagerServer(), carla::traffic_manager::TrafficManagerBase::GetActionBuffer(), and GetTM().

+ Here is the call graph for this function:

◆ GetNextAction()

Action carla::traffic_manager::TrafficManager::GetNextAction ( const ActorId actor_id)
inline

Method to get the next action.

Definition at line 357 of file TrafficManager.h.

References _port, carla::traffic_manager::TrafficManagerBase::GetNextAction(), and GetTM().

+ Here is the call graph for this function:

◆ GetTM()

TrafficManagerBase* carla::traffic_manager::TrafficManager::GetTM ( uint16_t  port) const
inlineprivate

◆ IsValidPort()

bool carla::traffic_manager::TrafficManager::IsValidPort ( ) const
inline

Definition at line 55 of file TrafficManager.h.

References _port.

◆ operator=() [1/2]

TrafficManager& carla::traffic_manager::TrafficManager::operator= ( const TrafficManager )
default

Referenced by TrafficManager().

+ Here is the caller graph for this function:

◆ operator=() [2/2]

TrafficManager& carla::traffic_manager::TrafficManager::operator= ( TrafficManager &&  )
default

◆ Port()

uint16_t carla::traffic_manager::TrafficManager::Port ( ) const
inline

Definition at line 51 of file TrafficManager.h.

References _port.

◆ RegisterVehicles()

void carla::traffic_manager::TrafficManager::RegisterVehicles ( const std::vector< ActorPtr > &  actor_list)
inline

This method registers a vehicle with the traffic manager.

Definition at line 156 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::RegisterVehicles().

Referenced by carla::client::Vehicle::SetAutopilot().

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

◆ Release()

void carla::traffic_manager::TrafficManager::Release ( )
static

Definition at line 45 of file TrafficManager.cpp.

References _mutex, and _tm_map.

Referenced by carla::client::detail::Episode::OnEpisodeStarted(), and TrafficManager().

+ Here is the caller graph for this function:

◆ RemoveImportedRoute()

void carla::traffic_manager::TrafficManager::RemoveImportedRoute ( const ActorId actor_id,
const bool  remove_path 
)
inline

Method to remove a route.

Definition at line 101 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::RemoveImportedRoute().

+ Here is the call graph for this function:

◆ RemoveUploadPath()

void carla::traffic_manager::TrafficManager::RemoveUploadPath ( const ActorId actor_id,
const bool  remove_path 
)
inline

Method to remove a path.

Definition at line 77 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::RemoveUploadPath().

+ Here is the call graph for this function:

◆ Reset()

void carla::traffic_manager::TrafficManager::Reset ( void  )
static

Definition at line 55 of file TrafficManager.cpp.

References _mutex, and _tm_map.

Referenced by carla::client::detail::Episode::OnEpisodeChanged(), and TrafficManager().

+ Here is the caller graph for this function:

◆ SetAutoLaneChange()

void carla::traffic_manager::TrafficManager::SetAutoLaneChange ( const ActorPtr actor,
const bool  enable 
)
inline

Enable/disable automatic lane change on a vehicle.

Definition at line 241 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetAutoLaneChange().

+ Here is the call graph for this function:

◆ SetBoundariesRespawnDormantVehicles()

void carla::traffic_manager::TrafficManager::SetBoundariesRespawnDormantVehicles ( const float  lower_bound,
const float  upper_bound 
)
inline

Method to set boundaries for respawning vehicles.

Definition at line 124 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetBoundariesRespawnDormantVehicles().

+ Here is the call graph for this function:

◆ SetCollisionDetection()

void carla::traffic_manager::TrafficManager::SetCollisionDetection ( const ActorPtr reference_actor,
const ActorPtr other_actor,
const bool  detect_collision 
)
inline

Method to set collision detection rules between vehicles.

Definition at line 224 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetCollisionDetection().

+ Here is the call graph for this function:

◆ SetCustomPath()

void carla::traffic_manager::TrafficManager::SetCustomPath ( const ActorPtr actor,
const Path  path,
const bool  empty_buffer 
)
inline

Method to set our own imported path.

Definition at line 69 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetCustomPath().

+ Here is the call graph for this function:

◆ SetDesiredSpeed()

void carla::traffic_manager::TrafficManager::SetDesiredSpeed ( const ActorPtr actor,
const float  value 
)
inline

Set a vehicle's exact desired velocity.

Definition at line 190 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetDesiredSpeed().

+ Here is the call graph for this function:

◆ SetDistanceToLeadingVehicle()

void carla::traffic_manager::TrafficManager::SetDistanceToLeadingVehicle ( const ActorPtr actor,
const float  distance 
)
inline

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

Definition at line 250 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetDistanceToLeadingVehicle().

+ Here is the call graph for this function:

◆ SetForceLaneChange()

void carla::traffic_manager::TrafficManager::SetForceLaneChange ( const ActorPtr actor,
const bool  direction 
)
inline

Method to force lane change on a vehicle.

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

Definition at line 233 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetForceLaneChange().

+ Here is the call graph for this function:

◆ SetGlobalDistanceToLeadingVehicle()

void carla::traffic_manager::TrafficManager::SetGlobalDistanceToLeadingVehicle ( const float  distance)
inline

Method to Set Global distance to Leading vehicle.

Definition at line 315 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetGlobalDistanceToLeadingVehicle().

+ Here is the call graph for this function:

◆ SetGlobalLaneOffset()

void carla::traffic_manager::TrafficManager::SetGlobalLaneOffset ( float const  offset)
inline

Method to set a global lane offset displacement from the center line.

Positive values imply a right offset while negative ones mean a left one.

Definition at line 208 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetGlobalLaneOffset().

+ Here is the call graph for this function:

◆ SetGlobalPercentageSpeedDifference()

void carla::traffic_manager::TrafficManager::SetGlobalPercentageSpeedDifference ( float const  percentage)
inline

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

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

Definition at line 199 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetGlobalPercentageSpeedDifference().

+ Here is the call graph for this function:

◆ SetHybridPhysicsMode()

void carla::traffic_manager::TrafficManager::SetHybridPhysicsMode ( const bool  mode_switch)
inline

This method sets the hybrid physics mode.

Definition at line 140 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetHybridPhysicsMode().

+ Here is the call graph for this function:

◆ SetHybridPhysicsRadius()

void carla::traffic_manager::TrafficManager::SetHybridPhysicsRadius ( const float  radius)
inline

This method sets the hybrid physics radius.

Definition at line 148 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetHybridPhysicsRadius().

+ Here is the call graph for this function:

◆ SetImportedRoute()

void carla::traffic_manager::TrafficManager::SetImportedRoute ( const ActorPtr actor,
const Route  route,
const bool  empty_buffer 
)
inline

Method to set our own imported route.

Definition at line 93 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetImportedRoute().

+ Here is the call graph for this function:

◆ SetKeepRightPercentage()

void carla::traffic_manager::TrafficManager::SetKeepRightPercentage ( const ActorPtr actor,
const float  percentage 
)
inline

Method to set % to keep on the right lane.

Definition at line 323 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetKeepRightPercentage().

+ Here is the call graph for this function:

◆ SetLaneOffset()

void carla::traffic_manager::TrafficManager::SetLaneOffset ( const ActorPtr actor,
const float  offset 
)
inline

Method to set a lane offset displacement from the center line.

Positive values imply a right offset while negative ones mean a left one.

Definition at line 182 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetLaneOffset().

+ Here is the call graph for this function:

◆ SetMaxBoundaries()

void carla::traffic_manager::TrafficManager::SetMaxBoundaries ( const float  lower,
const float  upper 
)
inline

Method to set boundaries for respawning vehicles.

Definition at line 132 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetMaxBoundaries().

+ Here is the call graph for this function:

◆ SetOSMMode()

void carla::traffic_manager::TrafficManager::SetOSMMode ( const bool  mode_switch)
inline

Method to set Open Street Map mode.

Definition at line 61 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetOSMMode().

+ Here is the call graph for this function:

◆ SetPercentageIgnoreVehicles()

void carla::traffic_manager::TrafficManager::SetPercentageIgnoreVehicles ( const ActorPtr actor,
const float  perc 
)
inline

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

Definition at line 266 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetPercentageIgnoreVehicles().

+ Here is the call graph for this function:

◆ SetPercentageIgnoreWalkers()

void carla::traffic_manager::TrafficManager::SetPercentageIgnoreWalkers ( const ActorPtr actor,
const float  perc 
)
inline

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

Definition at line 258 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetPercentageIgnoreWalkers().

+ Here is the call graph for this function:

◆ SetPercentageRunningLight()

void carla::traffic_manager::TrafficManager::SetPercentageRunningLight ( const ActorPtr actor,
const float  perc 
)
inline

Method to specify the % chance of running a light.

Definition at line 282 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetPercentageRunningLight().

+ Here is the call graph for this function:

◆ SetPercentageRunningSign()

void carla::traffic_manager::TrafficManager::SetPercentageRunningSign ( const ActorPtr actor,
const float  perc 
)
inline

Method to specify the % chance of running a sign.

Definition at line 274 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetPercentageRunningSign().

+ Here is the call graph for this function:

◆ SetPercentageSpeedDifference()

void carla::traffic_manager::TrafficManager::SetPercentageSpeedDifference ( const ActorPtr actor,
const float  percentage 
)
inline

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

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

Definition at line 173 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetPercentageSpeedDifference().

+ Here is the call graph for this function:

◆ SetRandomDeviceSeed()

void carla::traffic_manager::TrafficManager::SetRandomDeviceSeed ( const uint64_t  seed)
inline

Method to set randomization seed.

Definition at line 347 of file TrafficManager.h.

References _port, GetTM(), carla::traffic_manager::TrafficManagerBase::SetRandomDeviceSeed(), and ShutDown().

+ Here is the call graph for this function:

◆ SetRandomLeftLaneChangePercentage()

void carla::traffic_manager::TrafficManager::SetRandomLeftLaneChangePercentage ( const ActorPtr actor,
const float  percentage 
)
inline

Method to set % to randomly do a left lane change.

Definition at line 331 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetRandomLeftLaneChangePercentage().

+ Here is the call graph for this function:

◆ SetRandomRightLaneChangePercentage()

void carla::traffic_manager::TrafficManager::SetRandomRightLaneChangePercentage ( const ActorPtr actor,
const float  percentage 
)
inline

Method to set % to randomly do a right lane change.

Definition at line 339 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetRandomRightLaneChangePercentage().

+ Here is the call graph for this function:

◆ SetRespawnDormantVehicles()

void carla::traffic_manager::TrafficManager::SetRespawnDormantVehicles ( const bool  mode_switch)
inline

Method to set if we are automatically respawning vehicles.

Definition at line 117 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetRespawnDormantVehicles().

+ Here is the call graph for this function:

◆ SetSynchronousMode()

void carla::traffic_manager::TrafficManager::SetSynchronousMode ( bool  mode)
inline

Method to switch traffic manager into synchronous execution.

Definition at line 290 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetSynchronousMode().

+ Here is the call graph for this function:

◆ SetSynchronousModeTimeOutInMiliSecond()

void carla::traffic_manager::TrafficManager::SetSynchronousModeTimeOutInMiliSecond ( double  time)
inline

Method to set tick timeout for synchronous execution.

Definition at line 298 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetSynchronousModeTimeOutInMiliSecond().

+ Here is the call graph for this function:

◆ SetUpdateVehicleLights()

void carla::traffic_manager::TrafficManager::SetUpdateVehicleLights ( const ActorPtr actor,
const bool  do_update 
)
inline

Set the automatic management of the vehicle lights.

Definition at line 216 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SetUpdateVehicleLights().

+ Here is the call graph for this function:

◆ ShutDown()

void carla::traffic_manager::TrafficManager::ShutDown ( )

Definition at line 69 of file TrafficManager.cpp.

References _mutex, _port, _tm_map, GetTM(), and carla::traffic_manager::TrafficManagerBase::ShutDown().

Referenced by SetRandomDeviceSeed().

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

◆ SynchronousTick()

bool carla::traffic_manager::TrafficManager::SynchronousTick ( )
inline

Method to provide synchronous tick.

Definition at line 306 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::SynchronousTick().

+ Here is the call graph for this function:

◆ Tick()

void carla::traffic_manager::TrafficManager::Tick ( )
static

Definition at line 62 of file TrafficManager.cpp.

References _mutex, and _tm_map.

Referenced by carla::client::detail::SynchronizeFrame(), and TrafficManager().

+ Here is the caller graph for this function:

◆ UnregisterVehicles()

void carla::traffic_manager::TrafficManager::UnregisterVehicles ( const std::vector< ActorPtr > &  actor_list)
inline

This method unregisters a vehicle from traffic manager.

Definition at line 164 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::UnregisterVehicles().

Referenced by carla::client::Vehicle::SetAutopilot().

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

◆ UpdateImportedRoute()

void carla::traffic_manager::TrafficManager::UpdateImportedRoute ( const ActorId actor_id,
const Route  route 
)
inline

Method to update an already set route.

Definition at line 109 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::UpdateImportedRoute().

+ Here is the call graph for this function:

◆ UpdateUploadPath()

void carla::traffic_manager::TrafficManager::UpdateUploadPath ( const ActorId actor_id,
const Path  path 
)
inline

Method to update an already set path.

Definition at line 85 of file TrafficManager.h.

References _port, GetTM(), and carla::traffic_manager::TrafficManagerBase::UpdateUploadPath().

+ Here is the call graph for this function:

Member Data Documentation

◆ _mutex

std::mutex carla::traffic_manager::TrafficManager::_mutex
staticprivate

Definition at line 399 of file TrafficManager.h.

Referenced by GetTM(), Release(), Reset(), ShutDown(), and Tick().

◆ _port

uint16_t carla::traffic_manager::TrafficManager::_port = 0
private

◆ _tm_map

std::map< uint16_t, TrafficManagerBase * > carla::traffic_manager::TrafficManager::_tm_map
staticprivate

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