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