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);
121 std::vector<SLPolygon> obs_sl_polygons;
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];
240bool LaneBorrowPath::GetBoundaryFromNeighborLane(
242 std::string* borrow_lane_type) {
244 CHECK_NOTNULL(path_bound);
245 ACHECK(!path_bound->empty());
249 double offset_to_map = 0;
250 bool borrowing_reverse_lane =
false;
251 reference_line.GetOffsetToMap(
init_sl_state_.first[0], &offset_to_map);
254 double past_lane_left_width = adc_lane_width / 2.0;
255 double past_lane_right_width = adc_lane_width / 2.0;
256 int path_blocked_idx = -1;
257 for (
size_t i = 0; i < path_bound->size(); ++i) {
258 double curr_s = (*path_bound)[i].s;
260 double curr_lane_left_width = 0.0;
261 double curr_lane_right_width = 0.0;
262 double offset_to_lane_center = 0.0;
263 if (!reference_line.GetLaneWidth(curr_s, &curr_lane_left_width,
264 &curr_lane_right_width)) {
265 AWARN <<
"Failed to get lane width at s = " << curr_s;
266 curr_lane_left_width = past_lane_left_width;
267 curr_lane_right_width = past_lane_right_width;
269 reference_line.GetOffsetToMap(curr_s, &offset_to_lane_center);
270 curr_lane_left_width += offset_to_lane_center;
271 curr_lane_right_width -= offset_to_lane_center;
272 past_lane_left_width = curr_lane_left_width;
273 past_lane_right_width = curr_lane_right_width;
276 double curr_neighbor_lane_width = 0.0;
278 hdmap::Id neighbor_lane_id;
279 if (pass_direction == SidePassDirection::LEFT_BORROW) {
283 &neighbor_lane_id, &curr_neighbor_lane_width)) {
284 ADEBUG <<
"Borrow left forward neighbor lane."
285 << neighbor_lane_id.id();
288 &neighbor_lane_id, &curr_neighbor_lane_width)) {
289 borrowing_reverse_lane =
true;
290 ADEBUG <<
"Borrow left reverse neighbor lane."
291 << neighbor_lane_id.id();
293 ADEBUG <<
"There is no left neighbor lane.";
295 }
else if (pass_direction == SidePassDirection::RIGHT_BORROW) {
299 &neighbor_lane_id, &curr_neighbor_lane_width)) {
300 ADEBUG <<
"Borrow right forward neighbor lane."
301 << neighbor_lane_id.id();
304 &neighbor_lane_id, &curr_neighbor_lane_width)) {
305 borrowing_reverse_lane =
true;
306 ADEBUG <<
"Borrow right reverse neighbor lane."
307 << neighbor_lane_id.id();
309 ADEBUG <<
"There is no right neighbor lane.";
315 double offset_to_map = 0.0;
316 reference_line.GetOffsetToMap(curr_s, &offset_to_map);
318 double curr_left_bound_lane =
319 curr_lane_left_width + (pass_direction == SidePassDirection::LEFT_BORROW
320 ? curr_neighbor_lane_width
323 double curr_right_bound_lane =
324 -curr_lane_right_width -
325 (pass_direction == SidePassDirection::RIGHT_BORROW
326 ? curr_neighbor_lane_width
328 double curr_left_bound = 0.0;
329 double curr_right_bound = 0.0;
330 curr_left_bound = curr_left_bound_lane - offset_to_map;
331 curr_right_bound = curr_right_bound_lane - offset_to_map;
336 "",
"", &path_bound->at(i))) {
337 path_blocked_idx =
static_cast<int>(i);
339 if (path_blocked_idx != -1) {
344 *borrow_lane_type = borrowing_reverse_lane ?
"reverse" :
"forward";
347void LaneBorrowPath::UpdateSelfPathInfo() {
349 if (!cur_path.Empty() &&
350 cur_path.path_label().find(
"self") != std::string::npos &&
351 cur_path.blocking_obstacle_id().empty()) {
352 use_self_lane_ = std::min(use_self_lane_ + 1, 10);
356 blocking_obstacle_id_ = cur_path.blocking_obstacle_id();
358bool LaneBorrowPath::IsNecessaryToBorrowLane() {
359 auto* mutable_path_decider_status =
injector_->planning_context()
360 ->mutable_planning_status()
361 ->mutable_path_decider();
362 if (mutable_path_decider_status->is_in_path_lane_borrow_scenario()) {
363 UpdateSelfPathInfo();
365 if (use_self_lane_ >= 6) {
368 mutable_path_decider_status->set_is_in_path_lane_borrow_scenario(
false);
369 decided_side_pass_direction_.clear();
370 AINFO <<
"Switch from LANE-BORROW path to SELF-LANE path.";
374 AINFO <<
"Blocking obstacle ID["
375 << mutable_path_decider_status->front_static_obstacle_id() <<
"]";
377 if (!HasSingleReferenceLine(*
frame_)) {
380 if (!IsWithinSidePassingSpeedADC(*
frame_)) {
388 if (!IsLongTermBlockingObstacle()) {
399 if (decided_side_pass_direction_.empty()) {
401 bool left_borrowable;
402 bool right_borrowable;
405 if (!left_borrowable && !right_borrowable) {
406 mutable_path_decider_status->set_is_in_path_lane_borrow_scenario(
false);
407 AINFO <<
"LEFT AND RIGHT LANE CAN NOT BORROW";
410 mutable_path_decider_status->set_is_in_path_lane_borrow_scenario(
true);
411 if (left_borrowable) {
412 decided_side_pass_direction_.push_back(
413 SidePassDirection::LEFT_BORROW);
415 if (right_borrowable) {
416 decided_side_pass_direction_.push_back(
417 SidePassDirection::RIGHT_BORROW);
422 AINFO <<
"Switch from SELF-LANE path to LANE-BORROW path.";
424 return mutable_path_decider_status->is_in_path_lane_borrow_scenario();
427bool LaneBorrowPath::HasSingleReferenceLine(
const Frame& frame) {
428 return frame.reference_line_info().size() == 1;
431bool LaneBorrowPath::IsWithinSidePassingSpeedADC(
const Frame& frame) {
435bool LaneBorrowPath::IsLongTermBlockingObstacle() {
439 .front_static_obstacle_cycle_counter() >=
441 ADEBUG <<
"The blocking obstacle is long-term existing.";
444 ADEBUG <<
"The blocking obstacle is not long-term existing.";
449bool LaneBorrowPath::IsBlockingObstacleWithinDestination(
450 const ReferenceLineInfo& reference_line_info) {
451 const auto& path_decider_status =
452 injector_->planning_context()->planning_status().path_decider();
453 const std::string blocking_obstacle_id =
454 path_decider_status.front_static_obstacle_id();
455 if (blocking_obstacle_id.empty()) {
456 ADEBUG <<
"There is no blocking obstacle.";
459 const Obstacle* blocking_obstacle =
460 reference_line_info.path_decision().obstacles().Find(
461 blocking_obstacle_id);
462 if (blocking_obstacle ==
nullptr) {
463 ADEBUG <<
"Blocking obstacle is no longer there.";
467 double blocking_obstacle_s =
468 blocking_obstacle->PerceptionSLBoundary().start_s();
469 double adc_end_s = reference_line_info.AdcSlBoundary().end_s();
470 ADEBUG <<
"Blocking obstacle is at s = " << blocking_obstacle_s;
471 ADEBUG <<
"ADC is at s = " << adc_end_s;
472 ADEBUG <<
"Destination is at s = "
473 << reference_line_info.SDistanceToDestination() + adc_end_s;
474 if (blocking_obstacle_s - adc_end_s >
475 reference_line_info.SDistanceToDestination()) {
481bool LaneBorrowPath::IsBlockingObstacleFarFromIntersection(
482 const ReferenceLineInfo& reference_line_info) {
483 const auto& path_decider_status =
484 injector_->planning_context()->planning_status().path_decider();
485 const std::string blocking_obstacle_id =
486 path_decider_status.front_static_obstacle_id();
487 if (blocking_obstacle_id.empty()) {
488 ADEBUG <<
"There is no blocking obstacle.";
491 const Obstacle* blocking_obstacle =
492 reference_line_info.path_decision().obstacles().Find(
493 blocking_obstacle_id);
494 if (blocking_obstacle ==
nullptr) {
495 ADEBUG <<
"Blocking obstacle is no longer there.";
500 double blocking_obstacle_s =
501 blocking_obstacle->PerceptionSLBoundary().end_s();
502 ADEBUG <<
"Blocking obstacle is at s = " << blocking_obstacle_s;
504 const auto& first_encountered_overlaps =
505 reference_line_info.FirstEncounteredOverlaps();
506 for (
const auto& overlap : first_encountered_overlaps) {
507 ADEBUG << overlap.first <<
", " << overlap.second.DebugString();
513 auto distance = overlap.second.start_s - blocking_obstacle_s;
517 ADEBUG <<
"Too close to signal intersection (" << distance
518 <<
"m); don't SIDE_PASS.";
523 ADEBUG <<
"Too close to overlap_type[" << overlap.first <<
"] ("
524 << distance <<
"m); don't SIDE_PASS";
533bool LaneBorrowPath::IsSidePassableObstacle(
534 const ReferenceLineInfo& reference_line_info) {
535 const auto& path_decider_status =
536 injector_->planning_context()->planning_status().path_decider();
537 const std::string blocking_obstacle_id =
538 path_decider_status.front_static_obstacle_id();
539 if (blocking_obstacle_id.empty()) {
540 ADEBUG <<
"There is no blocking obstacle.";
543 const Obstacle* blocking_obstacle =
544 reference_line_info.path_decision().obstacles().Find(
545 blocking_obstacle_id);
546 if (blocking_obstacle ==
nullptr) {
547 ADEBUG <<
"Blocking obstacle is no longer there.";
554void LaneBorrowPath::CheckLaneBorrow(
555 const ReferenceLineInfo& reference_line_info,
556 bool* left_neighbor_lane_borrowable,
bool* right_neighbor_lane_borrowable) {
557 const ReferenceLine& reference_line = reference_line_info.reference_line();
559 *left_neighbor_lane_borrowable =
true;
560 *right_neighbor_lane_borrowable =
true;
562 static constexpr double kLookforwardDistance = 100.0;
563 double check_s = reference_line_info.AdcSlBoundary().end_s();
564 const double lookforward_distance =
565 std::min(check_s + kLookforwardDistance, reference_line.Length());
566 while (check_s < lookforward_distance) {
567 auto ref_point = reference_line.GetNearestReferencePoint(check_s);
568 if (ref_point.lane_waypoints().empty()) {
569 *left_neighbor_lane_borrowable =
false;
570 *right_neighbor_lane_borrowable =
false;
573 auto ptr_lane_info = reference_line_info.LocateLaneInfo(check_s);
574 if (ptr_lane_info->lane().left_neighbor_forward_lane_id().empty() &&
575 ptr_lane_info->lane().left_neighbor_reverse_lane_id().empty()) {
576 *left_neighbor_lane_borrowable =
false;
578 if (ptr_lane_info->lane().right_neighbor_forward_lane_id().empty() &&
579 ptr_lane_info->lane().right_neighbor_reverse_lane_id().empty()) {
580 *right_neighbor_lane_borrowable =
false;
582 const auto waypoint = ref_point.lane_waypoints().front();
586 if (*left_neighbor_lane_borrowable) {
591 *left_neighbor_lane_borrowable =
false;
593 ADEBUG <<
"s[" << check_s <<
"] left_lane_boundary_type["
594 << LaneBoundaryType_Type_Name(lane_boundary_type) <<
"]";
596 if (*right_neighbor_lane_borrowable) {
600 *right_neighbor_lane_borrowable =
false;
602 ADEBUG <<
"s[" << check_s <<
"] right_neighbor_lane_borrowable["
603 << LaneBoundaryType_Type_Name(lane_boundary_type) <<
"]";
609bool LaneBorrowPath::CheckLaneBoundaryType(
610 const ReferenceLineInfo& reference_line_info,
const double check_s,
612 const ReferenceLine& reference_line = reference_line_info.reference_line();
613 auto ref_point = reference_line.GetNearestReferencePoint(check_s);
614 if (ref_point.lane_waypoints().empty()) {
618 const auto waypoint = ref_point.lane_waypoints().front();
621 if (lane_borrow_info == SidePassDirection::LEFT_BORROW) {
623 }
else if (lane_borrow_info == SidePassDirection::RIGHT_BORROW) {
633void LaneBorrowPath::SetPathInfo(PathData*
const path_data) {
634 std::vector<PathPointDecision> path_decision;
638 const auto& discrete_path = path_data->discretized_path();
639 bool is_prev_point_out_lane =
false;
640 SLBoundary ego_sl_boundary;
641 for (
size_t i = 0; i < discrete_path.size(); ++i) {
643 ADEBUG <<
"Unable to get SL-boundary of ego-vehicle.";
646 double lane_left_width = 0.0;
647 double lane_right_width = 0.0;
649 (ego_sl_boundary.start_s() + ego_sl_boundary.end_s()) / 2.0;
651 middle_s, &lane_left_width, &lane_right_width)) {
653 double back_to_inlane_extra_buffer = 0.2;
654 double in_and_out_lane_hysteresis_buffer =
655 is_prev_point_out_lane ? back_to_inlane_extra_buffer : 0.0;
659 if (ego_sl_boundary.end_l() >
660 lane_left_width + in_and_out_lane_hysteresis_buffer ||
661 ego_sl_boundary.start_l() <
662 -lane_right_width - in_and_out_lane_hysteresis_buffer) {
663 if (path_data->path_label().find(
"reverse") != std::string::npos) {
664 std::get<1>((path_decision)[i]) =
666 }
else if (path_data->path_label().find(
"forward") !=
668 std::get<1>((path_decision)[i]) =
673 if (!is_prev_point_out_lane) {
674 if (ego_sl_boundary.end_l() >
675 lane_left_width + back_to_inlane_extra_buffer ||
676 ego_sl_boundary.start_l() <
677 -lane_right_width - back_to_inlane_extra_buffer) {
678 is_prev_point_out_lane =
true;
684 if (is_prev_point_out_lane) {
685 is_prev_point_out_lane =
false;
691 <<
"reference line not ready when setting path point guide, middle_s"
692 << middle_s <<
",index" << i <<
"path point"
693 << discrete_path[i].DebugString();
697 path_data->SetPathPointDecisionGuide(std::move(path_decision));
701 const Obstacle* blocking_obstacle) {
703 static constexpr double kNeighborPathLengthComparisonTolerance = 25.0;
708 if (std::fabs(lhs_path_length - rhs_path_length) >
709 kNeighborPathLengthComparisonTolerance) {
710 return lhs_path_length > rhs_path_length;
719 if (std::abs(lhs_on_reverse - rhs_on_reverse) > 6) {
720 return lhs_on_reverse < rhs_on_reverse;
724 if (blocking_obstacle) {
726 const double obstacle_l =
730 ADEBUG <<
"obstacle[" << blocking_obstacle->
Id() <<
"] l[" << obstacle_l
732 return (obstacle_l > 0.0
733 ? (lhs.
path_label().find(
"right") != std::string::npos)
734 : (lhs.
path_label().find(
"left") != std::string::npos));
739 return lhs.
path_label().find(
"right") != std::string::npos;
740 }
else if (adc_l > 1.0) {
741 return lhs.
path_label().find(
"left") != std::string::npos;
746 static constexpr double kBackToSelfLaneComparisonTolerance = 20.0;
751 if (std::fabs(lhs_back_s - rhs_back_s) > kBackToSelfLaneComparisonTolerance) {
752 return lhs_back_idx < rhs_back_idx;
756 bool lhs_on_leftlane = lhs.
path_label().find(
"left") != std::string::npos;
757 return lhs_on_leftlane;
761 const std::vector<PathPointDecision>& path_point_decision) {
763 for (
const auto& curr_decision : path_point_decision) {
764 if (std::get<1>(curr_decision) ==
773 const std::vector<PathPointDecision>& path_point_decision) {
778 for (
int i =
static_cast<int>(path_point_decision.size()) - 1; i >= 0; --i) {
779 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
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
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