Skip to content

Commit

Permalink
fix bug with lateral offset which could be negative
Browse files Browse the repository at this point in the history
Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
  • Loading branch information
maxime-clem committed Aug 29, 2023
1 parent 8ec5377 commit 1af2814
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace behavior_velocity_planner::out_of_lane
[&](const auto & predicted_path) {
const auto is_low_confidence = predicted_path.confidence < params.objects_min_confidence;
const auto lat_offset_to_current_ego =
motion_utils::calcLateralOffset(predicted_path.path, ego_data.pose.position);
std::abs(motion_utils::calcLateralOffset(predicted_path.path, ego_data.pose.position));
const auto is_crossing_ego = lat_offset_to_current_ego <= object.shape.dimensions.y / 2.0 +
std::max(params.left_offset + params.extra_left_offset, params.right_offset + params.extra_right_offset);
return is_low_confidence || is_crossing_ego;
Expand Down

0 comments on commit 1af2814

Please sign in to comment.