Skip to content
Snippets Groups Projects
Unverified Commit 4e1c18db authored by Martin Ganeff's avatar Martin Ganeff Committed by GitHub
Browse files

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

parent 42a91947
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment