24 namespace traffic_manager {
26 using namespace constants::HybridMode;
27 using namespace constants::VehicleRemoval;
29 namespace chr = std::chrono;
34 using ActorMap = std::unordered_map<ActorId, ActorPtr>;
65 double elapsed_last_actor_destruction {0.0};
70 void UpdateIdleTime(std::pair<ActorId, double>& max_idle_time,
const ActorId& actor_id);
73 bool IsVehicleStuck(
const ActorId& actor_id);
76 void IdentifyNewActors(
const ActorList &actor_list);
84 void UpdateRegisteredActorsData(
const bool hybrid_physics_mode,
IdleInfo &max_idle_time);
86 void UpdateData(
const bool hybrid_physics_mode,
const Actor &vehicle,
87 const bool hero_actor_present,
const float physics_radius_square);
89 void UpdateUnregisteredActorsData();
95 std::vector<ActorId>& marked_for_removal,
110 void RemoveActor(
const ActorId actor_id,
const bool registered_actor);
std::pair< ActorId, double > IdleInfo
MotionPlanStage & motion_plan_stage
CollisionStage & collision_stage
std::unordered_map< ActorId, double > IdleTimeMap
std::pair< ActorIdSet, ActorIdSet > DestroyeddActors
std::vector< ActorId > & marked_for_removal
boost::shared_ptr< T > SharedPtr
Use this SharedPtr (boost::shared_ptr) to keep compatibility with boost::python, but it would be nice...
std::shared_ptr< InMemoryMap > LocalMapPtr
This class holds the state of all the vehicles in the simlation.
This file contains definitions of common data structures used in traffic manager. ...
std::unordered_map< carla::ActorId, Buffer > BufferMap
ALSM: Agent Lifecycle and State Managerment This class has functionality to update the local cache of...
VehicleLightStage & vehicle_light_stage
LocalizationStage & localization_stage
std::unordered_map< ActorId, bool > has_physics_enabled
const Parameters & parameters
carla::SharedPtr< cc::Actor > Actor
This class has functionality for responding to traffic lights and managing entry into non-signalized ...
AtomicActorSet & registered_vehicles
TrafficLightStage & traffic_light_stage
SimulationState & simulation_state
const LocalMapPtr & local_map
std::unordered_map< ActorId, ActorPtr > ActorMap
This class has functionality to maintain a horizon of waypoints ahead of the vehicle for it to follow...
ActorMap unregistered_actors
TrackTraffic & track_traffic
carla::SharedPtr< cc::ActorList > ActorList
This class has functionality for turning on/off the vehicle lights according to the current vehicle s...
This class has functionality to detect potential collision with a nearby actor.
cc::Timestamp current_timestamp