Skip to content

Commit

Permalink
feat(obstacle_avoidance_planner): dealt with close lane change (autow…
Browse files Browse the repository at this point in the history
…arefoundation#921)

* feat(obstacle_avoidance_planner): dealt with close lane change

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

* fix bug of right lane change

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>
  • Loading branch information
takayuki5168 authored and shmpwk committed May 24, 2022
1 parent 4b3b534 commit 1766f3f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions planning/obstacle_avoidance_planner/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ bool isPathShapeChanged(
// calculate lateral deviations between truncated path_points and prev_path_points
for (const auto & prev_point : truncated_prev_points) {
const double dist =
tier4_autoware_utils::calcLateralOffset(truncated_points, prev_point.pose.position);
std::abs(tier4_autoware_utils::calcLateralOffset(truncated_points, prev_point.pose.position));
if (dist > max_path_shape_change_dist) {
return true;
}
Expand Down Expand Up @@ -976,7 +976,8 @@ bool ObstacleAvoidancePlanner::checkReplan(
current_ego_pose_, path_points, prev_path_points_ptr_, max_mpt_length,
max_path_shape_change_dist_for_replan_,
traj_param_.delta_yaw_threshold_for_closest_point)) {
RCLCPP_INFO(get_logger(), "Replan since path shape was changed.");
RCLCPP_INFO(get_logger(), "Replan with resetting optimization since path shape was changed.");
resetPrevOptimization();
return true;
}

Expand Down

0 comments on commit 1766f3f

Please sign in to comment.