/// This file contains definitions of common data structures used in traffic manager. #pragma once #include #include #include #include "carla/client/Actor.h" #include "carla/geom/Location.h" #include "carla/geom/Rotation.h" #include "carla/geom/Vector3D.h" #include "carla/rpc/ActorId.h" #include "carla/rpc/Command.h" #include "carla/rpc/TrafficLightState.h" #include "carla/trafficmanager/SimpleWaypoint.h" namespace carla { namespace traffic_manager { namespace chr = std::chrono; namespace cc = carla::client; namespace cg = carla::geom; using ActorId = carla::ActorId; using ActorPtr = carla::SharedPtr; using JunctionID = carla::road::JuncId; using Junction = carla::SharedPtr; using SimpleWaypointPtr = std::shared_ptr; using Buffer = std::deque; using BufferMap = std::unordered_map; using TimeInstance = chr::time_point; using TLS = carla::rpc::TrafficLightState; struct LocalizationData { SimpleWaypointPtr junction_end_point; SimpleWaypointPtr safe_point; bool is_at_junction_entrance; }; using LocalizationFrame = std::vector; struct CollisionHazardData { float available_distance_margin; ActorId hazard_actor_id; bool hazard; }; using CollisionFrame = std::vector; using ControlFrame = std::vector; using TLFrame = std::vector; /// Structure to hold the actuation signals. struct ActuationSignal { float throttle; float brake; float steer; }; /// Structure to hold the controller state. struct StateEntry { cc::Timestamp time_instance; float angular_deviation; float velocity_deviation; float steer; }; } // namespace traffic_manager } // namespace carla