Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(avoidance): improve avoidance judgement logic for pedestrian & bicycle #4016

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore(avoidance): add comment
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
  • Loading branch information
satoshi-ota committed Jun 23, 2023
commit d0196bf79c96b030fdb77528e4eb3530c96d3d42
8 changes: 7 additions & 1 deletion planning/behavior_path_planner/src/utils/avoidance/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ bool isWithinCrosswalk(

boost::geometry::correct(polygon);

// ignore objects arround the crosswalk
// ignore objects around the crosswalk
if (boost::geometry::distance(p_object, polygon) < THRESHOLD) {
return true;
}
Expand Down Expand Up @@ -922,18 +922,24 @@ void filterTargetObjects(
}
}

// for non vehicle type object
if (!isVehicleTypeObject(o)) {
if (isWithinCrosswalk(o, rh->getOverallGraphPtr())) {
// avoidance module ignore pedestrian and bicycle around crosswalk
o.reason = "CrosswalkUser";
data.other_objects.push_back(o);
} else {
// if there is no crosswalk near the object, avoidance module avoids pedestrian and bicycle
// no matter how it is shifted.
o.last_seen = now;
o.avoid_margin = avoid_margin;
data.target_objects.push_back(o);
}
continue;
}

// from here condition check for vehicle type objects.

const auto stop_time_longer_than_threshold =
o.stop_time > parameters->threshold_time_force_avoidance_for_stopped_vehicle;

Expand Down