From 91e64549d1261ffedec86402544c68a24e352066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Mon, 11 Dec 2023 17:51:14 +0100 Subject: [PATCH 01/13] Update good-first-issue.md (#1198) --- .github/ISSUE_TEMPLATE/good-first-issue.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/good-first-issue.md b/.github/ISSUE_TEMPLATE/good-first-issue.md index 57779881d2..ececdae62c 100644 --- a/.github/ISSUE_TEMPLATE/good-first-issue.md +++ b/.github/ISSUE_TEMPLATE/good-first-issue.md @@ -55,6 +55,6 @@ Don’t hesitate to ask questions or to get help if you feel like you are gettin Furthermore, you find helpful resources here: * [ROS2 Control Contribution Guide](https://control.ros.org/master/doc/contributing/contributing.html) * [ROS2 Tutorials](https://docs.ros.org/en/rolling/Tutorials.html) -* [ROS Answers](https://answers.ros.org/questions/) +* [Robotics Stack Exchange](https://robotics.stackexchange.com) **Good luck with your first issue!** From e4203a5a0b30301c5fb19ec199a15c7b7208ccba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Mon, 11 Dec 2023 17:51:44 +0100 Subject: [PATCH 02/13] Add configs for humble and iron (#1197) --- .github/dependabot.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 05a48fc654..aafd67c236 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,3 +11,17 @@ updates: directory: "/" schedule: interval: "weekly" + - package-ecosystem: "github-actions" + # Workflow files stored in the + # default location of `.github/workflows` + directory: "/" + schedule: + interval: "weekly" + target-branch: "humble" + - package-ecosystem: "github-actions" + # Workflow files stored in the + # default location of `.github/workflows` + directory: "/" + schedule: + interval: "weekly" + target-branch: "iron" From 90680f2c043058702771d27ae9b248fd283d375b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 16:52:41 +0000 Subject: [PATCH 03/13] Bump actions/setup-python from 4.7.1 to 5.0.0 (#1199) --- .github/workflows/ci-format.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-format.yml b/.github/workflows/ci-format.yml index 2e1400f718..c7199b88c5 100644 --- a/.github/workflows/ci-format.yml +++ b/.github/workflows/ci-format.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4.7.1 + - uses: actions/setup-python@v5.0.0 with: python-version: '3.10' - name: Install system hooks From 6ca76cde6b5c6a26adfdb371f59714c9d1f203ae Mon Sep 17 00:00:00 2001 From: Sai Kishor Kothakota Date: Mon, 11 Dec 2023 17:53:54 +0100 Subject: [PATCH 04/13] added InsertBraces option of clang formatting and update the needed mirrors-clang-format version (#1194) --- .clang-format | 1 + .pre-commit-config.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index 698bda7da8..10dd2c7c7a 100644 --- a/.clang-format +++ b/.clang-format @@ -12,4 +12,5 @@ DerivePointerAlignment: false PointerAlignment: Middle ReflowComments: true IncludeBlocks: Preserve +InsertBraces: true ... diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0ad4d0aa6c..6e6d41cc9c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -62,7 +62,7 @@ repos: # CPP hooks - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v14.0.6 + rev: v15.0.6 hooks: - id: clang-format From 345e70f9a8d8cbc0ba46af8437ff6feb9627be6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Mon, 11 Dec 2023 19:14:18 +0100 Subject: [PATCH 05/13] Update list of reviewers (#1195) --- .github/reviewer-lottery.yml | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/.github/reviewer-lottery.yml b/.github/reviewer-lottery.yml index 84b156f5a1..c6580eacd4 100644 --- a/.github/reviewer-lottery.yml +++ b/.github/reviewer-lottery.yml @@ -13,28 +13,21 @@ groups: - name: reviewers reviewers: 5 usernames: - - rosterloh - - progtologist + - aprotyas - arne48 + - bijoua29 - christophfroehlich - DasRoteSkelett - - sgmurray - - harderthan - - jaron-l - - malapatiravi + - duringhof - erickisos - - sachinkum0009 - - qiayuanliao - - homalozoa - - anfemosa - - jackcenter - - VX792 - - mhubii + - fmauch + - jaron-l - livanov93 - - aprotyas + - mcbed + - moriarty + - olivier-stasse - peterdavidfagan - - duringhof + - progtologist + - saikishor - VanshGehlot - - bijoua29 - - LukasMacha97 - - mcbed + - VX792 From 562f36ddb615a70b54c71365393a8dc69508f52f Mon Sep 17 00:00:00 2001 From: Bence Magyar Date: Mon, 11 Dec 2023 18:18:53 +0000 Subject: [PATCH 06/13] Reformat with braces added (#1209) --- controller_manager/src/controller_manager.cpp | 28 ++++++++++++++++--- .../test/test_controller_manager_srvs.cpp | 9 +++++- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/controller_manager/src/controller_manager.cpp b/controller_manager/src/controller_manager.cpp index 2ff070f7d2..b79f122c6b 100644 --- a/controller_manager/src/controller_manager.cpp +++ b/controller_manager/src/controller_manager.cpp @@ -150,7 +150,9 @@ std::vector get_following_controller_names( } // If the controller is not configured, return empty if (!(is_controller_active(controller_it->c) || is_controller_inactive(controller_it->c))) + { return following_controllers; + } const auto cmd_itfs = controller_it->c->command_interface_configuration().names; for (const auto & itf : cmd_itfs) { @@ -210,7 +212,10 @@ std::vector get_preceding_controller_names( for (const auto & ctrl : controllers) { // If the controller is not configured, then continue - if (!(is_controller_active(ctrl.c) || is_controller_inactive(ctrl.c))) continue; + if (!(is_controller_active(ctrl.c) || is_controller_inactive(ctrl.c))) + { + continue; + } auto cmd_itfs = ctrl.c->command_interface_configuration().names; for (const auto & itf : cmd_itfs) { @@ -2443,7 +2448,10 @@ bool ControllerManager::controller_sorting( if (!((is_controller_active(ctrl_a.c) || is_controller_inactive(ctrl_a.c)) && (is_controller_active(ctrl_b.c) || is_controller_inactive(ctrl_b.c)))) { - if (is_controller_active(ctrl_a.c) || is_controller_inactive(ctrl_a.c)) return true; + if (is_controller_active(ctrl_a.c) || is_controller_inactive(ctrl_a.c)) + { + return true; + } return false; } @@ -2455,9 +2463,13 @@ bool ControllerManager::controller_sorting( // joint_state_broadcaster // If the controller b is also under the same condition, then maintain their initial order if (ctrl_b.c->command_interface_configuration().names.empty() || !ctrl_b.c->is_chainable()) + { return false; + } else + { return true; + } } else if (ctrl_b.c->command_interface_configuration().names.empty() || !ctrl_b.c->is_chainable()) { @@ -2467,12 +2479,17 @@ bool ControllerManager::controller_sorting( else { auto following_ctrls = get_following_controller_names(ctrl_a.info.name, controllers); - if (following_ctrls.empty()) return false; + if (following_ctrls.empty()) + { + return false; + } // If the ctrl_b is any of the following controllers of ctrl_a, then place ctrl_a before ctrl_b if ( std::find(following_ctrls.begin(), following_ctrls.end(), ctrl_b.info.name) != following_ctrls.end()) + { return true; + } else { auto ctrl_a_preceding_ctrls = get_preceding_controller_names(ctrl_a.info.name, controllers); @@ -2505,7 +2522,10 @@ bool ControllerManager::controller_sorting( // If there is no common parent, then they belong to 2 different sets auto following_ctrls_b = get_following_controller_names(ctrl_b.info.name, controllers); - if (following_ctrls_b.empty()) return true; + if (following_ctrls_b.empty()) + { + return true; + } auto find_first_element = [&](const auto & controllers_list) -> size_t { auto it = std::find_if( diff --git a/controller_manager/test/test_controller_manager_srvs.cpp b/controller_manager/test/test_controller_manager_srvs.cpp index bc20236306..8882d0a8de 100644 --- a/controller_manager/test/test_controller_manager_srvs.cpp +++ b/controller_manager/test/test_controller_manager_srvs.cpp @@ -639,7 +639,9 @@ TEST_F(TestControllerManagerSrvs, list_sorted_chained_controllers) {TEST_CHAINED_CONTROLLER_4, TEST_CHAINED_CONTROLLER_3, TEST_CHAINED_CONTROLLER_5, TEST_CHAINED_CONTROLLER_2, TEST_CHAINED_CONTROLLER_1, test_controller::TEST_CONTROLLER_NAME}) + { cm_->configure_controller(controller); + } // get controller list after configure result = call_service_and_wait(*client, request, srv_executor); @@ -796,7 +798,9 @@ TEST_F(TestControllerManagerSrvs, list_sorted_complex_chained_controllers) {TEST_CHAINED_CONTROLLER_4, TEST_CHAINED_CONTROLLER_3, TEST_CHAINED_CONTROLLER_5, TEST_CHAINED_CONTROLLER_7, TEST_CHAINED_CONTROLLER_2, TEST_CHAINED_CONTROLLER_1, TEST_CHAINED_CONTROLLER_6, test_controller::TEST_CONTROLLER_NAME}) + { cm_->configure_controller(controller); + } // get controller list after configure result = call_service_and_wait(*client, request, srv_executor); @@ -1010,7 +1014,10 @@ TEST_F(TestControllerManagerSrvs, list_sorted_independent_chained_controllers) TEST_CHAINED_CONTROLLER_4, TEST_CONTROLLER_2, TEST_CHAINED_CONTROLLER_2, TEST_CHAINED_CONTROLLER_6, TEST_CHAINED_CONTROLLER_7, TEST_CHAINED_CONTROLLER_8}; - for (const auto & controller : ctrls_order) cm_->configure_controller(controller); + for (const auto & controller : ctrls_order) + { + cm_->configure_controller(controller); + } // get controller list after configure result = call_service_and_wait(*client, request, srv_executor); From 51b8985400b10adb3fdd9f1851f368713def54eb Mon Sep 17 00:00:00 2001 From: "Dr. Denis" Date: Tue, 12 Dec 2023 13:11:35 +0100 Subject: [PATCH 07/13] [CM] Linting if/else statements (#1193) --- controller_manager/src/controller_manager.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/controller_manager/src/controller_manager.cpp b/controller_manager/src/controller_manager.cpp index b79f122c6b..da7815d51e 100644 --- a/controller_manager/src/controller_manager.cpp +++ b/controller_manager/src/controller_manager.cpp @@ -2462,14 +2462,9 @@ bool ControllerManager::controller_sorting( // The case of the controllers that don't have any command interfaces. For instance, // joint_state_broadcaster // If the controller b is also under the same condition, then maintain their initial order - if (ctrl_b.c->command_interface_configuration().names.empty() || !ctrl_b.c->is_chainable()) - { - return false; - } - else - { - return true; - } + const auto command_interfaces_exist = + !ctrl_b.c->command_interface_configuration().names.empty(); + return ctrl_b.c->is_chainable() && command_interfaces_exist; } else if (ctrl_b.c->command_interface_configuration().names.empty() || !ctrl_b.c->is_chainable()) { From 1330a4c73280c5b315e1f56519e3d0be23f513a0 Mon Sep 17 00:00:00 2001 From: Bence Magyar Date: Tue, 12 Dec 2023 16:34:56 +0000 Subject: [PATCH 08/13] Update changelogs --- controller_interface/CHANGELOG.rst | 3 +++ controller_manager/CHANGELOG.rst | 8 ++++++++ controller_manager_msgs/CHANGELOG.rst | 3 +++ hardware_interface/CHANGELOG.rst | 3 +++ joint_limits/CHANGELOG.rst | 3 +++ ros2_control/CHANGELOG.rst | 3 +++ ros2_control_test_assets/CHANGELOG.rst | 3 +++ ros2controlcli/CHANGELOG.rst | 3 +++ rqt_controller_manager/CHANGELOG.rst | 3 +++ transmission_interface/CHANGELOG.rst | 3 +++ 10 files changed, 35 insertions(+) diff --git a/controller_interface/CHANGELOG.rst b/controller_interface/CHANGELOG.rst index 92b1d91933..34ba3e2539 100644 --- a/controller_interface/CHANGELOG.rst +++ b/controller_interface/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package controller_interface ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 4.1.0 (2023-11-30) ------------------ * Add few warning compiler options to error (`#1181 `_) diff --git a/controller_manager/CHANGELOG.rst b/controller_manager/CHANGELOG.rst index c94433f8b5..3343fa7007 100644 --- a/controller_manager/CHANGELOG.rst +++ b/controller_manager/CHANGELOG.rst @@ -2,6 +2,14 @@ Changelog for package controller_manager ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- +* [CM] Linting if/else statements (`#1193 `_) +* Reformat with braces added (`#1209 `_) +* Report inactive controllers as a diagnostics ok instead of an error (`#1184 `_) +* Fix controller sorting issue while loading large number of controllers (`#1180 `_) +* Contributors: Bence Magyar, Dr. Denis, Lennart Nachtigall, Sai Kishor Kothakota + 4.1.0 (2023-11-30) ------------------ * Add few warning compiler options to error (`#1181 `_) diff --git a/controller_manager_msgs/CHANGELOG.rst b/controller_manager_msgs/CHANGELOG.rst index 899ae0d3fc..2816fc99a1 100644 --- a/controller_manager_msgs/CHANGELOG.rst +++ b/controller_manager_msgs/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package controller_manager_msgs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 4.1.0 (2023-11-30) ------------------ diff --git a/hardware_interface/CHANGELOG.rst b/hardware_interface/CHANGELOG.rst index 44f4246ac8..909712f885 100644 --- a/hardware_interface/CHANGELOG.rst +++ b/hardware_interface/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package hardware_interface ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 4.1.0 (2023-11-30) ------------------ * Add few warning compiler options to error (`#1181 `_) diff --git a/joint_limits/CHANGELOG.rst b/joint_limits/CHANGELOG.rst index 0360d15653..a2dbf930da 100644 --- a/joint_limits/CHANGELOG.rst +++ b/joint_limits/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package joint_limits ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 4.1.0 (2023-11-30) ------------------ * Add few warning compiler options to error (`#1181 `_) diff --git a/ros2_control/CHANGELOG.rst b/ros2_control/CHANGELOG.rst index ade3289319..bf269706a4 100644 --- a/ros2_control/CHANGELOG.rst +++ b/ros2_control/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package ros2_control ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 4.1.0 (2023-11-30) ------------------ diff --git a/ros2_control_test_assets/CHANGELOG.rst b/ros2_control_test_assets/CHANGELOG.rst index 5740f66f1b..d95b95c4f6 100644 --- a/ros2_control_test_assets/CHANGELOG.rst +++ b/ros2_control_test_assets/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package ros2_control_test_assets ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 4.1.0 (2023-11-30) ------------------ diff --git a/ros2controlcli/CHANGELOG.rst b/ros2controlcli/CHANGELOG.rst index 524a5a89ae..6b698a7368 100644 --- a/ros2controlcli/CHANGELOG.rst +++ b/ros2controlcli/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package ros2controlcli ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 4.1.0 (2023-11-30) ------------------ diff --git a/rqt_controller_manager/CHANGELOG.rst b/rqt_controller_manager/CHANGELOG.rst index 5e0e9ba9b8..7b56a66f90 100644 --- a/rqt_controller_manager/CHANGELOG.rst +++ b/rqt_controller_manager/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package rqt_controller_manager ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 4.1.0 (2023-11-30) ------------------ diff --git a/transmission_interface/CHANGELOG.rst b/transmission_interface/CHANGELOG.rst index 981e57572e..ddb4603f3e 100644 --- a/transmission_interface/CHANGELOG.rst +++ b/transmission_interface/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package transmission_interface ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 4.1.0 (2023-11-30) ------------------ * Add few warning compiler options to error (`#1181 `_) From 331379665eea1b0538eb116f927421f441c3dc00 Mon Sep 17 00:00:00 2001 From: Bence Magyar Date: Tue, 12 Dec 2023 16:35:25 +0000 Subject: [PATCH 09/13] 4.2.0 --- controller_interface/CHANGELOG.rst | 4 ++-- controller_interface/package.xml | 2 +- controller_manager/CHANGELOG.rst | 4 ++-- controller_manager/package.xml | 2 +- controller_manager_msgs/CHANGELOG.rst | 4 ++-- controller_manager_msgs/package.xml | 2 +- hardware_interface/CHANGELOG.rst | 4 ++-- hardware_interface/package.xml | 2 +- joint_limits/CHANGELOG.rst | 4 ++-- joint_limits/package.xml | 2 +- ros2_control/CHANGELOG.rst | 4 ++-- ros2_control/package.xml | 2 +- ros2_control_test_assets/CHANGELOG.rst | 4 ++-- ros2_control_test_assets/package.xml | 2 +- ros2controlcli/CHANGELOG.rst | 4 ++-- ros2controlcli/package.xml | 2 +- ros2controlcli/setup.py | 2 +- rqt_controller_manager/CHANGELOG.rst | 4 ++-- rqt_controller_manager/package.xml | 2 +- rqt_controller_manager/setup.py | 2 +- transmission_interface/CHANGELOG.rst | 4 ++-- transmission_interface/package.xml | 2 +- 22 files changed, 32 insertions(+), 32 deletions(-) diff --git a/controller_interface/CHANGELOG.rst b/controller_interface/CHANGELOG.rst index 34ba3e2539..27db0c351d 100644 --- a/controller_interface/CHANGELOG.rst +++ b/controller_interface/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package controller_interface ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +4.2.0 (2023-12-12) +------------------ 4.1.0 (2023-11-30) ------------------ diff --git a/controller_interface/package.xml b/controller_interface/package.xml index c7750bdec0..2d0b13727b 100644 --- a/controller_interface/package.xml +++ b/controller_interface/package.xml @@ -2,7 +2,7 @@ controller_interface - 4.1.0 + 4.2.0 Description of controller_interface Bence Magyar Denis Štogl diff --git a/controller_manager/CHANGELOG.rst b/controller_manager/CHANGELOG.rst index 3343fa7007..0ddc9cfe68 100644 --- a/controller_manager/CHANGELOG.rst +++ b/controller_manager/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package controller_manager ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +4.2.0 (2023-12-12) +------------------ * [CM] Linting if/else statements (`#1193 `_) * Reformat with braces added (`#1209 `_) * Report inactive controllers as a diagnostics ok instead of an error (`#1184 `_) diff --git a/controller_manager/package.xml b/controller_manager/package.xml index 63c38d52ab..7be9aac597 100644 --- a/controller_manager/package.xml +++ b/controller_manager/package.xml @@ -2,7 +2,7 @@ controller_manager - 4.1.0 + 4.2.0 Description of controller_manager Bence Magyar Denis Štogl diff --git a/controller_manager_msgs/CHANGELOG.rst b/controller_manager_msgs/CHANGELOG.rst index 2816fc99a1..dc07947f33 100644 --- a/controller_manager_msgs/CHANGELOG.rst +++ b/controller_manager_msgs/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package controller_manager_msgs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +4.2.0 (2023-12-12) +------------------ 4.1.0 (2023-11-30) ------------------ diff --git a/controller_manager_msgs/package.xml b/controller_manager_msgs/package.xml index e9e5c46123..7ef4c5d9e8 100644 --- a/controller_manager_msgs/package.xml +++ b/controller_manager_msgs/package.xml @@ -2,7 +2,7 @@ controller_manager_msgs - 4.1.0 + 4.2.0 Messages and services for the controller manager. Bence Magyar Denis Štogl diff --git a/hardware_interface/CHANGELOG.rst b/hardware_interface/CHANGELOG.rst index 909712f885..04e3996d01 100644 --- a/hardware_interface/CHANGELOG.rst +++ b/hardware_interface/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package hardware_interface ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +4.2.0 (2023-12-12) +------------------ 4.1.0 (2023-11-30) ------------------ diff --git a/hardware_interface/package.xml b/hardware_interface/package.xml index b97a4242bd..b3685a7ee2 100644 --- a/hardware_interface/package.xml +++ b/hardware_interface/package.xml @@ -1,7 +1,7 @@ hardware_interface - 4.1.0 + 4.2.0 ros2_control hardware interface Bence Magyar Denis Štogl diff --git a/joint_limits/CHANGELOG.rst b/joint_limits/CHANGELOG.rst index a2dbf930da..ab215f461d 100644 --- a/joint_limits/CHANGELOG.rst +++ b/joint_limits/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package joint_limits ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +4.2.0 (2023-12-12) +------------------ 4.1.0 (2023-11-30) ------------------ diff --git a/joint_limits/package.xml b/joint_limits/package.xml index 2990fdfd7e..e1832fa776 100644 --- a/joint_limits/package.xml +++ b/joint_limits/package.xml @@ -1,6 +1,6 @@ joint_limits - 4.1.0 + 4.2.0 Interfaces for handling of joint limits for controllers or hardware. Bence Magyar diff --git a/ros2_control/CHANGELOG.rst b/ros2_control/CHANGELOG.rst index bf269706a4..28a37f1134 100644 --- a/ros2_control/CHANGELOG.rst +++ b/ros2_control/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package ros2_control ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +4.2.0 (2023-12-12) +------------------ 4.1.0 (2023-11-30) ------------------ diff --git a/ros2_control/package.xml b/ros2_control/package.xml index 71d996ce8f..e8413239c7 100644 --- a/ros2_control/package.xml +++ b/ros2_control/package.xml @@ -1,7 +1,7 @@ ros2_control - 4.1.0 + 4.2.0 Metapackage for ROS2 control related packages Bence Magyar Denis Štogl diff --git a/ros2_control_test_assets/CHANGELOG.rst b/ros2_control_test_assets/CHANGELOG.rst index d95b95c4f6..c9200cf182 100644 --- a/ros2_control_test_assets/CHANGELOG.rst +++ b/ros2_control_test_assets/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package ros2_control_test_assets ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +4.2.0 (2023-12-12) +------------------ 4.1.0 (2023-11-30) ------------------ diff --git a/ros2_control_test_assets/package.xml b/ros2_control_test_assets/package.xml index c55a1d5ca8..6d5e8ac9d9 100644 --- a/ros2_control_test_assets/package.xml +++ b/ros2_control_test_assets/package.xml @@ -2,7 +2,7 @@ ros2_control_test_assets - 4.1.0 + 4.2.0 The package provides shared test resources for ros2_control stack Bence Magyar diff --git a/ros2controlcli/CHANGELOG.rst b/ros2controlcli/CHANGELOG.rst index 6b698a7368..5c50a0b21a 100644 --- a/ros2controlcli/CHANGELOG.rst +++ b/ros2controlcli/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package ros2controlcli ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +4.2.0 (2023-12-12) +------------------ 4.1.0 (2023-11-30) ------------------ diff --git a/ros2controlcli/package.xml b/ros2controlcli/package.xml index e14f9d8982..8aa2b528a6 100644 --- a/ros2controlcli/package.xml +++ b/ros2controlcli/package.xml @@ -2,7 +2,7 @@ ros2controlcli - 4.1.0 + 4.2.0 The ROS 2 command line tools for ROS2 Control. diff --git a/ros2controlcli/setup.py b/ros2controlcli/setup.py index 3bc1200b09..ff1df137ed 100644 --- a/ros2controlcli/setup.py +++ b/ros2controlcli/setup.py @@ -19,7 +19,7 @@ setup( name=package_name, - version="4.1.0", + version="4.2.0", packages=find_packages(exclude=["test"]), data_files=[ ("share/" + package_name, ["package.xml"]), diff --git a/rqt_controller_manager/CHANGELOG.rst b/rqt_controller_manager/CHANGELOG.rst index 7b56a66f90..959f47c6f7 100644 --- a/rqt_controller_manager/CHANGELOG.rst +++ b/rqt_controller_manager/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package rqt_controller_manager ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +4.2.0 (2023-12-12) +------------------ 4.1.0 (2023-11-30) ------------------ diff --git a/rqt_controller_manager/package.xml b/rqt_controller_manager/package.xml index ba51d7bd26..e08545b41f 100644 --- a/rqt_controller_manager/package.xml +++ b/rqt_controller_manager/package.xml @@ -2,7 +2,7 @@ rqt_controller_manager - 4.1.0 + 4.2.0 Graphical frontend for interacting with the controller manager. Bence Magyar Denis Štogl diff --git a/rqt_controller_manager/setup.py b/rqt_controller_manager/setup.py index d9d01fa304..9e9d9f763d 100644 --- a/rqt_controller_manager/setup.py +++ b/rqt_controller_manager/setup.py @@ -6,7 +6,7 @@ setup( name=package_name, - version="4.1.0", + version="4.2.0", packages=[package_name], data_files=[ ("share/ament_index/resource_index/packages", ["resource/" + package_name]), diff --git a/transmission_interface/CHANGELOG.rst b/transmission_interface/CHANGELOG.rst index ddb4603f3e..6b0cd5173b 100644 --- a/transmission_interface/CHANGELOG.rst +++ b/transmission_interface/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package transmission_interface ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +4.2.0 (2023-12-12) +------------------ 4.1.0 (2023-11-30) ------------------ diff --git a/transmission_interface/package.xml b/transmission_interface/package.xml index f0c9e70ed5..17a63cca0b 100644 --- a/transmission_interface/package.xml +++ b/transmission_interface/package.xml @@ -2,7 +2,7 @@ transmission_interface - 4.1.0 + 4.2.0 transmission_interface contains data structures for representing mechanical transmissions, methods for propagating values between actuator and joint spaces and tooling to support this. Bence Magyar Denis Štogl From 836354681b242dd222b34a0c450c1167766a356b Mon Sep 17 00:00:00 2001 From: Hans-Martin <48694653+duringhof@users.noreply.github.com> Date: Wed, 13 Dec 2023 18:34:45 +0100 Subject: [PATCH 10/13] Update reviewer-lottery.yml (#1220) --- .github/reviewer-lottery.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/reviewer-lottery.yml b/.github/reviewer-lottery.yml index c6580eacd4..2da79efd9a 100644 --- a/.github/reviewer-lottery.yml +++ b/.github/reviewer-lottery.yml @@ -18,7 +18,6 @@ groups: - bijoua29 - christophfroehlich - DasRoteSkelett - - duringhof - erickisos - fmauch - jaron-l From 9055b5b7dbe609eb3b8e351fa8e24bd399c4a7cc Mon Sep 17 00:00:00 2001 From: Stephanie Eng Date: Thu, 14 Dec 2023 12:50:48 -0500 Subject: [PATCH 11/13] Fix typo in docs (#1219) Co-authored-by: Dr. Denis --- hardware_interface/doc/mock_components_userdoc.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware_interface/doc/mock_components_userdoc.rst b/hardware_interface/doc/mock_components_userdoc.rst index 573037a58d..4b54d5fa00 100644 --- a/hardware_interface/doc/mock_components_userdoc.rst +++ b/hardware_interface/doc/mock_components_userdoc.rst @@ -14,7 +14,7 @@ The main intention is to reduce debugging time on the physical hardware and boos Generic System ^^^^^^^^^^^^^^ -The component implements ``hardware_interface::SystemInterface>`` supporting command and state interfaces. +The component implements ``hardware_interface::SystemInterface`` supporting command and state interfaces. For more information about hardware components check :ref:`detailed documentation `. Features: From 82c82aed172ff9f3d9ef0e218d3d16bd63581840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Sun, 17 Dec 2023 13:20:37 +0100 Subject: [PATCH 12/13] [CM] Increase tests timeout (#1224) --- controller_manager/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/controller_manager/CMakeLists.txt b/controller_manager/CMakeLists.txt index 41a6b18306..376cef3362 100644 --- a/controller_manager/CMakeLists.txt +++ b/controller_manager/CMakeLists.txt @@ -141,6 +141,7 @@ if(BUILD_TESTING) test_chainable_controller ros2_control_test_assets::ros2_control_test_assets ) + set_tests_properties(test_controller_manager_srvs PROPERTIES TIMEOUT 120) ament_target_dependencies(test_controller_manager_srvs controller_manager_msgs ) From b6f32c3b9a1da699f87019943958c32df74cbd12 Mon Sep 17 00:00:00 2001 From: Sai Kishor Kothakota Date: Sun, 17 Dec 2023 10:33:34 -0600 Subject: [PATCH 13/13] [CM] Set chained controller interfaces 'available' for activated controllers (#1098) * control reference interface availability based on the controller state * update the docs of the chainable controllers output --------- Co-authored-by: Dr. Denis --- .../doc/controller_chaining.rst | 4 +- controller_manager/src/controller_manager.cpp | 27 +-- .../test/test_controller_manager_srvs.cpp | 160 ++++++++++++++++++ ...llers_chaining_with_controller_manager.cpp | 4 +- 4 files changed, 180 insertions(+), 15 deletions(-) diff --git a/controller_manager/doc/controller_chaining.rst b/controller_manager/doc/controller_chaining.rst index d79e730d3f..c83ed97ac0 100644 --- a/controller_manager/doc/controller_chaining.rst +++ b/controller_manager/doc/controller_chaining.rst @@ -76,7 +76,9 @@ One can also think of it as an actual chain, you can not add a chain link or bre Debugging outputs ---------------------------- -Flag ``unavailable`` on reference interface does not provide much information about anything at the moment. So don't get confused by it. The reason we have it are internal implementation reasons irelevant for the usage. +- The reference interfaces are ``unavailable`` and ``unclaimed``, when the controller exporting them is in inactive state +- The reference interfaces are ``available`` and ``unclaimed``, when the controller exporting them is in an active state but is not in chained mode with any other controller (The controllers gets its references from the subscriber) +- The reference interfaces are ``available`` and ``claimed``, when the controller exporting them is in active state and also in chained mode with other controllers (The controller gets its references from the controllers it is chained with) Closing remarks diff --git a/controller_manager/src/controller_manager.cpp b/controller_manager/src/controller_manager.cpp index da7815d51e..2e703f4219 100644 --- a/controller_manager/src/controller_manager.cpp +++ b/controller_manager/src/controller_manager.cpp @@ -1386,6 +1386,11 @@ void ControllerManager::deactivate_controllers( { const auto new_state = controller->get_node()->deactivate(); controller->release_interfaces(); + // if it is a chainable controller, make the reference interfaces unavailable on deactivation + if (controller->is_chainable()) + { + resource_manager_->make_controller_reference_interfaces_unavailable(request); + } if (new_state.id() != lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE) { RCLCPP_ERROR( @@ -1419,18 +1424,10 @@ void ControllerManager::switch_chained_mode( auto controller = found_it->c; if (!is_controller_active(*controller)) { - if (controller->set_chained_mode(to_chained_mode)) - { - if (to_chained_mode) - { - resource_manager_->make_controller_reference_interfaces_available(request); - } - else - { - resource_manager_->make_controller_reference_interfaces_unavailable(request); - } - } - else + // if it is a chainable controller, make the reference interfaces available on preactivation + // (This is needed when you activate a couple of chainable controller altogether) + resource_manager_->make_controller_reference_interfaces_available(request); + if (!controller->set_chained_mode(to_chained_mode)) { RCLCPP_ERROR( get_logger(), @@ -1567,6 +1564,12 @@ void ControllerManager::activate_controllers( lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE); } + // if it is a chainable controller, make the reference interfaces available on activation + if (controller->is_chainable()) + { + resource_manager_->make_controller_reference_interfaces_available(request); + } + if (controller->is_async()) { async_controller_threads_.at(controller_name)->activate(); diff --git a/controller_manager/test/test_controller_manager_srvs.cpp b/controller_manager/test/test_controller_manager_srvs.cpp index 8882d0a8de..2cd5645bd8 100644 --- a/controller_manager/test/test_controller_manager_srvs.cpp +++ b/controller_manager/test/test_controller_manager_srvs.cpp @@ -24,6 +24,7 @@ #include "controller_manager/controller_manager.hpp" #include "controller_manager_msgs/srv/list_controller_types.hpp" #include "controller_manager_msgs/srv/list_controllers.hpp" +#include "controller_manager_msgs/srv/list_hardware_interfaces.hpp" #include "controller_manager_msgs/srv/switch_controller.hpp" #include "lifecycle_msgs/msg/state.hpp" #include "test_chainable_controller/test_chainable_controller.hpp" @@ -34,6 +35,7 @@ using ::testing::Return; using ::testing::UnorderedElementsAre; using ListControllers = controller_manager_msgs::srv::ListControllers; +using ListHardwareInterfaces = controller_manager_msgs::srv::ListHardwareInterfaces; using TestController = test_controller::TestController; using TestChainableController = test_chainable_controller::TestChainableController; @@ -1553,3 +1555,161 @@ TEST_F(TestControllerManagerSrvs, list_sorted_large_chained_controller_tree) } RCLCPP_INFO(srv_node->get_logger(), "Check successful!"); } + +TEST_F(TestControllerManagerSrvs, list_hardware_interfaces_srv) +{ + // create server client and request + rclcpp::executors::SingleThreadedExecutor srv_executor; + rclcpp::Node::SharedPtr srv_node = std::make_shared("srv_client"); + srv_executor.add_node(srv_node); + rclcpp::Client::SharedPtr client = + srv_node->create_client( + "test_controller_manager/list_hardware_interfaces"); + auto request = std::make_shared(); + + // create chained controller + auto test_chained_controller = std::make_shared(); + controller_interface::InterfaceConfiguration chained_cmd_cfg = { + controller_interface::interface_configuration_type::INDIVIDUAL, {"joint1/position"}}; + controller_interface::InterfaceConfiguration chained_state_cfg = { + controller_interface::interface_configuration_type::INDIVIDUAL, + {"joint1/position", "joint1/velocity"}}; + test_chained_controller->set_command_interface_configuration(chained_cmd_cfg); + test_chained_controller->set_state_interface_configuration(chained_state_cfg); + test_chained_controller->set_reference_interface_names({"joint1/position", "joint1/velocity"}); + // create non-chained controller + auto test_controller = std::make_shared(); + controller_interface::InterfaceConfiguration cmd_cfg = { + controller_interface::interface_configuration_type::INDIVIDUAL, + {std::string(test_chainable_controller::TEST_CONTROLLER_NAME) + "/joint1/position", + std::string(test_chainable_controller::TEST_CONTROLLER_NAME) + "/joint1/velocity", + "joint2/velocity"}}; + controller_interface::InterfaceConfiguration state_cfg = { + controller_interface::interface_configuration_type::INDIVIDUAL, + {"joint1/position", "joint1/velocity"}}; + test_controller->set_command_interface_configuration(cmd_cfg); + test_controller->set_state_interface_configuration(state_cfg); + + // add controllers + cm_->add_controller( + test_chained_controller, test_chainable_controller::TEST_CONTROLLER_NAME, + test_chainable_controller::TEST_CONTROLLER_CLASS_NAME); + cm_->add_controller( + test_controller, test_controller::TEST_CONTROLLER_NAME, + test_controller::TEST_CONTROLLER_CLASS_NAME); + // get hardware interface list before configure and loading + auto initial_result = call_service_and_wait(*client, request, srv_executor); + // As there is no controller, so all the interfaces should be available and unclaimed + for (const auto & cmd_itrf : initial_result->command_interfaces) + { + ASSERT_TRUE(cmd_itrf.is_available); + ASSERT_FALSE(cmd_itrf.is_claimed); + } + + // configure controllers + cm_->configure_controller(test_chainable_controller::TEST_CONTROLLER_NAME); + cm_->configure_controller(test_controller::TEST_CONTROLLER_NAME); + + // The interfaces should be same available and unclaimed until we activate the controllers + auto result = call_service_and_wait(*client, request, srv_executor); + + ASSERT_EQ(2u, result->command_interfaces.size() - initial_result->command_interfaces.size()); + // There will be no increase in state interfaces + ASSERT_EQ(0u, result->state_interfaces.size() - initial_result->state_interfaces.size()); + // As there is no controller, so all the interfaces should be available and unclaimed + for (const auto & cmd_itrf : result->command_interfaces) + { + // The controller command interface shouldn't be active until it's controller is active + if ( + cmd_itrf.name == + std::string(test_chainable_controller::TEST_CONTROLLER_NAME) + "/joint1/position" || + cmd_itrf.name == + std::string(test_chainable_controller::TEST_CONTROLLER_NAME) + "/joint1/velocity") + { + ASSERT_FALSE(cmd_itrf.is_available); + } + else + { + ASSERT_TRUE(cmd_itrf.is_available); + } + ASSERT_FALSE(cmd_itrf.is_claimed); + } + auto find_interface_in_list = [](const std::string & interface, auto & hw_interface_info) + { + return std::find_if( + hw_interface_info.begin(), hw_interface_info.end(), + [&](auto info) { return info.name == interface; }) != hw_interface_info.end(); + }; + ASSERT_TRUE(find_interface_in_list( + std::string(test_chainable_controller::TEST_CONTROLLER_NAME) + "/joint1/position", + result->command_interfaces)); + ASSERT_TRUE(find_interface_in_list( + std::string(test_chainable_controller::TEST_CONTROLLER_NAME) + "/joint1/velocity", + result->command_interfaces)); + + // activate controllers + cm_->switch_controller( + {test_chainable_controller::TEST_CONTROLLER_NAME}, {}, + controller_manager_msgs::srv::SwitchController::Request::STRICT, true, rclcpp::Duration(0, 0)); + + // On activating this chainable controller, we should see that there are 2 more command interfaces + // as this chainable controllers exports 2 reference interfaces + result = call_service_and_wait(*client, request, srv_executor); + + // There will be no increase upon activation + ASSERT_EQ(2u, result->command_interfaces.size() - initial_result->command_interfaces.size()); + ASSERT_EQ(0u, result->state_interfaces.size() - initial_result->state_interfaces.size()); + + for (const auto & cmd_itrf : result->command_interfaces) + { + ASSERT_TRUE(cmd_itrf.is_available); + // This interface is claimed by the chainable controller + if (cmd_itrf.name == "joint1/position") + { + EXPECT_TRUE(cmd_itrf.is_claimed); + } + else if ( + cmd_itrf.name == + std::string(test_chainable_controller::TEST_CONTROLLER_NAME) + "/joint1/position" || + cmd_itrf.name == + std::string(test_chainable_controller::TEST_CONTROLLER_NAME) + "/joint1/velocity") + { + // As these interfaces are exposed by the chainable controller and not yet claimed by other + // controllers + ASSERT_FALSE(cmd_itrf.is_claimed); + } + else + { + // Case for rest of the controllers + ASSERT_FALSE(cmd_itrf.is_claimed); + } + } + + cm_->switch_controller( + {test_controller::TEST_CONTROLLER_NAME}, {}, + controller_manager_msgs::srv::SwitchController::Request::STRICT, true, rclcpp::Duration(0, 0)); + + // Now as another controller using the interfaces of chainable controller is activated, those + // interfaces should reflect as claimed + result = call_service_and_wait(*client, request, srv_executor); + + for (const auto & cmd_itrf : result->command_interfaces) + { + ASSERT_TRUE(cmd_itrf.is_available); + // This interface is claimed by the chainable controller + if ( + cmd_itrf.name == "joint1/position" || cmd_itrf.name == "joint2/velocity" || + cmd_itrf.name == + std::string(test_chainable_controller::TEST_CONTROLLER_NAME) + "/joint1/position" || + cmd_itrf.name == + std::string(test_chainable_controller::TEST_CONTROLLER_NAME) + "/joint1/velocity") + { + ASSERT_TRUE(cmd_itrf.is_claimed); + } + else + { + // Case for rest of the controllers + ASSERT_FALSE(cmd_itrf.is_claimed); + } + } +} diff --git a/controller_manager/test/test_controllers_chaining_with_controller_manager.cpp b/controller_manager/test/test_controllers_chaining_with_controller_manager.cpp index a34d70ada7..0ebddd85e0 100644 --- a/controller_manager/test/test_controllers_chaining_with_controller_manager.cpp +++ b/controller_manager/test/test_controllers_chaining_with_controller_manager.cpp @@ -670,14 +670,14 @@ TEST_P( // PositionController is deactivated --> DiffDrive controller is not in chained mode anymore DeactivateAndCheckController( position_tracking_controller, POSITION_TRACKING_CONTROLLER, - POSITION_CONTROLLER_CLAIMED_INTERFACES, 4u); + POSITION_CONTROLLER_CLAIMED_INTERFACES, 4u, true); EXPECT_TRUE(pid_left_wheel_controller->is_in_chained_mode()); EXPECT_TRUE(pid_right_wheel_controller->is_in_chained_mode()); ASSERT_FALSE(diff_drive_controller->is_in_chained_mode()); // DiffDrive (preceding) controller is activated --> PID controller in chained mode DeactivateAndCheckController( - diff_drive_controller, DIFF_DRIVE_CONTROLLER, DIFF_DRIVE_CLAIMED_INTERFACES, 8u); + diff_drive_controller, DIFF_DRIVE_CONTROLLER, DIFF_DRIVE_CLAIMED_INTERFACES, 8u, true); EXPECT_FALSE(pid_left_wheel_controller->is_in_chained_mode()); EXPECT_FALSE(pid_right_wheel_controller->is_in_chained_mode()); ASSERT_FALSE(diff_drive_controller->is_in_chained_mode());