Closed erikboto closed 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
- c205a0b https://github.com/swri-robotics/gps_umd/pull/89/commits/c205a0baeff8d455251d3383dd5b58ed149cb68b Fix queue build up issue in gpsd_client
File Changes
(1 file https://github.com/swri-robotics/gps_umd/pull/89/files)
- M gpsd_client/src/client.cpp https://github.com/swri-robotics/gps_umd/pull/89/files#diff-0a3911742cb8a702ce919811c9c94f0ec8125d760a2308433db229dc19cb861f (8)
Patch Links:
- https://github.com/swri-robotics/gps_umd/pull/89.patch
- https://github.com/swri-robotics/gps_umd/pull/89.diff
— 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: @.***>
Thanks for the good fix. I'll also work on getting it ported to ROS 1.
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.