navigation icon indicating copy to clipboard operation
navigation copied to clipboard

Why is observation_persistence is compared to the last update time instead of the current time?

Open nightingale0131 opened this issue 4 years ago • 0 comments
trafficstars

This is more of a question than an issue, but I noticed that the observation_persistence parameter in the obstacle layer is used to compare observations with the last known update rather than the current time.

This can be seen in the ObservationBuffer::purgeStaleObservations() function (observation_persistence is passed into observation_keep_time_). This is an issue for me because I have an observation source that does not populate the buffer at a given rate, in fact, it very rarely populates the buffer. Instead of the observation being cleared after observation_persistence (say 1s) has passed, it hangs around indefinitely in the buffer until the next observation is received.

Does anyone know why this is the case? Is this by design or a bug? I ask because it's not how I would have expected observation_persistence to be used.

nightingale0131 avatar May 07 '21 17:05 nightingale0131