diff --git a/recipes-ros/mavros/libmavconn_0.17.4.bb b/recipes-ros/mavros/libmavconn_0.17.4.bb new file mode 100644 index 0000000..f4a6c27 --- /dev/null +++ b/recipes-ros/mavros/libmavconn_0.17.4.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "MAVLink communication library" +LICENSE = "BSD | GPLv3 | LGPLv3" +LIC_FILES_CHKSUM = "file://package.xml;beginline=15;endline=17;md5=9b511d4c606b1a23e454d3260818d003" + +DEPENDS = " \ + boost \ + ros-mavlink \ + console-bridge \ +" + +RDEPENDS_${PN} = " \ + boost \ + ros-mavlink \ + console-bridge \ +" + +require mavros.inc + +ROS_PKG_SUBDIR = "libmavconn" diff --git a/recipes-ros/mavros/mavros-extras_0.17.4.bb b/recipes-ros/mavros/mavros-extras_0.17.4.bb new file mode 100644 index 0000000..e5d10f3 --- /dev/null +++ b/recipes-ros/mavros/mavros-extras_0.17.4.bb @@ -0,0 +1,32 @@ +DESCRIPTION = "Extra nodes and plugins for MAVROS" + +LICENSE = "BSD | GPLv3 | LGPLv3" +LIC_FILES_CHKSUM = "file://package.xml;beginline=12;endline=14;md5=5e724d80140fc99e7507c9876e320175" + +MAVROS_RUN_AND_BUILD_DEPENDS = " \ + roscpp \ + tf2-ros \ + tf \ + geometry-msgs \ + mavros-msgs \ + sensor-msgs \ + std-msgs \ + visualization-msgs \ + urdf \ + image-transport \ + mavros \ + " + +DEPENDS = "\ + cmake-modules \ + cv-bridge \ + ${MAVROS_RUN_AND_BUILD_DEPENDS} \ +" + +RDEPENDS_${PN} = "\ + ${MAVROS_RUN_AND_BUILD_DEPENDS} \ +" + +require mavros.inc + +ROS_PKG_SUBDIR = "mavros_extras" diff --git a/recipes-ros/mavros/mavros-msgs_0.17.4.bb b/recipes-ros/mavros/mavros-msgs_0.17.4.bb new file mode 100644 index 0000000..9b1b5db --- /dev/null +++ b/recipes-ros/mavros/mavros-msgs_0.17.4.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "mavros_msgs defines messages for MAVROS" +LICENSE = "BSD | GPLv3 | LGPLv3" +LIC_FILES_CHKSUM = "file://package.xml;beginline=11;endline=13;md5=9b511d4c606b1a23e454d3260818d003" + +DEPENDS = " \ + message-generation \ + std-msgs \ + geometry-msgs \ +" + +RDEPENDS_${PN} = " \ + message-runtime \ + std-msgs \ + geometry-msgs \ +" + +require mavros.inc + +ROS_PKG_SUBDIR = "mavros_msgs" diff --git a/recipes-ros/mavros/mavros.inc b/recipes-ros/mavros/mavros.inc new file mode 100644 index 0000000..9466afc --- /dev/null +++ b/recipes-ros/mavros/mavros.inc @@ -0,0 +1,8 @@ +SRC_URI = "https://github.com/mavlink/${ROS_SPN}/archive/${PV}.tar.gz;downloadfilename=${ROS_SP}.tar.gz" +SRC_URI[md5sum] = "7d8fd22c44a9a5d384cd34c5a329d443" + +S = "${WORKDIR}/${ROS_SP}/${ROS_BPN}" + +inherit catkin + +ROS_SPN = "mavros" diff --git a/recipes-ros/mavros/mavros_0.17.4.bb b/recipes-ros/mavros/mavros_0.17.4.bb new file mode 100644 index 0000000..7f4ba20 --- /dev/null +++ b/recipes-ros/mavros/mavros_0.17.4.bb @@ -0,0 +1,49 @@ +DESCRIPTION = "MAVROS -- MAVLink extendable communication node for ROS with \ +proxy for Ground Control Station." +LICENSE = "BSD | GPLv3 | LGPLv3" +LIC_FILES_CHKSUM = "file://package.xml;beginline=12;endline=14;md5=9b511d4c606b1a23e454d3260818d003" + +# System dependencies + +DEPENDS = " \ + boost \ + libeigen \ + ros-mavlink \ +" + +RDEPENDS_${PN} = " \ + boost \ + ros-mavlink \ +" + +# ROS packages dependencies +MAVROS_RUN_AND_BUILD_DEPENDS = " \ + diagnostic-updater \ + eigen-conversions \ + libmavconn \ + pluginlib \ + rosconsole-bridge \ + roscpp \ + tf2-ros \ + diagnostic-msgs \ + geometry-msgs \ + mavros-msgs \ + nav-msgs \ + sensor-msgs \ + std-msgs \ + std-srvs \ +" + +DEPENDS_append = " \ + angles \ + cmake-modules \ + message-runtime \ + rospy \ + ${MAVROS_RUN_AND_BUILD_DEPENDS} \ +" + +RDEPENDS_${PN}_append = "${MAVROS_RUN_AND_BUILD_DEPENDS}" + +require mavros.inc + +ROS_PKG_SUBDIR = "mavros" diff --git a/recipes-ros/ros-mavlink/files/0001-Fix-PKG_NAME-_INCLUDE_DIR-variable.patch b/recipes-ros/ros-mavlink/files/0001-Fix-PKG_NAME-_INCLUDE_DIR-variable.patch new file mode 100644 index 0000000..26d9437 --- /dev/null +++ b/recipes-ros/ros-mavlink/files/0001-Fix-PKG_NAME-_INCLUDE_DIR-variable.patch @@ -0,0 +1,31 @@ +From af522ba6b85be00a712618c719e831b941a8ffdc Mon Sep 17 00:00:00 2001 +From: Gustavo Jose de Sousa +Date: Wed, 16 Nov 2016 13:23:49 -0200 +Subject: [PATCH] Fix @PKG_NAME@_INCLUDE_DIR variable + +The previous approach hardcoded the path to the include directory and cross +compilation using a sysroot directory would fail. This patch takes the +resulting config files generated from other ROS packages as reference. + +Upstream-Status: Backport [https://github.com/mavlink/mavlink-gbp-release/pull/5] +--- + config.cmake.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/config.cmake.in b/config.cmake.in +index b62ab64..34bed61 100644 +--- a/config.cmake.in ++++ b/config.cmake.in +@@ -3,7 +3,8 @@ if (@PKG_NAME@_CONFIG_INCLUDED) + endif() + set(@PKG_NAME@_CONFIG_INCLUDED TRUE) + +-set(@PKG_NAME@_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include") ++get_filename_component(include "${@PKG_NAME@_DIR}/../../../include" ABSOLUTE) ++set(@PKG_NAME@_INCLUDE_DIRS ${include}) + set(@PKG_NAME@_DIALECTS @PKG_MAVLINK_DIALECTS@) + set(@PKG2_NAME@_DIALECTS @PKG2_MAVLINK_DIALECTS@) + +-- +2.10.2 + diff --git a/recipes-ros/ros-mavlink/ros-mavlink_git.bb b/recipes-ros/ros-mavlink/ros-mavlink_git.bb new file mode 100644 index 0000000..64cfa26 --- /dev/null +++ b/recipes-ros/ros-mavlink/ros-mavlink_git.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "MAVLink message marshaling library" +LICENSE = "LGPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=54ad3cbe91bebcf6b1823970ff1fb97f" + +SRC_URI = "git://github.com/mavlink/mavlink-gbp-release.git;branch=release/${ROSDISTRO}/mavlink" +SRCREV = "${AUTOREV}" + +SRC_URI += "file://0001-Fix-PKG_NAME-_INCLUDE_DIR-variable.patch" + +S = "${WORKDIR}/git" + +DEPENDS = "python-setuptools" + +inherit catkin