Skip to content

Commit

Permalink
fix(motion_velocity_smoother): curve deceleration not working with a …
Browse files Browse the repository at this point in the history
…specific parameter set

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>
  • Loading branch information
TakaHoribe committed Apr 21, 2022
1 parent bad563d commit 8adff0c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ boost::optional<TrajectoryPoints> SmootherBase::applyLateralAccelerationFilter(
for (size_t i = 0; i < output->size(); ++i) {
double curvature = 0.0;
const size_t start = i > after_decel_index ? i - after_decel_index : 0;
const size_t end = std::min(output->size(), i + before_decel_index);
const size_t end = std::min(output->size(), i + before_decel_index + 1);
for (size_t j = start; j < end; ++j) {
curvature = std::max(curvature, std::fabs(curvature_v->at(j)));
}
Expand Down

0 comments on commit 8adff0c

Please sign in to comment.