Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
5aa46af
Rename header files to have .hpp extension.
clalancette Nov 25, 2019
a08939d
Remove trailing whitespace in all files.
clalancette Nov 25, 2019
65338b2
Switch out boost time and mutex for std::
clalancette Nov 25, 2019
dc2b364
Remove boost from ublox_msgs.hpp serialization.
clalancette Nov 25, 2019
76b7456
Rearrange messages.
clalancette Nov 25, 2019
5cf25d3
Fully de-boostify callback.hpp
clalancette Nov 25, 2019
65b21e5
Remove some uses of boost from async_worker.hpp
clalancette Nov 25, 2019
511161e
Remove boost from worker.hpp
clalancette Nov 25, 2019
d7728bc
Remove more boost.
clalancette Nov 25, 2019
b83960d
Remove boost from serialization.
clalancette Nov 25, 2019
3b40802
Remove a bunch of boost from node.cpp
clalancette Nov 25, 2019
578b8e4
Remove most of boost from node.cpp/.hpp.
clalancette Nov 25, 2019
2403f39
Remove the last of boost from node.cpp
clalancette Nov 25, 2019
f604491
Remove uses of 'new' throughout the codebase.
clalancette Nov 25, 2019
cd06a0f
Switch to non-boost asio.
clalancette Nov 25, 2019
77e5ba3
Remove 'using namespace' uses.
clalancette Nov 25, 2019
69d096a
Switch the one use of tf to tf2.
clalancette Nov 25, 2019
e77aba6
Switch to more idiomatic publisher initialization.
clalancette Nov 25, 2019
309e628
Switch to const references for std::string where possible.
clalancette Nov 25, 2019
05fe25e
Remove last static advertiser.
clalancette Nov 25, 2019
fa067a9
Remove the one static ros::Subscriber.
clalancette Nov 25, 2019
16b5901
Move ComponentInterface to its own file.
clalancette Nov 25, 2019
04c7b09
UbloxNode is not a component.
clalancette Nov 25, 2019
dfbafa6
Move FTSProduct class into its own file.
clalancette Nov 25, 2019
f1f9c26
Move the directory structure around just a bit.
clalancette Nov 26, 2019
3461552
More rearrangement of header files to make a more sane structure.
clalancette Nov 26, 2019
5b8fe74
Move serialization into the ublox_serialization module.
clalancette Nov 26, 2019
1cba374
Remove unused vector serialization.
clalancette Nov 26, 2019
8f0023c
Get rid of global 'debug' variable.
clalancette Nov 26, 2019
0740b9e
Lots of small code updates throughout the GPS module.
clalancette Nov 26, 2019
1e22553
Make nav_rate a class variable.
clalancette Nov 26, 2019
4ce3160
Make meas_rate a member variable.
clalancette Nov 26, 2019
ddf631e
Make config_on_startup_flag a member variable.
clalancette Nov 26, 2019
c7cab77
Make frame_id a member variable.
clalancette Nov 26, 2019
86f844b
Make updater a member variable of UbloxNode.
clalancette Nov 26, 2019
c97208b
Make freq_diag a member variable of UbloxNode.
clalancette Nov 26, 2019
8b74171
Switch to a structure for RTCMs.
clalancette Nov 26, 2019
f322c4d
Make rtcms a member variable of UbloxNode.
clalancette Nov 26, 2019
2984f94
Remove kROSQueueSize constant.
clalancette Nov 26, 2019
9286f88
Move the kDefaultMeasRate to the class that needs it.
clalancette Nov 26, 2019
07638b7
Remove kSubscribeRate.
clalancette Nov 26, 2019
72f7013
Move kNavSvInfoSubscribeRate into the base class that uses it.
clalancette Nov 26, 2019
e8b75aa
Make gnss a member variable of UbloxNode.
clalancette Nov 26, 2019
9a1aca2
Move UbloxTopicDiagnostic to its own file.
clalancette Nov 26, 2019
c6a81b1
Move FixDiagnostic class to its own file.
clalancette Nov 26, 2019
f37c9ea
Minor code improvements.
clalancette Nov 27, 2019
13d2011
Add namespaces to component_interface and fts_product.hpp
clalancette Nov 27, 2019
5110541
Make gps a member variable of UbloxNode.
clalancette Nov 27, 2019
98d635b
Move fixFromString and modelFromString into node.cpp
clalancette Nov 27, 2019
c6cee60
Make fix_status_service a member variable of UbloxFirmware.
clalancette Nov 27, 2019
730c7f7
Replace templated publish call with lambdas.
clalancette Nov 27, 2019
b2bba78
Add in ROS2-like declare and get parameters.
clalancette Nov 27, 2019
73b0241
Make sure to declare the sbas parameter.
clalancette Nov 27, 2019
e852f36
Make dat/set a declared parameter.
clalancette Nov 27, 2019
af113d6
Declare the config_on_startup flag.
clalancette Nov 27, 2019
1f8b7d7
Convert a few more parameters over to being declared.
clalancette Nov 27, 2019
5054f0f
Declare more parameters.
clalancette Nov 27, 2019
895c15f
Move some more boolean parameters to declarations.
clalancette Nov 27, 2019
eed32ef
Finish removing the "enable" map.
clalancette Nov 27, 2019
e004a69
Declare a lot more parameters.
clalancette Dec 2, 2019
bb9ddde
Declare a few more booleans.
clalancette Dec 2, 2019
7b5e0bc
Start passing the node into functions.
clalancette Dec 2, 2019
4bb8c63
Pass the nodehandle into more methods.
clalancette Dec 2, 2019
4bcb3a3
Remove the last uses of the global variable.
clalancette Dec 2, 2019
e22311b
Make the node handle a member variable of UbloxNode.
clalancette Dec 2, 2019
b3d2584
Move TimProduct class into its own file.
clalancette Dec 2, 2019
6a64946
Move AdrUdrProduct class into its own files.
clalancette Dec 2, 2019
0857d0f
Move HpgRovProduct class to its own files.
clalancette Dec 2, 2019
46266be
Move RawDataProduct class into its own files.
clalancette Dec 2, 2019
f0ee947
Move UbloxFirmware class to its own files.
clalancette Dec 2, 2019
ace5228
Move UbloxFirmware6 class to its own files.
clalancette Dec 2, 2019
5962bb8
Move UbloxFirmware7Plus class to its own header file.
clalancette Dec 2, 2019
cfac6c2
Move UbloxFirmware7 to its own files.
clalancette Dec 2, 2019
f96d55a
Move UbloxFirmware8 class to its own files.
clalancette Dec 2, 2019
41472c0
Move UbloxFirmware9 class to its own files.
clalancette Dec 2, 2019
7e88539
Move HpgRefProduct class to its own files.
clalancette Dec 2, 2019
3cc1671
Move HpPosRecProduct class to its own files.
clalancette Dec 2, 2019
58b94ba
Cleanup includes in node.{hpp,cpp}.
clalancette Dec 2, 2019
8ba1df3
Move spinning out of the constructor.
clalancette Dec 2, 2019
787219b
Split the main out into its own file.
clalancette Dec 2, 2019
2bcb841
Start ROS 2 port by COLCON_IGNORE everything.
clalancette Dec 2, 2019
faff390
Port of ublox_serialization to ROS 2.
clalancette Dec 2, 2019
be59d84
Port ublox_msgs to ROS 2.
clalancette Dec 2, 2019
1eabc8a
Port ublox_gps to ROS 2.
clalancette Dec 2, 2019
7337ad6
Port the ublox package to ROS 2.
clalancette Dec 2, 2019
b3b065c
Update configuration files for ROS 2.
clalancette Dec 3, 2019
0aba664
Remove declareRosBoolean.
clalancette Dec 3, 2019
4ee0a28
Mark constants as such.
clalancette Dec 3, 2019
9bc9eb0
More fixes around the codebase.
clalancette Dec 3, 2019
519a6b0
More fixes so that we get the correct rates.
clalancette Dec 3, 2019
f6eaea2
Declare more parameters correctly.
clalancette Dec 3, 2019
c4f3b34
Declare more parameters.
clalancette Dec 3, 2019
e49e84b
More fixes for declaring parameters.
clalancette Dec 3, 2019
f0113b1
Minor cleanup in the gps code.
clalancette Dec 3, 2019
a199564
Pass the logger down to the Gps level.
clalancette Dec 3, 2019
a31f961
Fix a few bugs pointed out by valgrind.
clalancette Dec 3, 2019
f99692f
Remove -ggdb3 flag from CMakeLists.txt.
clalancette Dec 3, 2019
1451923
Switch a couple more catch blocks to const.
clalancette Dec 16, 2019
30fa1c7
Re-enable logging in the AsyncWorker.
clalancette Dec 16, 2019
08328d6
Fix a bug for reads of zero size.
clalancette Dec 16, 2019
b71d858
Rename rawDataStreamPa member variable to raw_data_stream_pa
clalancette Dec 16, 2019
22b5ac8
Make sure to initialize checksum properly.
clalancette Dec 16, 2019
1c64443
Small style fixups.
clalancette Jan 6, 2020
1deaf66
Fixes pointed out by clang-tidy.
clalancette Jan 6, 2020
f1c63d2
Make ublox_gps composable.
clalancette Jan 7, 2020
9006132
Fix heading output to comply with REP-103
clalancette Jan 7, 2020
925f76d
Finish porting configs to ROS 2.
clalancette Jan 7, 2020
87290a9
Create ROS 2 launch files.
clalancette Jan 7, 2020
98fd4df
Update rover configuration.
clalancette Jan 16, 2020
3dc6f5a
Configure the base more accurately.
clalancette Jan 16, 2020
048f4c2
Increase the timeout for NavPVT messages during Survey-In config.
clalancette Jan 16, 2020
a697590
Fix getting RTCM ids and rates.
clalancette Jan 16, 2020
22e727b
Make sure to have package.xml depend on ament_cmake_ros
clalancette Feb 18, 2020
32c1f7f
Make sure to depend on tf2 properly.
clalancette Feb 18, 2020
8cb5d20
Make sure to reset for survey-in mode.
clalancette Feb 24, 2020
a581cb6
Create publishers based on ROS parameters (#1)
mabelzhang Mar 23, 2020
16b09f0
Merge pull request #68 from clalancette/ros2-devel
versatran01 Mar 24, 2020
eb6f033
Fixes to compile on Foxy.
clalancette Sep 9, 2020
fd0ea05
Merge pull request #112 from KumarRobotics/foxy-fixes
versatran01 Oct 13, 2020
5333d5e
Changelog.
clalancette Oct 13, 2020
5f2e727
2.0.0
clalancette Oct 13, 2020
b54031e
Fix wrong variable name in launch (#120)
wep21 Jan 25, 2021
141b6ab
[FEAT]: add launch and config directories to 'intall' package to avoi…
dadaroce Feb 23, 2021
32ea097
Fix warnings in launch.
clalancette Feb 23, 2021
8a20180
Merge pull request #126 from KumarRobotics/clalancette/fix-launch-war…
versatran01 Feb 23, 2021
67dcd26
add Ublox ZED_F9P config (#131)
deepinbubblegum May 19, 2021
7456c7b
Add UDP support (#140)
khallenbeck-dsi Oct 12, 2021
daaa065
Add the types to declared parameters. (#141)
clalancette Oct 15, 2021
24c4722
Fix parameter declaration types. (#146)
clalancette Nov 4, 2021
47b9df7
Revamp the building of the driver for modern ROS 2 practices.
clalancette Apr 13, 2022
e450adc
Merge pull request #158 from KumarRobotics/clalancette/revamp-building
versatran01 Apr 13, 2022
31d2cd4
Changelog.
clalancette Apr 13, 2022
b6187dd
2.3.0
clalancette Apr 13, 2022
1b12669
Fix topic name (#9) (#163)
wep21 Jun 13, 2022
3c1784b
Remove periodical force update (#12) (#161)
wep21 Jun 13, 2022
56a3a0b
Fix warning for unsupported SPG mode (#181)
PhilippPolterauer Sep 7, 2022
7c77ebc
HPS Device Support ( C102-f9r) (#182)
PhilippPolterauer Sep 8, 2022
71e2f0c
Add support for forwarding RTCM correction data (#169)
RyanTheRobothead Oct 18, 2022
88673b7
Add position and velocity covariance message (UBX_NAV_COV) (#196)
kagibson Jan 11, 2023
b6e0270
Bugfix: IMU gyro unit fix to comply with sensor_msgs definition (#191)
clalancette Feb 2, 2023
751c064
Add serializer for NavTIMEGPS message. (#201)
kagibson Feb 3, 2023
9466188
Fix EsfStatus serialization (#208)
jakor97 Mar 17, 2023
be4fb7b
Read & write all values from NavCOV message (#212)
Apr 14, 2023
6fe76fd
Feature: Add support for new HPS firmware and publishing NMEA Sentenc…
RyanTheRobothead Jul 10, 2023
8bc735e
Added CfgVALDEL, CfgVALGET & CfgVALSET messages (#218)
Oct 10, 2023
e668f03
Updated Heading and Orientation Calculations to be Consistent with RO…
JordanSlater Oct 10, 2023
577ef65
Added Firmware v9 GNSS configuration (#229)
brandonbeggs Nov 5, 2023
f939680
fix ADR/UDR product detection
Muhammad540 Nov 11, 2024
4542ddb
fix: protocol version
Muhammad540 Nov 11, 2024
95aa818
fix: for protocol version >= 18
Muhammad540 Nov 11, 2024
83f26d5
fix: neo_m8u_rover.yaml type issues
Muhammad540 Nov 11, 2024
594c999
Merge pull request #256 from Muhammad540/ros2
vmlane Dec 4, 2024
133a5d0
add driver reset service
tomoaki399 Dec 19, 2025
f585335
fix reset
tomoaki399 Dec 22, 2025
1896d08
remove delay
tomoaki399 Dec 24, 2025
d9ffe5d
Merge pull request #4 from EightKnot-SW/feature/add_driver_reset_service
tomoaki399 Dec 25, 2025
9222b99
Add try/catch code to handle exceptions
Jul 1, 2026
43e2f74
Merge pull request #5 from EightKnot-SW/feature/add_safe_close_of_dds…
nomumu Jul 3, 2026
aa3f4ad
fix time threshold
EightKnotRobotUser Jul 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ublox
The `ublox` package provides support for [u-blox](http://www.u-blox.com) GPS receivers. Only the _serial_ configuration of the driver is documented here, but TCP communication is also supported by the driver (untested).
The `ublox` package provides support for [u-blox](http://www.u-blox.com) GPS receivers. Only the _serial_ configuration of the driver is documented here, but TCP/UDP communication is also supported by the driver (untested).

The driver was originally written by Johannes Meyer. Changes made later are detailed in the version history below.

Expand Down
10 changes: 10 additions & 0 deletions ublox/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
Changelog for package ublox
^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.3.0 (2022-04-13)
------------------

2.0.0 (2020-10-13)
------------------
* Initial ROS 2 port to Dashing
* Port the ublox package to ROS 2.
* Start ROS 2 port by COLCON_IGNORE everything.
* Contributors: Chao Qu, Chris Lalancette

1.2.0 (2019-11-19)
------------------

Expand Down
6 changes: 3 additions & 3 deletions ublox/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.5)
project(ublox)
find_package(catkin REQUIRED)
catkin_metapackage()
find_package(ament_cmake REQUIRED)
ament_package()
14 changes: 8 additions & 6 deletions ublox/package.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<?xml version="1.0"?>
<package>
<package format="2">
<name>ublox</name>
<version>1.2.0</version>
<version>2.3.0</version>
<description>Provides a ublox_gps node for u-blox GPS receivers, messages, and serialization packages for the binary UBX protocol.</description>
<author>Johannes Meyer</author>
<maintainer email="vmlane@alum.mit.edu">Veronica Lane</maintainer>
<license>BSD</license>

<buildtool_depend>catkin</buildtool_depend>
<url>http://wiki.ros.org/ublox</url>

<buildtool_depend>ament_cmake</buildtool_depend>
<exec_depend>ublox_serialization</exec_depend>
<exec_depend>ublox_msgs</exec_depend>
<exec_depend>ublox_gps</exec_depend>

<!-- The export tag contains other, unspecified, tags -->
<export>
<rosdoc external="http://www.u-blox.com/en/product-resources"/>
<!-- You can specify that this package is a metapackage here: -->
<metapackage />
<build_type>ament_cmake</build_type>
</export>
</package>
124 changes: 124 additions & 0 deletions ublox_gps/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,130 @@
Changelog for package ublox_gps
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.3.0 (2022-04-13)
------------------
* Revamp the building of the driver for modern ROS 2 practices.
* Fix parameter declaration types. (`#146 <https://github.com/KumarRobotics/ublox/issues/146>`_)
* Add the types to declared parameters. (`#141 <https://github.com/KumarRobotics/ublox/issues/141>`_)
* Add UDP support (`#140 <https://github.com/KumarRobotics/ublox/issues/140>`_)
* add Ublox ZED_F9P config (`#131 <https://github.com/KumarRobotics/ublox/issues/131>`_)
* Fix warnings in launch.
* [FEAT]: add launch and config directories to 'intall' package to avoid wrong launch location (`#125 <https://github.com/KumarRobotics/ublox/issues/125>`_)
* Fix wrong variable name in launch (`#120 <https://github.com/KumarRobotics/ublox/issues/120>`_)
* Contributors: CHAIWIT PHONKHEN, Chao Qu, Chris Lalancette, Daisuke Nishimatsu, Davidson Daniel Rojas Cediel, Kevin Hallenbeck

2.0.0 (2020-10-13)
------------------
* Initial ROS 2 port to Dashing
* Create publishers based on ROS parameters (`#1 <https://github.com/KumarRobotics/ublox/issues/1>`_)
* Make sure to reset for survey-in mode.
* Make sure to depend on tf2 properly.
* Make sure to have package.xml depend on ament_cmake_ros
* Fix getting RTCM ids and rates.
* Increase the timeout for NavPVT messages during Survey-In config.
* Configure the base more accurately.
* Update rover configuration.
* Create ROS 2 launch files.
* Finish porting configs to ROS 2.
* Fix heading output to comply with REP-103
* Make ublox_gps composable.
* Fixes pointed out by clang-tidy.
* Rename rawDataStreamPa member variable to raw_data_stream_pa
* Fix a bug for reads of zero size.
* Re-enable logging in the AsyncWorker.
* Switch a couple more catch blocks to const.
* Remove -ggdb3 flag from CMakeLists.txt.
* Fix a few bugs pointed out by valgrind.
* Pass the logger down to the Gps level.
* Minor cleanup in the gps code.
* More fixes for declaring parameters.
* Declare more parameters.
* Declare more parameters correctly.
* More fixes so that we get the correct rates.
* More fixes around the codebase.
* Mark constants as such.
* Remove declareRosBoolean.
* Update configuration files for ROS 2.
* Port ublox_gps to ROS 2.
* Start ROS 2 port by COLCON_IGNORE everything.
* Split the main out into its own file.
* Move spinning out of the constructor.
* Cleanup includes in node.{hpp,cpp}.
* Move HpPosRecProduct class to its own files.
* Move HpgRefProduct class to its own files.
* Move UbloxFirmware9 class to its own files.
* Move UbloxFirmware8 class to its own files.
* Move UbloxFirmware7 to its own files.
* Move UbloxFirmware7Plus class to its own header file.
* Move UbloxFirmware6 class to its own files.
* Move UbloxFirmware class to its own files.
* Move RawDataProduct class into its own files.
* Move HpgRovProduct class to its own files.
* Move AdrUdrProduct class into its own files.
* Move TimProduct class into its own file.
* Make the node handle a member variable of UbloxNode.
* Remove the last uses of the global variable.
* Pass the nodehandle into more methods.
* Start passing the node into functions.
* Declare a few more booleans.
* Declare a lot more parameters.
* Finish removing the "enable" map.
* Move some more boolean parameters to declarations.
* Declare more parameters.
* Convert a few more parameters over to being declared.
* Declare the config_on_startup flag.
* Make dat/set a declared parameter.
* Make sure to declare the sbas parameter.
* Add in ROS2-like declare and get parameters.
* Replace templated publish call with lambdas.
* Make fix_status_service a member variable of UbloxFirmware.
* Move fixFromString and modelFromString into node.cpp
* Make gps a member variable of UbloxNode.
* Add namespaces to component_interface and fts_product.hpp
* Minor code improvements.
* Move FixDiagnostic class to its own file.
* Move UbloxTopicDiagnostic to its own file.
* Make gnss a member variable of UbloxNode.
* Move kNavSvInfoSubscribeRate into the base class that uses it.
* Remove kSubscribeRate.
* Move the kDefaultMeasRate to the class that needs it.
* Remove kROSQueueSize constant.
* Make rtcms a member variable of UbloxNode.
* Switch to a structure for RTCMs.
* Make freq_diag a member variable of UbloxNode.
* Make updater a member variable of UbloxNode.
* Make frame_id a member variable.
* Make config_on_startup_flag a member variable.
* Make meas_rate a member variable.
* Make nav_rate a class variable.
* Lots of small code updates throughout the GPS module.
* Get rid of global 'debug' variable.
* Move serialization into the ublox_serialization module.
* More rearrangement of header files to make a more sane structure.
* Move FTSProduct class into its own file.
* UbloxNode is not a component.
* Move ComponentInterface to its own file.
* Remove the one static ros::Subscriber.
* Remove last static advertiser.
* Switch to const references for std::string where possible.
* Switch to more idiomatic publisher initialization.
* Switch the one use of tf to tf2.
* Remove 'using namespace' uses.
* Switch to non-boost asio.
* Remove uses of 'new' throughout the codebase.
* Remove the last of boost from node.cpp
* Remove most of boost from node.cpp/.hpp.
* Remove a bunch of boost from node.cpp
* Remove more boost.
* Remove boost from worker.hpp
* Remove some uses of boost from async_worker.hpp
* Fully de-boostify callback.hpp
* Rearrange messages.
* Switch out boost time and mutex for std
* Remove trailing whitespace in all files.
* Rename header files to have .hpp extension.
* Contributors: Chao Qu, Chris Lalancette, Mabel Zhang

1.2.0 (2019-11-19)
------------------
* Add support for ZED-F9P new RELPOSNED message and provide heading output
Expand Down
159 changes: 97 additions & 62 deletions ublox_gps/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,78 +1,113 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.5)
project(ublox_gps)
find_package(catkin REQUIRED COMPONENTS
tf
roscpp
roscpp_serialization
ublox_msgs
ublox_serialization
diagnostic_updater
)

catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS tf roscpp ublox_msgs ublox_serialization)

# include boost
find_package(Boost REQUIRED COMPONENTS system regex thread)
link_directories(${Boost_LIBRARY_DIR})
include_directories(${Boost_INCLUDE_DIR})

# include other ublox packages
include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(${catkin_INCLUDE_DIRS})

# link pthread
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread")
# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

find_package(ament_cmake_ros REQUIRED)
find_package(asio REQUIRED)
find_package(diagnostic_msgs REQUIRED)
find_package(diagnostic_updater REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(nmea_msgs REQUIRED)
find_package(rcl_interfaces REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_components REQUIRED)
find_package(rtcm_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(std_msgs REQUIRED)
find_package(std_srvs REQUIRED)
find_package(tf2 REQUIRED)
find_package(ublox_msgs REQUIRED)
find_package(ublox_serialization REQUIRED)

# build library
add_library(ublox_gps src/gps.cpp)

# fix msg compile order bug
add_dependencies(ublox_gps ${catkin_EXPORTED_TARGETS})

target_link_libraries(ublox_gps
boost_system
boost_regex
boost_thread
# build node
add_library(ublox_gps
src/adr_udr_product.cpp
src/gnss.cpp
src/gps.cpp
src/hp_pos_rec_product.cpp
src/hpg_ref_product.cpp
src/hpg_rov_product.cpp
src/mkgmtime.c
src/node.cpp
src/raw_data_pa.cpp
src/raw_data_product.cpp
src/tim_product.cpp
src/ublox_firmware.cpp
src/ublox_firmware6.cpp
src/ublox_firmware7.cpp
src/ublox_firmware8.cpp
src/ublox_firmware9.cpp)
target_include_directories(ublox_gps PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
${diagnostic_updater_INCLUDE_DIRS}
)

target_link_libraries(ublox_gps
${catkin_LIBRARIES}
target_link_libraries(ublox_gps PUBLIC
${asio_LIBRARIES}
${diagnostic_updater_LIBRARIES}
${diagnostic_msgs_TARGETS}
${geometry_msgs_TARGETS}
${rcl_interfaces_TARGETS}
rclcpp::rclcpp
rclcpp_components::component
${nmea_msgs_TARGETS}
${rtcm_msgs_TARGETS}
${sensor_msgs_TARGETS}
${std_msgs_TARGETS}
${std_srvs_TARGETS}
tf2::tf2
${ublox_msgs_TARGETS}
ublox_serialization::ublox_serialization
)

# build node
add_executable(ublox_gps_node src/node.cpp src/mkgmtime.c src/raw_data_pa.cpp)
set_target_properties(ublox_gps_node PROPERTIES OUTPUT_NAME ublox_gps)
install(TARGETS ublox_gps EXPORT export_${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)

target_link_libraries(ublox_gps_node boost_system boost_regex boost_thread)
target_link_libraries(ublox_gps_node ${catkin_LIBRARIES})
target_link_libraries(ublox_gps_node ublox_gps)
add_executable(ublox_gps_node src/node_main.cpp)
target_link_libraries(ublox_gps_node PRIVATE
rclcpp::rclcpp
ublox_gps
)

# build logger node
add_executable(ublox_logger_node src/logger_node_pa.cpp src/raw_data_pa.cpp)
set_target_properties(ublox_logger_node PROPERTIES OUTPUT_NAME ublox_logger)

target_link_libraries(ublox_logger_node ${catkin_LIBRARIES})

install(TARGETS ublox_gps ublox_gps_node ublox_logger_node
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
add_executable(ublox_logger src/logger_node_pa.cpp src/raw_data_pa.cpp)
target_link_libraries(ublox_logger PRIVATE
rclcpp::rclcpp
${std_msgs_TARGETS}
ublox_gps
)

install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
PATTERN ".svn" EXCLUDE
install(TARGETS
ublox_gps_node ublox_logger
DESTINATION lib/${PROJECT_NAME}
)

install(DIRECTORY config/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/config
PATTERN ".svn" EXCLUDE
rclcpp_components_register_nodes(ublox_gps
"ublox_node::UbloxNode")

install(DIRECTORY include/
DESTINATION include/${PROJECT_NAME}
)

install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
PATTERN ".svn" EXCLUDE
install(
DIRECTORY launch config
DESTINATION share/${PROJECT_NAME}
)

ament_export_include_directories("include/${PROJECT_NAME}")
ament_export_targets(export_${PROJECT_NAME})

ament_package()
5 changes: 5 additions & 0 deletions ublox_gps/cmake/Findasio.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include(FindPackageHandleStandardArgs)

find_path(ASIO_INCLUDE_DIR NAMES asio.hpp)
find_package_handle_standard_args(asio DEFAULT_MSG ASIO_INCLUDE_DIR)
mark_as_advanced(ASIO_INCLUDE_DIR)
Loading