From 93af5e2700d017752f8c5838fb95fc378c2ffb1b Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Wed, 23 Jun 2021 03:36:57 +0300 Subject: [PATCH] =?UTF-8?q?Try=20another=20way=20to=20enforce=20using=20PX?= =?UTF-8?q?4=E2=80=99s=20mavlink?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/patches/sitl_gazebo.patch | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/assets/patches/sitl_gazebo.patch b/assets/patches/sitl_gazebo.patch index bc745cc..41078bd 100644 --- a/assets/patches/sitl_gazebo.patch +++ b/assets/patches/sitl_gazebo.patch @@ -1,16 +1,21 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 18c59d6..6f0e577 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -97,7 +97,7 @@ if (BUILD_ROS_INTERFACE) - endif() +diff --git a/cmake/FindMAVLink.cmake b/cmake/FindMAVLink.cmake +index 8de3079..c203237 100644 +--- a/cmake/FindMAVLink.cmake ++++ b/cmake/FindMAVLink.cmake +@@ -46,13 +46,6 @@ find_path(_MAVLINK_INCLUDE_DIR + NO_CMAKE_SYSTEM_PATH + ) - # find MAVLink --find_package(MAVLink) -+find_package(MAVLink "2.0" EXACT REQUIRED) - - # see if catkin was invoked to build this - if (CATKIN_DEVEL_PREFIX) +-# look specifically for the ROS version if no other was found +-find_path(_MAVLINK_INCLUDE_DIR +- NAMES mavlink/v1.0/mavlink_types.h mavlink/v2.0/mavlink_types.h +- PATH_SUFFIXES include +- PATHS /opt/ros/${ROS_DISTRO}/ +- ) +- + # read the version + if (EXISTS ${_MAVLINK_INCLUDE_DIR}/mavlink/config.h) + file(READ ${_MAVLINK_INCLUDE_DIR}/mavlink/config.h MAVLINK_CONFIG_FILE) diff --git a/package.xml b/package.xml index ae0fb34..12f17b8 100644 --- a/package.xml