Skip to content

Commit 81ef509

Browse files
authored
fix(motion_utils): remove only first point whose orientation is invalid (autowarefoundation#7084)
fix(motion_utils): don't continue when it removes invalid orientation point Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
1 parent 93243e0 commit 81ef509

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

planning/behavior_path_planner_common/src/utils/path_shifter/path_shifter.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ namespace behavior_path_planner
5353

5454
using motion_utils::findNearestIndex;
5555
using motion_utils::insertOrientation;
56-
using motion_utils::removeInvalidOrientationPoints;
56+
using motion_utils::removeFirstInvalidOrientationPoints;
5757
using motion_utils::removeOverlapPoints;
5858

5959
void PathShifter::setPath(const PathWithLaneId & path)
@@ -155,14 +155,14 @@ bool PathShifter::generate(
155155
shifted_path->path.points = removeOverlapPoints(shifted_path->path.points);
156156
// Use orientation before shift to remove points in reverse order
157157
// before setting wrong azimuth orientation
158-
removeInvalidOrientationPoints(shifted_path->path.points);
158+
removeFirstInvalidOrientationPoints(shifted_path->path.points);
159159
size_t previous_size{shifted_path->path.points.size()};
160160
do {
161161
previous_size = shifted_path->path.points.size();
162162
// Set the azimuth orientation to the next point at each point
163163
insertOrientation(shifted_path->path.points, true);
164164
// Use azimuth orientation to remove points in reverse order
165-
removeInvalidOrientationPoints(shifted_path->path.points);
165+
removeFirstInvalidOrientationPoints(shifted_path->path.points);
166166
} while (previous_size != shifted_path->path.points.size());
167167

168168
// DEBUG

0 commit comments

Comments
 (0)