diff --git a/recipes-devtools/python/python-future.inc b/recipes-devtools/python/python-future.inc new file mode 100644 index 0000000..6613dfe --- /dev/null +++ b/recipes-devtools/python/python-future.inc @@ -0,0 +1,13 @@ +DESCRIPTION = "Clean single-source support for Python 3 and 2" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3f457538b297bd0ef86564b8ac216ad7" +SRCNAME = "future" + +SRC_URI = "https://pypi.python.org/packages/00/2b/8d082ddfed935f3608cc61140df6dcbf0edea1bc3ab52fb6c29ae3e81e85/future-${PV}.tar.gz" +SRC_URI[md5sum] = "3e8e88a2bda48d54b1da7634d04760d7" +SRC_URI[sha256sum] = "e39ced1ab767b5936646cedba8bcce582398233d6a627067d4c6a454c90cfedb" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +BBCLASSEXTEND += "native" diff --git a/recipes-devtools/python/python-future_0.16.0.bb b/recipes-devtools/python/python-future_0.16.0.bb new file mode 100644 index 0000000..0279dfb --- /dev/null +++ b/recipes-devtools/python/python-future_0.16.0.bb @@ -0,0 +1,3 @@ +require python-future.inc + +inherit setuptools diff --git a/recipes-devtools/python/python3-future_0.16.0.bb b/recipes-devtools/python/python3-future_0.16.0.bb new file mode 100644 index 0000000..9952c83 --- /dev/null +++ b/recipes-devtools/python/python3-future_0.16.0.bb @@ -0,0 +1,3 @@ +require python-future.inc + +inherit setuptools3 diff --git a/recipes-ros/mavlink/mavlink/0001-do-not-require-python2.patch b/recipes-ros/mavlink/mavlink/0001-do-not-require-python2.patch new file mode 100644 index 0000000..c81b5b6 --- /dev/null +++ b/recipes-ros/mavlink/mavlink/0001-do-not-require-python2.patch @@ -0,0 +1,45 @@ +From 9a48d109510a9e3592fb90bb1ab89853dfa62da3 Mon Sep 17 00:00:00 2001 +From: Lukas Bulwahn +Date: Sun, 7 May 2017 07:02:29 +0200 +Subject: [PATCH 1/2] do not require python2 + +When only a python3 interpreter is available, CMake fails with: + +``` +| CMake Error at /home/lukas/work/repositories/openembedded.org/openembedded-core/build/tmp-glibc/work/core2-64-oe-linux/ros-mavlink/git-r0/recipe-sysroot-native/usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message): +| Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at +| least version "2") +| Call Stack (most recent call first): +| /home/lukas/work/repositories/openembedded.org/openembedded-core/build/tmp-glibc/work/core2-64-oe-linux/ros-mavlink/git-r0/recipe-sysroot-native/usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) +| /home/lukas/work/repositories/openembedded.org/openembedded-core/build/tmp-glibc/work/core2-64-oe-linux/ros-mavlink/git-r0/recipe-sysroot-native/usr/share/cmake-3.7/Modules/FindPythonInterp.cmake:151 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) +| CMakeLists.txt:22 (find_package) +| +| +| -- Configuring incomplete, errors occurred! +``` + +After dropping this one line, CMake does not insist on python2, +and configures mavlink successfully. + +Signed-off-by: Lukas Bulwahn + +Upstream-Status: Pending +--- + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 594ecb3..26a4210 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -18,7 +18,6 @@ include(GNUInstallDirs) + set(CMAKE_INSTALL_LIBDIR lib) + + # find libraries with cmake modules +-set(PythonInterp_FIND_VERSION "2") + find_package(PythonInterp REQUIRED) + + # Try to read package version from package.xml +-- +1.9.1 + diff --git a/recipes-ros/mavlink/mavlink/0002-provide-path-to-find-mavgen_c.patch b/recipes-ros/mavlink/mavlink/0002-provide-path-to-find-mavgen_c.patch new file mode 100644 index 0000000..ee2d8ef --- /dev/null +++ b/recipes-ros/mavlink/mavlink/0002-provide-path-to-find-mavgen_c.patch @@ -0,0 +1,43 @@ +From 6ac7498052f0e97e978c8adf887b9bbf851d58e2 Mon Sep 17 00:00:00 2001 +From: Lukas Bulwahn +Date: Sun, 7 May 2017 07:02:49 +0200 +Subject: [PATCH 2/2] provide path to find mavgen_c + +When compiling mavlink, it failed with: + +``` +| Generating C headers +| Traceback (most recent call last): +| File "/home/lukas/work/repositories/openembedded.org/openembedded-core/build/tmp-glibc/work/core2-64-oe-linux/ros-mavlink/git-r0/git/pymavlink/tools/mavgen.py", line 30, in +| mavgen.mavgen(args, args.definitions) +| File "/home/lukas/work/repositories/openembedded.org/openembedded-core/build/tmp-glibc/work/core2-64-oe-linux/ros-mavlink/git-r0/git/pymavlink/generator/mavgen.py", line 154, in mavgen +| mavgen_cpp11.generate(opts.output, xml) +| File "/home/lukas/work/repositories/openembedded.org/openembedded-core/build/tmp-glibc/work/core2-64-oe-linux/ros-mavlink/git-r0/git/pymavlink/generator/mavgen_cpp11.py", line 451, in generate +| import mavgen_c +| ImportError: No module named 'mavgen_c' +``` + +This commit provides the path to find mavgen_c, as already done in +many other places. + +Upstream-Status: Pending +--- + pymavlink/generator/mavgen_cpp11.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pymavlink/generator/mavgen_cpp11.py b/pymavlink/generator/mavgen_cpp11.py +index 797ab2e..5fc824a 100644 +--- a/pymavlink/generator/mavgen_cpp11.py ++++ b/pymavlink/generator/mavgen_cpp11.py +@@ -448,7 +448,7 @@ def generate_one(basename, xml): + def generate(basename, xml_list): + '''generate serialization MAVLink C++ implemenation''' + print("Generating C headers") +- import mavgen_c ++ from . import mavgen_c + mavgen_c.generate(basename, xml_list) + for xml in xml_list: + generate_one(basename, xml) +-- +1.9.1 + diff --git a/recipes-ros/ros-mavlink/ros-mavlink_git.bb b/recipes-ros/mavlink/mavlink_git.bb similarity index 55% rename from recipes-ros/ros-mavlink/ros-mavlink_git.bb rename to recipes-ros/mavlink/mavlink_git.bb index c4e201e..7bec02e 100644 --- a/recipes-ros/ros-mavlink/ros-mavlink_git.bb +++ b/recipes-ros/mavlink/mavlink_git.bb @@ -2,13 +2,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" +SRC_URI = "git://github.com/mavlink/mavlink-gbp-release.git;branch=release/kinetic/mavlink" SRCREV = "${AUTOREV}" -SRC_URI += "file://0001-Fix-PKG_NAME-_INCLUDE_DIR-variable.patch" +SRC_URI += "file://0001-do-not-require-python2.patch" +SRC_URI += "file://0002-provide-path-to-find-mavgen_c.patch" S = "${WORKDIR}/git" -DEPENDS = "python-setuptools-native" +DEPENDS = "${PYTHON_PN}-setuptools-native ${PYTHON_PN}-future-native" inherit catkin diff --git a/recipes-ros/mavros/libmavconn_0.17.5.bb b/recipes-ros/mavros/libmavconn_0.18.7.bb similarity index 90% rename from recipes-ros/mavros/libmavconn_0.17.5.bb rename to recipes-ros/mavros/libmavconn_0.18.7.bb index f4a6c27..dfb5659 100644 --- a/recipes-ros/mavros/libmavconn_0.17.5.bb +++ b/recipes-ros/mavros/libmavconn_0.18.7.bb @@ -4,13 +4,13 @@ LIC_FILES_CHKSUM = "file://package.xml;beginline=15;endline=17;md5=9b511d4c606b1 DEPENDS = " \ boost \ - ros-mavlink \ + mavlink \ console-bridge \ " RDEPENDS_${PN} = " \ boost \ - ros-mavlink \ + mavlink \ console-bridge \ " diff --git a/recipes-ros/mavros/mavros-extras_0.17.5.bb b/recipes-ros/mavros/mavros-extras_0.18.7.bb similarity index 100% rename from recipes-ros/mavros/mavros-extras_0.17.5.bb rename to recipes-ros/mavros/mavros-extras_0.18.7.bb diff --git a/recipes-ros/mavros/mavros-msgs_0.17.5.bb b/recipes-ros/mavros/mavros-msgs_0.18.7.bb similarity index 100% rename from recipes-ros/mavros/mavros-msgs_0.17.5.bb rename to recipes-ros/mavros/mavros-msgs_0.18.7.bb diff --git a/recipes-ros/mavros/mavros.inc b/recipes-ros/mavros/mavros.inc index b975b38..dd35998 100644 --- a/recipes-ros/mavros/mavros.inc +++ b/recipes-ros/mavros/mavros.inc @@ -1,5 +1,6 @@ SRC_URI = "https://github.com/mavlink/${ROS_SPN}/archive/${PV}.tar.gz;downloadfilename=${ROS_SP}.tar.gz" -SRC_URI[md5sum] = "eea22457db6c7b8a17bba0223a41dceb" +SRC_URI[md5sum] = "88a94aeeeda9bc8f7e5b1997071464ac" +SRC_URI[sha256sum] = "92e086072ac0641143b59d1dbda7ab54e5903d55001eaeceb34432efe3b07dcc" S = "${WORKDIR}/${ROS_SP}/${ROS_BPN}" diff --git a/recipes-ros/mavros/mavros/0001-always-find-Eigen-with-cmake_modules-mechanism.patch b/recipes-ros/mavros/mavros/0001-always-find-Eigen-with-cmake_modules-mechanism.patch new file mode 100644 index 0000000..16ff831 --- /dev/null +++ b/recipes-ros/mavros/mavros/0001-always-find-Eigen-with-cmake_modules-mechanism.patch @@ -0,0 +1,36 @@ +From d7b00940cb69d659d77bb08b1cbbf5aad4ea4617 Mon Sep 17 00:00:00 2001 +From: Lukas Bulwahn +Date: Sun, 7 May 2017 06:14:18 +0200 +Subject: [PATCH] always find Eigen with cmake_modules mechanism + +Upstream-Status: Pending +--- + mavros/CMakeLists.txt | 12 ++++-------- + 1 file changed, 4 insertions(+), 8 deletions(-) + +diff --git a/mavros/CMakeLists.txt b/mavros/CMakeLists.txt +index 3b3a0bd..bcc7924 100644 +--- a/mavros/CMakeLists.txt ++++ b/mavros/CMakeLists.txt +@@ -26,14 +26,10 @@ find_package(catkin REQUIRED COMPONENTS + # find_package(Boost REQUIRED COMPONENTS system) + find_package(Boost REQUIRED COMPONENTS system) + +-find_package(Eigen3) +-if(NOT EIGEN3_FOUND) +- # Fallback to cmake_modules +- find_package(cmake_modules REQUIRED) +- find_package(Eigen REQUIRED) +- set(EIGEN3_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}) +- set(EIGEN3_LIBRARIES ${EIGEN_LIBRARIES}) +-endif() ++find_package(cmake_modules REQUIRED) ++find_package(Eigen REQUIRED) ++set(EIGEN3_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}) ++set(EIGEN3_LIBRARIES ${EIGEN_LIBRARIES}) + + include(EnableCXX11) + include(MavrosMavlink) +-- +1.9.1 + diff --git a/recipes-ros/mavros/mavros_0.17.5.bb b/recipes-ros/mavros/mavros_0.18.7.bb similarity index 88% rename from recipes-ros/mavros/mavros_0.17.5.bb rename to recipes-ros/mavros/mavros_0.18.7.bb index 7f4ba20..e941aaa 100644 --- a/recipes-ros/mavros/mavros_0.17.5.bb +++ b/recipes-ros/mavros/mavros_0.18.7.bb @@ -8,12 +8,12 @@ LIC_FILES_CHKSUM = "file://package.xml;beginline=12;endline=14;md5=9b511d4c606b1 DEPENDS = " \ boost \ libeigen \ - ros-mavlink \ + mavlink \ " RDEPENDS_${PN} = " \ boost \ - ros-mavlink \ + mavlink \ " # ROS packages dependencies @@ -47,3 +47,5 @@ RDEPENDS_${PN}_append = "${MAVROS_RUN_AND_BUILD_DEPENDS}" require mavros.inc ROS_PKG_SUBDIR = "mavros" + +SRC_URI += "file://0001-always-find-Eigen-with-cmake_modules-mechanism.patch;striplevel=2" diff --git a/recipes-ros/packagegroups/packagegroup-ros-world.bb b/recipes-ros/packagegroups/packagegroup-ros-world.bb index 30173f0..02831ec 100644 --- a/recipes-ros/packagegroups/packagegroup-ros-world.bb +++ b/recipes-ros/packagegroups/packagegroup-ros-world.bb @@ -184,9 +184,12 @@ RDEPENDS_${PN} = "\ cv-camera \ object-recognition-msgs \ srdfdom \ + libmavconn \ + mavros \ + mavros-extras \ + mavlink \ " -# ros-mavlink fails while configuring; libmavconn, mavros, mavros-extras depend on ros-mavlink. # urdfdom-headers is an empty deploy package. # image-view requires gtk+, but it cannot be found by cmake for some reason. # sound-play requires python-gst (which is not available in any layers' master branch) 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 deleted file mode 100644 index 26d9437..0000000 --- a/recipes-ros/ros-mavlink/files/0001-Fix-PKG_NAME-_INCLUDE_DIR-variable.patch +++ /dev/null @@ -1,31 +0,0 @@ -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 -