Skip to content

Commit 2541904

Browse files
committed
reflect comment
Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
1 parent 9c4d0b1 commit 2541904

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

planning/behavior_path_goal_planner_module/src/goal_planner_module.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -852,11 +852,11 @@ std::optional<std::pair<PullOverPath, GoalCandidate>> GoalPlannerModule::selectP
852852
const double backward_length =
853853
parameters_->backward_goal_search_length + parameters_->decide_path_distance;
854854
const auto & prev_module_output_path = getPreviousModuleOutput().path;
855-
const double prev_path_back_to_goal_dist = calcSignedArcLength(
856-
prev_module_output_path.points, prev_module_output_path.points.back().point.pose.position,
855+
const double prev_path_front_to_goal_dist = calcSignedArcLength(
856+
prev_module_output_path.points, prev_module_output_path.points.front().point.pose.position,
857857
goal_pose.position);
858858
const auto & long_tail_reference_path = [&]() {
859-
if (prev_path_back_to_goal_dist > backward_length) {
859+
if (prev_path_front_to_goal_dist > backward_length) {
860860
return prev_module_output_path;
861861
}
862862
// get road lanes which is at least backward_length[m] behind the goal
@@ -865,7 +865,8 @@ std::optional<std::pair<PullOverPath, GoalCandidate>> GoalPlannerModule::selectP
865865
/*forward_only_in_route*/ false);
866866
const auto goal_pose_length = lanelet::utils::getArcCoordinates(road_lanes, goal_pose).length;
867867
return planner_data_->route_handler->getCenterLinePath(
868-
road_lanes, std::max(0.0, goal_pose_length - backward_length), goal_pose_length);
868+
road_lanes, std::max(0.0, goal_pose_length - backward_length),
869+
goal_pose_length + parameters_->forward_goal_search_length);
869870
}();
870871
for (const auto & pull_over_path : pull_over_path_candidates) {
871872
// check if goal is safe

0 commit comments

Comments
 (0)