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

fix(detection_area): fix overline function #930

Merged
merged 3 commits into from
Oct 13, 2023
Merged
Changes from 2 commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,13 @@ bool DetectionAreaModule::isOverLine(
const autoware_auto_planning_msgs::msg::PathWithLaneId & path,
const geometry_msgs::msg::Pose & self_pose, const geometry_msgs::msg::Pose & line_pose) const
{
return tier4_autoware_utils::calcSignedArcLength(
path.points, self_pose.position, line_pose.position) < 0;
const PointWithSearchRangeIndex src_point_with_search_range_index =
planning_utils::findFirstNearSearchRangeIndex(path.points, self_pose.position);
const PointWithSearchRangeIndex dst_point_with_search_range_index = {
line_pose.position, planning_utils::getPathIndexRangeIncludeLaneId(path, lane_id_)};

return planning_utils::calcSignedArcLengthWithSearchIndex(
path.points, src_point_with_search_range_index, dst_point_with_search_range_index) < 0;
h-ohta marked this conversation as resolved.
Show resolved Hide resolved
}

bool DetectionAreaModule::hasEnoughBrakingDistance(
Expand Down
Loading