From 3dc731657a721a48344a443ce628eac73da0b4b8 Mon Sep 17 00:00:00 2001 From: MariuszSzczepanikSpyrosoft <118888269+MariuszSzczepanikSpyrosoft@users.noreply.github.com> Date: Wed, 14 Jun 2023 16:31:18 +0200 Subject: [PATCH 1/7] Fix build according to modification of GPSD (#78) GPSD since version 3.23.1 (GPSD_API_MAJOR_VERSION=12) has introduced interfaces changes on the below values: - Change STATUS_NO_FIX to STATUS_UNK to avoid confusion with fix mode. - Change STATUS_FIX to STATUS_GPS to avoid confusion with fix mode. - Change STATUS_DGPS_FIX to STATUS_DGPS to avoid confusion with fix mode. --- gpsd_client/src/client.cpp | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/gpsd_client/src/client.cpp b/gpsd_client/src/client.cpp index 579f0e8..736bfef 100644 --- a/gpsd_client/src/client.cpp +++ b/gpsd_client/src/client.cpp @@ -148,7 +148,9 @@ class GPSDClient { #endif } -#if GPSD_API_MAJOR_VERSION >= 10 +#if GPSD_API_MAJOR_VERSION >= 12 + if ((p->fix.status & STATUS_GPS) && !(check_fix_by_variance && std::isnan(p->fix.epx))) { +#elif GPSD_API_MAJOR_VERSION >= 10 if ((p->fix.status & STATUS_FIX) && !(check_fix_by_variance && std::isnan(p->fix.epx))) { #else if ((p->status & STATUS_FIX) && !(check_fix_by_variance && std::isnan(p->fix.epx))) { @@ -157,9 +159,11 @@ class GPSDClient { status.status = 0; // FIXME: gpsmm puts its constants in the global // namespace, so `GPSStatus::STATUS_FIX' is illegal. -// STATUS_DGPS_FIX was removed in API version 6 but re-added afterward +// STATUS_DGPS_FIX was removed in API version 6 but re-added afterward and next renamed since the version 12 #if GPSD_API_MAJOR_VERSION != 6 -#if GPSD_API_MAJOR_VERSION >= 10 +#if GPSD_API_MAJOR_VERSION >= 12 + if (p->fix.status & STATUS_DGPS) +#elif GPSD_API_MAJOR_VERSION >= 10 if (p->fix.status & STATUS_DGPS_FIX) #else if (p->status & STATUS_DGPS_FIX) @@ -206,7 +210,7 @@ class GPSDClient { /* TODO: attitude */ } else { - status.status = -1; // STATUS_NO_FIX + status.status = -1; // STATUS_NO_FIX or STATUS_UNK } fix.status = status; @@ -242,15 +246,20 @@ class GPSDClient { #else switch (p->status) { #endif +#if GPSD_API_MAJOR_VERSION >= 12 + case STATUS_GPS: +#else case STATUS_NO_FIX: - fix->status.status = -1; // NavSatStatus::STATUS_NO_FIX; - break; - case STATUS_FIX: - fix->status.status = 0; // NavSatStatus::STATUS_FIX; +#endif + fix->status.status = 0; // NavSatStatus::STATUS_FIX or NavSatStatus::STATUS_GPS; break; -// STATUS_DGPS_FIX was removed in API version 6 but re-added afterward -#if GPSD_API_MAJOR_VERSION != 6 +// STATUS_DGPS_FIX was removed in API version 6 but re-added afterward and next renamed since the version 12 +#if GPSD_API_MAJOR_VERSION != 6 +#if GPSD_API_MAJOR_VERSION >= 12 + case STATUS_DGPS: +#else case STATUS_DGPS_FIX: +#endif fix->status.status = 2; // NavSatStatus::STATUS_GBAS_FIX; break; #endif From bb2885fd345e0f6aa2b18f083b350064b6758095 Mon Sep 17 00:00:00 2001 From: David Anthony Date: Wed, 14 Jun 2023 10:12:19 -0500 Subject: [PATCH 2/7] Updating changelogs --- gps_common/CHANGELOG.rst | 3 +++ gps_umd/CHANGELOG.rst | 3 +++ gpsd_client/CHANGELOG.rst | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/gps_common/CHANGELOG.rst b/gps_common/CHANGELOG.rst index 01f2d0b..e2bdf07 100644 --- a/gps_common/CHANGELOG.rst +++ b/gps_common/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package gps_common ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 0.3.3 (2022-11-28) ------------------ * Fix truncation warning for UTM zone snprintf() (`#44 `_) diff --git a/gps_umd/CHANGELOG.rst b/gps_umd/CHANGELOG.rst index a6a753b..84b5900 100644 --- a/gps_umd/CHANGELOG.rst +++ b/gps_umd/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package gps_umd ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 0.3.3 (2022-11-28) ------------------ diff --git a/gpsd_client/CHANGELOG.rst b/gpsd_client/CHANGELOG.rst index 5819b3b..1c875c8 100644 --- a/gpsd_client/CHANGELOG.rst +++ b/gpsd_client/CHANGELOG.rst @@ -2,6 +2,11 @@ Changelog for package gpsd_client ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- +* GPSD API v12 Compatibility (`#78 `_) +* Contributors: MariuszSzczepanikSpyrosoft + 0.3.3 (2022-11-28) ------------------ * Adding better debugging output to help diagnose corner case (`#59 `_) From 99130b95cda595f776cff20893fe4a7158a96f1b Mon Sep 17 00:00:00 2001 From: David Anthony Date: Wed, 14 Jun 2023 10:20:04 -0500 Subject: [PATCH 3/7] 0.3.4 --- gps_common/CHANGELOG.rst | 4 ++-- gps_common/package.xml | 2 +- gps_umd/CHANGELOG.rst | 4 ++-- gps_umd/package.xml | 2 +- gpsd_client/CHANGELOG.rst | 4 ++-- gpsd_client/package.xml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gps_common/CHANGELOG.rst b/gps_common/CHANGELOG.rst index e2bdf07..03ba1dc 100644 --- a/gps_common/CHANGELOG.rst +++ b/gps_common/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package gps_common ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +0.3.4 (2023-06-14) +------------------ 0.3.3 (2022-11-28) ------------------ diff --git a/gps_common/package.xml b/gps_common/package.xml index f5486c2..5ede991 100644 --- a/gps_common/package.xml +++ b/gps_common/package.xml @@ -1,7 +1,7 @@ gps_common - 0.3.3 + 0.3.4 GPS messages and common routines for use in GPS drivers Timo Roehling diff --git a/gps_umd/CHANGELOG.rst b/gps_umd/CHANGELOG.rst index 84b5900..c59ef12 100644 --- a/gps_umd/CHANGELOG.rst +++ b/gps_umd/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package gps_umd ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +0.3.4 (2023-06-14) +------------------ 0.3.3 (2022-11-28) ------------------ diff --git a/gps_umd/package.xml b/gps_umd/package.xml index 5f9e1e0..0acfa76 100644 --- a/gps_umd/package.xml +++ b/gps_umd/package.xml @@ -1,7 +1,7 @@ gps_umd - 0.3.3 + 0.3.4 gps_umd metapackage Ken Tossell diff --git a/gpsd_client/CHANGELOG.rst b/gpsd_client/CHANGELOG.rst index 1c875c8..29ed45d 100644 --- a/gpsd_client/CHANGELOG.rst +++ b/gpsd_client/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package gpsd_client ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +0.3.4 (2023-06-14) +------------------ * GPSD API v12 Compatibility (`#78 `_) * Contributors: MariuszSzczepanikSpyrosoft diff --git a/gpsd_client/package.xml b/gpsd_client/package.xml index d8e86ae..b536431 100644 --- a/gpsd_client/package.xml +++ b/gpsd_client/package.xml @@ -1,7 +1,7 @@ gpsd_client - 0.3.3 + 0.3.4 connects to a GPSd server and broadcasts GPS fixes using the NavSatFix message From 34fed302d82890855a64f7985d399317fc951d77 Mon Sep 17 00:00:00 2001 From: David Anthony Date: Thu, 21 Sep 2023 17:32:31 -0500 Subject: [PATCH 4/7] Updating CI process (#84) --- .github/workflows/main.yml | 16 ++++++++++++++++ .travis.yml | 25 ------------------------- gps_common/package.xml | 5 +++-- gps_umd/package.xml | 5 +++-- gpsd_client/package.xml | 5 +++-- 5 files changed, 25 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..7312fff --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,16 @@ +name: CI + +on: [push, pull_request] + +jobs: + industrial_ci: + strategy: + matrix: + env: + - {ROS_DISTRO: noetic, ROS_REPO: testing} + - {ROS_DISTRO: noetic, ROS_REPO: main} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: 'ros-industrial/industrial_ci@master' + env: ${{matrix.env}} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0c32515..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -sudo: required -dist: trusty -language: generic -compiler: - - gcc -notifications: - email: - on_success: always - on_failure: always -env: - matrix: - - USE_DEB=true ROS_DISTRO="indigo" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu - - USE_DEB=true ROS_DISTRO="indigo" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu - - USE_DEB=true ROS_DISTRO="kinetic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu - - USE_DEB=true ROS_DISTRO="kinetic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu - - USE_DEB=true ROS_DISTRO="lunar" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu - - USE_DEB=true ROS_DISTRO="lunar" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu -install: - - git clone https://github.com/ros-industrial/industrial_ci.git .ci_config -matrix: - allow_failures: - - env: ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu -script: - - source .ci_config/travis.sh -# - source ./travis.sh # Enable this when you have a package-local script diff --git a/gps_common/package.xml b/gps_common/package.xml index 5ede991..b5d868a 100644 --- a/gps_common/package.xml +++ b/gps_common/package.xml @@ -4,8 +4,9 @@ 0.3.4 GPS messages and common routines for use in GPS drivers - Timo Roehling - P. J. Reed + Timo Roehling + P. J. Reed + Southwest Research Institute BSD http://ros.org/wiki/gps_common diff --git a/gps_umd/package.xml b/gps_umd/package.xml index 0acfa76..50aa502 100644 --- a/gps_umd/package.xml +++ b/gps_umd/package.xml @@ -4,8 +4,9 @@ 0.3.4 gps_umd metapackage - Ken Tossell - P. J. Reed + Ken Tossell + P. J. Reed + Southwest Research Institute BSD diff --git a/gpsd_client/package.xml b/gpsd_client/package.xml index b536431..1e5edac 100644 --- a/gpsd_client/package.xml +++ b/gpsd_client/package.xml @@ -5,10 +5,11 @@ connects to a GPSd server and broadcasts GPS fixes using the NavSatFix message - Timo Roehling - P. J. Reed Ken Tossell Rob Thomson + Timo Roehling + P. J. Reed + Southwest Research Institute BSD http://ros.org/wiki/gpsd_client From 52116cd2810e92a6b701056a6b6785f998bc836c Mon Sep 17 00:00:00 2001 From: David Anthony Date: Fri, 29 Sep 2023 10:07:13 -0500 Subject: [PATCH 5/7] Clarifying that license is BSD 3-clause according to original author's wishes (#87) --- LICENSE | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b8c0cdb --- /dev/null +++ b/LICENSE @@ -0,0 +1,11 @@ +Copyright 2023, Ken Tossell + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. From 6b8c31f8821cbdd375b257bcef7e0e38c6f3b98a Mon Sep 17 00:00:00 2001 From: David Anthony Date: Thu, 9 May 2024 14:03:09 -0500 Subject: [PATCH 6/7] Port of PR #89 (#97) * Port of PR #89 * Fixing variable name --- gpsd_client/src/client.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gpsd_client/src/client.cpp b/gpsd_client/src/client.cpp index 736bfef..1642ae3 100644 --- a/gpsd_client/src/client.cpp +++ b/gpsd_client/src/client.cpp @@ -59,7 +59,12 @@ class GPSDClient { if (!gps->waiting(1e6)) return; - gps_data_t *p = gps->read(); + // Read out all queued data and only act on the latest + gps_data_t* p = NULL; + while (gps->waiting(0)) + { + p = gps->read(); + } #else gps_data_t *p = gps->poll(); #endif From 68e8398f119ab386503368426c36a473547a62ae Mon Sep 17 00:00:00 2001 From: agyoungs Date: Thu, 9 May 2024 14:32:39 -0500 Subject: [PATCH 7/7] Added GPSExtendedStatus msg to allow for additional status enums (#93) Co-authored-by: Alex Youngs Co-authored-by: David Anthony --- gps_common/CMakeLists.txt | 1 + gps_common/msg/GPSExtendedStatus.msg | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 gps_common/msg/GPSExtendedStatus.msg diff --git a/gps_common/CMakeLists.txt b/gps_common/CMakeLists.txt index 44567df..3d7b13f 100644 --- a/gps_common/CMakeLists.txt +++ b/gps_common/CMakeLists.txt @@ -28,6 +28,7 @@ catkin_python_setup() add_message_files( FILES GPSStatus.msg + GPSExtendedStatus.msg GPSFix.msg ) diff --git a/gps_common/msg/GPSExtendedStatus.msg b/gps_common/msg/GPSExtendedStatus.msg new file mode 100644 index 0000000..de5816e --- /dev/null +++ b/gps_common/msg/GPSExtendedStatus.msg @@ -0,0 +1,9 @@ +# Extended Measurement status to use for GPSStatus.msg +int16 STATUS_NO_FIX=-1 # Unable to fix position +int16 STATUS_FIX=0 # Normal fix +int16 STATUS_SBAS_FIX=1 # Fixed using a satellite-based augmentation system +int16 STATUS_GBAS_FIX=2 # or a ground-based augmentation system +int16 STATUS_DGPS_FIX=18 # Fixed with DGPS +int16 STATUS_RTK_FIX=19 # Real-Time Kinematic, fixed integers +int16 STATUS_RTK_FLOAT=20 # Real-Time Kinematic, float integers +int16 STATUS_WAAS_FIX=33 # Fixed with WAAS