Skip to content

Commit

Permalink
fix(intersection): fix wrong resample process (autowarefoundation#5516)
Browse files Browse the repository at this point in the history
Signed-off-by: Mamoru Sobue <[email protected]>
  • Loading branch information
soblin authored and zhiwango committed Nov 21, 2023
1 parent 4d4abb5 commit ea10557
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions planning/behavior_velocity_intersection_module/src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1428,14 +1428,14 @@ lanelet::ConstLanelet generatePathLanelet(
{
lanelet::Points3d lefts;
lanelet::Points3d rights;
size_t prev_idx = start_idx;
for (size_t i = start_idx; i <= end_idx; ++i) {
const auto & p = path.points.at(i).point.pose;
if (start_idx < i && i != end_idx) {
const auto & p_prev = path.points.at(i - 1).point.pose;
if (tier4_autoware_utils::calcDistance2d(p_prev, p) < interval) {
continue;
}
const auto & p_prev = path.points.at(prev_idx).point.pose;
if (i != start_idx && tier4_autoware_utils::calcDistance2d(p_prev, p) < interval) {
continue;
}
prev_idx = i;
const double yaw = tf2::getYaw(p.orientation);
const double x = p.position.x;
const double y = p.position.y;
Expand Down

0 comments on commit ea10557

Please sign in to comment.