7 # pragma clang diagnostic push 8 # pragma clang diagnostic ignored "-Wshadow" 10 #include "boost/geometry.hpp" 11 #include "boost/geometry/geometries/geometries.hpp" 12 #include "boost/geometry/geometries/point_xy.hpp" 13 #include "boost/geometry/geometries/polygon.hpp" 14 #if defined(__clang__) 15 # pragma clang diagnostic pop 25 namespace traffic_manager {
42 namespace bg = boost::geometry;
44 using Buffer = std::deque<std::shared_ptr<SimpleWaypoint>>;
45 using BufferMap = std::unordered_map<carla::ActorId, Buffer>;
49 using Polygon = bg::model::polygon<bg::model::d2::point_xy<double>>;
70 std::pair<bool, float> NegotiateCollision(
const ActorId reference_vehicle_id,
72 const uint64_t reference_junction_look_ahead_index);
75 float GetBoundingBoxExtention(
const ActorId actor_id);
102 void Update (
const unsigned long index)
override;
104 void RemoveActor(
const ActorId actor_id)
override;
106 void Reset()
override;
109 void ClearCycleCache();
double initial_lock_distance
CollisionLockMap collision_locks
std::vector< cg::Location > LocationVector
std::unordered_map< ActorId, LocationVector > GeodesicBoundaryMap
double inter_bbox_distance
const BufferMap & buffer_map
GeometryComparisonMap geometry_cache
std::unordered_map< uint64_t, GeometryComparison > GeometryComparisonMap
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< ActorId, CollisionLock > CollisionLockMap
std::deque< std::shared_ptr< SimpleWaypoint > > Buffer
std::unordered_map< carla::ActorId, Buffer > BufferMap
double inter_geodesic_distance
const Parameters & parameters
GeodesicBoundaryMap geodesic_boundary_map
const TrackTraffic & track_traffic
RandomGenerator & random_device
double other_vehicle_to_reference_geodesic
const SimulationState & simulation_state
bg::model::polygon< bg::model::d2::point_xy< double > > Polygon
double distance_to_lead_vehicle
const std::vector< ActorId > & vehicle_id_list
This class has functionality to detect potential collision with a nearby actor.
CollisionFrame & output_array
std::vector< CollisionHazardData > CollisionFrame
double reference_vehicle_to_other_geodesic