Skip to content

Commit

Permalink
update Mavlink usage to match PX4 and switch to development
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Nov 6, 2021
1 parent 6fa6ec7 commit 1c8c919
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: submodule update
run: git submodule update --init --recursive
- name: Install latest mavlink
run: git clone --depth 1 https://github.com/mavlink/c_library_v2.git /usr/local/include/mavlink/v2.0 && rm -rf /usr/local/include/mavlink/v2.0/.git
run: git clone --depth 1 https://github.com/mavlink/c_library_v2.git /usr/local/include/mavlink && rm -rf /usr/local/include/mavlink/.git
- name: Cmake Build
run: |
mkdir build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_test_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
brew update;
git clone -b release-1.10.0 https://github.com/google/googletest
git clone https://github.com/mavlink/c_library_v2.git /usr/local/include/mavlink/v2.0
git clone https://github.com/mavlink/c_library_v2.git /usr/local/include/mavlink
- name: Install
run: |
pushd googletest
Expand Down
7 changes: 4 additions & 3 deletions cmake/FindMAVLink.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ set(_MAVLINK_EXTRA_SEARCH_HINTS
../../mavlink/
../mavlink/
${CATKIN_DEVEL_PREFIX}/
${CMAKE_CURRENT_BINARY_DIR}/../mavlink/
)

set(_MAVLINK_EXTRA_SEARCH_PATHS
Expand All @@ -29,16 +30,16 @@ set(_MAVLINK_EXTRA_SEARCH_PATHS

# look for in the hints first
find_path(_MAVLINK_INCLUDE_DIR
NAMES mavlink/v1.0/mavlink_types.h mavlink/v2.0/mavlink_types.h
NAMES mavlink_types.h
PATH_SUFFIXES include
HINTS ${_MAVLINK_EXTRA_SEARCH_HINTS}
NO_DEFAULT_PATH
)

# look for in the hard-coded paths
find_path(_MAVLINK_INCLUDE_DIR
NAMES mavlink/v1.0/mavlink_types.h mavlink/v2.0/mavlink_types.h
PATH_SUFFIXES include
NAMES mavlink_types.h
PATH_SUFFIXES include/mavlink
PATHS ${_MAVLINK_EXTRA_SEARCH_PATHS}
NO_CMAKE_PATH
NO_CMAKE_ENVIRONMENT_PATH
Expand Down
2 changes: 1 addition & 1 deletion include/gazebo_camera_manager_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <string>
#include <opencv2/opencv.hpp>
#include <mavlink/v2.0/common/mavlink.h>
#include <development/mavlink.h>
#include <gazebo/common/Plugin.hh>
#include <gazebo/sensors/CameraSensor.hh>
#include <gazebo/gazebo.hh>
Expand Down
2 changes: 1 addition & 1 deletion include/gazebo_gimbal_controller_plugin.hh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <gazebo/util/system.hh>
#include <gazebo/sensors/sensors.hh>
#include <ignition/math.hh>
#include <mavlink/v2.0/common/mavlink.h>
#include <development/mavlink.h>

namespace gazebo
{
Expand Down
2 changes: 1 addition & 1 deletion include/mavlink_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#include <Eigen/Eigen>
#include<Eigen/StdVector>

#include <mavlink/v2.0/common/mavlink.h>
#include <development/mavlink.h>
#include "msgbuffer.h"

static const uint32_t kDefaultMavlinkUdpPort = 14560;
Expand Down
2 changes: 1 addition & 1 deletion include/msgbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#pragma once

#include <cassert>
#include "mavlink/v2.0/common/mavlink.h"
#include <development/mavlink.h>

namespace gazebo {
/**
Expand Down
2 changes: 2 additions & 0 deletions src/gazebo_camera_manager_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include <boost/algorithm/string.hpp>
#include <opencv2/opencv.hpp>

#include <development/mavlink.h>

using namespace std;
using namespace gazebo;
using namespace cv;
Expand Down

0 comments on commit 1c8c919

Please sign in to comment.