File tree 1 file changed +6
-1
lines changed
planning/behavior_path_planner/src/utils
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -108,13 +108,17 @@ PathWithLaneId resamplePathWithSpline(
108
108
109
109
std::vector<double > s_out = s_in;
110
110
111
+ // sampling from interval distance
111
112
const auto start_s = std::max (target_section.first , 0.0 );
112
113
const auto end_s = std::min (target_section.second , s_vec.back ());
113
114
for (double s = start_s; s < end_s; s += interval) {
114
115
if (!find_almost_same_values (s_out, s)) {
115
116
s_out.push_back (s);
116
117
}
117
118
}
119
+ if (!find_almost_same_values (s_out, end_s)) {
120
+ s_out.push_back (end_s);
121
+ }
118
122
119
123
// Insert Stop Point
120
124
const auto closest_stop_dist = motion_utils::calcDistanceToForwardStopPoint (transformed_path);
@@ -133,7 +137,8 @@ PathWithLaneId resamplePathWithSpline(
133
137
}
134
138
}
135
139
136
- if (s_out.empty ()) {
140
+ // spline resample required more than 2 points for yaw angle calculation
141
+ if (s_out.size () < 2 ) {
137
142
return path;
138
143
}
139
144
You can’t perform that action at this time.
0 commit comments