18#include <unordered_map>
51 using XYZKey = std::tuple<double, double, double>;
57 std::vector<SharedPtr<client::Waypoint>>
path;
69 std::array<double, 3>
vertex{{0.0, 0.0, 0.0}};
78 std::vector<SharedPtr<client::Waypoint>>
path;
92 std::pair<std::optional<NodeId>,
const Edge *>
94 const std::vector<NodeId> &route)
const;
96 const std::vector<NodeId> &route);
C++ port of agents.navigation.global_route_planner.GlobalRoutePlanner.
std::tuple< double, double, double > XYZKey
double DistanceHeuristic(NodeId a, NodeId b) const
std::pair< SharedPtr< client::Waypoint >, RoadOption > RouteItem
NodeId _intersection_end_node
RoadOption TurnDecision(std::size_t index, const std::vector< NodeId > &route)
std::map< std::pair< NodeId, NodeId >, Edge > _edges
double _sampling_resolution
std::vector< RouteItem > TraceRoute(const geom::Location &origin, const geom::Location &destination)
Returns the list of (waypoint, RoadOption) pairs from origin to destination.
std::unordered_map< NodeId, Node > _nodes
static std::size_t FindClosestInList(const SharedPtr< client::Waypoint > ¤t, const std::vector< SharedPtr< client::Waypoint > > &list)
const Edge * FindEdge(NodeId n1, NodeId n2) const
std::map< XYZKey, NodeId > _id_map
std::map< uint32_t, std::map< uint32_t, std::map< int32_t, std::pair< NodeId, NodeId > > > > _road_id_to_edge
NodeId GetOrCreateNode(const XYZKey &key)
std::pair< std::optional< NodeId >, const Edge * > SuccessiveLastIntersectionEdge(std::size_t index, const std::vector< NodeId > &route) const
Edge & AddEdge(NodeId n1, NodeId n2)
RoadOption _previous_decision
std::optional< std::pair< NodeId, NodeId > > Localize(const geom::Location &loc) const
SharedPtr< client::Map > _map
std::vector< TopologySegment > _topology
std::vector< NodeId > PathSearch(const geom::Location &origin, const geom::Location &destination)
RoadOption
Topological direction emitted by the planners.
This file contains definitions of common data structures used in traffic manager.
std::shared_ptr< T > SharedPtr
SharedPtr< client::Waypoint > change_waypoint
std::optional< geom::Vector3D > net_vector
std::optional< geom::Vector3D > entry_vector
SharedPtr< client::Waypoint > entry_waypoint
std::vector< SharedPtr< client::Waypoint > > path
std::optional< geom::Vector3D > exit_vector
SharedPtr< client::Waypoint > exit_waypoint
std::vector< NodeId > successors
std::array< double, 3 > vertex
SharedPtr< client::Waypoint > exit
std::vector< SharedPtr< client::Waypoint > > path
SharedPtr< client::Waypoint > entry