Skip to content

Commit

Permalink
chore: minor fix
Browse files Browse the repository at this point in the history
Signed-off-by: tanaka3 <ttatcoder@outlook.jp>
  • Loading branch information
taikitanaka3 committed Jan 13, 2022
1 parent c6fb966 commit 8ed8480
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ void buildSlices(
const double ratio_dist_increment = std::min(1.0, slice_width / std::abs(range.max_distance));
lanelet::BasicPolygon2d poly;
const int num_step = static_cast<int>(slice_length / resolution);
const int loop_num = static_cast<int>(inner_bounds.size()) - 1 - num_step;
for (int s = 0; s < loop_num; s += num_step) {
const int max_index = static_cast<int>(inner_bounds.size());
for (int s = 0; s < max_index; s += num_step) {
const double length = s * slice_length;
const double next_length = (s + num_step) * resolution;
for (int d = 0; d < num_lateral_slice; d++) {
Expand All @@ -82,6 +82,7 @@ void buildSlices(
BasicLineString2d outer_polygons;
// build interpolated polygon for lateral
for (int i = 0; i <= num_step; i++) {
if(s+i >= max_index) continue;
inner_polygons.emplace_back(
lerp(inner_bounds.at(s + i), outer_bounds.at(s + i), ratio_dist));
outer_polygons.emplace_back(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ bool OcclusionSpotInPrivateModule::modifyPathVelocity(
.position.x;
}
autoware_auto_planning_msgs::msg::PathWithLaneId interp_path;
occlusion_spot_utils::splineInterpolate(limited_path, 1.0, &interp_path, logger_);
occlusion_spot_utils::splineInterpolate(limited_path, 0.5, &interp_path, logger_);
if (interp_path.points.size() < 4) {
return true;
}
Expand Down

0 comments on commit 8ed8480

Please sign in to comment.