Skip to content

Commit

Permalink
Update planning/autoware_path_generator/src/utils.cpp
Browse files Browse the repository at this point in the history
Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>
  • Loading branch information
sasakisasaki and kosuke55 authored Mar 8, 2025
1 parent 5872f9c commit 468539c
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions planning/autoware_path_generator/src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,20 +445,8 @@ PathWithLaneId modify_path_for_smooth_goal_connection(
const auto goal_lanelet = get_goal_lanelet(*planner_data);
const auto refined_goal = goal_lanelet.has_value() ? refine_goal(goal, *goal_lanelet) : goal;

bool is_valid_path{false};
PathWithLaneId refined_path;

// Then, refine the path for the goal
refined_path = refine_path_for_goal(path, refined_goal);
if (is_path_valid(refined_path, planner_data)) {
is_valid_path = true;
}

// It is better to return the original path if the refined path is not valid
if (!is_valid_path) {
return path;
}
return refined_path;
const PathWithLaneId refined_path = refine_path_for_goal(path, refined_goal);
return is_path_valid(refined_path, planner_data) ? refined_path : path;
}

TurnIndicatorsCommand get_turn_signal(
Expand Down

0 comments on commit 468539c

Please sign in to comment.