Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use current time to check if observation is out of date #1872

Merged
merged 1 commit into from
Jul 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion nav2_costmap_2d/src/observation_buffer.cpp
Expand Up @@ -234,7 +234,7 @@ void ObservationBuffer::purgeStaleObservations()
Observation & obs = *obs_it;
// check if the observation is out of date... and if it is,
// remove it and those that follow from the list
if ((last_updated_ - obs.cloud_->header.stamp) > observation_keep_time_) {
if ((nh_->now() - obs.cloud_->header.stamp) > observation_keep_time_) {
observation_list_.erase(obs_it, observation_list_.end());
return;
}
Expand Down