The function of this class is to integrate all the various stages of the traffic manager appropriately using messengers. More...
#include <TrafficManagerLocal.h>
Public Member Functions | |
ActionBuffer | GetActionBuffer (const ActorId &actor_id) |
Method to get the vehicle's action buffer. More... | |
carla::client::detail::EpisodeProxy & | GetEpisodeProxy () |
Get CARLA episode information. More... | |
Action | GetNextAction (const ActorId &actor_id) |
Method to get the vehicle's next action. More... | |
std::vector< ActorId > | GetRegisteredVehiclesIDs () |
Get list of all registered vehicles. More... | |
void | RegisterVehicles (const std::vector< ActorPtr > &actor_list) |
This method registers a vehicle with the traffic manager. More... | |
void | Release () |
To release 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 list of points. More... | |
void | Reset () |
To reset the traffic manager. More... | |
void | Run () |
Initiates thread to run the TrafficManager sequentially. 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 to respawn of dormant 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 specify how much distance a vehicle should maintain to the Global 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) |
Method to set a global % decrease in velocity with respect to the speed limit. More... | |
void | SetHybridPhysicsMode (const bool mode_switch) |
Method to set hybrid physics mode. More... | |
void | SetHybridPhysicsRadius (const float radius) |
Method to set 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 limits for boundaries when respawning dormant 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 any traffic light. More... | |
void | SetPercentageRunningSign (const ActorPtr &actor, const float perc) |
Method to specify the % chance of running any traffic sign. More... | |
void | SetPercentageSpeedDifference (const ActorPtr &actor, const float percentage) |
Method to 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 automatic respawn of dormant 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) |
Method to set the automatic management of the vehicle lights. More... | |
void | SetupLocalMap () |
Method to setup InMemoryMap. More... | |
void | ShutDown () |
void | Start () |
To start the TrafficManager. More... | |
void | Stop () |
To stop the TrafficManager. More... | |
bool | SynchronousTick () |
Method to provide synchronous tick. More... | |
TrafficManagerLocal (std::vector< float > longitudinal_PID_parameters, std::vector< float > longitudinal_highway_PID_parameters, std::vector< float > lateral_PID_parameters, std::vector< float > lateral_highway_PID_parameters, float perc_decrease_from_limit, cc::detail::EpisodeProxy &episode_proxy, uint16_t &RPCportTM) | |
Private constructor for singleton lifecycle management. More... | |
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 list of points. More... | |
virtual | ~TrafficManagerLocal () |
Destructor. More... | |
Public Member Functions inherited from carla::traffic_manager::TrafficManagerBase | |
TrafficManagerBase () | |
Protected constructor for singleton lifecycle management. More... | |
virtual | ~TrafficManagerBase () |
Destructor. More... | |
Private Member Functions | |
bool | CheckAllFrozen (TLGroup tl_to_freeze) |
Method to check if all traffic lights are frozen in a group. More... | |
Private Attributes | |
ALSM | alsm |
BufferMap | buffer_map |
Structures to hold waypoint buffers for all vehicles. More... | |
CollisionFrame | collision_frame |
Array to hold output data of collision avoidance. More... | |
CollisionStage | collision_stage |
ControlFrame | control_frame |
Array to hold output data of motion planning. More... | |
uint64_t | current_reserved_capacity {0u} |
Variable to keep track of currently reserved array space for frames. More... | |
carla::client::detail::EpisodeProxy | episode_proxy |
CARLA client connection object. More... | |
std::vector< float > | lateral_highway_PID_parameters |
std::vector< float > | lateral_PID_parameters |
LocalMapPtr | local_map |
Pointer to local map cache. More... | |
LocalizationFrame | localization_frame |
Array to hold output data of localization stage. More... | |
LocalizationStage | localization_stage |
Various stages representing core operations of traffic manager. More... | |
std::vector< float > | longitudinal_highway_PID_parameters |
std::vector< float > | longitudinal_PID_parameters |
PID controller parameters. More... | |
std::vector< ActorId > | marked_for_removal |
MotionPlanStage | motion_plan_stage |
Parameters | parameters |
Parameterization object. More... | |
TimePoint | previous_update_instance |
Time instance used to calculate dt in asynchronous mode. More... | |
RandomGenerator | random_device = RandomGenerator(seed) |
Structure holding random devices per vehicle. More... | |
AtomicActorSet | registered_vehicles |
Set of all actors registered with traffic manager. More... | |
int | registered_vehicles_state |
State counter to track changes in registered actors. More... | |
std::mutex | registration_mutex |
Mutex to prevent vehicle registration during frame array re-allocation. More... | |
std::atomic< bool > | run_traffic_manger {true} |
Switch to turn on / turn off traffic manager. More... | |
uint64_t | seed {static_cast<uint64_t>(time(NULL))} |
Randomization seed. More... | |
TrafficManagerServer | server |
Traffic manager server instance. More... | |
SimulationState | simulation_state |
Type containing the current state of all actors involved in the simulation. More... | |
std::atomic< bool > | step_begin {false} |
Flags to signal step begin and end. More... | |
std::condition_variable | step_begin_trigger |
Condition variables for progressing synchronous execution. More... | |
std::atomic< bool > | step_end {false} |
std::condition_variable | step_end_trigger |
std::mutex | step_execution_mutex |
Mutex for progressing synchronous execution. More... | |
TLFrame | tl_frame |
Array to hold output data of traffic light response. More... | |
TrackTraffic | track_traffic |
Object for tracking paths of the traffic vehicles. More... | |
TrafficLightStage | traffic_light_stage |
std::vector< ActorId > | vehicle_id_list |
List of vehicles registered with the traffic manager in current update cycle. More... | |
VehicleLightStage | vehicle_light_stage |
std::unique_ptr< std::thread > | worker_thread |
Single worker thread for sequential execution of sub-components. More... | |
cc::World | world |
CARLA client and object. More... | |
The function of this class is to integrate all the various stages of the traffic manager appropriately using messengers.
Definition at line 50 of file TrafficManagerLocal.h.
carla::traffic_manager::TrafficManagerLocal::TrafficManagerLocal | ( | std::vector< float > | longitudinal_PID_parameters, |
std::vector< float > | longitudinal_highway_PID_parameters, | ||
std::vector< float > | lateral_PID_parameters, | ||
std::vector< float > | lateral_highway_PID_parameters, | ||
float | perc_decrease_from_limit, | ||
cc::detail::EpisodeProxy & | episode_proxy, | ||
uint16_t & | RPCportTM | ||
) |
Private constructor for singleton lifecycle management.
Definition at line 20 of file TrafficManagerLocal.cpp.
References parameters, registered_vehicles_state, carla::traffic_manager::Parameters::SetGlobalPercentageSpeedDifference(), SetupLocalMap(), and Start().
|
virtual |
Destructor.
Definition at line 111 of file TrafficManagerLocal.cpp.
References episode_proxy, carla::client::detail::EpisodeProxyImpl< PointerT >::Lock(), carla::traffic_manager::TrafficManagerServer::port(), Release(), and server.
|
private |
Method to check if all traffic lights are frozen in a group.
Definition at line 458 of file TrafficManagerLocal.cpp.
References carla::rpc::Red.
|
virtual |
Method to get the vehicle's action buffer.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 454 of file TrafficManagerLocal.cpp.
References carla::traffic_manager::LocalizationStage::ComputeActionBuffer(), and localization_stage.
|
virtual |
Get CARLA episode information.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 480 of file TrafficManagerLocal.cpp.
References episode_proxy.
|
virtual |
Method to get the vehicle's next action.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 450 of file TrafficManagerLocal.cpp.
References carla::traffic_manager::LocalizationStage::ComputeNextAction(), and localization_stage.
std::vector< ActorId > carla::traffic_manager::TrafficManagerLocal::GetRegisteredVehiclesIDs | ( | ) |
Get list of all registered vehicles.
Definition at line 484 of file TrafficManagerLocal.cpp.
References carla::traffic_manager::AtomicActorSet::GetIDList(), and registered_vehicles.
|
virtual |
This method registers a vehicle with the traffic manager.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 316 of file TrafficManagerLocal.cpp.
References carla::traffic_manager::AtomicActorSet::Insert(), registered_vehicles, and registration_mutex.
|
virtual |
To release the traffic manager.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 301 of file TrafficManagerLocal.cpp.
References local_map, and Stop().
Referenced by Reset(), and ~TrafficManagerLocal().
|
virtual |
Method to remove a route.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 430 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::RemoveImportedRoute().
|
virtual |
Method to remove a list of points.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 418 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::RemoveUploadPath().
|
virtual |
To reset the traffic manager.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 308 of file TrafficManagerLocal.cpp.
References episode_proxy, carla::client::detail::EpisodeProxyImpl< PointerT >::Lock(), Release(), SetupLocalMap(), Start(), and world.
void carla::traffic_manager::TrafficManagerLocal::Run | ( | ) |
Initiates thread to run the TrafficManager sequentially.
Definition at line 140 of file TrafficManagerLocal.cpp.
References alsm, carla::traffic_manager::CollisionStage::ClearCycleCache(), collision_frame, collision_stage, control_frame, current_reserved_capacity, episode_proxy, carla::client::Timestamp::frame, carla::traffic_manager::Parameters::GetHybridPhysicsMode(), carla::traffic_manager::AtomicActorSet::GetIDList(), carla::client::World::GetSnapshot(), carla::traffic_manager::AtomicActorSet::GetState(), carla::traffic_manager::Parameters::GetSynchronousMode(), carla::client::WorldSnapshot::GetTimestamp(), carla::traffic_manager::constants::FrameMemory::GROWTH_STEP_SIZE, carla::traffic_manager::constants::HybridMode::HYBRID_MODE_DT, carla::traffic_manager::constants::FrameMemory::INITIAL_SIZE, carla::traffic_manager::constants::FrameMemory::INV_GROWTH_STEP_SIZE, localization_frame, localization_stage, carla::client::detail::EpisodeProxyImpl< PointerT >::Lock(), motion_plan_stage, parameters, previous_update_instance, registered_vehicles, registered_vehicles_state, registration_mutex, run_traffic_manger, carla::traffic_manager::Parameters::SetMaxBoundaries(), carla::traffic_manager::AtomicActorSet::Size(), step_begin, step_begin_trigger, step_end, step_end_trigger, step_execution_mutex, tl_frame, traffic_light_stage, carla::traffic_manager::VehicleLightStage::Update(), carla::traffic_manager::TrafficLightStage::Update(), carla::traffic_manager::LocalizationStage::Update(), carla::traffic_manager::MotionPlanStage::Update(), carla::traffic_manager::CollisionStage::Update(), carla::traffic_manager::ALSM::Update(), carla::traffic_manager::VehicleLightStage::UpdateWorldInfo(), vehicle_id_list, vehicle_light_stage, and world.
Referenced by Start().
|
virtual |
Enable/disable automatic lane change on a vehicle.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 362 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetAutoLaneChange().
|
virtual |
Method to set boundaries to respawn of dormant vehicles.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 442 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetBoundariesRespawnDormantVehicles().
|
virtual |
Method to set collision detection rules between vehicles.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 354 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetCollisionDetection().
|
virtual |
Method to set our own imported path.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 414 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetCustomPath().
|
virtual |
Set a vehicle's exact desired velocity.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 345 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetDesiredSpeed().
|
virtual |
Method to specify how much distance a vehicle should maintain to the leading vehicle.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 366 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetDistanceToLeadingVehicle().
|
virtual |
Method to force lane change on a vehicle.
Direction flag can be set to true for left and false for right.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 358 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetForceLaneChange().
|
virtual |
Method to specify how much distance a vehicle should maintain to the Global leading vehicle.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 370 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetGlobalDistanceToLeadingVehicle().
|
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.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 341 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetGlobalLaneOffset().
|
virtual |
Method to set a global % decrease in velocity with respect to the speed limit.
If less than 0, it's a % increase.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 333 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetGlobalPercentageSpeedDifference().
|
virtual |
Method to set hybrid physics mode.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 402 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetHybridPhysicsMode().
|
virtual |
Method to set hybrid physics radius.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 406 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetHybridPhysicsRadius().
|
virtual |
Method to set our own imported route.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 426 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetImportedRoute().
|
virtual |
Method to set % to keep on the right lane.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 390 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetKeepRightPercentage().
|
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.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 337 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetLaneOffset().
|
virtual |
Method to set limits for boundaries when respawning dormant vehicles.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 446 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetMaxBoundaries().
|
virtual |
Method to set Open Street Map mode.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 410 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetOSMMode().
|
virtual |
Method to specify the % chance of ignoring collisions with any vehicle.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 378 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetPercentageIgnoreVehicles().
|
virtual |
Method to specify the % chance of ignoring collisions with any walker.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 374 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetPercentageIgnoreWalkers().
|
virtual |
Method to specify the % chance of running any traffic light.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 382 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetPercentageRunningLight().
|
virtual |
Method to specify the % chance of running any traffic sign.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 386 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetPercentageRunningSign().
|
virtual |
Method to set a vehicle's % decrease in velocity with respect to the speed limit.
If less than 0, it's a % increase.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 329 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetPercentageSpeedDifference().
|
virtual |
Method to set randomization seed.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 488 of file TrafficManagerLocal.cpp.
References random_device, carla::client::World::ResetAllTrafficLights(), seed, and world.
|
virtual |
Method to set % to randomly do a left lane change.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 394 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetRandomLeftLaneChangePercentage().
|
virtual |
Method to set % to randomly do a right lane change.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 398 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetRandomRightLaneChangePercentage().
|
virtual |
Method to set automatic respawn of dormant vehicles.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 438 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetRespawnDormantVehicles().
|
virtual |
Method to switch traffic manager into synchronous execution.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 467 of file TrafficManagerLocal.cpp.
References carla::traffic_manager::Parameters::GetSynchronousMode(), parameters, carla::traffic_manager::Parameters::SetSynchronousMode(), step_begin, and step_begin_trigger.
|
virtual |
Method to set Tick timeout for synchronous execution.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 476 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetSynchronousModeTimeOutInMiliSecond().
|
virtual |
Method to set the automatic management of the vehicle lights.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 350 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::SetUpdateVehicleLights().
void carla::traffic_manager::TrafficManagerLocal::SetupLocalMap | ( | ) |
Method to setup InMemoryMap.
Definition at line 116 of file TrafficManagerLocal.cpp.
References episode_proxy, carla::client::World::GetMap(), local_map, carla::client::detail::EpisodeProxyImpl< PointerT >::Lock(), carla::log_warning(), and world.
Referenced by Reset(), and TrafficManagerLocal().
|
inlinevirtual |
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 281 of file TrafficManagerLocal.h.
|
virtual |
To start the TrafficManager.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 135 of file TrafficManagerLocal.cpp.
References Run(), run_traffic_manger, and worker_thread.
Referenced by Reset(), and TrafficManagerLocal().
|
virtual |
To stop the TrafficManager.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 263 of file TrafficManagerLocal.cpp.
References buffer_map, carla::traffic_manager::TrackTraffic::Clear(), carla::traffic_manager::AtomicActorSet::Clear(), collision_frame, collision_stage, control_frame, current_reserved_capacity, carla::traffic_manager::Parameters::GetSynchronousMode(), localization_frame, localization_stage, motion_plan_stage, parameters, previous_update_instance, registered_vehicles, registered_vehicles_state, carla::traffic_manager::TrafficLightStage::Reset(), carla::traffic_manager::SimulationState::Reset(), carla::traffic_manager::LocalizationStage::Reset(), carla::traffic_manager::MotionPlanStage::Reset(), carla::traffic_manager::CollisionStage::Reset(), run_traffic_manger, simulation_state, step_begin, step_begin_trigger, step_end, tl_frame, track_traffic, traffic_light_stage, vehicle_id_list, and worker_thread.
Referenced by Release().
|
virtual |
Method to provide synchronous tick.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 251 of file TrafficManagerLocal.cpp.
References carla::traffic_manager::Parameters::GetSynchronousMode(), parameters, step_begin, step_begin_trigger, step_end, step_end_trigger, and step_execution_mutex.
|
virtual |
This method unregisters a vehicle from traffic manager.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 321 of file TrafficManagerLocal.cpp.
References alsm, registration_mutex, and carla::traffic_manager::ALSM::RemoveActor().
|
virtual |
Method to update an already set route.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 434 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::UpdateImportedRoute().
|
virtual |
Method to update an already set list of points.
Implements carla::traffic_manager::TrafficManagerBase.
Definition at line 422 of file TrafficManagerLocal.cpp.
References parameters, and carla::traffic_manager::Parameters::UpdateUploadPath().
|
private |
Definition at line 97 of file TrafficManagerLocal.h.
Referenced by Run(), and UnregisterVehicles().
|
private |
Structures to hold waypoint buffers for all vehicles.
Definition at line 72 of file TrafficManagerLocal.h.
Referenced by Stop().
|
private |
Array to hold output data of collision avoidance.
Definition at line 84 of file TrafficManagerLocal.h.
|
private |
Definition at line 93 of file TrafficManagerLocal.h.
|
private |
Array to hold output data of motion planning.
Definition at line 88 of file TrafficManagerLocal.h.
|
private |
Variable to keep track of currently reserved array space for frames.
Definition at line 90 of file TrafficManagerLocal.h.
|
private |
CARLA client connection object.
Definition at line 59 of file TrafficManagerLocal.h.
Referenced by GetEpisodeProxy(), Reset(), Run(), SetupLocalMap(), and ~TrafficManagerLocal().
|
private |
Definition at line 57 of file TrafficManagerLocal.h.
|
private |
Definition at line 56 of file TrafficManagerLocal.h.
|
private |
Pointer to local map cache.
Definition at line 70 of file TrafficManagerLocal.h.
Referenced by Release(), and SetupLocalMap().
|
private |
Array to hold output data of localization stage.
Definition at line 82 of file TrafficManagerLocal.h.
|
private |
Various stages representing core operations of traffic manager.
Definition at line 92 of file TrafficManagerLocal.h.
Referenced by GetActionBuffer(), GetNextAction(), Run(), and Stop().
|
private |
Definition at line 55 of file TrafficManagerLocal.h.
|
private |
PID controller parameters.
Definition at line 54 of file TrafficManagerLocal.h.
|
private |
Definition at line 116 of file TrafficManagerLocal.h.
|
private |
Definition at line 95 of file TrafficManagerLocal.h.
|
private |
Parameterization object.
Definition at line 80 of file TrafficManagerLocal.h.
Referenced by RemoveImportedRoute(), RemoveUploadPath(), Run(), SetAutoLaneChange(), SetBoundariesRespawnDormantVehicles(), SetCollisionDetection(), SetCustomPath(), SetDesiredSpeed(), SetDistanceToLeadingVehicle(), SetForceLaneChange(), SetGlobalDistanceToLeadingVehicle(), SetGlobalLaneOffset(), SetGlobalPercentageSpeedDifference(), SetHybridPhysicsMode(), SetHybridPhysicsRadius(), SetImportedRoute(), SetKeepRightPercentage(), SetLaneOffset(), SetMaxBoundaries(), SetOSMMode(), SetPercentageIgnoreVehicles(), SetPercentageIgnoreWalkers(), SetPercentageRunningLight(), SetPercentageRunningSign(), SetPercentageSpeedDifference(), SetRandomLeftLaneChangePercentage(), SetRandomRightLaneChangePercentage(), SetRespawnDormantVehicles(), SetSynchronousMode(), SetSynchronousModeTimeOutInMiliSecond(), SetUpdateVehicleLights(), Stop(), SynchronousTick(), TrafficManagerLocal(), UpdateImportedRoute(), and UpdateUploadPath().
|
private |
Time instance used to calculate dt in asynchronous mode.
Definition at line 78 of file TrafficManagerLocal.h.
|
private |
Structure holding random devices per vehicle.
Definition at line 115 of file TrafficManagerLocal.h.
Referenced by SetRandomDeviceSeed().
|
private |
Set of all actors registered with traffic manager.
Definition at line 63 of file TrafficManagerLocal.h.
Referenced by GetRegisteredVehiclesIDs(), RegisterVehicles(), Run(), and Stop().
|
private |
State counter to track changes in registered actors.
Definition at line 65 of file TrafficManagerLocal.h.
Referenced by Run(), Stop(), and TrafficManagerLocal().
|
private |
Mutex to prevent vehicle registration during frame array re-allocation.
Definition at line 118 of file TrafficManagerLocal.h.
Referenced by RegisterVehicles(), Run(), and UnregisterVehicles().
|
private |
Switch to turn on / turn off traffic manager.
Definition at line 101 of file TrafficManagerLocal.h.
|
private |
Randomization seed.
Definition at line 113 of file TrafficManagerLocal.h.
Referenced by SetRandomDeviceSeed().
|
private |
Traffic manager server instance.
Definition at line 99 of file TrafficManagerLocal.h.
Referenced by ~TrafficManagerLocal().
|
private |
Type containing the current state of all actors involved in the simulation.
Definition at line 76 of file TrafficManagerLocal.h.
Referenced by Stop().
|
private |
Flags to signal step begin and end.
Definition at line 103 of file TrafficManagerLocal.h.
Referenced by Run(), SetSynchronousMode(), Stop(), and SynchronousTick().
|
private |
Condition variables for progressing synchronous execution.
Definition at line 108 of file TrafficManagerLocal.h.
Referenced by Run(), SetSynchronousMode(), Stop(), and SynchronousTick().
|
private |
Definition at line 104 of file TrafficManagerLocal.h.
Referenced by Run(), Stop(), and SynchronousTick().
|
private |
Definition at line 109 of file TrafficManagerLocal.h.
Referenced by Run(), and SynchronousTick().
|
private |
Mutex for progressing synchronous execution.
Definition at line 106 of file TrafficManagerLocal.h.
Referenced by Run(), and SynchronousTick().
|
private |
Array to hold output data of traffic light response.
Definition at line 86 of file TrafficManagerLocal.h.
|
private |
Object for tracking paths of the traffic vehicles.
Definition at line 74 of file TrafficManagerLocal.h.
Referenced by Stop().
|
private |
Definition at line 94 of file TrafficManagerLocal.h.
|
private |
List of vehicles registered with the traffic manager in current update cycle.
Definition at line 68 of file TrafficManagerLocal.h.
|
private |
Definition at line 96 of file TrafficManagerLocal.h.
Referenced by Run().
|
private |
Single worker thread for sequential execution of sub-components.
Definition at line 111 of file TrafficManagerLocal.h.
|
private |
CARLA client and object.
Definition at line 61 of file TrafficManagerLocal.h.
Referenced by Reset(), Run(), SetRandomDeviceSeed(), and SetupLocalMap().