CARLA
 
载入中...
搜索中...
未找到
Public 成员函数 | Private 属性 | 所有成员列表
carla::traffic_manager::TrafficManagerRemote类 参考

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

#include <TrafficManagerRemote.h>

+ 类 carla::traffic_manager::TrafficManagerRemote 继承关系图:
+ carla::traffic_manager::TrafficManagerRemote 的协作图:

Public 成员函数

ActionBuffer GetActionBuffer (const ActorId &actor_id)
 Method to get the vehicle's action buffer.
 
carla::client::detail::EpisodeProxyGetEpisodeProxy ()
 Get CARLA episode information.
 
Action GetNextAction (const ActorId &actor_id)
 Method to get the vehicle's next action.
 
void HealthCheckRemoteTM ()
 Method to check server is alive or not.
 
void RegisterVehicles (const std::vector< ActorPtr > &actor_list)
 This method registers a vehicle with the traffic manager.
 
void Release ()
 To release the traffic manager.
 
void RemoveImportedRoute (const ActorId &actor_id, const bool remove_path)
 Method to remove a route.
 
void RemoveUploadPath (const ActorId &actor_id, const bool remove_path)
 Method to remove a path.
 
void Reset ()
 To reset the traffic manager.
 
void SetAutoLaneChange (const ActorPtr &actor, const bool enable)
 Enable/disable automatic lane change on a vehicle.
 
void SetBoundariesRespawnDormantVehicles (const float lower_bound, const float upper_bound)
 Method to set boundaries for respawning vehicles.
 
void SetCollisionDetection (const ActorPtr &reference_actor, const ActorPtr &other_actor, const bool detect_collision)
 Method to set collision detection rules between vehicles.
 
void SetCustomPath (const ActorPtr &actor, const Path path, const bool empty_buffer)
 Method to set our own imported path.
 
void SetDesiredSpeed (const ActorPtr &actor, const float value)
 Set a vehicle's exact desired velocity.
 
void SetDistanceToLeadingVehicle (const ActorPtr &actor, const float distance)
 Method to specify how much distance a vehicle should maintain to the leading vehicle.
 
void SetForceLaneChange (const ActorPtr &actor, const bool direction)
 Method to force lane change on a vehicle.
 
void SetGlobalDistanceToLeadingVehicle (const float distance)
 Method to specify Global Distance
 
void SetGlobalLaneOffset (float const offset)
 Method to set a global lane offset displacement from the center line.
 
void SetGlobalPercentageSpeedDifference (float const percentage)
 Method to set a global % decrease in velocity with respect to the speed limit.
 
void SetHybridPhysicsMode (const bool mode_switch)
 Method to set hybrid physics mode.
 
void SetHybridPhysicsRadius (const float radius)
 Method to set hybrid physics radius.
 
void SetImportedRoute (const ActorPtr &actor, const Route route, const bool empty_buffer)
 Method to set our own imported route.
 
void SetKeepRightPercentage (const ActorPtr &actor, const float percentage)
 Method to set % to keep on the right lane.
 
void SetLaneOffset (const ActorPtr &actor, const float offset)
 Method to set a lane offset displacement from the center line.
 
void SetMaxBoundaries (const float lower, const float upper)
 Method to set limits for boundaries when respawning vehicles.
 
void SetOSMMode (const bool mode_switch)
 Method to set Open Street Map mode.
 
void SetPercentageIgnoreVehicles (const ActorPtr &actor, const float perc)
 Method to specify the % chance of ignoring collisions with any vehicle.
 
void SetPercentageIgnoreWalkers (const ActorPtr &actor, const float perc)
 Method to specify the % chance of ignoring collisions with any walker.
 
void SetPercentageRunningLight (const ActorPtr &actor, const float perc)
 Method to specify the % chance of running any traffic light
 
void SetPercentageRunningSign (const ActorPtr &actor, const float perc)
 Method to specify the % chance of running any traffic sign
 
void SetPercentageSpeedDifference (const ActorPtr &actor, const float percentage)
 Method to set a vehicle's % decrease in velocity with respect to the speed limit.
 
void SetRandomDeviceSeed (const uint64_t seed)
 Method to set randomization seed.
 
void SetRandomLeftLaneChangePercentage (const ActorPtr &actor, const float percentage)
 Method to set % to randomly do a left lane change.
 
void SetRandomRightLaneChangePercentage (const ActorPtr &actor, const float percentage)
 Method to set % to randomly do a right lane change.
 
void SetRespawnDormantVehicles (const bool mode_switch)
 Method to set automatic respawn of dormant vehicles.
 
void SetSynchronousMode (bool mode)
 Method to switch traffic manager into synchronous execution.
 
void SetSynchronousModeTimeOutInMiliSecond (double time)
 Method to set Tick timeout for synchronous execution.
 
void SetUpdateVehicleLights (const ActorPtr &actor, const bool do_update)
 Method to set the automatic management of the vehicle lights
 
virtual void ShutDown ()
 
void Start ()
 To start the TrafficManager.
 
void Stop ()
 To stop the TrafficManager.
 
bool SynchronousTick ()
 Method to provide synchronous tick
 
 TrafficManagerRemote (const std::pair< std::string, uint16_t > &_serverTM, carla::client::detail::EpisodeProxy &episodeProxy)
 Constructor store remote location information.
 
void UnregisterVehicles (const std::vector< ActorPtr > &actor_list)
 This method unregisters a vehicle from traffic manager.
 
void UpdateImportedRoute (const ActorId &actor_id, const Route route)
 Method to update an already set route.
 
void UpdateUploadPath (const ActorId &actor_id, const Path path)
 Method to update an already set path.
 
virtual ~TrafficManagerRemote ()
 Destructor.
 
- Public 成员函数 继承自 carla::traffic_manager::TrafficManagerBase
 TrafficManagerBase ()
 Protected constructor for singleton lifecycle management.
 
virtual ~TrafficManagerBase ()
 Destructor.
 

Private 属性

std::condition_variable _cv
 
bool _keep_alive = true
 
std::mutex _mutex
 
TrafficManagerClient client
 Remote client using the IP and port information it connects to as remote RPC traffic manager server.
 
carla::client::detail::EpisodeProxy episodeProxyTM
 CARLA client connection object.
 

详细描述

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

在文件 TrafficManagerRemote.h28 行定义.

构造及析构函数说明

◆ TrafficManagerRemote()

carla::traffic_manager::TrafficManagerRemote::TrafficManagerRemote ( const std::pair< std::string, uint16_t > & _serverTM,
carla::client::detail::EpisodeProxy & episodeProxy )

Constructor store remote location information.

在文件 TrafficManagerRemote.cpp16 行定义.

引用了 Start().

+ 函数调用图:

◆ ~TrafficManagerRemote()

carla::traffic_manager::TrafficManagerRemote::~TrafficManagerRemote ( )
virtual

Destructor.

在文件 TrafficManagerRemote.cpp27 行定义.

引用了 Release().

+ 函数调用图:

成员函数说明

◆ GetActionBuffer()

ActionBuffer carla::traffic_manager::TrafficManagerRemote::GetActionBuffer ( const ActorId & actor_id)
virtual

Method to get the vehicle's action buffer.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp280 行定义.

◆ GetEpisodeProxy()

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

Get CARLA episode information.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp292 行定义.

引用了 episodeProxyTM.

◆ GetNextAction()

Action carla::traffic_manager::TrafficManagerRemote::GetNextAction ( const ActorId & actor_id)
virtual

Method to get the vehicle's next action.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp276 行定义.

◆ HealthCheckRemoteTM()

void carla::traffic_manager::TrafficManagerRemote::HealthCheckRemoteTM ( )

Method to check server is alive or not.

在文件 TrafficManagerRemote.cpp288 行定义.

被这些函数引用 carla::traffic_manager::TrafficManager::CreateTrafficManagerClient().

+ 这是这个函数的调用关系图:

◆ RegisterVehicles()

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

This method registers a vehicle with the traffic manager.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp92 行定义.

◆ Release()

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

To release the traffic manager.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp79 行定义.

引用了 Stop().

被这些函数引用 ~TrafficManagerRemote().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ RemoveImportedRoute()

void carla::traffic_manager::TrafficManagerRemote::RemoveImportedRoute ( const ActorId & actor_id,
const bool remove_path )
virtual

Method to remove a route.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp244 行定义.

◆ RemoveUploadPath()

void carla::traffic_manager::TrafficManagerRemote::RemoveUploadPath ( const ActorId & actor_id,
const bool remove_path )
virtual

Method to remove a path.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp230 行定义.

◆ Reset()

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

To reset the traffic manager.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp83 行定义.

引用了 episodeProxyTM, carla::client::detail::EpisodeProxyImpl< PointerT >::Lock(), Start() , 以及 Stop().

+ 函数调用图:

◆ SetAutoLaneChange()

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

Enable/disable automatic lane change on a vehicle.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp153 行定义.

◆ SetBoundariesRespawnDormantVehicles()

void carla::traffic_manager::TrafficManagerRemote::SetBoundariesRespawnDormantVehicles ( const float lower_bound,
const float upper_bound )
virtual

Method to set boundaries for respawning vehicles.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp256 行定义.

◆ SetCollisionDetection()

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

Method to set collision detection rules between vehicles.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp140 行定义.

◆ SetCustomPath()

void carla::traffic_manager::TrafficManagerRemote::SetCustomPath ( const ActorPtr & actor,
const Path path,
const bool empty_buffer )
virtual

Method to set our own imported path.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp224 行定义.

◆ SetDesiredSpeed()

void carla::traffic_manager::TrafficManagerRemote::SetDesiredSpeed ( const ActorPtr & actor,
const float value )
virtual

Set a vehicle's exact desired velocity.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp114 行定义.

◆ SetDistanceToLeadingVehicle()

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

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

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp159 行定义.

◆ SetForceLaneChange()

void carla::traffic_manager::TrafficManagerRemote::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.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp147 行定义.

◆ SetGlobalDistanceToLeadingVehicle()

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

Method to specify Global Distance

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp165 行定义.

◆ SetGlobalLaneOffset()

void carla::traffic_manager::TrafficManagerRemote::SetGlobalLaneOffset ( float const offset)
virtual

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.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp130 行定义.

◆ SetGlobalPercentageSpeedDifference()

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

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

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

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp120 行定义.

◆ SetHybridPhysicsMode()

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

Method to set hybrid physics mode.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp212 行定义.

◆ SetHybridPhysicsRadius()

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

Method to set hybrid physics radius.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp216 行定义.

◆ SetImportedRoute()

void carla::traffic_manager::TrafficManagerRemote::SetImportedRoute ( const ActorPtr & actor,
const Route route,
const bool empty_buffer )
virtual

Method to set our own imported route.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp238 行定义.

◆ SetKeepRightPercentage()

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

Method to set % to keep on the right lane.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp194 行定义.

◆ SetLaneOffset()

void carla::traffic_manager::TrafficManagerRemote::SetLaneOffset ( const ActorPtr & actor,
const float offset )
virtual

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

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

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp124 行定义.

◆ SetMaxBoundaries()

void carla::traffic_manager::TrafficManagerRemote::SetMaxBoundaries ( const float lower,
const float upper )
virtual

Method to set limits for boundaries when respawning vehicles.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp260 行定义.

◆ SetOSMMode()

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

Method to set Open Street Map mode.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp220 行定义.

◆ SetPercentageIgnoreVehicles()

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

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

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp176 行定义.

◆ SetPercentageIgnoreWalkers()

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

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

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp170 行定义.

◆ SetPercentageRunningLight()

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

Method to specify the % chance of running any traffic light

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp182 行定义.

◆ SetPercentageRunningSign()

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

Method to specify the % chance of running any traffic sign

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp188 行定义.

◆ SetPercentageSpeedDifference()

void carla::traffic_manager::TrafficManagerRemote::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.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp108 行定义.

◆ SetRandomDeviceSeed()

void carla::traffic_manager::TrafficManagerRemote::SetRandomDeviceSeed ( const uint64_t seed)
virtual

Method to set randomization seed.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp296 行定义.

◆ SetRandomLeftLaneChangePercentage()

void carla::traffic_manager::TrafficManagerRemote::SetRandomLeftLaneChangePercentage ( const ActorPtr & actor,
const float percentage )
virtual

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

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp200 行定义.

◆ SetRandomRightLaneChangePercentage()

void carla::traffic_manager::TrafficManagerRemote::SetRandomRightLaneChangePercentage ( const ActorPtr & actor,
const float percentage )
virtual

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

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp206 行定义.

◆ SetRespawnDormantVehicles()

void carla::traffic_manager::TrafficManagerRemote::SetRespawnDormantVehicles ( const bool mode_switch)
virtual

Method to set automatic respawn of dormant vehicles.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp252 行定义.

◆ SetSynchronousMode()

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

Method to switch traffic manager into synchronous execution.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp268 行定义.

◆ SetSynchronousModeTimeOutInMiliSecond()

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

Method to set Tick timeout for synchronous execution.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp272 行定义.

◆ SetUpdateVehicleLights()

void carla::traffic_manager::TrafficManagerRemote::SetUpdateVehicleLights ( const ActorPtr & actor,
const bool do_update )
virtual

Method to set the automatic management of the vehicle lights

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp134 行定义.

◆ ShutDown()

void carla::traffic_manager::TrafficManagerRemote::ShutDown ( )
virtual

◆ Start()

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

To start the TrafficManager.

Until connection active

Create error msg

TSet the error message

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp31 行定义.

引用了 _cv, _keep_alive, episodeProxyTM , 以及 carla::client::detail::EpisodeProxyImpl< PointerT >::Lock().

被这些函数引用 Reset() , 以及 TrafficManagerRemote().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ Stop()

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

To stop the TrafficManager.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp70 行定义.

引用了 _cv, _keep_alive , 以及 _mutex.

被这些函数引用 Release() , 以及 Reset().

+ 这是这个函数的调用关系图:

◆ SynchronousTick()

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

Method to provide synchronous tick

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp284 行定义.

◆ UnregisterVehicles()

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

This method unregisters a vehicle from traffic manager.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp100 行定义.

◆ UpdateImportedRoute()

void carla::traffic_manager::TrafficManagerRemote::UpdateImportedRoute ( const ActorId & actor_id,
const Route route )
virtual

Method to update an already set route.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp248 行定义.

◆ UpdateUploadPath()

void carla::traffic_manager::TrafficManagerRemote::UpdateUploadPath ( const ActorId & actor_id,
const Path path )
virtual

Method to update an already set path.

实现了 carla::traffic_manager::TrafficManagerBase.

在文件 TrafficManagerRemote.cpp234 行定义.

类成员变量说明

◆ _cv

std::condition_variable carla::traffic_manager::TrafficManagerRemote::_cv
private

在文件 TrafficManagerRemote.h187 行定义.

被这些函数引用 Start() , 以及 Stop().

◆ _keep_alive

bool carla::traffic_manager::TrafficManagerRemote::_keep_alive = true
private

在文件 TrafficManagerRemote.h191 行定义.

被这些函数引用 Start() , 以及 Stop().

◆ _mutex

std::mutex carla::traffic_manager::TrafficManagerRemote::_mutex
private

在文件 TrafficManagerRemote.h189 行定义.

被这些函数引用 Stop().

◆ client

TrafficManagerClient carla::traffic_manager::TrafficManagerRemote::client
private

Remote client using the IP and port information it connects to as remote RPC traffic manager server.

在文件 TrafficManagerRemote.h182 行定义.

◆ episodeProxyTM

carla::client::detail::EpisodeProxy carla::traffic_manager::TrafficManagerRemote::episodeProxyTM
private

CARLA client connection object.

在文件 TrafficManagerRemote.h185 行定义.

被这些函数引用 GetEpisodeProxy(), Reset() , 以及 Start().


该类的文档由以下文件生成: