16namespace traffic_manager {
23using Action = std::pair<RoadOption, WaypointPtr>;
25using Path = std::vector<cg::Location>;
26using Route = std::vector<uint8_t>;
51 const float vehicle_speed,
52 bool force,
bool direction);
55 const bool is_at_junction_entrance,
61 const float horizon_square);
66 const float horizon_square);
79 void Update(
const unsigned long index)
override;
83 void Reset()
override;
This class has functionality to maintain a horizon of waypoints ahead of the vehicle for it to follow...
ActionBuffer ComputeActionBuffer(const ActorId &actor_id)
void ImportRoute(Route &imported_actions, Buffer &waypoint_buffer, const ActorId actor_id, const float horizon_square)
ActorIdSet vehicles_at_junction
LocalizationStage(const std::vector< ActorId > &vehicle_id_list, BufferMap &buffer_map, const SimulationState &simulation_state, TrackTraffic &track_traffic, const LocalMapPtr &local_map, Parameters ¶meters, std::vector< ActorId > &marked_for_removal, LocalizationFrame &output_array, RandomGenerator &random_device)
void ImportPath(Path &imported_path, Buffer &waypoint_buffer, const ActorId actor_id, const float horizon_square)
void ExtendAndFindSafeSpace(const ActorId actor_id, const bool is_at_junction_entrance, Buffer &waypoint_buffer)
Action ComputeNextAction(const ActorId &actor_id)
std::unordered_map< ActorId, SimpleWaypointPair > vehicles_at_junction_entrance
const SimulationState & simulation_state
RandomGenerator & random_device
const std::vector< ActorId > & vehicle_id_list
TrackTraffic & track_traffic
SimpleWaypointPtr AssignLaneChange(const ActorId actor_id, const cg::Location vehicle_location, const float vehicle_speed, bool force, bool direction)
const LocalMapPtr & local_map
LocalizationFrame & output_array
std::vector< ActorId > & marked_for_removal
void Update(const unsigned long index) override
void RemoveActor(const ActorId actor_id) override
std::pair< SimpleWaypointPtr, SimpleWaypointPtr > SimpleWaypointPair
LaneChangeSWptMap last_lane_change_swpt
This class holds the state of all the vehicles in the simlation.
carla::SharedPtr< cc::Waypoint > WaypointPtr
std::vector< uint8_t > Route
std::vector< cg::Location > Path
std::unordered_map< ActorId, SimpleWaypointPtr > LaneChangeSWptMap
std::vector< Action > ActionBuffer
std::deque< std::shared_ptr< SimpleWaypoint > > Buffer
std::shared_ptr< InMemoryMap > LocalMapPtr
std::shared_ptr< SimpleWaypoint > SimpleWaypointPtr
std::pair< RoadOption, WaypointPtr > Action
std::unordered_set< ActorId > ActorIdSet
std::vector< LocalizationData > LocalizationFrame
std::unordered_map< carla::ActorId, Buffer > BufferMap
This file contains definitions of common data structures used in traffic manager.
boost::shared_ptr< T > SharedPtr
Use this SharedPtr (boost::shared_ptr) to keep compatibility with boost::python, but it would be nice...