From 2d7838329602f163b24d4eefbeb91ac947568186 Mon Sep 17 00:00:00 2001 From: jmackay2 Date: Tue, 10 Oct 2023 23:39:05 -0400 Subject: [PATCH] Add the capability to use Gazebo Harmonic if it is installed --- src/modules/simulation/gz_bridge/CMakeLists.txt | 14 +++++++------- .../simulation/gz_bridge/GZMixingInterfaceESC.hpp | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/modules/simulation/gz_bridge/CMakeLists.txt b/src/modules/simulation/gz_bridge/CMakeLists.txt index 8462dec6d3..6c7a11b7a1 100644 --- a/src/modules/simulation/gz_bridge/CMakeLists.txt +++ b/src/modules/simulation/gz_bridge/CMakeLists.txt @@ -32,13 +32,13 @@ ############################################################################ # Find the gz_Transport library -find_package(gz-transport - #REQUIRED COMPONENTS core - NAMES - #ignition-transport11 # IGN (Fortress and earlier) no longer supported - gz-transport12 - #QUIET -) +# First look for GZ Harmonic libraries +find_package(gz-transport NAMES gz-transport13) + +# If Harmonic not found, look for GZ Garden libraries +if(NOT gz-transport_FOUND) + find_package(gz-transport NAMES gz-transport12) +endif() if(gz-transport_FOUND) diff --git a/src/modules/simulation/gz_bridge/GZMixingInterfaceESC.hpp b/src/modules/simulation/gz_bridge/GZMixingInterfaceESC.hpp index e8e3c5a244..316ff6195a 100644 --- a/src/modules/simulation/gz_bridge/GZMixingInterfaceESC.hpp +++ b/src/modules/simulation/gz_bridge/GZMixingInterfaceESC.hpp @@ -35,6 +35,7 @@ #include +#include #include #include