From b185beab1dc3787635122e7bd2fe4fb780c34f93 Mon Sep 17 00:00:00 2001 From: Karsten Knese Date: Tue, 22 Sep 2020 08:53:52 -0700 Subject: [PATCH 01/13] run gh actions on 20.04 Signed-off-by: Karsten Knese --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d461b365b4..56832c5262 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ on: jobs: build_and_test: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: fail-fast: false steps: @@ -24,7 +24,6 @@ jobs: vcs-repo-file-url: | https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/.github/workspace.repos https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos - colcon-mixin-name: coverage-gcc colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml - uses: codecov/codecov-action@v1 From a1cbec4e28b7b47fd4244b6c3c58f37ee6de5501 Mon Sep 17 00:00:00 2001 From: Karsten Knese Date: Tue, 22 Sep 2020 11:30:20 -0700 Subject: [PATCH 02/13] use packages in metapackages Signed-off-by: Karsten Knese --- .github/workflows/test.yml | 5 ++--- ros2_controllers/package.xml | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 56832c5262..5e126002c6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,10 +17,9 @@ jobs: - uses: ros-tooling/setup-ros@0.0.23 - uses: ros-tooling/action-ros-ci@0.0.17 with: + # build all packages listed in the meta package package-name: | - joint_state_controller - joint_trajectory_controller - diff_drive_controller + ros2_controllers vcs-repo-file-url: | https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/.github/workspace.repos https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos diff --git a/ros2_controllers/package.xml b/ros2_controllers/package.xml index ae11c50ca8..634bc24fd5 100644 --- a/ros2_controllers/package.xml +++ b/ros2_controllers/package.xml @@ -12,6 +12,7 @@ ament_cmake + diff_drive_controller joint_state_controller joint_trajectory_controller From 63de3d9ff2c73c904ae6e93c6d867cd49c6eea4d Mon Sep 17 00:00:00 2001 From: Karsten Knese Date: Tue, 22 Sep 2020 13:21:55 -0700 Subject: [PATCH 03/13] conditional for fixing tests for foxy and master Signed-off-by: Karsten Knese --- joint_trajectory_controller/CMakeLists.txt | 7 +++++++ .../test/test_trajectory_actions.cpp | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/joint_trajectory_controller/CMakeLists.txt b/joint_trajectory_controller/CMakeLists.txt index 8b8179e4aa..998933db04 100644 --- a/joint_trajectory_controller/CMakeLists.txt +++ b/joint_trajectory_controller/CMakeLists.txt @@ -101,6 +101,13 @@ if(BUILD_TESTING) test_trajectory_actions test/test_trajectory_actions.cpp ) + # There's an API break between master and foxy in terms of action goalhandles + # more details: https://github.com/ros2/rclcpp/pull/1311 + # Adding a conditional here helps fixing the test wo/ branching off + if(${rclcpp_VERSION} LESS "5.0.0") + message("RCLCPP_VERSION = ${rclcpp_VERSION}") + target_compile_definitions(test_trajectory_actions PRIVATE SHARED_FUTURE_CALLBACK) + endif() target_include_directories(test_trajectory_actions PRIVATE include) target_link_libraries(test_trajectory_actions joint_trajectory_controller diff --git a/joint_trajectory_controller/test/test_trajectory_actions.cpp b/joint_trajectory_controller/test/test_trajectory_actions.cpp index 286e4cf82a..78c7614957 100644 --- a/joint_trajectory_controller/test/test_trajectory_actions.cpp +++ b/joint_trajectory_controller/test/test_trajectory_actions.cpp @@ -246,12 +246,17 @@ class TestTrajectoryActions : public ::testing::Test GoalOptions goal_options_; public: +#ifdef SHARED_FUTURE_CALLBACK void common_goal_response(std::shared_future future) { + const auto goal_handle = future.get(); +#else + void common_goal_response(GoalHandle::SharedPtr goal_handle) + { +#endif RCLCPP_DEBUG( node_->get_logger(), "common_goal_response time: %f", rclcpp::Clock().now().seconds()); - const auto goal_handle = future.get(); if (!goal_handle) { common_goal_accepted_ = false; RCLCPP_DEBUG(node_->get_logger(), "Goal rejected"); From 54bc02598f0e3490b1e768c949c218ba8d50a800 Mon Sep 17 00:00:00 2001 From: Karsten Knese Date: Tue, 22 Sep 2020 15:23:26 -0700 Subject: [PATCH 04/13] update codecov action Signed-off-by: Karsten Knese --- .github/workflows/test.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5e126002c6..5f887b9ae3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,20 @@ on: - cron: '17 8 * * *' jobs: - build_and_test: + ci_binary: + name: Industrial CI against testing repository + strategy: + matrix: + env: + - {ROS_DISTRO: foxy, ROS_REPO: testing} + runs-on: ubuntu-latest + steps: + - run: sudo apt-get update -qq && sudo apt-get upgrade + - uses: actions/checkout@v1 + - uses: 'ros-industrial/industrial_ci@master' + env: ${{matrix.env}} + + ci_source: runs-on: ubuntu-20.04 strategy: fail-fast: false @@ -31,7 +44,6 @@ jobs: file: ros_ws/lcov/total_coverage.info flags: unittests name: codecov-umbrella - yml: ./codecov.yml fail_ci_if_error: true - uses: actions/upload-artifact@v1 with: From ef213370459c6a684f13c3873ababe65e4cf85d1 Mon Sep 17 00:00:00 2001 From: Karsten Knese Date: Tue, 22 Sep 2020 15:38:31 -0700 Subject: [PATCH 05/13] disable binary jobs temporarily Signed-off-by: Karsten Knese --- .github/workflows/test.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5f887b9ae3..efa9c810e7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,20 +9,22 @@ on: - cron: '17 8 * * *' jobs: - ci_binary: - name: Industrial CI against testing repository - strategy: - matrix: - env: - - {ROS_DISTRO: foxy, ROS_REPO: testing} - runs-on: ubuntu-latest - steps: - - run: sudo apt-get update -qq && sudo apt-get upgrade - - uses: actions/checkout@v1 - - uses: 'ros-industrial/industrial_ci@master' - env: ${{matrix.env}} + # Re-enable once ros2_controls is released completely + # ci_binary: + # name: Binary job testing against latest release + # runs-on: ubuntu-latest + # strategy: + # matrix: + # env: + # - {ROS_DISTRO: foxy, ROS_REPO: testing} + # steps: + # - run: sudo apt-get update -qq && sudo apt-get upgrade + # - uses: actions/checkout@v1 + # - uses: 'ros-industrial/industrial_ci@master' + # env: ${{matrix.env}} ci_source: + name: Source job testing against latest ROS2 source branches runs-on: ubuntu-20.04 strategy: fail-fast: false From 57f421340b09af2ec1888262520a1565486cddbf Mon Sep 17 00:00:00 2001 From: Karsten Knese Date: Tue, 22 Sep 2020 16:26:23 -0700 Subject: [PATCH 06/13] remove codecov Signed-off-by: Karsten Knese --- .github/workflows/test.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index efa9c810e7..b3343fc064 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,13 +40,6 @@ jobs: https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos colcon-mixin-name: coverage-gcc colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml - - uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - file: ros_ws/lcov/total_coverage.info - flags: unittests - name: codecov-umbrella - fail_ci_if_error: true - uses: actions/upload-artifact@v1 with: name: colcon-logs-${{ matrix.os }} From 875d874186369af53c19354cba151af3cc467fa6 Mon Sep 17 00:00:00 2001 From: Karsten Knese Date: Wed, 23 Sep 2020 15:35:55 -0700 Subject: [PATCH 07/13] limit source job to foxy distribution Signed-off-by: Karsten Knese --- .github/workflows/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b3343fc064..73e59533bc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,20 +24,22 @@ jobs: # env: ${{matrix.env}} ci_source: - name: Source job testing against latest ROS2 source branches + name: Foxy source job runs-on: ubuntu-20.04 strategy: fail-fast: false steps: - uses: ros-tooling/setup-ros@0.0.23 + with: + required-ros-distributions: foxy - uses: ros-tooling/action-ros-ci@0.0.17 with: + source-ros-binary-installation: foxy # build all packages listed in the meta package package-name: | ros2_controllers vcs-repo-file-url: | https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/.github/workspace.repos - https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos colcon-mixin-name: coverage-gcc colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml - uses: actions/upload-artifact@v1 From 95901e37be6bf9576a48eedf1f3022ad8768341a Mon Sep 17 00:00:00 2001 From: Karsten Knese Date: Wed, 23 Sep 2020 15:39:35 -0700 Subject: [PATCH 08/13] apply same file structure Signed-off-by: Karsten Knese --- .github/workflows/{test.yml => ci.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{test.yml => ci.yml} (96%) diff --git a/.github/workflows/test.yml b/.github/workflows/ci.yml similarity index 96% rename from .github/workflows/test.yml rename to .github/workflows/ci.yml index 73e59533bc..57cf81f590 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ on: jobs: # Re-enable once ros2_controls is released completely # ci_binary: - # name: Binary job testing against latest release + # name: Foxy binary job # runs-on: ubuntu-latest # strategy: # matrix: From 5e321368a3dc2ac713670d259ac1b6c69ff004d3 Mon Sep 17 00:00:00 2001 From: Karsten Knese Date: Wed, 23 Sep 2020 15:51:13 -0700 Subject: [PATCH 09/13] list packages explicitly Signed-off-by: Karsten Knese --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57cf81f590..4764cb4bea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,9 @@ jobs: source-ros-binary-installation: foxy # build all packages listed in the meta package package-name: | + diff_drive_controller + joint_state_controller + joint_trajectory_controller ros2_controllers vcs-repo-file-url: | https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/.github/workspace.repos From d7a4d11753079c15b02b49b8292936ebc876ce11 Mon Sep 17 00:00:00 2001 From: Karsten Knese Date: Thu, 24 Sep 2020 07:42:51 -0700 Subject: [PATCH 10/13] fix cmake linter Signed-off-by: Karsten Knese --- joint_trajectory_controller/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/joint_trajectory_controller/CMakeLists.txt b/joint_trajectory_controller/CMakeLists.txt index 998933db04..b0b17272ee 100644 --- a/joint_trajectory_controller/CMakeLists.txt +++ b/joint_trajectory_controller/CMakeLists.txt @@ -106,7 +106,8 @@ if(BUILD_TESTING) # Adding a conditional here helps fixing the test wo/ branching off if(${rclcpp_VERSION} LESS "5.0.0") message("RCLCPP_VERSION = ${rclcpp_VERSION}") - target_compile_definitions(test_trajectory_actions PRIVATE SHARED_FUTURE_CALLBACK) + target_compile_definitions( + test_trajectory_actions PRIVATE SHARED_FUTURE_CALLBACK) endif() target_include_directories(test_trajectory_actions PRIVATE include) target_link_libraries(test_trajectory_actions From 6827a6e4db82508349b494b049f18f4480741ed5 Mon Sep 17 00:00:00 2001 From: Karsten Knese Date: Fri, 25 Sep 2020 11:15:21 -0700 Subject: [PATCH 11/13] add main ros repos Signed-off-by: Karsten Knese --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4764cb4bea..28c2bb91e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,7 @@ jobs: # matrix: # env: # - {ROS_DISTRO: foxy, ROS_REPO: testing} + # - {ROS_DISTRO: foxy, ROS_REPO: main} # steps: # - run: sudo apt-get update -qq && sudo apt-get upgrade # - uses: actions/checkout@v1 From 12e9cab1ca20ce28984dc84dad31c6f7290a5c6b Mon Sep 17 00:00:00 2001 From: Karsten Knese Date: Fri, 25 Sep 2020 11:17:24 -0700 Subject: [PATCH 12/13] Revert "conditional for fixing tests for foxy and master" This reverts commit 8371698e7cf33fe50c96945338f8b2193e5ab00e. --- joint_trajectory_controller/CMakeLists.txt | 8 -------- .../test/test_trajectory_actions.cpp | 7 +------ .../test/test_trajectory_controller.cpp | 2 +- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/joint_trajectory_controller/CMakeLists.txt b/joint_trajectory_controller/CMakeLists.txt index b0b17272ee..8b8179e4aa 100644 --- a/joint_trajectory_controller/CMakeLists.txt +++ b/joint_trajectory_controller/CMakeLists.txt @@ -101,14 +101,6 @@ if(BUILD_TESTING) test_trajectory_actions test/test_trajectory_actions.cpp ) - # There's an API break between master and foxy in terms of action goalhandles - # more details: https://github.com/ros2/rclcpp/pull/1311 - # Adding a conditional here helps fixing the test wo/ branching off - if(${rclcpp_VERSION} LESS "5.0.0") - message("RCLCPP_VERSION = ${rclcpp_VERSION}") - target_compile_definitions( - test_trajectory_actions PRIVATE SHARED_FUTURE_CALLBACK) - endif() target_include_directories(test_trajectory_actions PRIVATE include) target_link_libraries(test_trajectory_actions joint_trajectory_controller diff --git a/joint_trajectory_controller/test/test_trajectory_actions.cpp b/joint_trajectory_controller/test/test_trajectory_actions.cpp index 78c7614957..286e4cf82a 100644 --- a/joint_trajectory_controller/test/test_trajectory_actions.cpp +++ b/joint_trajectory_controller/test/test_trajectory_actions.cpp @@ -246,17 +246,12 @@ class TestTrajectoryActions : public ::testing::Test GoalOptions goal_options_; public: -#ifdef SHARED_FUTURE_CALLBACK void common_goal_response(std::shared_future future) { - const auto goal_handle = future.get(); -#else - void common_goal_response(GoalHandle::SharedPtr goal_handle) - { -#endif RCLCPP_DEBUG( node_->get_logger(), "common_goal_response time: %f", rclcpp::Clock().now().seconds()); + const auto goal_handle = future.get(); if (!goal_handle) { common_goal_accepted_ = false; RCLCPP_DEBUG(node_->get_logger(), "Goal rejected"); diff --git a/joint_trajectory_controller/test/test_trajectory_controller.cpp b/joint_trajectory_controller/test/test_trajectory_controller.cpp index 15991bdc22..b6dde7cce8 100644 --- a/joint_trajectory_controller/test/test_trajectory_controller.cpp +++ b/joint_trajectory_controller/test/test_trajectory_controller.cpp @@ -916,7 +916,7 @@ TEST_F(TestTrajectoryController, test_trajectory_replace) { subscribeToState(); std::vector> points_old {{{2., 3., 4.}}}; - std::vector> points_partial_new {{1.5}}; + std::vector> points_partial_new {{{1.5}}}; const auto delay = std::chrono::milliseconds(500); builtin_interfaces::msg::Duration time_from_start{rclcpp::Duration(delay)}; From 8f3691224be2e76f1acfd9360a87b3f87bb3207f Mon Sep 17 00:00:00 2001 From: Karsten Knese Date: Sat, 26 Sep 2020 10:29:24 -0700 Subject: [PATCH 13/13] Update .github/workflows/ci.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Denis Štogl --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28c2bb91e4..15c9e8086c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,8 +16,8 @@ jobs: # strategy: # matrix: # env: - # - {ROS_DISTRO: foxy, ROS_REPO: testing} # - {ROS_DISTRO: foxy, ROS_REPO: main} + # - {ROS_DISTRO: foxy, ROS_REPO: testing} # steps: # - run: sudo apt-get update -qq && sudo apt-get upgrade # - uses: actions/checkout@v1