Apollo  6.0
Open source self driving car software
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
apollo::hdmap::Path Class Reference

#include <path.h>

Collaboration diagram for apollo::hdmap::Path:
Collaboration graph

Public Member Functions

 Path ()=default
 
 Path (const std::vector< MapPathPoint > &path_points)
 
 Path (std::vector< MapPathPoint > &&path_points)
 
 Path (std::vector< LaneSegment > &&path_points)
 
 Path (const std::vector< LaneSegment > &path_points)
 
 Path (const std::vector< MapPathPoint > &path_points, const std::vector< LaneSegment > &lane_segments)
 
 Path (std::vector< MapPathPoint > &&path_points, std::vector< LaneSegment > &&lane_segments)
 
 Path (const std::vector< MapPathPoint > &path_points, const std::vector< LaneSegment > &lane_segments, const double max_approximation_error)
 
 Path (std::vector< MapPathPoint > &&path_points, std::vector< LaneSegment > &&lane_segments, const double max_approximation_error)
 
MapPathPoint GetSmoothPoint (const InterpolatedIndex &index) const
 
MapPathPoint GetSmoothPoint (double s) const
 
double GetSFromIndex (const InterpolatedIndex &index) const
 
InterpolatedIndex GetIndexFromS (double s) const
 
InterpolatedIndex GetLaneIndexFromS (double s) const
 
std::vector< hdmap::LaneSegmentGetLaneSegments (const double start_s, const double end_s) const
 
bool GetNearestPoint (const common::math::Vec2d &point, double *accumulate_s, double *lateral) const
 
bool GetNearestPoint (const common::math::Vec2d &point, double *accumulate_s, double *lateral, double *distance) const
 
bool GetProjectionWithHueristicParams (const common::math::Vec2d &point, const double hueristic_start_s, const double hueristic_end_s, double *accumulate_s, double *lateral, double *min_distance) const
 
bool GetProjection (const common::math::Vec2d &point, double *accumulate_s, double *lateral) const
 
bool GetProjection (const common::math::Vec2d &point, double *accumulate_s, double *lateral, double *distance) const
 
bool GetHeadingAlongPath (const common::math::Vec2d &point, double *heading) const
 
int num_points () const
 
int num_segments () const
 
const std::vector< MapPathPoint > & path_points () const
 
const std::vector< LaneSegment > & lane_segments () const
 
const std::vector< LaneSegment > & lane_segments_to_next_point () const
 
const std::vector< common::math::Vec2d > & unit_directions () const
 
const std::vector< double > & accumulated_s () const
 
const std::vector< common::math::LineSegment2d > & segments () const
 
const PathApproximationapproximation () const
 
double length () const
 
const PathOverlapNextLaneOverlap (double s) const
 
const std::vector< PathOverlap > & lane_overlaps () const
 
const std::vector< PathOverlap > & signal_overlaps () const
 
const std::vector< PathOverlap > & yield_sign_overlaps () const
 
const std::vector< PathOverlap > & stop_sign_overlaps () const
 
const std::vector< PathOverlap > & crosswalk_overlaps () const
 
const std::vector< PathOverlap > & junction_overlaps () const
 
const std::vector< PathOverlap > & pnc_junction_overlaps () const
 
const std::vector< PathOverlap > & clear_area_overlaps () const
 
const std::vector< PathOverlap > & speed_bump_overlaps () const
 
const std::vector< PathOverlap > & parking_space_overlaps () const
 
double GetLaneLeftWidth (const double s) const
 
double GetLaneRightWidth (const double s) const
 
bool GetLaneWidth (const double s, double *lane_left_width, double *lane_right_width) const
 
double GetRoadLeftWidth (const double s) const
 
double GetRoadRightWidth (const double s) const
 
bool GetRoadWidth (const double s, double *road_left_width, double *road_ight_width) const
 
bool IsOnPath (const common::math::Vec2d &point) const
 
bool OverlapWith (const common::math::Box2d &box, double width) const
 
std::string DebugString () const
 

Protected Types

using GetOverlapFromLaneFunc = std::function< const std::vector< OverlapInfoConstPtr > &(const LaneInfo &)>
 

Protected Member Functions

void Init ()
 
void InitPoints ()
 
void InitLaneSegments ()
 
void InitWidth ()
 
void InitPointIndex ()
 
void InitOverlaps ()
 
double GetSample (const std::vector< double > &samples, const double s) const
 
void GetAllOverlaps (GetOverlapFromLaneFunc GetOverlaps_from_lane, std::vector< PathOverlap > *const overlaps) const
 

Protected Attributes

int num_points_ = 0
 
int num_segments_ = 0
 
std::vector< MapPathPointpath_points_
 
std::vector< LaneSegmentlane_segments_
 
std::vector< double > lane_accumulated_s_
 
std::vector< LaneSegmentlane_segments_to_next_point_
 
std::vector< common::math::Vec2dunit_directions_
 
double length_ = 0.0
 
std::vector< double > accumulated_s_
 
std::vector< common::math::LineSegment2dsegments_
 
bool use_path_approximation_ = false
 
PathApproximation approximation_
 
int num_sample_points_ = 0
 
std::vector< double > lane_left_width_
 
std::vector< double > lane_right_width_
 
std::vector< double > road_left_width_
 
std::vector< double > road_right_width_
 
std::vector< int > last_point_index_
 
std::vector< PathOverlaplane_overlaps_
 
std::vector< PathOverlapsignal_overlaps_
 
std::vector< PathOverlapyield_sign_overlaps_
 
std::vector< PathOverlapstop_sign_overlaps_
 
std::vector< PathOverlapcrosswalk_overlaps_
 
std::vector< PathOverlapparking_space_overlaps_
 
std::vector< PathOverlapjunction_overlaps_
 
std::vector< PathOverlappnc_junction_overlaps_
 
std::vector< PathOverlapclear_area_overlaps_
 
std::vector< PathOverlapspeed_bump_overlaps_
 

Member Typedef Documentation

◆ GetOverlapFromLaneFunc

using apollo::hdmap::Path::GetOverlapFromLaneFunc = std::function<const std::vector<OverlapInfoConstPtr>&(const LaneInfo&)>
protected

Constructor & Destructor Documentation

◆ Path() [1/9]

apollo::hdmap::Path::Path ( )
default

◆ Path() [2/9]

apollo::hdmap::Path::Path ( const std::vector< MapPathPoint > &  path_points)
explicit

◆ Path() [3/9]

apollo::hdmap::Path::Path ( std::vector< MapPathPoint > &&  path_points)
explicit

◆ Path() [4/9]

apollo::hdmap::Path::Path ( std::vector< LaneSegment > &&  path_points)
explicit

◆ Path() [5/9]

apollo::hdmap::Path::Path ( const std::vector< LaneSegment > &  path_points)
explicit

◆ Path() [6/9]

apollo::hdmap::Path::Path ( const std::vector< MapPathPoint > &  path_points,
const std::vector< LaneSegment > &  lane_segments 
)

◆ Path() [7/9]

apollo::hdmap::Path::Path ( std::vector< MapPathPoint > &&  path_points,
std::vector< LaneSegment > &&  lane_segments 
)

◆ Path() [8/9]

apollo::hdmap::Path::Path ( const std::vector< MapPathPoint > &  path_points,
const std::vector< LaneSegment > &  lane_segments,
const double  max_approximation_error 
)

◆ Path() [9/9]

apollo::hdmap::Path::Path ( std::vector< MapPathPoint > &&  path_points,
std::vector< LaneSegment > &&  lane_segments,
const double  max_approximation_error 
)

Member Function Documentation

◆ accumulated_s()

const std::vector<double>& apollo::hdmap::Path::accumulated_s ( ) const
inline

◆ approximation()

const PathApproximation* apollo::hdmap::Path::approximation ( ) const
inline

◆ clear_area_overlaps()

const std::vector<PathOverlap>& apollo::hdmap::Path::clear_area_overlaps ( ) const
inline

◆ crosswalk_overlaps()

const std::vector<PathOverlap>& apollo::hdmap::Path::crosswalk_overlaps ( ) const
inline

◆ DebugString()

std::string apollo::hdmap::Path::DebugString ( ) const

◆ GetAllOverlaps()

void apollo::hdmap::Path::GetAllOverlaps ( GetOverlapFromLaneFunc  GetOverlaps_from_lane,
std::vector< PathOverlap > *const  overlaps 
) const
protected

◆ GetHeadingAlongPath()

bool apollo::hdmap::Path::GetHeadingAlongPath ( const common::math::Vec2d point,
double *  heading 
) const

◆ GetIndexFromS()

InterpolatedIndex apollo::hdmap::Path::GetIndexFromS ( double  s) const

◆ GetLaneIndexFromS()

InterpolatedIndex apollo::hdmap::Path::GetLaneIndexFromS ( double  s) const

◆ GetLaneLeftWidth()

double apollo::hdmap::Path::GetLaneLeftWidth ( const double  s) const

◆ GetLaneRightWidth()

double apollo::hdmap::Path::GetLaneRightWidth ( const double  s) const

◆ GetLaneSegments()

std::vector<hdmap::LaneSegment> apollo::hdmap::Path::GetLaneSegments ( const double  start_s,
const double  end_s 
) const

◆ GetLaneWidth()

bool apollo::hdmap::Path::GetLaneWidth ( const double  s,
double *  lane_left_width,
double *  lane_right_width 
) const

◆ GetNearestPoint() [1/2]

bool apollo::hdmap::Path::GetNearestPoint ( const common::math::Vec2d point,
double *  accumulate_s,
double *  lateral 
) const

◆ GetNearestPoint() [2/2]

bool apollo::hdmap::Path::GetNearestPoint ( const common::math::Vec2d point,
double *  accumulate_s,
double *  lateral,
double *  distance 
) const

◆ GetProjection() [1/2]

bool apollo::hdmap::Path::GetProjection ( const common::math::Vec2d point,
double *  accumulate_s,
double *  lateral 
) const

◆ GetProjection() [2/2]

bool apollo::hdmap::Path::GetProjection ( const common::math::Vec2d point,
double *  accumulate_s,
double *  lateral,
double *  distance 
) const

◆ GetProjectionWithHueristicParams()

bool apollo::hdmap::Path::GetProjectionWithHueristicParams ( const common::math::Vec2d point,
const double  hueristic_start_s,
const double  hueristic_end_s,
double *  accumulate_s,
double *  lateral,
double *  min_distance 
) const

◆ GetRoadLeftWidth()

double apollo::hdmap::Path::GetRoadLeftWidth ( const double  s) const

◆ GetRoadRightWidth()

double apollo::hdmap::Path::GetRoadRightWidth ( const double  s) const

◆ GetRoadWidth()

bool apollo::hdmap::Path::GetRoadWidth ( const double  s,
double *  road_left_width,
double *  road_ight_width 
) const

◆ GetSample()

double apollo::hdmap::Path::GetSample ( const std::vector< double > &  samples,
const double  s 
) const
protected

◆ GetSFromIndex()

double apollo::hdmap::Path::GetSFromIndex ( const InterpolatedIndex index) const

◆ GetSmoothPoint() [1/2]

MapPathPoint apollo::hdmap::Path::GetSmoothPoint ( const InterpolatedIndex index) const

◆ GetSmoothPoint() [2/2]

MapPathPoint apollo::hdmap::Path::GetSmoothPoint ( double  s) const

◆ Init()

void apollo::hdmap::Path::Init ( )
protected

◆ InitLaneSegments()

void apollo::hdmap::Path::InitLaneSegments ( )
protected

◆ InitOverlaps()

void apollo::hdmap::Path::InitOverlaps ( )
protected

◆ InitPointIndex()

void apollo::hdmap::Path::InitPointIndex ( )
protected

◆ InitPoints()

void apollo::hdmap::Path::InitPoints ( )
protected

◆ InitWidth()

void apollo::hdmap::Path::InitWidth ( )
protected

◆ IsOnPath()

bool apollo::hdmap::Path::IsOnPath ( const common::math::Vec2d point) const

◆ junction_overlaps()

const std::vector<PathOverlap>& apollo::hdmap::Path::junction_overlaps ( ) const
inline

◆ lane_overlaps()

const std::vector<PathOverlap>& apollo::hdmap::Path::lane_overlaps ( ) const
inline

◆ lane_segments()

const std::vector<LaneSegment>& apollo::hdmap::Path::lane_segments ( ) const
inline

◆ lane_segments_to_next_point()

const std::vector<LaneSegment>& apollo::hdmap::Path::lane_segments_to_next_point ( ) const
inline

◆ length()

double apollo::hdmap::Path::length ( ) const
inline

◆ NextLaneOverlap()

const PathOverlap* apollo::hdmap::Path::NextLaneOverlap ( double  s) const

◆ num_points()

int apollo::hdmap::Path::num_points ( ) const
inline

◆ num_segments()

int apollo::hdmap::Path::num_segments ( ) const
inline

◆ OverlapWith()

bool apollo::hdmap::Path::OverlapWith ( const common::math::Box2d box,
double  width 
) const

◆ parking_space_overlaps()

const std::vector<PathOverlap>& apollo::hdmap::Path::parking_space_overlaps ( ) const
inline

◆ path_points()

const std::vector<MapPathPoint>& apollo::hdmap::Path::path_points ( ) const
inline

◆ pnc_junction_overlaps()

const std::vector<PathOverlap>& apollo::hdmap::Path::pnc_junction_overlaps ( ) const
inline

◆ segments()

const std::vector<common::math::LineSegment2d>& apollo::hdmap::Path::segments ( ) const
inline

◆ signal_overlaps()

const std::vector<PathOverlap>& apollo::hdmap::Path::signal_overlaps ( ) const
inline

◆ speed_bump_overlaps()

const std::vector<PathOverlap>& apollo::hdmap::Path::speed_bump_overlaps ( ) const
inline

◆ stop_sign_overlaps()

const std::vector<PathOverlap>& apollo::hdmap::Path::stop_sign_overlaps ( ) const
inline

◆ unit_directions()

const std::vector<common::math::Vec2d>& apollo::hdmap::Path::unit_directions ( ) const
inline

◆ yield_sign_overlaps()

const std::vector<PathOverlap>& apollo::hdmap::Path::yield_sign_overlaps ( ) const
inline

Member Data Documentation

◆ accumulated_s_

std::vector<double> apollo::hdmap::Path::accumulated_s_
protected

◆ approximation_

PathApproximation apollo::hdmap::Path::approximation_
protected

◆ clear_area_overlaps_

std::vector<PathOverlap> apollo::hdmap::Path::clear_area_overlaps_
protected

◆ crosswalk_overlaps_

std::vector<PathOverlap> apollo::hdmap::Path::crosswalk_overlaps_
protected

◆ junction_overlaps_

std::vector<PathOverlap> apollo::hdmap::Path::junction_overlaps_
protected

◆ lane_accumulated_s_

std::vector<double> apollo::hdmap::Path::lane_accumulated_s_
protected

◆ lane_left_width_

std::vector<double> apollo::hdmap::Path::lane_left_width_
protected

◆ lane_overlaps_

std::vector<PathOverlap> apollo::hdmap::Path::lane_overlaps_
protected

◆ lane_right_width_

std::vector<double> apollo::hdmap::Path::lane_right_width_
protected

◆ lane_segments_

std::vector<LaneSegment> apollo::hdmap::Path::lane_segments_
protected

◆ lane_segments_to_next_point_

std::vector<LaneSegment> apollo::hdmap::Path::lane_segments_to_next_point_
protected

◆ last_point_index_

std::vector<int> apollo::hdmap::Path::last_point_index_
protected

◆ length_

double apollo::hdmap::Path::length_ = 0.0
protected

◆ num_points_

int apollo::hdmap::Path::num_points_ = 0
protected

◆ num_sample_points_

int apollo::hdmap::Path::num_sample_points_ = 0
protected

◆ num_segments_

int apollo::hdmap::Path::num_segments_ = 0
protected

◆ parking_space_overlaps_

std::vector<PathOverlap> apollo::hdmap::Path::parking_space_overlaps_
protected

◆ path_points_

std::vector<MapPathPoint> apollo::hdmap::Path::path_points_
protected

◆ pnc_junction_overlaps_

std::vector<PathOverlap> apollo::hdmap::Path::pnc_junction_overlaps_
protected

◆ road_left_width_

std::vector<double> apollo::hdmap::Path::road_left_width_
protected

◆ road_right_width_

std::vector<double> apollo::hdmap::Path::road_right_width_
protected

◆ segments_

std::vector<common::math::LineSegment2d> apollo::hdmap::Path::segments_
protected

◆ signal_overlaps_

std::vector<PathOverlap> apollo::hdmap::Path::signal_overlaps_
protected

◆ speed_bump_overlaps_

std::vector<PathOverlap> apollo::hdmap::Path::speed_bump_overlaps_
protected

◆ stop_sign_overlaps_

std::vector<PathOverlap> apollo::hdmap::Path::stop_sign_overlaps_
protected

◆ unit_directions_

std::vector<common::math::Vec2d> apollo::hdmap::Path::unit_directions_
protected

◆ use_path_approximation_

bool apollo::hdmap::Path::use_path_approximation_ = false
protected

◆ yield_sign_overlaps_

std::vector<PathOverlap> apollo::hdmap::Path::yield_sign_overlaps_
protected

The documentation for this class was generated from the following file: