Skip to content

Commit

Permalink
fix(static_obstacle_avoidance): ignore pedestrian/cyclist who is not …
Browse files Browse the repository at this point in the history
…on road edge (autowarefoundation#7850)

* fix(static_obstacle_avoidance): ignore pedestrian/cyclist who is not on road edge

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* docs(static_obstacle_avoidance): update flowchart

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* Update planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module/README.md

Co-authored-by: Go Sakayori <go-sakayori@users.noreply.github.com>

---------

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Co-authored-by: Go Sakayori <go-sakayori@users.noreply.github.com>
Signed-off-by: palas21 <palas21@itu.edu.tr>
  • Loading branch information
2 people authored and palas21 committed Jul 12, 2024
1 parent 419aa48 commit 95e6d83
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,27 @@ if(isWithinCrosswalk()) then (yes)
stop
else (\n no)
endif
if(is object within intersection?) then (yes)
#00FFB1 :return false;
stop
else (\n no)
endif
if(is object on right side of the ego path?) then (yes)
if(are there adjacent lanes on right side of ego lane?) then (yes)
#00FFB1 :return false;
stop
else (\n no)
endif
else (\n no)
if(are there adjacent lanes on left side of ego lane?) then (yes)
#00FFB1 :return false;
stop
else (\n no)
endif
endif
#FF006C :return true;
stop
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,45 @@ bool isSatisfiedWithNonVehicleCondition(
return false;
}

if (object.is_within_intersection) {
RCLCPP_DEBUG(
rclcpp::get_logger(logger_namespace),
"object is within intersection. don't have to avoid it.");
return false;
}

const auto right_lane =
planner_data->route_handler->getRightLanelet(object.overhang_lanelet, true, true);
if (right_lane.has_value() && isOnRight(object)) {
RCLCPP_DEBUG(
rclcpp::get_logger(logger_namespace), "object isn't on the edge lane. never avoid it.");
return false;
}

const auto left_lane =
planner_data->route_handler->getLeftLanelet(object.overhang_lanelet, true, true);
if (left_lane.has_value() && !isOnRight(object)) {
RCLCPP_DEBUG(
rclcpp::get_logger(logger_namespace), "object isn't on the edge lane. never avoid it.");
return false;
}

const auto right_opposite_lanes =
planner_data->route_handler->getRightOppositeLanelets(object.overhang_lanelet);
if (!right_opposite_lanes.empty() && isOnRight(object)) {
RCLCPP_DEBUG(
rclcpp::get_logger(logger_namespace), "object isn't on the edge lane. never avoid it.");
return false;
}

const auto left_opposite_lanes =
planner_data->route_handler->getLeftOppositeLanelets(object.overhang_lanelet);
if (!left_opposite_lanes.empty() && !isOnRight(object)) {
RCLCPP_DEBUG(
rclcpp::get_logger(logger_namespace), "object isn't on the edge lane. never avoid it.");
return false;
}

return true;
}

Expand Down Expand Up @@ -1840,6 +1879,8 @@ void filterTargetObjects(
continue;
}
} else {
o.is_within_intersection =
filtering_utils::isWithinIntersection(o, planner_data->route_handler);
o.is_parked = false;
o.avoid_margin = filtering_utils::getAvoidMargin(o, planner_data, parameters);

Expand Down

0 comments on commit 95e6d83

Please sign in to comment.