Skip to content

Commit 57a5fdb

Browse files
committed
Build mavros from source, with patch to fix yaml-cpp linkage
1 parent 3ff2f8c commit 57a5fdb

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.docker/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ RUN git clone --depth 1 --recursive -b ${MAVLINK_RELEASE} https://github.com/mav
119119
# Comment those lines out in mavlink.
120120
# n.b. This may not be the best way to do this. A sed one-liner?
121121
RUN patch -d mavlink -p 1 < $USER_WORKSPACE/src/blue/.docker/patches/mavlink_standard_library.patch
122+
# Fix linkage for yaml-cpp in mavros_extra_plugins
123+
RUN patch -d mavros -p 1 < $USER_WORKSPACE/src/blue/.docker/patches/mavros_extra_yaml_linkage.patch
124+
122125

123126
WORKDIR $USER_WORKSPACE
124127
RUN sudo apt-get -q update \
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
diff --git a/mavros_extras/CMakeLists.txt b/mavros_extras/CMakeLists.txt
2+
index dc0fd0cb..8e52b6f2 100644
3+
--- a/mavros_extras/CMakeLists.txt
4+
+++ b/mavros_extras/CMakeLists.txt
5+
@@ -32,7 +32,7 @@ find_package(libmavconn REQUIRED)
6+
7+
find_package(eigen3_cmake_module REQUIRED)
8+
find_package(Eigen3 REQUIRED)
9+
-# find_package(yaml_cpp REQUIRED)
10+
+find_package(yaml-cpp REQUIRED)
11+
find_package(yaml_cpp_vendor REQUIRED)
12+
13+
## Find GeographicLib
14+
@@ -132,6 +132,7 @@ add_library(mavros_extras_plugins SHARED
15+
src/plugins/wheel_odometry.cpp
16+
# [[[end]]] (checksum: 1f8cd51fa90b89b27ee35d276b5f8c83)
17+
)
18+
+target_link_libraries(mavros_extras_plugins yaml-cpp::yaml-cpp)
19+
ament_target_dependencies(mavros_extras_plugins
20+
angles
21+
geometry_msgs
22+
@@ -164,6 +165,7 @@ add_library(mavros_extras SHARED
23+
src/lib/servo_state_publisher.cpp
24+
# [[[end]]] (checksum: a3ce43c71c567f697861bcbcd0f25aa3)
25+
)
26+
+target_link_libraries(mavros_extras yaml-cpp::yaml-cpp)
27+
ament_target_dependencies(mavros_extras
28+
rclcpp
29+
rclcpp_components

0 commit comments

Comments
 (0)