Skip to content

Commit

Permalink
fix(static_obstacle_avoidance): change avoidance condition (autowaref…
Browse files Browse the repository at this point in the history
…oundation#8433) (#1460)

Signed-off-by: satoshi-ota <[email protected]>
  • Loading branch information
satoshi-ota authored Aug 29, 2024
1 parent e7a9153 commit f30e55f
Showing 1 changed file with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,46 @@ bool isObviousAvoidanceTarget(
}
}

if (object.behavior == ObjectData::Behavior::MERGING) {
object.info = ObjectInfo::MERGING_TO_EGO_LANE;
if (
isOnRight(object) && !object.is_on_ego_lane &&
object.overhang_points.front().first < parameters->th_overhang_distance) {
RCLCPP_DEBUG(
rclcpp::get_logger(logger_namespace),
"merging vehicle. but overhang distance is less than threshold.");
return true;
}
if (
!isOnRight(object) && !object.is_on_ego_lane &&
object.overhang_points.front().first > -1.0 * parameters->th_overhang_distance) {
RCLCPP_DEBUG(
rclcpp::get_logger(logger_namespace),
"merging vehicle. but overhang distance is less than threshold.");
return true;
}
}

if (object.behavior == ObjectData::Behavior::DEVIATING) {
object.info = ObjectInfo::DEVIATING_FROM_EGO_LANE;
if (
isOnRight(object) && !object.is_on_ego_lane &&
object.overhang_points.front().first < parameters->th_overhang_distance) {
RCLCPP_DEBUG(
rclcpp::get_logger(logger_namespace),
"deviating vehicle. but overhang distance is less than threshold.");
return true;
}
if (
!isOnRight(object) && !object.is_on_ego_lane &&
object.overhang_points.front().first > -1.0 * parameters->th_overhang_distance) {
RCLCPP_DEBUG(
rclcpp::get_logger(logger_namespace),
"deviating vehicle. but overhang distance is less than threshold.");
return true;
}
}

if (!object.is_parked) {
object.info = ObjectInfo::IS_NOT_PARKING_OBJECT;
}
Expand Down

0 comments on commit f30e55f

Please sign in to comment.