27#include "modules/common_msgs/basic_msgs/pnc_point.pb.h"
28#include "modules/common_msgs/map_msgs/map.pb.h"
29#include "modules/common_msgs/map_msgs/map_geometry.pb.h"
30#include "modules/common_msgs/planning_msgs/sl_boundary.pb.h"
31#include "modules/common_msgs/routing_msgs/routing.pb.h"
44 template <
typename Iterator>
46 : reference_points_(begin, end),
76 const double distance_forward);
78 bool Segment(
const double s,
const double distance_backward,
79 const double distance_forward);
89 std::pair<std::array<double, 3>, std::array<double, 3>>
ToFrenetFrame(
100 const double end_s)
const;
107 const double start_s,
const double end_s,
120 double warm_start_s = -1.0)
const;
123 double warm_start_s = -1.0)
const;
124 bool GetSLBoundary(
const std::vector<common::math::Vec2d>& corners,
125 SLBoundary*
const sl_boundary,
double warm_start_s)
const;
143 double warm_start_s = -1.0)
const;
147 double warm_start_s = -1.0)
const;
150 double hueristic_end_s)
const;
152 template <
class XYPo
int>
157 bool GetLaneWidth(
const double s,
double*
const lane_left_width,
158 double*
const lane_right_width)
const;
162 bool GetRoadWidth(
const double s,
double*
const road_left_width,
163 double*
const road_right_width)
const;
171 std::vector<hdmap::LaneInfoConstPtr>* lanes)
const;
180 template <
class XYPo
int>
215 void AddSpeedLimit(
double start_s,
double end_s,
double speed_limit);
251 static double FindMinDistancePoint(
const ReferencePoint& p0,
const double s0,
253 const double x,
const double y);
257 double start_s = 0.0;
259 double speed_limit = 0.0;
261 SpeedLimit(
double _start_s,
double _end_s,
double _speed_limit)
262 : start_s(_start_s), end_s(_end_s), speed_limit(_speed_limit) {}
267 std::vector<SpeedLimit> speed_limit_;
268 std::vector<ReferencePoint> reference_points_;
269 hdmap::Path map_path_;
270 uint32_t priority_ = 0;
271 common::math::Vec2d ego_position_;
Rectangular (undirected) bounding box in 2-D.
The class of polygon in 2-D.
Implements a class of 2-dimensional vectors.
const hdmap::Path & GetMapPath() const
bool GetApproximateSLBoundary(const common::math::Box2d &box, const double start_s, const double end_s, SLBoundary *const sl_boundary) const
bool IsOnRoad(const common::SLPoint &sl_point) const
: check if a box/point is on road (not on sideways/medians) along reference line
uint32_t GetPriority() const
bool Segment(const common::math::Vec2d &point, const double distance_backward, const double distance_forward)
std::string DebugString() const
const hdmap::Path & map_path() const
bool IsOnLane(const common::SLPoint &sl_point) const
: check if a box/point is on lane along reference line
void AddSpeedLimit(double start_s, double end_s, double speed_limit)
void GetLaneBoundaryType(const double s, hdmap::LaneBoundaryType::Type *const left_boundary_type, hdmap::LaneBoundaryType::Type *const right_boundary_type) const
ReferencePoint GetReferencePoint(const double s) const
std::vector< hdmap::LaneSegment > GetLaneSegments(const double start_s, const double end_s) const
void SetEgoPosition(common::math::Vec2d ego_pos)
std::pair< std::array< double, 3 >, std::array< double, 3 > > ToFrenetFrame(const common::TrajectoryPoint &traj_point) const
bool XYToSL(const XYPoint &xy, common::SLPoint *const sl_point) const
double GetDrivingWidth(const SLBoundary &sl_boundary) const
bool IsOnLane(const XYPoint &xy) const
size_t GetNearestReferenceIndex(const double s) const
bool GetSLBoundary(const common::math::Box2d &box, SLBoundary *const sl_boundary, double warm_start_s=-1.0) const
Get the SL Boundary of the box.
bool Stitch(const ReferenceLine &other)
Stitch current reference line with the other reference line The stitching strategy is to use current ...
void SetPriority(uint32_t priority)
bool GetRoadWidth(const double s, double *const road_left_width, double *const road_right_width) const
void GetLaneFromS(const double s, std::vector< hdmap::LaneInfoConstPtr > *lanes) const
bool SLToXY(const common::SLPoint &sl_point, common::math::Vec2d *const xy_point) const
ReferenceLine(const ReferenceLine &reference_line)=default
bool XYToSL(const common::math::Vec2d &xy_point, common::SLPoint *const sl_point, double warm_start_s=-1.0) const
Transvert Cartesian coordinates to Frenet.
std::vector< ReferencePoint > GetReferencePoints(double start_s, double end_s) const
hdmap::Road::Type GetRoadType(const double s) const
ReferencePoint GetNearestReferencePoint(const common::math::Vec2d &xy) const
bool HasOverlap(const common::math::Box2d &box) const
check if any part of the box has overlap with the road.
common::FrenetFramePoint GetFrenetPoint(const common::PathPoint &path_point) const
double GetSpeedLimitFromS(const double s) const
bool IsBlockRoad(const common::math::Box2d &box2d, double gap) const
Check if a box is blocking the road surface.
bool GetLaneWidth(const double s, double *const lane_left_width, double *const lane_right_width) const
const std::vector< ReferencePoint > & reference_points() const
bool GetOffsetToMap(const double s, double *l_offset) const
ReferenceLine(const Iterator begin, const Iterator end)
Planning module main class.