swri-robotics / gps_umd

BSD 3-Clause "New" or "Revised" License
85 stars 94 forks source link

Fix queue build up issue in gpsd_client #89

Closed erikboto closed 11 months ago

erikboto commented 12 months ago

In step() which is called periodically according to the parameter publish_rate we only perform read() once, which means that there could still be more unprocessed data from gpsd waiting. This leads to a build up of unprocessed data causing the published data to be old and outdated.

By instead using the waiting() call to see if there's more data to be processed we can make sure that what we publish is actually the newest available data.

danthony06 commented 11 months ago

Looks good. I'll test it out next week.

On Wed, Oct 11, 2023, 17:38 Erik Botö @.***> wrote:

In step() which is called periodically according to the parameter publish_rate we only perform read() once, which means that there could still be more unprocessed data from gpsd waiting. This leads to a build up of unprocessed data causing the published data to be old and outdated.

By instead using the waiting() call to see if there's more data to be processed we can make sure that what we publish is actually the newest available data.

You can view, comment on, or merge this pull request online at:

https://github.com/swri-robotics/gps_umd/pull/89 Commit Summary

File Changes

(1 file https://github.com/swri-robotics/gps_umd/pull/89/files)

Patch Links:

— Reply to this email directly, view it on GitHub https://github.com/swri-robotics/gps_umd/pull/89, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBZWHCXTKU26WGT5BCEA23X62D3LANCNFSM6AAAAAA534IUSI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

danthony06 commented 11 months ago

Thanks for the good fix. I'll also work on getting it ported to ROS 1.