Skip to content

Commit

Permalink
Correct accumulated_delay_times in ekf_localizer so that the delay_st…
Browse files Browse the repository at this point in the history
…ep is computed accurately.

Signed-off-by: TaikiYamada4 <[email protected]>
  • Loading branch information
TaikiYamada4 committed Dec 8, 2023
1 parent 1bac0bf commit ec30500
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions localization/ekf_localizer/src/ekf_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ void EKFModule::accumulate_delay_time(const double dt)
accumulated_delay_times_.begin(), accumulated_delay_times_.end() - 1,
accumulated_delay_times_.end());

// Add the new delay time to all elements.
// Add a new element (=0) and, and add delay time to the previous elements.
accumulated_delay_times_.front() = 0.0;
for (auto & delay_time : accumulated_delay_times_) {
delay_time += dt;
for (size_t i = 1; i < accumulated_delay_times_.size(); ++i) {
accumulated_delay_times_[i] += dt;
}
}

Expand Down

0 comments on commit ec30500

Please sign in to comment.