Skip to content

Commit f30e55f

Browse files
authored
fix(static_obstacle_avoidance): change avoidance condition (autowarefoundation#8433) (#1460)
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
1 parent e7a9153 commit f30e55f

File tree

1 file changed

+40
-0
lines changed
  • planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module/src

1 file changed

+40
-0
lines changed

planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module/src/utils.cpp

+40
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,46 @@ bool isObviousAvoidanceTarget(
754754
}
755755
}
756756

757+
if (object.behavior == ObjectData::Behavior::MERGING) {
758+
object.info = ObjectInfo::MERGING_TO_EGO_LANE;
759+
if (
760+
isOnRight(object) && !object.is_on_ego_lane &&
761+
object.overhang_points.front().first < parameters->th_overhang_distance) {
762+
RCLCPP_DEBUG(
763+
rclcpp::get_logger(logger_namespace),
764+
"merging vehicle. but overhang distance is less than threshold.");
765+
return true;
766+
}
767+
if (
768+
!isOnRight(object) && !object.is_on_ego_lane &&
769+
object.overhang_points.front().first > -1.0 * parameters->th_overhang_distance) {
770+
RCLCPP_DEBUG(
771+
rclcpp::get_logger(logger_namespace),
772+
"merging vehicle. but overhang distance is less than threshold.");
773+
return true;
774+
}
775+
}
776+
777+
if (object.behavior == ObjectData::Behavior::DEVIATING) {
778+
object.info = ObjectInfo::DEVIATING_FROM_EGO_LANE;
779+
if (
780+
isOnRight(object) && !object.is_on_ego_lane &&
781+
object.overhang_points.front().first < parameters->th_overhang_distance) {
782+
RCLCPP_DEBUG(
783+
rclcpp::get_logger(logger_namespace),
784+
"deviating vehicle. but overhang distance is less than threshold.");
785+
return true;
786+
}
787+
if (
788+
!isOnRight(object) && !object.is_on_ego_lane &&
789+
object.overhang_points.front().first > -1.0 * parameters->th_overhang_distance) {
790+
RCLCPP_DEBUG(
791+
rclcpp::get_logger(logger_namespace),
792+
"deviating vehicle. but overhang distance is less than threshold.");
793+
return true;
794+
}
795+
}
796+
757797
if (!object.is_parked) {
758798
object.info = ObjectInfo::IS_NOT_PARKING_OBJECT;
759799
}

0 commit comments

Comments
 (0)