CARLA
Loading...
Searching...
No Matches
Public Member Functions | List of all members
carla::traffic_manager::TrafficManagerBase Class Referenceabstract

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

#include <TrafficManagerBase.h>

+ Inheritance diagram for carla::traffic_manager::TrafficManagerBase:

Public Member Functions

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

Detailed Description

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

Definition at line 26 of file TrafficManagerBase.h.

Constructor & Destructor Documentation

◆ TrafficManagerBase()

carla::traffic_manager::TrafficManagerBase::TrafficManagerBase ( )
inline

Protected constructor for singleton lifecycle management.

Definition at line 42 of file TrafficManagerBase.h.

◆ ~TrafficManagerBase()

virtual carla::traffic_manager::TrafficManagerBase::~TrafficManagerBase ( )
inlinevirtual

Destructor.

Definition at line 45 of file TrafficManagerBase.h.

Member Function Documentation

◆ GetActionBuffer()

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

◆ GetEpisodeProxy()

virtual carla::client::detail::EpisodeProxy & carla::traffic_manager::TrafficManagerBase::GetEpisodeProxy ( )
pure virtual

◆ GetNextAction()

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

◆ RegisterVehicles()

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

◆ Release()

virtual void carla::traffic_manager::TrafficManagerBase::Release ( )
pure virtual

◆ RemoveImportedRoute()

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

◆ RemoveUploadPath()

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

◆ Reset()

virtual void carla::traffic_manager::TrafficManagerBase::Reset ( uint64_t  episode_id)
pure virtual

To reset the traffic manager for the episode episode_id.

Implemented in carla::traffic_manager::TrafficManagerLocal, and carla::traffic_manager::TrafficManagerRemote.

◆ SetAutoLaneChange()

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

◆ SetBoundariesRespawnDormantVehicles()

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

◆ SetCollisionDetection()

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

◆ SetCustomPath()

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

◆ SetDesiredSpeed()

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

◆ SetDistanceToLeadingVehicle()

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

◆ SetForceLaneChange()

virtual void carla::traffic_manager::TrafficManagerBase::SetForceLaneChange ( const ActorPtr &  actor,
const bool  direction 
)
pure virtual

Method to force lane change on a vehicle.

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

Implemented in carla::traffic_manager::TrafficManagerLocal, and carla::traffic_manager::TrafficManagerRemote.

Referenced by carla::traffic_manager::TrafficManager::SetForceLaneChange(), and carla::traffic_manager::TrafficManagerServer::TrafficManagerServer().

◆ SetGlobalDistanceToLeadingVehicle()

virtual void carla::traffic_manager::TrafficManagerBase::SetGlobalDistanceToLeadingVehicle ( const float  dist)
pure virtual

◆ SetGlobalLaneOffset()

virtual void carla::traffic_manager::TrafficManagerBase::SetGlobalLaneOffset ( float const  offset)
pure 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.

Implemented in carla::traffic_manager::TrafficManagerLocal, and carla::traffic_manager::TrafficManagerRemote.

Referenced by carla::traffic_manager::TrafficManager::SetGlobalLaneOffset(), and carla::traffic_manager::TrafficManagerServer::TrafficManagerServer().

◆ SetGlobalLargeVehicleWideTurn()

virtual void carla::traffic_manager::TrafficManagerBase::SetGlobalLargeVehicleWideTurn ( const bool  enable)
pure virtual

◆ SetGlobalPercentageSpeedDifference()

virtual void carla::traffic_manager::TrafficManagerBase::SetGlobalPercentageSpeedDifference ( float const  percentage)
pure virtual

◆ SetHybridPhysicsMode()

virtual void carla::traffic_manager::TrafficManagerBase::SetHybridPhysicsMode ( const bool  mode_switch)
pure virtual

◆ SetHybridPhysicsRadius()

virtual void carla::traffic_manager::TrafficManagerBase::SetHybridPhysicsRadius ( const float  radius)
pure virtual

◆ SetImportedRoute()

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

◆ SetKeepSlowLanePercentage()

virtual void carla::traffic_manager::TrafficManagerBase::SetKeepSlowLanePercentage ( const ActorPtr &  actor,
const float  percentage 
)
pure virtual

◆ SetLaneOffset()

virtual void carla::traffic_manager::TrafficManagerBase::SetLaneOffset ( const ActorPtr &  actor,
const float  offset 
)
pure 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.

Implemented in carla::traffic_manager::TrafficManagerLocal, and carla::traffic_manager::TrafficManagerRemote.

Referenced by carla::traffic_manager::TrafficManager::SetLaneOffset(), and carla::traffic_manager::TrafficManagerServer::TrafficManagerServer().

◆ SetLargeVehicleWideTurn()

virtual void carla::traffic_manager::TrafficManagerBase::SetLargeVehicleWideTurn ( const ActorPtr &  actor,
const bool  enable 
)
pure virtual

◆ SetMaxBoundaries()

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

Method to set limits for boundaries when respawning vehicles.

Implemented in carla::traffic_manager::TrafficManagerLocal, and carla::traffic_manager::TrafficManagerRemote.

Referenced by carla::traffic_manager::TrafficManager::SetMaxBoundaries().

◆ SetOSMMode()

virtual void carla::traffic_manager::TrafficManagerBase::SetOSMMode ( const bool  mode_switch)
pure virtual

◆ SetPercentageIgnoreVehicles()

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

◆ SetPercentageIgnoreWalkers()

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

◆ SetPercentageRunningLight()

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

◆ SetPercentageRunningSign()

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

◆ SetPercentageSpeedDifference()

virtual void carla::traffic_manager::TrafficManagerBase::SetPercentageSpeedDifference ( const ActorPtr &  actor,
const float  percentage 
)
pure virtual

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

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

Implemented in carla::traffic_manager::TrafficManagerLocal, and carla::traffic_manager::TrafficManagerRemote.

Referenced by carla::traffic_manager::TrafficManager::SetPercentageSpeedDifference(), and carla::traffic_manager::TrafficManagerServer::TrafficManagerServer().

◆ SetRandomDeviceSeed()

virtual void carla::traffic_manager::TrafficManagerBase::SetRandomDeviceSeed ( const uint64_t  seed)
pure virtual

◆ SetRandomLeftLaneChangePercentage()

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

◆ SetRandomRightLaneChangePercentage()

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

◆ SetRespawnDormantVehicles()

virtual void carla::traffic_manager::TrafficManagerBase::SetRespawnDormantVehicles ( const bool  mode_switch)
pure virtual

◆ SetSynchronousMode()

virtual void carla::traffic_manager::TrafficManagerBase::SetSynchronousMode ( bool  mode)
pure virtual

◆ SetSynchronousModeTimeOutInMiliSecond()

virtual void carla::traffic_manager::TrafficManagerBase::SetSynchronousModeTimeOutInMiliSecond ( double  time)
pure virtual

◆ SetUpdateVehicleLights()

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

◆ ShutDown()

virtual void carla::traffic_manager::TrafficManagerBase::ShutDown ( )
pure virtual

◆ Start()

virtual void carla::traffic_manager::TrafficManagerBase::Start ( )
pure virtual

◆ Stop()

virtual void carla::traffic_manager::TrafficManagerBase::Stop ( )
pure virtual

◆ SynchronousTick()

virtual bool carla::traffic_manager::TrafficManagerBase::SynchronousTick ( )
pure virtual

◆ UnregisterVehicles()

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

◆ UpdateImportedRoute()

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

◆ UpdateUploadPath()

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

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