From e2b70c6db946a10660c23a5ba60f7288c85f43e6 Mon Sep 17 00:00:00 2001 From: Dmitry Rozhkov Date: Thu, 18 May 2017 10:32:31 +0300 Subject: [PATCH 1/2] industrial-core: initial recipes Signed-off-by: Dmitry Rozhkov --- .../industrial-core/industrial-core.inc | 9 +++ .../industrial-core/industrial-msgs_0.4.3.bb | 10 +++ ...lient-build-unit-tests-conditionally.patch | 36 ++++++++++ ..._client-Fix-signature-of-goal-and-ca.patch | 61 ++++++++++++++++ .../industrial-robot-client_0.4.3.bb | 17 +++++ .../industrial-robot-simulator_0.4.3.bb | 10 +++ .../industrial-trajectory-filters_0.4.3.bb | 10 +++ ...utils-build-unit-tests-conditionally.patch | 33 +++++++++ .../industrial-core/industrial-utils_0.4.3.bb | 10 +++ .../0001-Build-unit-tests-conditionally.patch | 71 +++++++++++++++++++ .../industrial-core/simple-message_0.4.3.bb | 12 ++++ 11 files changed, 279 insertions(+) create mode 100644 recipes-ros/industrial-core/industrial-core.inc create mode 100644 recipes-ros/industrial-core/industrial-msgs_0.4.3.bb create mode 100644 recipes-ros/industrial-core/industrial-robot-client/0001-client-build-unit-tests-conditionally.patch create mode 100644 recipes-ros/industrial-core/industrial-robot-client/0001-industrial_robot_client-Fix-signature-of-goal-and-ca.patch create mode 100644 recipes-ros/industrial-core/industrial-robot-client_0.4.3.bb create mode 100644 recipes-ros/industrial-core/industrial-robot-simulator_0.4.3.bb create mode 100644 recipes-ros/industrial-core/industrial-trajectory-filters_0.4.3.bb create mode 100644 recipes-ros/industrial-core/industrial-utils/0001-utils-build-unit-tests-conditionally.patch create mode 100644 recipes-ros/industrial-core/industrial-utils_0.4.3.bb create mode 100644 recipes-ros/industrial-core/simple-message/0001-Build-unit-tests-conditionally.patch create mode 100644 recipes-ros/industrial-core/simple-message_0.4.3.bb diff --git a/recipes-ros/industrial-core/industrial-core.inc b/recipes-ros/industrial-core/industrial-core.inc new file mode 100644 index 0000000..a968a19 --- /dev/null +++ b/recipes-ros/industrial-core/industrial-core.inc @@ -0,0 +1,9 @@ +SRC_URI = "https://github.com/ros-industrial/${ROS_SPN}/archive/${PV}.tar.gz;downloadfilename=${ROS_SP}.tar.gz" +SRC_URI[md5sum] = "7a1955ab2b909b79ad40d11516a2743c" +SRC_URI[sha256sum] = "6c21cf1383e90cefcbb536675fa0503b67d0f7cc5777f76f6dc49fd14d4254e9" + +S = "${WORKDIR}/${ROS_SP}/${ROS_BPN}" + +inherit catkin + +ROS_SPN = "industrial_core" diff --git a/recipes-ros/industrial-core/industrial-msgs_0.4.3.bb b/recipes-ros/industrial-core/industrial-msgs_0.4.3.bb new file mode 100644 index 0000000..a389a6e --- /dev/null +++ b/recipes-ros/industrial-core/industrial-msgs_0.4.3.bb @@ -0,0 +1,10 @@ +DESCRIPTION = "The industrial message package containes industrial specific messages definitions" +SECTION = "devel" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://package.xml;beginline=9;endline=9;md5=d566ef916e9dedc494f5f793a6690ba5" + +DEPENDS = "std-msgs trajectory-msgs genmsg message-generation" + +RDEPENDS_${PN} = "trajectory-msgs" + +require industrial-core.inc diff --git a/recipes-ros/industrial-core/industrial-robot-client/0001-client-build-unit-tests-conditionally.patch b/recipes-ros/industrial-core/industrial-robot-client/0001-client-build-unit-tests-conditionally.patch new file mode 100644 index 0000000..70066ee --- /dev/null +++ b/recipes-ros/industrial-core/industrial-robot-client/0001-client-build-unit-tests-conditionally.patch @@ -0,0 +1,36 @@ +From 1b919470ba4434aca1ae5c62adbf574ea0065065 Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov +Date: Thu, 5 Jan 2017 14:33:32 +0200 +Subject: [PATCH] client: build unit tests conditionally + +Upstream-Status: Accepted [https://github.com/ros-industrial/industrial_core/pull/171] + +Signed-off-by: Dmitry Rozhkov +--- + CMakeLists.txt | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 95f6298..29bb239 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -139,10 +139,12 @@ add_dependencies(joint_trajectory_action industrial_robot_client_gencpp) + ## Test ## + ########## + # Testing - Only performed on normal (non byte swapped library) +-catkin_add_gtest(utest_robot_client test/utest.cpp) +-target_link_libraries(utest_robot_client +- industrial_robot_client +- ${catkin_LIBRARIES}) ++if(CATKIN_ENABLE_TESTING) ++ catkin_add_gtest(utest_robot_client test/utest.cpp) ++ target_link_libraries(utest_robot_client ++ industrial_robot_client ++ ${catkin_LIBRARIES}) ++endif() + + # ROS launch testing + ## ROS launch test should be enabled when launch parameters are supported, +-- +2.7.4 + diff --git a/recipes-ros/industrial-core/industrial-robot-client/0001-industrial_robot_client-Fix-signature-of-goal-and-ca.patch b/recipes-ros/industrial-core/industrial-robot-client/0001-industrial_robot_client-Fix-signature-of-goal-and-ca.patch new file mode 100644 index 0000000..63dafb3 --- /dev/null +++ b/recipes-ros/industrial-core/industrial-robot-client/0001-industrial_robot_client-Fix-signature-of-goal-and-ca.patch @@ -0,0 +1,61 @@ +From 75b97718c0e99c916d7890e38cf86c66e62bca6e Mon Sep 17 00:00:00 2001 +From: Maarten de Vries +Date: Wed, 11 May 2016 22:32:19 +0200 +Subject: [PATCH] industrial_robot_client: Fix signature of goal and cancel + callbacks. + +Upstream-Status: Backported [from v0.5.1] + +Signed-off-by: Dmitry Rozhkov +--- + .../include/industrial_robot_client/joint_trajectory_action.h | 4 ++-- + industrial_robot_client/src/joint_trajectory_action.cpp | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/include/industrial_robot_client/joint_trajectory_action.h b/include/industrial_robot_client/joint_trajectory_action.h +index 6eaf6b5..90fb35f 100644 +--- a/include/industrial_robot_client/joint_trajectory_action.h ++++ b/include/industrial_robot_client/joint_trajectory_action.h +@@ -185,7 +185,7 @@ private: + * \param gh goal handle + * + */ +- void goalCB(JointTractoryActionServer::GoalHandle & gh); ++ void goalCB(JointTractoryActionServer::GoalHandle gh); + + /** + * \brief Action server cancel callback method +@@ -194,7 +194,7 @@ private: + * + */ + +- void cancelCB(JointTractoryActionServer::GoalHandle & gh); ++ void cancelCB(JointTractoryActionServer::GoalHandle gh); + /** + * \brief Controller state callback (executed when feedback message + * received) +diff --git a/industrial_robot_client/src/joint_trajectory_action.cpp b/industrial_robot_client/src/joint_trajectory_action.cpp +index 0f92b95..407da6d 100644 +--- a/src/joint_trajectory_action.cpp ++++ b/src/joint_trajectory_action.cpp +@@ -107,7 +107,7 @@ void JointTrajectoryAction::watchdog(const ros::TimerEvent &e) + } + } + +-void JointTrajectoryAction::goalCB(JointTractoryActionServer::GoalHandle & gh) ++void JointTrajectoryAction::goalCB(JointTractoryActionServer::GoalHandle gh) + { + ROS_INFO("Received new goal"); + +@@ -180,7 +180,7 @@ void JointTrajectoryAction::goalCB(JointTractoryActionServer::GoalHandle & gh) + } + } + +-void JointTrajectoryAction::cancelCB(JointTractoryActionServer::GoalHandle & gh) ++void JointTrajectoryAction::cancelCB(JointTractoryActionServer::GoalHandle gh) + { + ROS_DEBUG("Received action cancel request"); + if (active_goal_ == gh) +-- +2.7.4 + diff --git a/recipes-ros/industrial-core/industrial-robot-client_0.4.3.bb b/recipes-ros/industrial-core/industrial-robot-client_0.4.3.bb new file mode 100644 index 0000000..51b6a8c --- /dev/null +++ b/recipes-ros/industrial-core/industrial-robot-client_0.4.3.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "Ccontains generic clients for connecting to industrial robot controllers with servers that adhere to the simple message protocol" +SECTION = "devel" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://package.xml;beginline=10;endline=10;md5=d566ef916e9dedc494f5f793a6690ba5" + +DEPENDS = "sensor-msgs control-msgs actionlib actionlib-msgs simple-message industrial-utils" + +require industrial-core.inc + +SRC_URI += " \ + file://0001-client-build-unit-tests-conditionally.patch \ + file://0001-industrial_robot_client-Fix-signature-of-goal-and-ca.patch \ + " + +EXTRA_OECMAKE_append = "\ + -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=NEVER \ + " diff --git a/recipes-ros/industrial-core/industrial-robot-simulator_0.4.3.bb b/recipes-ros/industrial-core/industrial-robot-simulator_0.4.3.bb new file mode 100644 index 0000000..521590b --- /dev/null +++ b/recipes-ros/industrial-core/industrial-robot-simulator_0.4.3.bb @@ -0,0 +1,10 @@ +DESCRIPTION = "The industrial robot simulator is a stand in for industrial robot driver node(s)" +SECTION = "devel" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://package.xml;beginline=7;endline=7;md5=d566ef916e9dedc494f5f793a6690ba5" + +DEPENDS = "std-msgs trajectory-msgs sensor-msgs industrial-msgs control-msgs" + +RDEPENDS_${PN} = "industrial-robot-client" + +require industrial-core.inc diff --git a/recipes-ros/industrial-core/industrial-trajectory-filters_0.4.3.bb b/recipes-ros/industrial-core/industrial-trajectory-filters_0.4.3.bb new file mode 100644 index 0000000..0ad6ff7 --- /dev/null +++ b/recipes-ros/industrial-core/industrial-trajectory-filters_0.4.3.bb @@ -0,0 +1,10 @@ +DESCRIPTION = "ROS Industrial libraries/plugins for filtering trajectories" +SECTION = "devel" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://package.xml;beginline=16;endline=16;md5=d566ef916e9dedc494f5f793a6690ba5" + +DEPENDS = "trajectory-msgs moveit-ros-planning" + +RDEPENDS_${PN} = "trajectory-msgs" + +require industrial-core.inc diff --git a/recipes-ros/industrial-core/industrial-utils/0001-utils-build-unit-tests-conditionally.patch b/recipes-ros/industrial-core/industrial-utils/0001-utils-build-unit-tests-conditionally.patch new file mode 100644 index 0000000..d566097 --- /dev/null +++ b/recipes-ros/industrial-core/industrial-utils/0001-utils-build-unit-tests-conditionally.patch @@ -0,0 +1,33 @@ +From 72e1dc2e983bdef9845b45e1bf9717ad43015b28 Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov +Date: Thu, 5 Jan 2017 12:11:14 +0200 +Subject: [PATCH] utils: build unit tests conditionally + +Upstream-Status: Accepted [https://github.com/ros-industrial/industrial_core/pull/171] + +Signed-off-by: Dmitry Rozhkov +--- + CMakeLists.txt | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cac163f..b1db333 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,9 +20,10 @@ target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}) + + + +-catkin_add_gtest(utest_inds_utils test/utest.cpp) +-target_link_libraries(utest_inds_utils ${PROJECT_NAME} ${catkin_LIBRARIES}) +- ++if(CATKIN_ENABLE_TESTING) ++ catkin_add_gtest(utest_inds_utils test/utest.cpp) ++ target_link_libraries(utest_inds_utils ${PROJECT_NAME} ${catkin_LIBRARIES}) ++endif() + + + install( +-- +2.7.4 + diff --git a/recipes-ros/industrial-core/industrial-utils_0.4.3.bb b/recipes-ros/industrial-core/industrial-utils_0.4.3.bb new file mode 100644 index 0000000..b4fcd95 --- /dev/null +++ b/recipes-ros/industrial-core/industrial-utils_0.4.3.bb @@ -0,0 +1,10 @@ +DESCRIPTION = "Industrial utils is a library package that captures common funcitonality for the ROS-Industrial distribution" +SECTION = "devel" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://package.xml;beginline=7;endline=7;md5=d566ef916e9dedc494f5f793a6690ba5" + +DEPENDS = "roscpp urdf" + +require industrial-core.inc + +SRC_URI += "file://0001-utils-build-unit-tests-conditionally.patch" diff --git a/recipes-ros/industrial-core/simple-message/0001-Build-unit-tests-conditionally.patch b/recipes-ros/industrial-core/simple-message/0001-Build-unit-tests-conditionally.patch new file mode 100644 index 0000000..8dadefd --- /dev/null +++ b/recipes-ros/industrial-core/simple-message/0001-Build-unit-tests-conditionally.patch @@ -0,0 +1,71 @@ +From f4c66b4425b64c31bc3ce1a882a513f903b393ab Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov +Date: Thu, 5 Jan 2017 11:46:57 +0200 +Subject: [PATCH] Build unit tests conditionally + +Upstream-Status: Accepted [https://github.com/ros-industrial/industrial_core/pull/171] + +Signed-off-by: Dmitry Rozhkov +--- + CMakeLists.txt | 32 ++++++++++++++++++-------------- + 1 file changed, 18 insertions(+), 14 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 06830d5..e6cb21a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -101,33 +101,37 @@ add_library(simple_message ${SRC_FILES}) + target_link_libraries(simple_message ${catkin_LIBRARIES}) + add_dependencies(simple_message ${industrial_msgs_EXPORTED_TARGETS}) + +-catkin_add_gtest(utest ${UTEST_SRC_FILES}) +-set_target_properties(utest PROPERTIES COMPILE_DEFINITIONS "TEST_PORT_BASE=11000") +-target_link_libraries(utest simple_message) +- + # ALTERNATIVE LIBRARY (DIFFERENT ENDIAN) + add_library(simple_message_bswap ${SRC_FILES}) + set_target_properties(simple_message_bswap PROPERTIES COMPILE_DEFINITIONS "BYTE_SWAPPING") + target_link_libraries(simple_message_bswap ${catkin_LIBRARIES}) + add_dependencies(simple_message_bswap ${industrial_msgs_EXPORTED_TARGETS}) + +-catkin_add_gtest(utest_byte_swapping ${UTEST_SRC_FILES}) +-set_target_properties(utest_byte_swapping PROPERTIES COMPILE_DEFINITIONS "TEST_PORT_BASE=12000") +-target_link_libraries(utest_byte_swapping simple_message_bswap) +- + # ALTERNATIVE LIBRARY (64-bit floats) + add_library(simple_message_float64 ${SRC_FILES}) + set_target_properties(simple_message_float64 PROPERTIES COMPILE_DEFINITIONS "FLOAT64") + target_link_libraries(simple_message_float64 ${catkin_LIBRARIES}) + add_dependencies(simple_message_float64 ${industrial_msgs_EXPORTED_TARGETS}) + +-catkin_add_gtest(utest_float64 ${UTEST_SRC_FILES}) +-set_target_properties(utest_float64 PROPERTIES COMPILE_DEFINITIONS "TEST_PORT_BASE=13000;FLOAT64") +-target_link_libraries(utest_float64 simple_message_float64) ++if(CATKIN_ENABLE_TESTING) ++ ++ catkin_add_gtest(utest ${UTEST_SRC_FILES}) ++ set_target_properties(utest PROPERTIES COMPILE_DEFINITIONS "TEST_PORT_BASE=11000") ++ target_link_libraries(utest simple_message) ++ ++ catkin_add_gtest(utest_byte_swapping ${UTEST_SRC_FILES}) ++ set_target_properties(utest_byte_swapping PROPERTIES COMPILE_DEFINITIONS "TEST_PORT_BASE=12000") ++ target_link_libraries(utest_byte_swapping simple_message_bswap) ++ ++ catkin_add_gtest(utest_float64 ${UTEST_SRC_FILES}) ++ set_target_properties(utest_float64 PROPERTIES COMPILE_DEFINITIONS "TEST_PORT_BASE=13000;FLOAT64") ++ target_link_libraries(utest_float64 simple_message_float64) ++ ++ catkin_add_gtest(utest_udp ${UTEST_SRC_FILES}) ++ set_target_properties(utest_udp PROPERTIES COMPILE_DEFINITIONS "TEST_PORT_BASE=15000;UDP_TEST") ++ target_link_libraries(utest_udp simple_message) + +-catkin_add_gtest(utest_udp ${UTEST_SRC_FILES}) +-set_target_properties(utest_udp PROPERTIES COMPILE_DEFINITIONS "TEST_PORT_BASE=15000;UDP_TEST") +-target_link_libraries(utest_udp simple_message) ++endif() + + install( + TARGETS simple_message simple_message_bswap simple_message_float64 +-- +2.7.4 + diff --git a/recipes-ros/industrial-core/simple-message_0.4.3.bb b/recipes-ros/industrial-core/simple-message_0.4.3.bb new file mode 100644 index 0000000..3b97e62 --- /dev/null +++ b/recipes-ros/industrial-core/simple-message_0.4.3.bb @@ -0,0 +1,12 @@ +DESCRIPTION = "Defines a simple messaging connection and protocol for communicating with an industrial robot controller." +SECTION = "devel" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://package.xml;beginline=11;endline=11;md5=d566ef916e9dedc494f5f793a6690ba5" + +DEPENDS = "roscpp industrial-msgs" + +RDEPENDS_${PN} = "industrial-msgs" + +require industrial-core.inc + +SRC_URI += "file://0001-Build-unit-tests-conditionally.patch" From 2097ff3d48537ae5cb90001bb3e727556686d41d Mon Sep 17 00:00:00 2001 From: Dmitry Rozhkov Date: Thu, 18 May 2017 10:40:07 +0300 Subject: [PATCH 2/2] packagegroups: new packagegroup for industrial_core related recipes Signed-off-by: Dmitry Rozhkov --- .../packagegroup-ros-industrial-core.bb | 13 +++++++++++++ recipes-ros/packagegroups/packagegroup-ros-world.bb | 1 + 2 files changed, 14 insertions(+) create mode 100644 recipes-ros/packagegroups/packagegroup-ros-industrial-core.bb diff --git a/recipes-ros/packagegroups/packagegroup-ros-industrial-core.bb b/recipes-ros/packagegroups/packagegroup-ros-industrial-core.bb new file mode 100644 index 0000000..81a8204 --- /dev/null +++ b/recipes-ros/packagegroups/packagegroup-ros-industrial-core.bb @@ -0,0 +1,13 @@ +DESCRIPTION = "ros-industrial-core package group" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "${PN}" + +RDEPENDS_${PN} = "\ + industrial-trajectory-filters \ + industrial-robot-simulator \ + industrial-robot-client \ + industrial-utils \ +" diff --git a/recipes-ros/packagegroups/packagegroup-ros-world.bb b/recipes-ros/packagegroups/packagegroup-ros-world.bb index 02831ec..75dbd56 100644 --- a/recipes-ros/packagegroups/packagegroup-ros-world.bb +++ b/recipes-ros/packagegroups/packagegroup-ros-world.bb @@ -8,6 +8,7 @@ PACKAGES = "${PN}" RDEPENDS_${PN} = "\ packagegroup-ros-comm \ packagegroup-ros-kobuki \ + packagegroup-ros-industrial-core \ actionlib \ bond \ bondcpp \