Skip to content

Commit

Permalink
fix(behavior_path_planner): overwrite goal lane id when pull over fun…
Browse files Browse the repository at this point in the history
…ction is on (autowarefoundation#451)

Signed-off-by: kyoichi sugahara <81.s.kyo.19@gmail.com>
  • Loading branch information
kyoichi-sugahara authored and satoshi-ota committed May 20, 2022
1 parent 4096fe4 commit d283ba6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -669,8 +669,8 @@ PathWithLaneId BehaviorPathPlannerNode::modifyPathForSmoothGoalConnection(
const PathWithLaneId & path) const
{
const auto goal = planner_data_->route_handler->getGoalPose();
const auto goal_lane_id = planner_data_->route_handler->getGoalLaneId();
const auto is_approved = planner_data_->approval.is_approved.data;
auto goal_lane_id = planner_data_->route_handler->getGoalLaneId();

Pose refined_goal{};
{
Expand All @@ -681,6 +681,7 @@ PathWithLaneId BehaviorPathPlannerNode::modifyPathForSmoothGoalConnection(
is_approved && planner_data_->route_handler->getPullOverTarget(
planner_data_->route_handler->getShoulderLanelets(), &pull_over_lane)) {
refined_goal = planner_data_->route_handler->getPullOverGoalPose();
goal_lane_id = pull_over_lane.id();
} else if (planner_data_->route_handler->getGoalLanelet(&goal_lanelet)) {
refined_goal = util::refineGoal(goal, goal_lanelet);
} else {
Expand Down

0 comments on commit d283ba6

Please sign in to comment.