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

Provides communication with the rpc of TrafficManagerServer. 更多...

#include <TrafficManagerClient.h>

+ carla::traffic_manager::TrafficManagerClient 的协作图:

Public 成员函数

ActionBuffer GetActionBuffer (const ActorId &actor_id)
 Method to get the vehicle's action buffer.
 
Action GetNextAction (const ActorId &actor_id)
 Method to get the vehicle's next action.
 
void getServerDetails (std::string &_host, uint16_t &_port)
 Get parameters.
 
void HealthCheckRemoteTM ()
 Check if remote traffic manager is alive
 
TrafficManagerClientoperator= (const TrafficManagerClient &)=default
 
TrafficManagerClientoperator= (TrafficManagerClient &&)=default
 
void RegisterVehicle (const std::vector< carla::rpc::Actor > &actor_list)
 Register vehicles to remote traffic manager server via RPC client.
 
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 list of points.
 
void SetAutoLaneChange (const carla::rpc::Actor &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 carla::rpc::Actor &reference_actor, const carla::rpc::Actor &other_actor, const bool detect_collision)
 Method to set collision detection rules between vehicles.
 
void SetCustomPath (const carla::rpc::Actor &actor, const Path path, const bool empty_buffer)
 Method to set our own imported path.
 
void SetDesiredSpeed (const carla::rpc::Actor &_actor, const float value)
 Set a vehicle's exact desired velocity.
 
void SetDistanceToLeadingVehicle (const carla::rpc::Actor &actor, const float distance)
 Method to specify how much distance a vehicle should maintain to the leading vehicle.
 
void SetForceLaneChange (const carla::rpc::Actor &actor, const bool direction)
 Method to force lane change on a vehicle.
 
void SetGlobalDistanceToLeadingVehicle (const float distance)
 Method to specify how much distance a vehicle should maintain to the Global leading vehicle.
 
void SetGlobalLaneOffset (const float offset)
 Method to set a global lane offset displacement from the center line.
 
void SetGlobalPercentageSpeedDifference (const float 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 mode.
 
void SetImportedRoute (const carla::rpc::Actor &actor, const Route route, const bool empty_buffer)
 Method to set our own imported route.
 
void SetKeepRightPercentage (const carla::rpc::Actor &actor, const float percentage)
 Method to set % to keep on the right lane.
 
void SetLaneOffset (const carla::rpc::Actor &_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 boundaries for respawning vehicles.
 
void SetOSMMode (const bool mode_switch)
 Method to set Open Street Map mode.
 
void SetPercentageIgnoreVehicles (const carla::rpc::Actor &actor, const float percentage)
 Method to specify the % chance of ignoring collisions with any vehicle.
 
void SetPercentageIgnoreWalkers (const carla::rpc::Actor &actor, const float percentage)
 Method to specify the % chance of ignoring collisions with any walker.
 
void SetPercentageRunningLight (const carla::rpc::Actor &actor, const float percentage)
 Method to specify the % chance of running a traffic sign.
 
void SetPercentageRunningSign (const carla::rpc::Actor &actor, const float percentage)
 Method to specify the % chance of running any traffic sign.
 
void SetPercentageSpeedDifference (const carla::rpc::Actor &_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 carla::rpc::Actor &actor, const float percentage)
 Method to set % to randomly do a left lane change.
 
void SetRandomRightLaneChangePercentage (const carla::rpc::Actor &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 setServerDetails (const std::string &_host, const uint16_t &_port)
 Set parameters.
 
void SetSynchronousMode (const bool mode)
 Method to switch traffic manager into synchronous execution.
 
void SetSynchronousModeTimeOutInMiliSecond (const double time)
 Method to set tick timeout for synchronous execution.
 
void SetUpdateVehicleLights (const carla::rpc::Actor &_actor, const bool do_update)
 Method to set the automatic management of the vehicle lights
 
void ShutDown ()
 
bool SynchronousTick ()
 Method to provide synchronous tick.
 
 TrafficManagerClient (const std::string &_host, const uint16_t &_port)
 Parametric constructor to initialize the parameters.
 
 TrafficManagerClient (const TrafficManagerClient &)=default
 
 TrafficManagerClient (TrafficManagerClient &&)=default
 
void UnregisterVehicle (const std::vector< carla::rpc::Actor > &actor_list)
 Unregister vehicles to remote traffic manager server via RPC client.
 
void UpdateImportedRoute (const ActorId &actor_id, const Route route)
 Method to update an already set list of points.
 
void UpdateUploadPath (const ActorId &actor_id, const Path path)
 Method to update an already set list of points.
 
 ~TrafficManagerClient ()
 Destructor method.
 

Private 属性

::rpc::client * _client = nullptr
 RPC client.
 
std::string tmhost
 Server port and host.
 
uint16_t tmport
 

详细描述

Provides communication with the rpc of TrafficManagerServer.

在文件 TrafficManagerClient.h21 行定义.

构造及析构函数说明

◆ TrafficManagerClient() [1/3]

carla::traffic_manager::TrafficManagerClient::TrafficManagerClient ( const TrafficManagerClient & )
default

◆ TrafficManagerClient() [2/3]

carla::traffic_manager::TrafficManagerClient::TrafficManagerClient ( TrafficManagerClient && )
default

◆ TrafficManagerClient() [3/3]

carla::traffic_manager::TrafficManagerClient::TrafficManagerClient ( const std::string & _host,
const uint16_t & _port )
inline

Parametric constructor to initialize the parameters.

Create client instance.

在文件 TrafficManagerClient.h32 行定义.

引用了 _client, tmhost , 以及 tmport.

◆ ~TrafficManagerClient()

carla::traffic_manager::TrafficManagerClient::~TrafficManagerClient ( )
inline

Destructor method.

在文件 TrafficManagerClient.h46 行定义.

引用了 _client.

成员函数说明

◆ GetActionBuffer()

ActionBuffer carla::traffic_manager::TrafficManagerClient::GetActionBuffer ( const ActorId & actor_id)
inline

Method to get the vehicle's action buffer.

在文件 TrafficManagerClient.h302 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ GetNextAction()

Action carla::traffic_manager::TrafficManagerClient::GetNextAction ( const ActorId & actor_id)
inline

Method to get the vehicle's next action.

在文件 TrafficManagerClient.h295 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ getServerDetails()

void carla::traffic_manager::TrafficManagerClient::getServerDetails ( std::string & _host,
uint16_t & _port )
inline

Get parameters.

在文件 TrafficManagerClient.h60 行定义.

引用了 tmhost , 以及 tmport.

◆ HealthCheckRemoteTM()

void carla::traffic_manager::TrafficManagerClient::HealthCheckRemoteTM ( )
inline

Check if remote traffic manager is alive

在文件 TrafficManagerClient.h186 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ RegisterVehicle()

void carla::traffic_manager::TrafficManagerClient::RegisterVehicle ( const std::vector< carla::rpc::Actor > & actor_list)
inline

Register vehicles to remote traffic manager server via RPC client.

在文件 TrafficManagerClient.h66 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ RemoveImportedRoute()

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

Method to remove a route.

在文件 TrafficManagerClient.h265 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ RemoveUploadPath()

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

Method to remove a list of points.

在文件 TrafficManagerClient.h247 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetAutoLaneChange()

void carla::traffic_manager::TrafficManagerClient::SetAutoLaneChange ( const carla::rpc::Actor & actor,
const bool enable )
inline

Enable/disable automatic lane change on a vehicle.

在文件 TrafficManagerClient.h131 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetBoundariesRespawnDormantVehicles()

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

Method to set boundaries for respawning vehicles.

在文件 TrafficManagerClient.h283 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetCollisionDetection()

void carla::traffic_manager::TrafficManagerClient::SetCollisionDetection ( const carla::rpc::Actor & reference_actor,
const carla::rpc::Actor & other_actor,
const bool detect_collision )
inline

Method to set collision detection rules between vehicles.

在文件 TrafficManagerClient.h118 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetCustomPath()

void carla::traffic_manager::TrafficManagerClient::SetCustomPath ( const carla::rpc::Actor & actor,
const Path path,
const bool empty_buffer )
inline

Method to set our own imported path.

在文件 TrafficManagerClient.h241 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetDesiredSpeed()

void carla::traffic_manager::TrafficManagerClient::SetDesiredSpeed ( const carla::rpc::Actor & _actor,
const float value )
inline

Set a vehicle's exact desired velocity.

在文件 TrafficManagerClient.h92 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetDistanceToLeadingVehicle()

void carla::traffic_manager::TrafficManagerClient::SetDistanceToLeadingVehicle ( const carla::rpc::Actor & actor,
const float distance )
inline

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

在文件 TrafficManagerClient.h138 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetForceLaneChange()

void carla::traffic_manager::TrafficManagerClient::SetForceLaneChange ( const carla::rpc::Actor & 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.

在文件 TrafficManagerClient.h125 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetGlobalDistanceToLeadingVehicle()

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

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

在文件 TrafficManagerClient.h193 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetGlobalLaneOffset()

void carla::traffic_manager::TrafficManagerClient::SetGlobalLaneOffset ( const float 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.

在文件 TrafficManagerClient.h106 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetGlobalPercentageSpeedDifference()

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

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

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

在文件 TrafficManagerClient.h99 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetHybridPhysicsMode()

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

Method to set hybrid physics mode.

在文件 TrafficManagerClient.h217 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetHybridPhysicsRadius()

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

Method to set hybrid physics mode.

在文件 TrafficManagerClient.h223 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetImportedRoute()

void carla::traffic_manager::TrafficManagerClient::SetImportedRoute ( const carla::rpc::Actor & actor,
const Route route,
const bool empty_buffer )
inline

Method to set our own imported route.

在文件 TrafficManagerClient.h259 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetKeepRightPercentage()

void carla::traffic_manager::TrafficManagerClient::SetKeepRightPercentage ( const carla::rpc::Actor & actor,
const float percentage )
inline

Method to set % to keep on the right lane.

在文件 TrafficManagerClient.h199 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetLaneOffset()

void carla::traffic_manager::TrafficManagerClient::SetLaneOffset ( const carla::rpc::Actor & _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.

在文件 TrafficManagerClient.h86 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetMaxBoundaries()

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

Method to set boundaries for respawning vehicles.

在文件 TrafficManagerClient.h289 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetOSMMode()

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

Method to set Open Street Map mode.

在文件 TrafficManagerClient.h235 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetPercentageIgnoreVehicles()

void carla::traffic_manager::TrafficManagerClient::SetPercentageIgnoreVehicles ( const carla::rpc::Actor & actor,
const float percentage )
inline

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

在文件 TrafficManagerClient.h150 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetPercentageIgnoreWalkers()

void carla::traffic_manager::TrafficManagerClient::SetPercentageIgnoreWalkers ( const carla::rpc::Actor & actor,
const float percentage )
inline

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

在文件 TrafficManagerClient.h144 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetPercentageRunningLight()

void carla::traffic_manager::TrafficManagerClient::SetPercentageRunningLight ( const carla::rpc::Actor & actor,
const float percentage )
inline

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

在文件 TrafficManagerClient.h156 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetPercentageRunningSign()

void carla::traffic_manager::TrafficManagerClient::SetPercentageRunningSign ( const carla::rpc::Actor & actor,
const float percentage )
inline

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

在文件 TrafficManagerClient.h162 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetPercentageSpeedDifference()

void carla::traffic_manager::TrafficManagerClient::SetPercentageSpeedDifference ( const carla::rpc::Actor & _actor,
const float percentage )
inline

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

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

在文件 TrafficManagerClient.h79 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetRandomDeviceSeed()

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

Method to set randomization seed.

在文件 TrafficManagerClient.h229 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetRandomLeftLaneChangePercentage()

void carla::traffic_manager::TrafficManagerClient::SetRandomLeftLaneChangePercentage ( const carla::rpc::Actor & actor,
const float percentage )
inline

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

在文件 TrafficManagerClient.h205 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetRandomRightLaneChangePercentage()

void carla::traffic_manager::TrafficManagerClient::SetRandomRightLaneChangePercentage ( const carla::rpc::Actor & actor,
const float percentage )
inline

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

在文件 TrafficManagerClient.h211 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetRespawnDormantVehicles()

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

Method to set automatic respawn of dormant vehicles.

在文件 TrafficManagerClient.h277 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ setServerDetails()

void carla::traffic_manager::TrafficManagerClient::setServerDetails ( const std::string & _host,
const uint16_t & _port )
inline

Set parameters.

在文件 TrafficManagerClient.h54 行定义.

引用了 tmhost , 以及 tmport.

◆ SetSynchronousMode()

void carla::traffic_manager::TrafficManagerClient::SetSynchronousMode ( const bool mode)
inline

Method to switch traffic manager into synchronous execution.

在文件 TrafficManagerClient.h168 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetSynchronousModeTimeOutInMiliSecond()

void carla::traffic_manager::TrafficManagerClient::SetSynchronousModeTimeOutInMiliSecond ( const double time)
inline

Method to set tick timeout for synchronous execution.

在文件 TrafficManagerClient.h174 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SetUpdateVehicleLights()

void carla::traffic_manager::TrafficManagerClient::SetUpdateVehicleLights ( const carla::rpc::Actor & _actor,
const bool do_update )
inline

Method to set the automatic management of the vehicle lights

在文件 TrafficManagerClient.h112 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ ShutDown()

void carla::traffic_manager::TrafficManagerClient::ShutDown ( )
inline

在文件 TrafficManagerClient.h308 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ SynchronousTick()

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

Method to provide synchronous tick.

在文件 TrafficManagerClient.h180 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ UnregisterVehicle()

void carla::traffic_manager::TrafficManagerClient::UnregisterVehicle ( const std::vector< carla::rpc::Actor > & actor_list)
inline

Unregister vehicles to remote traffic manager server via RPC client.

在文件 TrafficManagerClient.h72 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ UpdateImportedRoute()

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

Method to update an already set list of points.

在文件 TrafficManagerClient.h271 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

◆ UpdateUploadPath()

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

Method to update an already set list of points.

在文件 TrafficManagerClient.h253 行定义.

引用了 _client , 以及 DEBUG_ASSERT.

类成员变量说明

◆ _client

::rpc::client* carla::traffic_manager::TrafficManagerClient::_client = nullptr
private

◆ tmhost

std::string carla::traffic_manager::TrafficManagerClient::tmhost
private

Server port and host.

在文件 TrafficManagerClient.h319 行定义.

被这些函数引用 getServerDetails(), setServerDetails() , 以及 TrafficManagerClient().

◆ tmport

uint16_t carla::traffic_manager::TrafficManagerClient::tmport
private

在文件 TrafficManagerClient.h320 行定义.

被这些函数引用 getServerDetails(), setServerDetails() , 以及 TrafficManagerClient().


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