48 const std::string& name,
49 const std::shared_ptr<DependencyInjector>& injector) {
54 return Task::LoadConfig<LaneBorrowPathConfig>(&config_);
65 if (!IsNecessaryToBorrowLane()) {
66 ADEBUG <<
"No need to borrow lane";
69 std::vector<PathBoundary> candidate_path_boundaries;
70 std::vector<PathData> candidate_path_data;
73 if (!DecidePathBounds(&candidate_path_boundaries)) {
76 if (!OptimizePath(candidate_path_boundaries, &candidate_path_data)) {
79 if (AssessPath(&candidate_path_data,
81 ADEBUG <<
"lane borrow path success";
87bool LaneBorrowPath::DecidePathBounds(std::vector<PathBoundary>* boundary) {
88 for (
size_t i = 0; i < decided_side_pass_direction_.size(); i++) {
89 boundary->emplace_back();
90 auto& path_bound = boundary->back();
91 std::string blocking_obstacle_id =
"";
92 std::string borrow_lane_type =
"";
93 double path_narrowest_width = 0;
97 const std::string msg =
"Failed to initialize path boundaries.";
103 if (!GetBoundaryFromNeighborLane(decided_side_pass_direction_[i],
104 &path_bound, &borrow_lane_type)) {
105 AERROR <<
"Failed to decide a rough boundary based on lane and adc.";
106 boundary->pop_back();
111 if (decided_side_pass_direction_[i] == SidePassDirection::LEFT_BORROW) {
112 label =
"regular/left" + borrow_lane_type;
114 label =
"regular/right" + borrow_lane_type;
116 path_bound.set_label(label);
126 &path_bound, &blocking_obstacle_id, &path_narrowest_width)) {
127 const std::string msg =
128 "Failed to decide fine tune the boundaries after "
129 "taking into consideration all static obstacles.";
131 boundary->pop_back();
137 while (!blocking_obstacle_id.empty() &&
138 path_bound.size() < temp_path_bound.size() &&
139 counter < FLAGS_num_extra_tail_bound_point) {
140 path_bound.push_back(temp_path_bound[path_bound.size()]);
143 ADEBUG <<
"Completed generating path boundaries.";
145 path_bound.set_blocking_obstacle_id(blocking_obstacle_id);
148 return !boundary->empty();
150bool LaneBorrowPath::OptimizePath(
151 const std::vector<PathBoundary>& path_boundaries,
152 std::vector<PathData>* candidate_path_data) {
155 std::array<double, 3> end_state = {0.0, 0.0, 0.0};
157 for (
const auto& path_boundary : path_boundaries) {
158 std::vector<double> opt_l, opt_dl, opt_ddl;
159 std::vector<std::pair<double, double>> ddl_bounds;
164 std::vector<double> ref_l;
165 std::vector<double> weight_ref_l;
167 path_boundary, config.path_reference_l_weight(), &ref_l, &weight_ref_l);
171 ddl_bounds, jerk_bound, config, &opt_l, &opt_dl, &opt_ddl);
174 opt_l, opt_dl, opt_ddl, path_boundary.delta_s(),
175 path_boundary.start_s());
177 path_data.SetReferenceLine(&reference_line);
178 path_data.SetFrenetPath(std::move(frenet_frame_path));
179 if (FLAGS_use_front_axe_center_in_path_planning) {
180 auto discretized_path = DiscretizedPath(
183 path_data.SetDiscretizedPath(discretized_path);
185 path_data.set_path_label(path_boundary.label());
186 path_data.set_blocking_obstacle_id(path_boundary.blocking_obstacle_id());
187 candidate_path_data->push_back(std::move(path_data));
190 if (candidate_path_data->empty()) {
196bool LaneBorrowPath::AssessPath(std::vector<PathData>* candidate_path_data,
197 PathData* final_path) {
198 std::vector<PathData> valid_path_data;
199 for (
auto& curr_path_data : *candidate_path_data) {
202 SetPathInfo(&curr_path_data);
204 FLAGS_path_trim_destination_threshold) {
207 if (curr_path_data.Empty()) {
208 AINFO <<
"lane borrow path is empty after trimed";
211 valid_path_data.push_back(curr_path_data);
214 if (valid_path_data.empty()) {
215 AINFO <<
"All lane borrow path are not valid";
218 auto* mutable_path_decider_status =
injector_->planning_context()
219 ->mutable_planning_status()
220 ->mutable_path_decider();
221 const std::string blocking_obstacle_id =
222 mutable_path_decider_status->front_static_obstacle_id();
223 const Obstacle* blocking_obstacle =
225 blocking_obstacle_id);
226 if (valid_path_data.size() > 1) {
228 blocking_obstacle)) {
229 *final_path = valid_path_data[0];
231 *final_path = valid_path_data[1];
234 *final_path = valid_path_data[0];
242bool LaneBorrowPath::GetBoundaryFromNeighborLane(
244 std::string* borrow_lane_type) {
246 CHECK_NOTNULL(path_bound);
247 ACHECK(!path_bound->empty());
251 double offset_to_map = 0;
252 bool borrowing_reverse_lane =
false;
253 reference_line.GetOffsetToMap(
init_sl_state_.first[0], &offset_to_map);
256 double past_lane_left_width = adc_lane_width / 2.0;
257 double past_lane_right_width = adc_lane_width / 2.0;
258 int path_blocked_idx = -1;
259 for (
size_t i = 0; i < path_bound->size(); ++i) {
260 double curr_s = (*path_bound)[i].s;
262 double curr_lane_left_width = 0.0;
263 double curr_lane_right_width = 0.0;
264 double offset_to_lane_center = 0.0;
265 if (!reference_line.GetLaneWidth(curr_s, &curr_lane_left_width,
266 &curr_lane_right_width)) {
267 AWARN <<
"Failed to get lane width at s = " << curr_s;
268 curr_lane_left_width = past_lane_left_width;
269 curr_lane_right_width = past_lane_right_width;
271 reference_line.GetOffsetToMap(curr_s, &offset_to_lane_center);
272 curr_lane_left_width += offset_to_lane_center;
273 curr_lane_right_width -= offset_to_lane_center;
274 past_lane_left_width = curr_lane_left_width;
275 past_lane_right_width = curr_lane_right_width;
278 double curr_neighbor_lane_width = 0.0;
280 hdmap::Id neighbor_lane_id;
281 if (pass_direction == SidePassDirection::LEFT_BORROW) {
285 &neighbor_lane_id, &curr_neighbor_lane_width)) {
286 ADEBUG <<
"Borrow left forward neighbor lane."
287 << neighbor_lane_id.id();
290 &neighbor_lane_id, &curr_neighbor_lane_width)) {
291 borrowing_reverse_lane =
true;
292 ADEBUG <<
"Borrow left reverse neighbor lane."
293 << neighbor_lane_id.id();
295 ADEBUG <<
"There is no left neighbor lane.";
297 }
else if (pass_direction == SidePassDirection::RIGHT_BORROW) {
301 &neighbor_lane_id, &curr_neighbor_lane_width)) {
302 ADEBUG <<
"Borrow right forward neighbor lane."
303 << neighbor_lane_id.id();
306 &neighbor_lane_id, &curr_neighbor_lane_width)) {
307 borrowing_reverse_lane =
true;
308 ADEBUG <<
"Borrow right reverse neighbor lane."
309 << neighbor_lane_id.id();
311 ADEBUG <<
"There is no right neighbor lane.";
317 double offset_to_map = 0.0;
318 reference_line.GetOffsetToMap(curr_s, &offset_to_map);
320 double curr_left_bound_lane =
321 curr_lane_left_width + (pass_direction == SidePassDirection::LEFT_BORROW
322 ? curr_neighbor_lane_width
325 double curr_right_bound_lane =
326 -curr_lane_right_width -
327 (pass_direction == SidePassDirection::RIGHT_BORROW
328 ? curr_neighbor_lane_width
330 double curr_left_bound = 0.0;
331 double curr_right_bound = 0.0;
332 curr_left_bound = curr_left_bound_lane - offset_to_map;
333 curr_right_bound = curr_right_bound_lane - offset_to_map;
338 "",
"", &path_bound->at(i))) {
339 path_blocked_idx =
static_cast<int>(i);
341 if (path_blocked_idx != -1) {
346 *borrow_lane_type = borrowing_reverse_lane ?
"reverse" :
"forward";
349void LaneBorrowPath::UpdateSelfPathInfo() {
351 if (!cur_path.Empty() &&
352 cur_path.path_label().find(
"self") != std::string::npos &&
353 cur_path.blocking_obstacle_id().empty()) {
354 use_self_lane_ = std::min(use_self_lane_ + 1, 10);
358 blocking_obstacle_id_ = cur_path.blocking_obstacle_id();
360bool LaneBorrowPath::IsNecessaryToBorrowLane() {
361 auto* mutable_path_decider_status =
injector_->planning_context()
362 ->mutable_planning_status()
363 ->mutable_path_decider();
364 if (mutable_path_decider_status->is_in_path_lane_borrow_scenario()) {
365 UpdateSelfPathInfo();
367 if (use_self_lane_ >= 6) {
370 mutable_path_decider_status->set_is_in_path_lane_borrow_scenario(
false);
371 decided_side_pass_direction_.clear();
372 AINFO <<
"Switch from LANE-BORROW path to SELF-LANE path.";
376 AINFO <<
"Blocking obstacle ID["
377 << mutable_path_decider_status->front_static_obstacle_id() <<
"]";
379 if (!HasSingleReferenceLine(*
frame_)) {
382 if (!IsWithinSidePassingSpeedADC(*
frame_)) {
390 if (!IsLongTermBlockingObstacle()) {
401 if (decided_side_pass_direction_.empty()) {
403 bool left_borrowable;
404 bool right_borrowable;
407 if (!left_borrowable && !right_borrowable) {
408 mutable_path_decider_status->set_is_in_path_lane_borrow_scenario(
false);
409 AINFO <<
"LEFT AND RIGHT LANE CAN NOT BORROW";
412 mutable_path_decider_status->set_is_in_path_lane_borrow_scenario(
true);
413 if (left_borrowable) {
414 decided_side_pass_direction_.push_back(
415 SidePassDirection::LEFT_BORROW);
417 if (right_borrowable) {
418 decided_side_pass_direction_.push_back(
419 SidePassDirection::RIGHT_BORROW);
424 AINFO <<
"Switch from SELF-LANE path to LANE-BORROW path.";
426 return mutable_path_decider_status->is_in_path_lane_borrow_scenario();
429bool LaneBorrowPath::HasSingleReferenceLine(
const Frame& frame) {
430 return frame.reference_line_info().size() == 1;
433bool LaneBorrowPath::IsWithinSidePassingSpeedADC(
const Frame& frame) {
437bool LaneBorrowPath::IsLongTermBlockingObstacle() {
441 .front_static_obstacle_cycle_counter() >=
443 ADEBUG <<
"The blocking obstacle is long-term existing.";
446 ADEBUG <<
"The blocking obstacle is not long-term existing.";
451bool LaneBorrowPath::IsBlockingObstacleWithinDestination(
452 const ReferenceLineInfo& reference_line_info) {
453 const auto& path_decider_status =
454 injector_->planning_context()->planning_status().path_decider();
455 const std::string blocking_obstacle_id =
456 path_decider_status.front_static_obstacle_id();
457 if (blocking_obstacle_id.empty()) {
458 ADEBUG <<
"There is no blocking obstacle.";
461 const Obstacle* blocking_obstacle =
462 reference_line_info.path_decision().obstacles().Find(
463 blocking_obstacle_id);
464 if (blocking_obstacle ==
nullptr) {
465 ADEBUG <<
"Blocking obstacle is no longer there.";
469 double blocking_obstacle_s =
470 blocking_obstacle->PerceptionSLBoundary().start_s();
471 double adc_end_s = reference_line_info.AdcSlBoundary().end_s();
472 ADEBUG <<
"Blocking obstacle is at s = " << blocking_obstacle_s;
473 ADEBUG <<
"ADC is at s = " << adc_end_s;
474 ADEBUG <<
"Destination is at s = "
475 << reference_line_info.SDistanceToDestination() + adc_end_s;
476 if (blocking_obstacle_s - adc_end_s >
477 reference_line_info.SDistanceToDestination()) {
483bool LaneBorrowPath::IsBlockingObstacleFarFromIntersection(
484 const ReferenceLineInfo& reference_line_info) {
485 const auto& path_decider_status =
486 injector_->planning_context()->planning_status().path_decider();
487 const std::string blocking_obstacle_id =
488 path_decider_status.front_static_obstacle_id();
489 if (blocking_obstacle_id.empty()) {
490 ADEBUG <<
"There is no blocking obstacle.";
493 const Obstacle* blocking_obstacle =
494 reference_line_info.path_decision().obstacles().Find(
495 blocking_obstacle_id);
496 if (blocking_obstacle ==
nullptr) {
497 ADEBUG <<
"Blocking obstacle is no longer there.";
502 double blocking_obstacle_s =
503 blocking_obstacle->PerceptionSLBoundary().end_s();
504 ADEBUG <<
"Blocking obstacle is at s = " << blocking_obstacle_s;
506 const auto& first_encountered_overlaps =
507 reference_line_info.FirstEncounteredOverlaps();
508 for (
const auto& overlap : first_encountered_overlaps) {
509 ADEBUG << overlap.first <<
", " << overlap.second.DebugString();
515 auto distance = overlap.second.start_s - blocking_obstacle_s;
519 ADEBUG <<
"Too close to signal intersection (" << distance
520 <<
"m); don't SIDE_PASS.";
525 ADEBUG <<
"Too close to overlap_type[" << overlap.first <<
"] ("
526 << distance <<
"m); don't SIDE_PASS";
535bool LaneBorrowPath::IsSidePassableObstacle(
536 const ReferenceLineInfo& reference_line_info) {
537 const auto& path_decider_status =
538 injector_->planning_context()->planning_status().path_decider();
539 const std::string blocking_obstacle_id =
540 path_decider_status.front_static_obstacle_id();
541 if (blocking_obstacle_id.empty()) {
542 ADEBUG <<
"There is no blocking obstacle.";
545 const Obstacle* blocking_obstacle =
546 reference_line_info.path_decision().obstacles().Find(
547 blocking_obstacle_id);
548 if (blocking_obstacle ==
nullptr) {
549 ADEBUG <<
"Blocking obstacle is no longer there.";
556void LaneBorrowPath::CheckLaneBorrow(
557 const ReferenceLineInfo& reference_line_info,
558 bool* left_neighbor_lane_borrowable,
bool* right_neighbor_lane_borrowable) {
559 const ReferenceLine& reference_line = reference_line_info.reference_line();
561 *left_neighbor_lane_borrowable =
true;
562 *right_neighbor_lane_borrowable =
true;
564 static constexpr double kLookforwardDistance = 100.0;
565 double check_s = reference_line_info.AdcSlBoundary().end_s();
566 const double lookforward_distance =
567 std::min(check_s + kLookforwardDistance, reference_line.Length());
568 while (check_s < lookforward_distance) {
569 auto ref_point = reference_line.GetNearestReferencePoint(check_s);
570 if (ref_point.lane_waypoints().empty()) {
571 *left_neighbor_lane_borrowable =
false;
572 *right_neighbor_lane_borrowable =
false;
575 auto ptr_lane_info = reference_line_info.LocateLaneInfo(check_s);
576 if (ptr_lane_info->lane().left_neighbor_forward_lane_id().empty() &&
577 ptr_lane_info->lane().left_neighbor_reverse_lane_id().empty()) {
578 *left_neighbor_lane_borrowable =
false;
580 if (ptr_lane_info->lane().right_neighbor_forward_lane_id().empty() &&
581 ptr_lane_info->lane().right_neighbor_reverse_lane_id().empty()) {
582 *right_neighbor_lane_borrowable =
false;
584 const auto waypoint = ref_point.lane_waypoints().front();
588 if (*left_neighbor_lane_borrowable) {
593 *left_neighbor_lane_borrowable =
false;
595 ADEBUG <<
"s[" << check_s <<
"] left_lane_boundary_type["
596 << LaneBoundaryType_Type_Name(lane_boundary_type) <<
"]";
598 if (*right_neighbor_lane_borrowable) {
602 *right_neighbor_lane_borrowable =
false;
604 ADEBUG <<
"s[" << check_s <<
"] right_neighbor_lane_borrowable["
605 << LaneBoundaryType_Type_Name(lane_boundary_type) <<
"]";
611bool LaneBorrowPath::CheckLaneBoundaryType(
612 const ReferenceLineInfo& reference_line_info,
const double check_s,
614 const ReferenceLine& reference_line = reference_line_info.reference_line();
615 auto ref_point = reference_line.GetNearestReferencePoint(check_s);
616 if (ref_point.lane_waypoints().empty()) {
620 const auto waypoint = ref_point.lane_waypoints().front();
623 if (lane_borrow_info == SidePassDirection::LEFT_BORROW) {
625 }
else if (lane_borrow_info == SidePassDirection::RIGHT_BORROW) {
635void LaneBorrowPath::SetPathInfo(PathData*
const path_data) {
636 std::vector<PathPointDecision> path_decision;
640 const auto& discrete_path = path_data->discretized_path();
641 bool is_prev_point_out_lane =
false;
642 SLBoundary ego_sl_boundary;
643 for (
size_t i = 0; i < discrete_path.size(); ++i) {
645 ADEBUG <<
"Unable to get SL-boundary of ego-vehicle.";
648 double lane_left_width = 0.0;
649 double lane_right_width = 0.0;
651 (ego_sl_boundary.start_s() + ego_sl_boundary.end_s()) / 2.0;
653 middle_s, &lane_left_width, &lane_right_width)) {
655 double back_to_inlane_extra_buffer = 0.2;
656 double in_and_out_lane_hysteresis_buffer =
657 is_prev_point_out_lane ? back_to_inlane_extra_buffer : 0.0;
661 if (ego_sl_boundary.end_l() >
662 lane_left_width + in_and_out_lane_hysteresis_buffer ||
663 ego_sl_boundary.start_l() <
664 -lane_right_width - in_and_out_lane_hysteresis_buffer) {
665 if (path_data->path_label().find(
"reverse") != std::string::npos) {
666 std::get<1>((path_decision)[i]) =
668 }
else if (path_data->path_label().find(
"forward") !=
670 std::get<1>((path_decision)[i]) =
675 if (!is_prev_point_out_lane) {
676 if (ego_sl_boundary.end_l() >
677 lane_left_width + back_to_inlane_extra_buffer ||
678 ego_sl_boundary.start_l() <
679 -lane_right_width - back_to_inlane_extra_buffer) {
680 is_prev_point_out_lane =
true;
686 if (is_prev_point_out_lane) {
687 is_prev_point_out_lane =
false;
693 <<
"reference line not ready when setting path point guide, middle_s"
694 << middle_s <<
",index" << i <<
"path point"
695 << discrete_path[i].DebugString();
699 path_data->SetPathPointDecisionGuide(std::move(path_decision));
703 const Obstacle* blocking_obstacle) {
705 static constexpr double kNeighborPathLengthComparisonTolerance = 25.0;
710 if (std::fabs(lhs_path_length - rhs_path_length) >
711 kNeighborPathLengthComparisonTolerance) {
712 return lhs_path_length > rhs_path_length;
721 if (std::abs(lhs_on_reverse - rhs_on_reverse) > 6) {
722 return lhs_on_reverse < rhs_on_reverse;
726 if (blocking_obstacle) {
728 const double obstacle_l =
732 ADEBUG <<
"obstacle[" << blocking_obstacle->
Id() <<
"] l[" << obstacle_l
734 return (obstacle_l > 0.0
735 ? (lhs.
path_label().find(
"right") != std::string::npos)
736 : (lhs.
path_label().find(
"left") != std::string::npos));
741 return lhs.
path_label().find(
"right") != std::string::npos;
742 }
else if (adc_l > 1.0) {
743 return lhs.
path_label().find(
"left") != std::string::npos;
748 static constexpr double kBackToSelfLaneComparisonTolerance = 20.0;
753 if (std::fabs(lhs_back_s - rhs_back_s) > kBackToSelfLaneComparisonTolerance) {
754 return lhs_back_idx < rhs_back_idx;
758 bool lhs_on_leftlane = lhs.
path_label().find(
"left") != std::string::npos;
759 return lhs_on_leftlane;
763 const std::vector<PathPointDecision>& path_point_decision) {
765 for (
const auto& curr_decision : path_point_decision) {
766 if (std::get<1>(curr_decision) ==
775 const std::vector<PathPointDecision>& path_point_decision) {
780 for (
int i =
static_cast<int>(path_point_decision.size()) - 1; i >= 0; --i) {
781 if (std::get<1>(path_point_decision[i]) !=
A general class to denote the return status of an API call.
static Status OK()
generate a success status.
@Brief This is a helper class that can load vehicle configurations.
Rectangular (undirected) bounding box in 2-D.
The class of polygon in 2-D.
Implements a class of 2-dimensional vectors.
Frame holds all data for one planning cycle.
T * Find(const I id)
Find object by id in the container
bool Init(const std::string &config_dir, const std::string &name, const std::shared_ptr< DependencyInjector > &injector) override
This is the class that associates an Obstacle with its path properties.
const std::string & Id() const
const SLBoundary & PerceptionSLBoundary() const
static void InitPathPointDecision(const PathData &path_data, const PathData::PathPointType type, std::vector< PathPointDecision > *const path_point_decision)
Init path_point_decision as type
static void TrimTailingOutLanePoints(PathData *const path_data)
Trim the points at tail of path which away from lane
static bool IsValidRegularPath(const ReferenceLineInfo &reference_line_info, const PathData &path_data)
Check if the generated path is valid
static bool GetBoundaryFromStaticObstacles(const ReferenceLineInfo &reference_line_info, std::vector< SLPolygon > *const sl_polygons, const SLState &init_sl_state, PathBoundary *const path_boundaries, std::string *const blocking_obstacle_id, double *const narrowest_width)
Refine the boundary based on static obstacles.
static void TrimPathBounds(const int path_blocked_idx, PathBoundary *const path_boundaries)
static bool UpdatePathBoundaryWithBuffer(double left_bound, double right_bound, BoundType left_type, BoundType right_type, std::string left_id, std::string right_id, PathBoundPoint *const bound_point)
Update the path_boundary at "idx" It also checks if ADC is blocked (lmax < lmin).
static void GetSLPolygons(const ReferenceLineInfo &reference_line_info, std::vector< SLPolygon > *polygons, const SLState &init_sl_state)
static double GetADCLaneWidth(const ReferenceLine &reference_line, const double adc_frenet_s)
Get lane width in init_sl_state.
static bool InitPathBoundary(const ReferenceLineInfo &reference_line_info, PathBoundary *const path_bound, SLState init_sl_state)
Starting from ADC's current position, increment until the path length, and set lateral bounds to be i...
const std::string & path_label() const
const FrenetFramePath & frenet_frame_path() const
const std::vector< std::tuple< double, PathPointType, double > > & path_point_decision_guide() const
const IndexedList< std::string, Obstacle > & obstacles() const
void RecordDebugInfo(const PathBound &path_boundaries, const std::string &debug_name, ReferenceLineInfo *const reference_line_info)
add path_boundary debug info for PnC monitor
bool GetSLBoundary(const PathData &path_data, int point_index, const ReferenceLineInfo *reference_line_info, SLBoundary *const sl_boundary)
get sl boundary of the point on PathData
std::vector< SLPolygon > obs_sl_polygons_
void GetStartPointSLState()
calculate init sl state by planning start point, result will store in init_sl_state_
static std::vector< common::PathPoint > ConvertPathPointRefFromFrontAxeToRearAxe(const PathData &path_data)
static void CalculateAccBound(const PathBoundary &path_boundary, const ReferenceLine &reference_line, std::vector< std::pair< double, double > > *ddl_bounds)
calculate ddl bound by referenceline kappa and adc lat accleration
static FrenetFramePath ToPiecewiseJerkPath(const std::vector< double > &x, const std::vector< double > &dx, const std::vector< double > &ddx, const double delta_s, const double start_s)
Data format tramform from raw data to FrenetFramePath
static double EstimateJerkBoundary(const double vehicle_speed)
Calculation of jerk boundary based on vehicle kinematics model.
static bool OptimizePath(const SLState &init_state, const std::array< double, 3 > &end_state, std::vector< double > l_ref, std::vector< double > l_ref_weight, const PathBoundary &path_boundary, const std::vector< std::pair< double, double > > &ddl_bounds, double dddl_bound, const PiecewiseJerkPathConfig &config, std::vector< double > *x, std::vector< double > *dx, std::vector< double > *ddx)
Piecewise jerk path optimizer.
static void UpdatePathRefWithBound(const PathBoundary &path_boundary, double weight, std::vector< double > *ref_l, std::vector< double > *weight_ref_l)
If ref_l is below or above path boundary, will update its values and weights
ReferenceLineInfo holds all data for one reference line.
bool path_reusable() const
PathDecision * path_decision()
bool GetNeighborLaneInfo(const ReferenceLineInfo::LaneType lane_type, const double s, hdmap::Id *ptr_lane_id, double *ptr_lane_width) const
std::vector< SLPolygon > * mutable_obs_sl_polygons()
const ReferenceLine & reference_line() const
const PathData & path_data() const
double SDistanceToDestination() const
PathData * mutable_path_data()
bool GetLaneWidth(const double s, double *const lane_left_width, double *const lane_right_width) const
std::shared_ptr< DependencyInjector > injector_
ReferenceLineInfo * reference_line_info_
virtual bool Init(const std::string &config_dir, const std::string &name, const std::shared_ptr< DependencyInjector > &injector)
Planning module main class.
LaneBoundaryType::Type LeftBoundaryType(const LaneWaypoint &waypoint)
get left boundary type at a waypoint.
LaneBoundaryType::Type RightBoundaryType(const LaneWaypoint &waypoint)
get left boundary type at a waypoint.
int GetBackToInLaneIndex(const std::vector< PathPointDecision > &path_point_decision)
constexpr double kJunctionClearanceDist
constexpr double kIntersectionClearanceDist
int ContainsOutOnReverseLane(const std::vector< PathPointDecision > &path_point_decision)
std::vector< PathBoundPoint > PathBound
bool IsNonmovableObstacle(const ReferenceLineInfo &reference_line_info, const Obstacle &obstacle)
bool ComparePathData(const PathData &lhs, const PathData &rhs, const Obstacle *blocking_obstacle)
optional PiecewiseJerkPathConfig path_optimizer_config
optional double lane_borrow_max_speed
optional int64 long_term_blocking_obstacle_cycle_threshold
optional bool is_allow_lane_borrowing