diff --git a/nav2_mppi_controller/src/critics/path_align_critic.cpp b/nav2_mppi_controller/src/critics/path_align_critic.cpp index cd913e5b0e..b103f5b5f6 100644 --- a/nav2_mppi_controller/src/critics/path_align_critic.cpp +++ b/nav2_mppi_controller/src/critics/path_align_critic.cpp @@ -98,6 +98,7 @@ void PathAlignCritic::score(CriticData & data) traj_integrated_distance = 0.0f; summed_path_dist = 0.0f; num_samples = 0.0f; + path_pt = 0u; const auto T_x = xt::view(data.trajectories.x, t, xt::all()); const auto T_y = xt::view(data.trajectories.y, t, xt::all()); for (size_t p = trajectory_point_step_; p < time_steps; p += trajectory_point_step_) {