Apollo 10.0
自动驾驶开放平台
apollo::hdmap::Path类 参考

#include <path.h>

apollo::hdmap::Path 的协作图:

Public 成员函数

 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 double heading, const common::math::Vec2d &point, double *accumulate_s, double *lateral) const
 
bool GetProjectionWithWarmStartS (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 GetProjection (const common::math::Vec2d &point, const double heading, 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
 
const std::vector< PathOverlap > & dead_end_overlaps () const
 
const std::vector< PathOverlap > & area_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 类型

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

Protected 成员函数

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 属性

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< PathOverlapdead_end_overlaps_
 
std::vector< PathOverlapjunction_overlaps_
 
std::vector< PathOverlappnc_junction_overlaps_
 
std::vector< PathOverlapclear_area_overlaps_
 
std::vector< PathOverlapspeed_bump_overlaps_
 
std::vector< PathOverlaparea_overlaps_
 

详细描述

在文件 path.h214 行定义.

成员类型定义说明

◆ GetOverlapFromLaneFunc

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

在文件 path.h360 行定义.

构造及析构函数说明

◆ Path() [1/9]

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

◆ Path() [2/9]

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

在文件 path.cc284 行定义.

286 Init();
287}
std::vector< MapPathPoint > path_points_
Definition path.h:368
const std::vector< MapPathPoint > & path_points() const
Definition path.h:279

◆ Path() [3/9]

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

在文件 path.cc289 行定义.

290 : path_points_(std::move(path_points)) {
291 Init();
292}

◆ Path() [4/9]

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

在文件 path.cc330 行定义.

331 : lane_segments_(std::move(segments)) {
332 for (const auto& segment : lane_segments_) {
333 const auto points = MapPathPoint::GetPointsFromLane(
334 segment.lane, segment.start_s, segment.end_s);
335 path_points_.insert(path_points_.end(), points.begin(), points.end());
336 }
338 CHECK_GE(path_points_.size(), 2U);
339 Init();
340}
static void RemoveDuplicates(std::vector< MapPathPoint > *points)
Definition path.cc:241
static std::vector< MapPathPoint > GetPointsFromLane(LaneInfoConstPtr lane, const double start_s, const double end_s)
Definition path.cc:206
const std::vector< common::math::LineSegment2d > & segments() const
Definition path.h:290
std::vector< LaneSegment > lane_segments_
Definition path.h:369

◆ Path() [5/9]

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

在文件 path.cc318 行定义.

320 for (const auto& segment : lane_segments_) {
321 const auto points = MapPathPoint::GetPointsFromLane(
322 segment.lane, segment.start_s, segment.end_s);
323 path_points_.insert(path_points_.end(), points.begin(), points.end());
324 }
326 CHECK_GE(path_points_.size(), 2U);
327 Init();
328}

◆ Path() [6/9]

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

在文件 path.cc294 行定义.

297 Init();
298}
const std::vector< LaneSegment > & lane_segments() const
Definition path.h:280

◆ Path() [7/9]

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

在文件 path.cc300 行定义.

302 : path_points_(std::move(path_points)),
303 lane_segments_(std::move(lane_segments)) {
304 Init();
305}

◆ 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.cc307 行定义.

311 Init();
312 if (max_approximation_error > 0.0) {
314 approximation_ = PathApproximation(*this, max_approximation_error);
315 }
316}
bool use_path_approximation_
Definition path.h:376
PathApproximation approximation_
Definition path.h:377

◆ Path() [9/9]

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

在文件 path.cc342 行定义.

345 : path_points_(std::move(path_points)),
346 lane_segments_(std::move(lane_segments)) {
347 Init();
348 if (max_approximation_error > 0.0) {
350 approximation_ = PathApproximation(*this, max_approximation_error);
351 }
352}

成员函数说明

◆ accumulated_s()

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

在文件 path.h289 行定义.

289{ return accumulated_s_; }
std::vector< double > accumulated_s_
Definition path.h:374

◆ approximation()

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

在文件 path.h293 行定义.

293{ return &approximation_; }

◆ area_overlaps()

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

在文件 path.h331 行定义.

331 {
332 return area_overlaps_;
333 }
std::vector< PathOverlap > area_overlaps_
Definition path.h:398

◆ clear_area_overlaps()

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

在文件 path.h319 行定义.

319 {
321 }
std::vector< PathOverlap > clear_area_overlaps_
Definition path.h:396

◆ crosswalk_overlaps()

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

在文件 path.h310 行定义.

310 {
311 return crosswalk_overlaps_;
312 }
std::vector< PathOverlap > crosswalk_overlaps_
Definition path.h:391

◆ dead_end_overlaps()

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

在文件 path.h328 行定义.

328 {
329 return dead_end_overlaps_;
330 }
std::vector< PathOverlap > dead_end_overlaps_
Definition path.h:393

◆ DebugString()

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

在文件 path.cc266 行定义.

266 {
267 return absl::StrCat(
268 "num_points = ", num_points_,
269 " points = "
270 "{(",
271 absl::StrJoin(path_points_, "), (", DebugStringFormatter()),
272 ")} "
273 "numlane_segments_ = ",
274 lane_segments_.size(),
275 " lane_segments = "
276 "{(",
277 absl::StrJoin(lane_segments_, "), (", DebugStringFormatter()), ")}");
278}

◆ GetAllOverlaps()

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

在文件 path.cc504 行定义.

505 {
506 if (overlaps == nullptr) {
507 return;
508 }
509 overlaps->clear();
510 std::unordered_map<std::string, std::vector<std::pair<double, double>>>
511 overlaps_by_id;
512 double s = 0.0;
513 for (const auto& lane_segment : lane_segments_) {
514 if (lane_segment.lane == nullptr) {
515 continue;
516 }
517 for (const auto& overlap : GetOverlaps_from_lane(*(lane_segment.lane))) {
518 const auto& overlap_info =
519 overlap->GetObjectOverlapInfo(lane_segment.lane->id());
520 if (overlap_info == nullptr) {
521 continue;
522 }
523
524 const auto& lane_overlap_info = overlap_info->lane_overlap_info();
525 if (lane_overlap_info.start_s() <= lane_segment.end_s &&
526 lane_overlap_info.end_s() >= lane_segment.start_s) {
527 const double ref_s = s - lane_segment.start_s;
528 const double adjusted_start_s =
529 std::max(lane_overlap_info.start_s(), lane_segment.start_s) + ref_s;
530 const double adjusted_end_s =
531 std::min(lane_overlap_info.end_s(), lane_segment.end_s) + ref_s;
532 for (const auto& object : overlap->overlap().object()) {
533 if (object.id().id() != lane_segment.lane->id().id()) {
534 overlaps_by_id[object.id().id()].emplace_back(adjusted_start_s,
535 adjusted_end_s);
536 }
537 }
538 }
539 }
540 s += lane_segment.end_s - lane_segment.start_s;
541 }
542 for (auto& overlaps_one_object : overlaps_by_id) {
543 const std::string& object_id = overlaps_one_object.first;
544 auto& segments = overlaps_one_object.second;
545 std::sort(segments.begin(), segments.end());
546
547 const double kMinOverlapDistanceGap = 1.5; // in meters.
548 for (const auto& segment : segments) {
549 if (!overlaps->empty() && overlaps->back().object_id == object_id &&
550 segment.first - overlaps->back().end_s <= kMinOverlapDistanceGap) {
551 overlaps->back().end_s =
552 std::max(overlaps->back().end_s, segment.second);
553 } else {
554 overlaps->emplace_back(object_id, segment.first, segment.second);
555 }
556 }
557 }
558 std::sort(overlaps->begin(), overlaps->end(),
559 [](const PathOverlap& overlap1, const PathOverlap& overlap2) {
560 return overlap1.start_s < overlap2.start_s;
561 });
562}

◆ GetHeadingAlongPath()

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

在文件 path.cc960 行定义.

960 {
961 if (heading == nullptr) {
962 return false;
963 }
964 double s = 0;
965 double l = 0;
966 if (GetProjection(point, &s, &l)) {
967 *heading = GetSmoothPoint(s).heading();
968 return true;
969 }
970 return false;
971}
double heading() const
Definition path.h:118
bool GetProjection(const common::math::Vec2d &point, double *accumulate_s, double *lateral) const
Definition path.cc:739
MapPathPoint GetSmoothPoint(const InterpolatedIndex &index) const
Definition path.cc:591

◆ GetIndexFromS()

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

在文件 path.cc638 行定义.

638 {
639 if (s <= 0.0) {
640 return {0, 0.0};
641 }
642 CHECK_GT(num_points_, 0);
643 if (s >= length_) {
644 return {num_points_ - 1, 0.0};
645 }
646 const int sample_id = static_cast<int>(s / kSampleDistance);
647 if (sample_id >= num_sample_points_) {
648 return {num_points_ - 1, 0.0};
649 }
650 const int next_sample_id = sample_id + 1;
651 int low = last_point_index_[sample_id];
652 int high = (next_sample_id < num_sample_points_
653 ? std::min(num_points_, last_point_index_[next_sample_id] + 1)
654 : num_points_);
655 while (low + 1 < high) {
656 const int mid = (low + high) >> 1;
657 if (accumulated_s_[mid] <= s) {
658 low = mid;
659 } else {
660 high = mid;
661 }
662 }
663 return {low, s - accumulated_s_[low]};
664}
std::vector< int > last_point_index_
Definition path.h:385
int num_sample_points_
Definition path.h:380

◆ GetLaneIndexFromS()

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

在文件 path.cc666 行定义.

666 {
667 if (s <= 0.0) {
668 return {0, 0.0};
669 }
670 CHECK_GT(lane_segments_.size(), 0U);
671 if (s >= length_) {
672 return {static_cast<int>(lane_segments_.size() - 1),
673 lane_segments_.back().Length()};
674 }
675 auto iter = std::lower_bound(lane_accumulated_s_.begin(),
676 lane_accumulated_s_.end(), s);
677 if (iter == lane_accumulated_s_.end()) {
678 return {static_cast<int>(lane_segments_.size() - 1),
679 lane_segments_.back().Length()};
680 }
681 int index =
682 static_cast<int>(std::distance(lane_accumulated_s_.begin(), iter));
683 if (index == 0) {
684 return {index, s};
685 } else {
686 return {index, s - lane_accumulated_s_[index - 1]};
687 }
688}
std::vector< double > lane_accumulated_s_
Definition path.h:370

◆ GetLaneLeftWidth()

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

在文件 path.cc973 行定义.

973 {
974 return GetSample(lane_left_width_, s);
975}
double GetSample(const std::vector< double > &samples, const double s) const
Definition path.cc:1016
std::vector< double > lane_left_width_
Definition path.h:381

◆ GetLaneRightWidth()

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

在文件 path.cc977 行定义.

977 {
978 return GetSample(lane_right_width_, s);
979}
std::vector< double > lane_right_width_
Definition path.h:382

◆ GetLaneSegments()

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

在文件 path.cc690 行定义.

691 {
692 std::vector<hdmap::LaneSegment> lanes;
693 if (start_s + kMathEpsilon > end_s) {
694 return lanes;
695 }
696 auto start_index = GetLaneIndexFromS(start_s);
697 if (start_index.offset + kMathEpsilon >=
698 lane_segments_[start_index.id].Length()) {
699 start_index.id += 1;
700 start_index.offset = 0;
701 }
702 const int num_lanes = static_cast<int>(lane_segments_.size());
703 if (start_index.id >= num_lanes) {
704 return lanes;
705 }
706 lanes.emplace_back(lane_segments_[start_index.id].lane, start_index.offset,
707 lane_segments_[start_index.id].Length());
708 auto end_index = GetLaneIndexFromS(end_s);
709 for (int i = start_index.id; i < end_index.id && i < num_lanes; ++i) {
710 lanes.emplace_back(lane_segments_[i]);
711 }
712 if (end_index.offset >= kMathEpsilon) {
713 lanes.emplace_back(lane_segments_[end_index.id].lane, 0, end_index.offset);
714 }
715 return lanes;
716}
InterpolatedIndex GetLaneIndexFromS(double s) const
Definition path.cc:666

◆ GetLaneWidth()

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

在文件 path.cc981 行定义.

982 {
983 CHECK_NOTNULL(lane_left_width);
984 CHECK_NOTNULL(lane_right_width);
985
986 if (s < 0.0 || s > length_) {
987 return false;
988 }
989 *lane_left_width = GetSample(lane_left_width_, s);
990 *lane_right_width = GetSample(lane_right_width_, s);
991 return true;
992}

◆ GetNearestPoint() [1/2]

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

在文件 path.cc718 行定义.

719 {
720 double distance = 0.0;
721 return GetNearestPoint(point, accumulate_s, lateral, &distance);
722}
bool GetNearestPoint(const common::math::Vec2d &point, double *accumulate_s, double *lateral) const
Definition path.cc:718

◆ GetNearestPoint() [2/2]

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

在文件 path.cc724 行定义.

725 {
726 if (!GetProjection(point, accumulate_s, lateral, min_distance)) {
727 return false;
728 }
729 if (*accumulate_s < 0.0) {
730 *accumulate_s = 0.0;
731 *min_distance = point.DistanceTo(path_points_[0]);
732 } else if (*accumulate_s > length_) {
733 *accumulate_s = length_;
734 *min_distance = point.DistanceTo(path_points_.back());
735 }
736 return true;
737}

◆ GetProjection() [1/4]

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

在文件 path.cc908 行定义.

910 {
911 if (segments_.empty()) {
912 return false;
913 }
914 if (accumulate_s == nullptr || lateral == nullptr ||
915 min_distance == nullptr) {
916 return false;
917 }
919 return approximation_.GetProjection(*this, point, accumulate_s, lateral,
920 min_distance);
921 }
922 CHECK_GE(num_points_, 2);
923 *min_distance = std::numeric_limits<double>::infinity();
924 int min_index = 0;
925 for (int i = 0; i < num_segments_; ++i) {
926 if (abs(common::math::AngleDiff(segments_[i].heading(), heading)) >= M_PI_2)
927 continue;
928 const double distance = segments_[i].DistanceSquareTo(point);
929 if (distance < *min_distance) {
930 min_index = i;
931 *min_distance = distance;
932 }
933 }
934 *min_distance = std::sqrt(*min_distance);
935 const auto& nearest_seg = segments_[min_index];
936 const auto prod = nearest_seg.ProductOntoUnit(point);
937 const auto proj = nearest_seg.ProjectOntoUnit(point);
938 if (min_index == 0) {
939 *accumulate_s = std::min(proj, nearest_seg.length());
940 if (proj < 0) {
941 *lateral = prod;
942 } else {
943 *lateral = (prod > 0.0 ? 1 : -1) * *min_distance;
944 }
945 } else if (min_index == num_segments_ - 1) {
946 *accumulate_s = accumulated_s_[min_index] + std::max(0.0, proj);
947 if (proj > 0) {
948 *lateral = prod;
949 } else {
950 *lateral = (prod > 0.0 ? 1 : -1) * *min_distance;
951 }
952 } else {
953 *accumulate_s = accumulated_s_[min_index] +
954 std::max(0.0, std::min(proj, nearest_seg.length()));
955 *lateral = (prod > 0.0 ? 1 : -1) * *min_distance;
956 }
957 return true;
958}
bool GetProjection(const Path &path, const common::math::Vec2d &point, double *accumulate_s, double *lateral, double *distance) const
Definition path.cc:1215
std::vector< common::math::LineSegment2d > segments_
Definition path.h:375
double AngleDiff(const double from, const double to)
Calculate the difference between angle from and to
Definition math_utils.cc:61

◆ GetProjection() [2/4]

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

在文件 path.cc739 行定义.

740 {
741 double distance = 0.0;
742 return GetProjection(point, accumulate_s, lateral, &distance);
743}

◆ GetProjection() [3/4]

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

在文件 path.cc859 行定义.

860 {
861 if (segments_.empty()) {
862 return false;
863 }
864 if (accumulate_s == nullptr || lateral == nullptr ||
865 min_distance == nullptr) {
866 return false;
867 }
869 return approximation_.GetProjection(*this, point, accumulate_s, lateral,
870 min_distance);
871 }
872 CHECK_GE(num_points_, 2);
873 *min_distance = std::numeric_limits<double>::infinity();
874 int min_index = 0;
875 for (int i = 0; i < num_segments_; ++i) {
876 const double distance = segments_[i].DistanceSquareTo(point);
877 if (distance < *min_distance) {
878 min_index = i;
879 *min_distance = distance;
880 }
881 }
882 *min_distance = std::sqrt(*min_distance);
883 const auto& nearest_seg = segments_[min_index];
884 const auto prod = nearest_seg.ProductOntoUnit(point);
885 const auto proj = nearest_seg.ProjectOntoUnit(point);
886 if (min_index == 0) {
887 *accumulate_s = std::min(proj, nearest_seg.length());
888 if (proj < 0) {
889 *lateral = prod;
890 } else {
891 *lateral = (prod > 0.0 ? 1 : -1) * *min_distance;
892 }
893 } else if (min_index == num_segments_ - 1) {
894 *accumulate_s = accumulated_s_[min_index] + std::max(0.0, proj);
895 if (proj > 0) {
896 *lateral = prod;
897 } else {
898 *lateral = (prod > 0.0 ? 1 : -1) * *min_distance;
899 }
900 } else {
901 *accumulate_s = accumulated_s_[min_index] +
902 std::max(0.0, std::min(proj, nearest_seg.length()));
903 *lateral = (prod > 0.0 ? 1 : -1) * *min_distance;
904 }
905 return true;
906}

◆ GetProjection() [4/4]

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

在文件 path.cc745 行定义.

746 {
747 double distance = 0.0;
748 return GetProjection(point, heading, accumulate_s, lateral, &distance);
749}

◆ 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

在文件 path.cc806 行定义.

811 {
812 if (segments_.empty()) {
813 return false;
814 }
815 if (accumulate_s == nullptr || lateral == nullptr ||
816 min_distance == nullptr) {
817 return false;
818 }
819 CHECK_GE(num_points_, 2);
820 *min_distance = std::numeric_limits<double>::infinity();
821
822 int start_interpolation_index = GetIndexFromS(hueristic_start_s).id;
823 int end_interpolation_index = static_cast<int>(
824 std::fmin(num_segments_, GetIndexFromS(hueristic_end_s).id + 1));
825 int min_index = start_interpolation_index;
826 for (int i = start_interpolation_index; i <= end_interpolation_index; ++i) {
827 const double distance = segments_[i].DistanceSquareTo(point);
828 if (distance < *min_distance) {
829 min_index = i;
830 *min_distance = distance;
831 }
832 }
833 *min_distance = std::sqrt(*min_distance);
834 const auto& nearest_seg = segments_[min_index];
835 const auto prod = nearest_seg.ProductOntoUnit(point);
836 const auto proj = nearest_seg.ProjectOntoUnit(point);
837 if (min_index == 0) {
838 *accumulate_s = std::min(proj, nearest_seg.length());
839 if (proj < 0) {
840 *lateral = prod;
841 } else {
842 *lateral = (prod > 0.0 ? 1 : -1) * *min_distance;
843 }
844 } else if (min_index == num_segments_ - 1) {
845 *accumulate_s = accumulated_s_[min_index] + std::max(0.0, proj);
846 if (proj > 0) {
847 *lateral = prod;
848 } else {
849 *lateral = (prod > 0.0 ? 1 : -1) * *min_distance;
850 }
851 } else {
852 *accumulate_s = accumulated_s_[min_index] +
853 std::max(0.0, std::min(proj, nearest_seg.length()));
854 *lateral = (prod > 0.0 ? 1 : -1) * *min_distance;
855 }
856 return true;
857}
InterpolatedIndex GetIndexFromS(double s) const
Definition path.cc:638

◆ GetProjectionWithWarmStartS()

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

在文件 path.cc751 行定义.

753 {
754 if (segments_.empty()) {
755 return false;
756 }
757 if (accumulate_s == nullptr || lateral == nullptr) {
758 return false;
759 }
760 if (*accumulate_s < 0.0) {
761 *accumulate_s = 0.0;
762 } else if (*accumulate_s > length()) {
763 *accumulate_s = length();
764 }
765 CHECK_GE(num_points_, 2);
766 double warm_start_s = *accumulate_s;
767 // Find the segment at the position of "accumulate_s".
768 int left_index = 0;
769 int right_index = num_segments_;
770 int mid_index = 0;
771 // Find the segment with projection of the given point on it.
772 while (right_index > left_index + 1) {
773 FindIndex(left_index, right_index, warm_start_s, &mid_index);
774 const auto& segment = segments_[mid_index];
775 const auto& start_point = segment.start();
776 double delta_x = point.x() - start_point.x();
777 double delta_y = point.y() - start_point.y();
778 const auto& unit_direction = segment.unit_direction();
779 double proj = delta_x * unit_direction.x() + delta_y * unit_direction.y();
780 *accumulate_s = accumulated_s_[mid_index] + proj;
781 *lateral = unit_direction.x() * delta_y - unit_direction.y() * delta_x;
782 if (proj > 0.0) {
783 if (proj < segment.length()) {
784 return true;
785 }
786 if (mid_index == right_index) {
787 *accumulate_s = accumulated_s_[mid_index];
788 return true;
789 }
790 left_index = mid_index + 1;
791 } else {
792 if (mid_index == left_index) {
793 *accumulate_s = accumulated_s_[mid_index];
794 return true;
795 }
796 if (std::abs(proj) < segments_[mid_index - 1].length()) {
797 return true;
798 }
799 right_index = mid_index - 1;
800 }
801 warm_start_s = segment.length() + proj;
802 }
803 return true;
804}
double length() const
Definition path.h:294

◆ GetRoadLeftWidth()

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

在文件 path.cc994 行定义.

994 {
995 return GetSample(road_left_width_, s);
996}
std::vector< double > road_left_width_
Definition path.h:383

◆ GetRoadRightWidth()

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

在文件 path.cc998 行定义.

998 {
999 return GetSample(road_right_width_, s);
1000}
std::vector< double > road_right_width_
Definition path.h:384

◆ GetRoadWidth()

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

在文件 path.cc1002 行定义.

1003 {
1004 CHECK_NOTNULL(road_left_width);
1005 CHECK_NOTNULL(road_right_width);
1006
1007 if (s < 0.0 || s > length_) {
1008 return false;
1009 }
1010
1011 *road_left_width = GetSample(road_left_width_, s);
1012 *road_right_width = GetSample(road_right_width_, s);
1013 return true;
1014}

◆ GetSample()

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

在文件 path.cc1016 行定义.

1017 {
1018 if (samples.empty()) {
1019 return 0.0;
1020 }
1021 if (s <= 0.0) {
1022 return samples[0];
1023 }
1024 const int idx = static_cast<int>(s / kSampleDistance);
1025 if (idx >= num_sample_points_ - 1) {
1026 return samples.back();
1027 }
1028 const double ratio = (s - idx * kSampleDistance) / kSampleDistance;
1029 return samples[idx] * (1.0 - ratio) + samples[idx + 1] * ratio;
1030}

◆ GetSFromIndex()

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

在文件 path.cc628 行定义.

628 {
629 if (index.id < 0) {
630 return 0.0;
631 }
632 if (index.id >= num_points_) {
633 return length_;
634 }
635 return accumulated_s_[index.id] + index.offset;
636}

◆ GetSmoothPoint() [1/2]

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

在文件 path.cc591 行定义.

591 {
592 CHECK_GE(index.id, 0);
593 CHECK_LT(index.id, num_points_);
594
595 const MapPathPoint& ref_point = path_points_[index.id];
596 if (std::abs(index.offset) > kMathEpsilon) {
597 const Vec2d delta = unit_directions_[index.id] * index.offset;
598 MapPathPoint point({ref_point.x() + delta.x(), ref_point.y() + delta.y()},
599 ref_point.heading());
600 if (index.id < num_segments_ && !ref_point.lane_waypoints().empty()) {
601 const LaneSegment& lane_segment = lane_segments_to_next_point_[index.id];
602 auto ref_lane_waypoint = ref_point.lane_waypoints()[0];
603 if (lane_segment.lane != nullptr) {
604 for (const auto& lane_waypoint : ref_point.lane_waypoints()) {
605 if (lane_waypoint.lane->id().id() == lane_segment.lane->id().id()) {
606 ref_lane_waypoint = lane_waypoint;
607 break;
608 }
609 }
610 point.add_lane_waypoint(
611 LaneWaypoint(lane_segment.lane, lane_segment.start_s + index.offset,
612 ref_lane_waypoint.l));
613 }
614 }
615 if (point.lane_waypoints().empty() && !ref_point.lane_waypoints().empty()) {
616 point.add_lane_waypoint(ref_point.lane_waypoints()[0]);
617 }
618 return point;
619 } else {
620 return ref_point;
621 }
622}
std::vector< common::math::Vec2d > unit_directions_
Definition path.h:372
std::vector< LaneSegment > lane_segments_to_next_point_
Definition path.h:371

◆ GetSmoothPoint() [2/2]

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

在文件 path.cc624 行定义.

624 {
625 return GetSmoothPoint(GetIndexFromS(s));
626}

◆ Init()

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

在文件 path.cc354 行定义.

354 {
355 InitPoints();
358 InitWidth();
359 InitOverlaps();
360}
void InitLaneSegments()
Definition path.cc:402
void InitPointIndex()
Definition path.cc:488
void InitPoints()
Definition path.cc:362
void InitOverlaps()
Definition path.cc:575

◆ InitLaneSegments()

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

在文件 path.cc402 行定义.

402 {
403 if (lane_segments_.empty()) {
404 for (int i = 0; i + 1 < num_points_; ++i) {
405 LaneSegment lane_segment;
406 if (FindLaneSegment(path_points_[i], path_points_[i + 1],
407 &lane_segment)) {
408 lane_segments_.push_back(lane_segment);
409 }
410 }
411 }
413 if (lane_segments_.empty()) {
414 return;
415 }
416 lane_accumulated_s_.resize(lane_segments_.size());
417 lane_accumulated_s_[0] = lane_segments_[0].Length();
418 for (std::size_t i = 1; i < lane_segments_.size(); ++i) {
420 lane_accumulated_s_[i - 1] + lane_segments_[i].Length();
421 }
422
425 for (int i = 0; i + 1 < num_points_; ++i) {
426 LaneSegment lane_segment;
427 if (FindLaneSegment(path_points_[i], path_points_[i + 1], &lane_segment)) {
428 lane_segments_to_next_point_.push_back(lane_segment);
429 } else {
430 lane_segments_to_next_point_.push_back(LaneSegment());
431 }
432 }
433 CHECK_EQ(lane_segments_to_next_point_.size(),
434 static_cast<size_t>(num_segments_));
435}
static void Join(std::vector< LaneSegment > *segments)
Join neighboring lane segments if they have the same lane id
Definition path.cc:138

◆ InitOverlaps()

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

在文件 path.cc575 行定义.

575 {
589}
const std::vector< OverlapInfoConstPtr > & junctions() const
const std::vector< OverlapInfoConstPtr > & speed_bumps() const
const std::vector< OverlapInfoConstPtr > & stop_signs() const
const std::vector< OverlapInfoConstPtr > & clear_areas() const
const std::vector< OverlapInfoConstPtr > & signals() const
const std::vector< OverlapInfoConstPtr > & parking_spaces() const
const std::vector< OverlapInfoConstPtr > & crosswalks() const
const std::vector< OverlapInfoConstPtr > & pnc_junctions() const
const std::vector< OverlapInfoConstPtr > & yield_signs() const
const std::vector< OverlapInfoConstPtr > & areas() const
const std::vector< OverlapInfoConstPtr > & cross_lanes() const
std::vector< PathOverlap > speed_bump_overlaps_
Definition path.h:397
std::vector< PathOverlap > stop_sign_overlaps_
Definition path.h:390
std::vector< PathOverlap > pnc_junction_overlaps_
Definition path.h:395
std::vector< PathOverlap > parking_space_overlaps_
Definition path.h:392
std::vector< PathOverlap > lane_overlaps_
Definition path.h:387
std::vector< PathOverlap > signal_overlaps_
Definition path.h:388
std::vector< PathOverlap > yield_sign_overlaps_
Definition path.h:389
std::vector< PathOverlap > junction_overlaps_
Definition path.h:394
void GetAllOverlaps(GetOverlapFromLaneFunc GetOverlaps_from_lane, std::vector< PathOverlap > *const overlaps) const
Definition path.cc:504

◆ InitPointIndex()

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

在文件 path.cc488 行定义.

488 {
489 last_point_index_.clear();
491 double s = 0.0;
492 int last_index = 0;
493 for (int i = 0; i < num_sample_points_; ++i) {
494 while (last_index + 1 < num_points_ &&
495 accumulated_s_[last_index + 1] <= s) {
496 ++last_index;
497 }
498 last_point_index_.push_back(last_index);
499 s += kSampleDistance;
500 }
501 CHECK_EQ(last_point_index_.size(), static_cast<size_t>(num_sample_points_));
502}

◆ InitPoints()

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

在文件 path.cc362 行定义.

362 {
363 num_points_ = static_cast<int>(path_points_.size());
364 CHECK_GE(num_points_, 2);
365
366 accumulated_s_.clear();
368 segments_.clear();
369 segments_.reserve(num_points_);
370 unit_directions_.clear();
372 double s = 0.0;
373 for (int i = 0; i < num_points_; ++i) {
374 accumulated_s_.push_back(s);
375 Vec2d heading;
376 if (i + 1 >= num_points_) {
377 heading = path_points_[i] - path_points_[i - 1];
378 heading.Normalize();
379 } else {
380 segments_.emplace_back(path_points_[i], path_points_[i + 1]);
381 heading = path_points_[i + 1] - path_points_[i];
382 float heading_length = heading.Length();
383 // TODO(All): use heading.length when all adjacent lanes are guarantee to
384 // be connected.
385 s += heading_length;
386 // Normalize "heading".
387 if (heading_length > 0.0) {
388 heading /= heading_length;
389 }
390 }
391 unit_directions_.push_back(heading);
392 }
393 length_ = s;
394 num_sample_points_ = static_cast<int>(length_ / kSampleDistance) + 1;
396
397 CHECK_EQ(accumulated_s_.size(), static_cast<size_t>(num_points_));
398 CHECK_EQ(unit_directions_.size(), static_cast<size_t>(num_points_));
399 CHECK_EQ(segments_.size(), static_cast<size_t>(num_segments_));
400}

◆ InitWidth()

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

在文件 path.cc437 行定义.

437 {
438 lane_left_width_.clear();
440 lane_right_width_.clear();
442
443 road_left_width_.clear();
445 road_right_width_.clear();
447
448 double sample_s = 0;
449 double segment_end_s = -1.0;
450 double segment_start_s = -1.0;
451 double waypoint_s = 0.0;
452 double left_width = 0.0;
453 double right_width = 0.0;
454 const LaneWaypoint* cur_waypoint = nullptr;
455 bool is_reach_to_end = false;
456 int path_point_index = 0;
457 for (int i = 0; i < num_sample_points_; ++i) {
458 // Find the segment at the position of "sample_s".
459 while (segment_end_s < sample_s && !is_reach_to_end) {
460 const auto& cur_point = path_points_[path_point_index];
461 cur_waypoint = &(cur_point.lane_waypoints()[0]);
462 CHECK_NOTNULL(cur_waypoint->lane);
463 segment_start_s = accumulated_s_[path_point_index];
464 segment_end_s = segment_start_s + segments_[path_point_index].length();
465 if (++path_point_index >= num_points_) {
466 is_reach_to_end = true;
467 }
468 }
469 // Find the width of the way point at the position of "sample_s".
470 waypoint_s = cur_waypoint->s + sample_s - segment_start_s;
471 cur_waypoint->lane->GetWidth(waypoint_s, &left_width, &right_width);
472 lane_left_width_.push_back(left_width - cur_waypoint->l);
473 lane_right_width_.push_back(right_width + cur_waypoint->l);
474 cur_waypoint->lane->GetRoadWidth(waypoint_s, &left_width, &right_width);
475 road_left_width_.push_back(left_width - cur_waypoint->l);
476 road_right_width_.push_back(right_width + cur_waypoint->l);
477 sample_s += kSampleDistance;
478 }
479 // Check the width array size.
480 auto num_sample_points = static_cast<size_t>(num_sample_points_);
481 CHECK_EQ(lane_left_width_.size(), num_sample_points);
482 CHECK_EQ(lane_right_width_.size(), num_sample_points);
483
484 CHECK_EQ(road_left_width_.size(), num_sample_points);
485 CHECK_EQ(road_right_width_.size(), num_sample_points);
486}

◆ IsOnPath()

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

在文件 path.cc1032 行定义.

1032 {
1033 double accumulate_s = 0.0;
1034 double lateral = 0.0;
1035 if (!GetProjection(point, &accumulate_s, &lateral)) {
1036 return false;
1037 }
1038 double lane_left_width = 0.0;
1039 double lane_right_width = 0.0;
1040 if (!GetLaneWidth(accumulate_s, &lane_left_width, &lane_right_width)) {
1041 return false;
1042 }
1043 if (lateral < lane_left_width && lateral > -lane_right_width) {
1044 return true;
1045 }
1046 return false;
1047}
bool GetLaneWidth(const double s, double *lane_left_width, double *lane_right_width) const
Definition path.cc:981

◆ junction_overlaps()

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

在文件 path.h313 行定义.

313 {
314 return junction_overlaps_;
315 }

◆ lane_overlaps()

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

在文件 path.h298 行定义.

298 {
299 return lane_overlaps_;
300 }

◆ lane_segments()

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

在文件 path.h280 行定义.

280 {
281 return lane_segments_;
282 }

◆ lane_segments_to_next_point()

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

在文件 path.h283 行定义.

283 {
285 }

◆ length()

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

在文件 path.h294 行定义.

294{ return length_; }

◆ NextLaneOverlap()

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

在文件 path.cc564 行定义.

564 {
565 auto next = std::upper_bound(
566 lane_overlaps_.begin(), lane_overlaps_.end(), s,
567 [](double s, const PathOverlap& o) { return s < o.start_s; });
568 if (next == lane_overlaps_.end()) {
569 return nullptr;
570 } else {
571 return &(*next);
572 }
573}

◆ num_points()

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

在文件 path.h277 行定义.

277{ return num_points_; }

◆ num_segments()

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

在文件 path.h278 行定义.

278{ return num_segments_; }

◆ OverlapWith()

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

在文件 path.cc1049 行定义.

1049 {
1051 return approximation_.OverlapWith(*this, box, width);
1052 }
1053 const Vec2d center = box.center();
1054 const double radius_sqr = Sqr(box.diagonal() / 2.0 + width) + kMathEpsilon;
1055 for (const auto& segment : segments_) {
1056 if (segment.DistanceSquareTo(center) > radius_sqr) {
1057 continue;
1058 }
1059 if (box.DistanceTo(segment) <= width + kMathEpsilon) {
1060 return true;
1061 }
1062 }
1063 return false;
1064}
bool OverlapWith(const Path &path, const common::math::Box2d &box, double width) const
Definition path.cc:1350
double Sqr(const double x)
Definition math_utils.cc:26
constexpr double kMathEpsilon
Definition vec2d.h:35

◆ parking_space_overlaps()

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

在文件 path.h325 行定义.

325 {
327 }

◆ path_points()

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

在文件 path.h279 行定义.

279{ return path_points_; }

◆ pnc_junction_overlaps()

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

在文件 path.h316 行定义.

316 {
318 }

◆ segments()

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

在文件 path.h290 行定义.

290 {
291 return segments_;
292 }

◆ signal_overlaps()

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

在文件 path.h301 行定义.

301 {
302 return signal_overlaps_;
303 }

◆ speed_bump_overlaps()

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

在文件 path.h322 行定义.

322 {
324 }

◆ stop_sign_overlaps()

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

在文件 path.h307 行定义.

307 {
308 return stop_sign_overlaps_;
309 }

◆ unit_directions()

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

在文件 path.h286 行定义.

286 {
287 return unit_directions_;
288 }

◆ yield_sign_overlaps()

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

在文件 path.h304 行定义.

304 {
306 }

类成员变量说明

◆ accumulated_s_

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

在文件 path.h374 行定义.

◆ approximation_

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

在文件 path.h377 行定义.

◆ area_overlaps_

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

在文件 path.h398 行定义.

◆ clear_area_overlaps_

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

在文件 path.h396 行定义.

◆ crosswalk_overlaps_

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

在文件 path.h391 行定义.

◆ dead_end_overlaps_

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

在文件 path.h393 行定义.

◆ junction_overlaps_

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

在文件 path.h394 行定义.

◆ lane_accumulated_s_

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

在文件 path.h370 行定义.

◆ lane_left_width_

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

在文件 path.h381 行定义.

◆ lane_overlaps_

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

在文件 path.h387 行定义.

◆ lane_right_width_

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

在文件 path.h382 行定义.

◆ lane_segments_

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

在文件 path.h369 行定义.

◆ lane_segments_to_next_point_

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

在文件 path.h371 行定义.

◆ last_point_index_

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

在文件 path.h385 行定义.

◆ length_

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

在文件 path.h373 行定义.

◆ num_points_

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

在文件 path.h366 行定义.

◆ num_sample_points_

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

在文件 path.h380 行定义.

◆ num_segments_

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

在文件 path.h367 行定义.

◆ parking_space_overlaps_

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

在文件 path.h392 行定义.

◆ path_points_

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

在文件 path.h368 行定义.

◆ pnc_junction_overlaps_

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

在文件 path.h395 行定义.

◆ road_left_width_

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

在文件 path.h383 行定义.

◆ road_right_width_

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

在文件 path.h384 行定义.

◆ segments_

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

在文件 path.h375 行定义.

◆ signal_overlaps_

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

在文件 path.h388 行定义.

◆ speed_bump_overlaps_

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

在文件 path.h397 行定义.

◆ stop_sign_overlaps_

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

在文件 path.h390 行定义.

◆ unit_directions_

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

在文件 path.h372 行定义.

◆ use_path_approximation_

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

在文件 path.h376 行定义.

◆ yield_sign_overlaps_

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

在文件 path.h389 行定义.


该类的文档由以下文件生成: