26 namespace prediction {
43 const std::shared_ptr<const hdmap::LaneInfo> lane_info,
const double s);
52 const std::shared_ptr<const hdmap::LaneInfo> lane_info,
const double s);
60 static double CurvatureOnLane(
const std::string& lane_id,
const double s);
69 const std::shared_ptr<const hdmap::LaneInfo> lane_info,
const double s);
76 static std::shared_ptr<const hdmap::LaneInfo>
LaneById(
const std::string&
id);
83 static std::shared_ptr<const hdmap::JunctionInfo>
JunctionById(
84 const std::string&
id);
91 static std::shared_ptr<const hdmap::OverlapInfo>
OverlapById(
92 const std::string&
id);
103 const std::shared_ptr<const hdmap::LaneInfo> lane_info,
double* s,
114 const double radius);
124 std::shared_ptr<const hdmap::LaneInfo> lane_info,
const double s,
140 const double radius);
151 const std::vector<std::shared_ptr<const hdmap::LaneInfo>>& prev_lanes,
152 const Eigen::Vector2d& point,
const double heading,
const double radius,
153 const bool on_lane,
const int max_num_lane,
154 const double max_lane_angle_diff,
155 std::vector<std::shared_ptr<const hdmap::LaneInfo>>* lanes);
165 static std::shared_ptr<const apollo::hdmap::LaneInfo>
167 const double radius,
const double heading,
168 const double angle_diff_threshold);
199 const double x,
const double y,
200 const std::shared_ptr<const hdmap::JunctionInfo> junction_info_ptr);
217 const std::shared_ptr<const hdmap::LaneInfo> lane_info,
218 const std::string& junction_id);
226 static std::vector<std::shared_ptr<const apollo::hdmap::JunctionInfo>>
235 static std::vector<std::shared_ptr<const apollo::hdmap::PNCJunctionInfo>>
244 static double PathHeading(std::shared_ptr<const hdmap::LaneInfo> lane_info,
245 const common::PointENU& point);
269 const Eigen::Vector2d& point,
const double heading,
const double radius,
270 const std::vector<std::shared_ptr<const hdmap::LaneInfo>>& lanes,
271 const int max_num_lane,
272 std::vector<std::shared_ptr<const hdmap::LaneInfo>>* nearby_lanes);
275 const std::shared_ptr<const hdmap::LaneInfo>& ptr_ego_lane,
279 const std::shared_ptr<const hdmap::LaneInfo>& ptr_ego_lane,
289 const double radius);
298 std::shared_ptr<const hdmap::LaneInfo> target_lane,
299 std::shared_ptr<const hdmap::LaneInfo> curr_lane);
308 std::shared_ptr<const hdmap::LaneInfo> target_lane,
309 const std::vector<std::shared_ptr<const hdmap::LaneInfo>>& lanes);
318 std::shared_ptr<const hdmap::LaneInfo> target_lane,
319 std::shared_ptr<const hdmap::LaneInfo> curr_lane);
328 std::shared_ptr<const hdmap::LaneInfo> target_lane,
329 const std::vector<std::shared_ptr<const hdmap::LaneInfo>>& lanes);
338 std::shared_ptr<const hdmap::LaneInfo> target_lane,
339 std::shared_ptr<const hdmap::LaneInfo> curr_lane);
348 std::shared_ptr<const hdmap::LaneInfo> target_lane,
349 const std::vector<std::shared_ptr<const hdmap::LaneInfo>>& lanes);
358 std::shared_ptr<const hdmap::LaneInfo> target_lane,
359 std::shared_ptr<const hdmap::LaneInfo> curr_lane);
368 std::shared_ptr<const hdmap::LaneInfo> target_lane,
369 const std::vector<std::shared_ptr<const hdmap::LaneInfo>>& lanes);
377 static bool IsIdenticalLane(std::shared_ptr<const hdmap::LaneInfo> other_lane,
378 std::shared_ptr<const hdmap::LaneInfo> curr_lane);
387 std::shared_ptr<const hdmap::LaneInfo> other_lane,
388 const std::vector<std::shared_ptr<const hdmap::LaneInfo>>& lanes);
403 static std::vector<std::shared_ptr<const hdmap::LaneInfo>>
GetNearbyLanes(
404 const common::PointENU& position,
const double nearby_radius);
411 static std::shared_ptr<const hdmap::LaneInfo>
413 const std::vector<std::shared_ptr<const hdmap::LaneInfo>>& lane_infos);
422 const size_t sample_size);
425 static std::shared_ptr<const hdmap::LaneInfo> GetNeighborLane(
426 const std::shared_ptr<const hdmap::LaneInfo>& ptr_ego_lane,
428 const std::vector<std::string>& neighbor_lane_ids,
429 const double threshold);
static bool Ready()
Check if map is ready.
static bool IsPointInJunction(const double x, const double y, const std::shared_ptr< const hdmap::JunctionInfo > junction_info_ptr)
Check if a point with coord x and y is in the junction.
static double LaneTotalWidth(const std::shared_ptr< const hdmap::LaneInfo > lane_info, const double s)
Get the width on a specified distance on a lane.
static bool IsVirtualLane(const std::string &lane_id)
Determine if a lane is a virtual lane.
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
static int LaneTurnType(const std::string &lane_id)
Get lane turn type.
static std::vector< std::shared_ptr< const hdmap::LaneInfo > > GetNearbyLanes(const common::PointENU &position, const double nearby_radius)
Get all nearby lanes within certain radius given a position.
static bool IsProjectionApproximateWithinLane(const Eigen::Vector2d &ego_position, const std::string &lane_id)
Check whether the projection of ego vehicle is on the target lane. Note: the direction of the lane is...
Eigen::Vector2d Vector2d
Definition: base_map_fwd.h:36
static bool IsLaneInJunction(const std::shared_ptr< const hdmap::LaneInfo > lane_info, const std::string &junction_id)
Check if a lane is in a junction.
static void NearbyLanesByCurrentLanes(const Eigen::Vector2d &point, const double heading, const double radius, const std::vector< std::shared_ptr< const hdmap::LaneInfo >> &lanes, const int max_num_lane, std::vector< std::shared_ptr< const hdmap::LaneInfo >> *nearby_lanes)
Get nearby lanes by a position and current lanes.
static bool IsLeftNeighborLane(std::shared_ptr< const hdmap::LaneInfo > target_lane, std::shared_ptr< const hdmap::LaneInfo > curr_lane)
Check if a lane is a left neighbor of another lane.
static Eigen::Vector2d PositionOnLane(const std::shared_ptr< const hdmap::LaneInfo > lane_info, const double s)
Get the position of a point on a specific distance along a lane.
static double PathHeading(std::shared_ptr< const hdmap::LaneInfo > lane_info, const common::PointENU &point)
Get the lane heading on a point.
Definition: prediction_map.h:28
static std::shared_ptr< const hdmap::LaneInfo > GetLeftNeighborLane(const std::shared_ptr< const hdmap::LaneInfo > &ptr_ego_lane, const Eigen::Vector2d &ego_position, const double threshold)
static std::shared_ptr< const hdmap::OverlapInfo > OverlapById(const std::string &id)
Get a shared pointer to an overlap by overlap ID.
static std::shared_ptr< const apollo::hdmap::LaneInfo > GetMostLikelyCurrentLane(const common::PointENU &position, const double radius, const double heading, const double angle_diff_threshold)
Get the lane that the position is on with minimal angle diff.
static double CurvatureOnLane(const std::string &lane_id, const double s)
Get the curvature of a point on a specific distance along a lane.
static bool IsSuccessorLane(std::shared_ptr< const hdmap::LaneInfo > target_lane, std::shared_ptr< const hdmap::LaneInfo > curr_lane)
Check if the target lane is a successor of another lane.
static bool SmoothPointFromLane(const std::string &id, const double s, const double l, Eigen::Vector2d *point, double *heading)
Get the smooth point on a lane by a longitudinal coordinate.
static bool NearJunction(const Eigen::Vector2d &point, const double radius)
Check if there are any junctions within the range centered at a certain point with a radius...
static std::shared_ptr< const hdmap::LaneInfo > LaneWithSmallestAverageCurvature(const std::vector< std::shared_ptr< const hdmap::LaneInfo >> &lane_infos)
Get the pointer to the lane with the smallest average curvature.
static bool ProjectionFromLane(std::shared_ptr< const hdmap::LaneInfo > lane_info, const double s, hdmap::MapPathPoint *path_point)
Get the nearest path point to a longitudinal coordinate on a lane.
static bool HasNearbyLane(const double x, const double y, const double radius)
If there is a lane in the range with radius.
static std::vector< std::shared_ptr< const apollo::hdmap::JunctionInfo > > GetJunctions(const Eigen::Vector2d &point, const double radius)
Get a list of junctions given a point and a search radius.
static bool OnVirtualLane(const Eigen::Vector2d &position, const double radius)
Determine if a point is on a virtual lane.
static std::vector< std::shared_ptr< const apollo::hdmap::PNCJunctionInfo > > GetPNCJunctions(const Eigen::Vector2d &point, const double radius)
Get a list of junctions given a point and a search radius.
static bool IsIdenticalLane(std::shared_ptr< const hdmap::LaneInfo > other_lane, std::shared_ptr< const hdmap::LaneInfo > curr_lane)
Check if two lanes are identical.
static bool IsPredecessorLane(std::shared_ptr< const hdmap::LaneInfo > target_lane, std::shared_ptr< const hdmap::LaneInfo > curr_lane)
Check if the target lane is a predecessor of another lane.
static std::shared_ptr< const hdmap::JunctionInfo > JunctionById(const std::string &id)
Get a shared pointer to a junction by junction ID.
static bool InJunction(const Eigen::Vector2d &point, const double radius)
Check if the obstacle is in a junction.
static double AverageCurvature(const std::string &lane_id, const size_t sample_size)
Get the average curvature along a lane with the ID lane_id.
static std::vector< std::string > NearbyLaneIds(const Eigen::Vector2d &point, const double radius)
Get nearby lanes by a position.
static void OnLane(const std::vector< std::shared_ptr< const hdmap::LaneInfo >> &prev_lanes, const Eigen::Vector2d &point, const double heading, const double radius, const bool on_lane, const int max_num_lane, const double max_lane_angle_diff, std::vector< std::shared_ptr< const hdmap::LaneInfo >> *lanes)
Get the connected lanes from some specified lanes.
static std::shared_ptr< const hdmap::LaneInfo > LaneById(const std::string &id)
Get a shared pointer to a lane by lane ID.
Image< uchar > * threshold(Image< T > *src, int t)
Definition: imutil.h:63
static std::shared_ptr< const hdmap::LaneInfo > GetRightNeighborLane(const std::shared_ptr< const hdmap::LaneInfo > &ptr_ego_lane, const Eigen::Vector2d &ego_position, const double threshold)
static bool IsRightNeighborLane(std::shared_ptr< const hdmap::LaneInfo > target_lane, std::shared_ptr< const hdmap::LaneInfo > curr_lane)
Check if a lane is a right neighbor of another lane.
static bool GetProjection(const Eigen::Vector2d &position, const std::shared_ptr< const hdmap::LaneInfo > lane_info, double *s, double *l)
Get the frenet coordinates (s, l) on a lane by a position.
static double HeadingOnLane(const std::shared_ptr< const hdmap::LaneInfo > lane_info, const double s)
Get the heading of a point on a specific distance along a lane.