22 #include <unordered_map> 28 #include "modules/prediction/proto/feature.pb.h" 31 namespace prediction {
53 const double start_s,
const double length,
const bool consider_lane_split,
54 std::shared_ptr<const apollo::hdmap::LaneInfo> lane_info_ptr);
66 const double start_s,
const double length,
const bool is_on_lane,
67 std::shared_ptr<const apollo::hdmap::LaneInfo> lane_info_ptr);
77 LaneObstacle*
const lane_obstacle);
86 void AddObstacle(
const int obstacle_id,
const std::string& lane_id,
87 const double lane_s,
const double lane_l);
102 const int obstacle_id,
const double obstacle_s,
103 const double obstacle_l,
104 NearbyObstacle*
const nearby_obstacle_ptr);
114 const int obstacle_id,
const double obstacle_s,
115 const double obstacle_l,
116 NearbyObstacle*
const nearby_obstacle_ptr);
125 std::unordered_map<std::string, std::vector<LaneObstacle>>&
127 return lane_obstacles_;
131 std::unordered_map<std::string, std::vector<LaneObstacle>> lane_obstacles_;
132 std::unordered_map<std::string, StopSign> lane_id_stop_sign_map_;
ObstacleClusters()=default
Constructor.
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
bool BackwardNearbyObstacle(const LaneSequence &lane_sequence, const int obstacle_id, const double obstacle_s, const double obstacle_l, NearbyObstacle *const nearby_obstacle_ptr)
Get the backward nearest obstacle on lane sequence at s.
std::unordered_map< std::string, std::vector< LaneObstacle > > & GetLaneObstacles()
Definition: obstacle_clusters.h:126
LaneGraph GetLaneGraphWithoutMemorizing(const double start_s, const double length, const bool is_on_lane, std::shared_ptr< const apollo::hdmap::LaneInfo > lane_info_ptr)
Obtain a lane graph given a lane info and s, but don't memorize it.
Definition: obstacle_clusters.h:33
StopSign QueryStopSignByLaneId(const std::string &lane_id)
Query stop sign by lane ID.
LaneGraph GetLaneGraph(const double start_s, const double length, const bool consider_lane_split, std::shared_ptr< const apollo::hdmap::LaneInfo > lane_info_ptr)
Obtain a lane graph given a lane info and s.
void SortObstacles()
Sort lane obstacles by lane s.
void AddObstacle(const int obstacle_id, const std::string &lane_id, const double lane_s, const double lane_l)
Add an obstacle into clusters.
void Init()
Remove all lane graphs.
bool ForwardNearbyObstacle(const LaneSequence &lane_sequence, const double s, LaneObstacle *const lane_obstacle)
Get the nearest obstacle on lane sequence at s.