From 3bd89d17ef593f0989916cf2e5905db0e21e68ff Mon Sep 17 00:00:00 2001 From: thomaspeyrucain <87322480+thomaspeyrucain@users.noreply.github.com> Date: Mon, 26 Jan 2026 17:42:43 +0100 Subject: [PATCH 1/4] Fix ERROR stream + check only active controllers for multiple chained controllers (#3556) (cherry picked from commit 848c062a0454b104b72cb038d641a9eb0531f317) # Conflicts: # moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp --- .../src/controller_manager_plugin.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp b/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp index b0236e6750..4645abeb88 100644 --- a/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp +++ b/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp @@ -567,10 +567,17 @@ class Ros2ControlManager : public moveit_controller_manager::MoveItControllerMan dependency_map_reverse_.clear(); for (auto& controller : result->controller) { - if (controller.chain_connections.size() > 1) + if (isActive(controller) && controller.chain_connections.size() > 1) { +<<<<<<< HEAD RCLCPP_ERROR_STREAM(LOGGER, "Controller with name %s chains to more than one controller. Chaining to more than " "one controller is not supported."); +======= + RCLCPP_ERROR_STREAM(getLogger(), "Controller with name " + << controller.name + << " chains to more than one controller. " + "Chaining to more than one controller is not supported."); +>>>>>>> 848c062a0 (Fix ERROR stream + check only active controllers for multiple chained controllers (#3556)) return false; } for (const auto& chained_controller : controller.chain_connections) From 58c90e0f8cad2c2b81e3fc25409f90f712539181 Mon Sep 17 00:00:00 2001 From: Nathan Brooks Date: Tue, 23 Jun 2026 13:04:55 +0800 Subject: [PATCH 2/4] Apply suggestions from code review Co-authored-by: Nathan Brooks --- .../src/controller_manager_plugin.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp b/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp index 4645abeb88..1659c94ad0 100644 --- a/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp +++ b/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp @@ -569,15 +569,10 @@ class Ros2ControlManager : public moveit_controller_manager::MoveItControllerMan { if (isActive(controller) && controller.chain_connections.size() > 1) { -<<<<<<< HEAD - RCLCPP_ERROR_STREAM(LOGGER, "Controller with name %s chains to more than one controller. Chaining to more than " - "one controller is not supported."); -======= RCLCPP_ERROR_STREAM(getLogger(), "Controller with name " << controller.name << " chains to more than one controller. " "Chaining to more than one controller is not supported."); ->>>>>>> 848c062a0 (Fix ERROR stream + check only active controllers for multiple chained controllers (#3556)) return false; } for (const auto& chained_controller : controller.chain_connections) From 95480f21b570d103da835b75d65010981f10c8e8 Mon Sep 17 00:00:00 2001 From: Nathan Brooks Date: Tue, 23 Jun 2026 16:46:50 +0800 Subject: [PATCH 3/4] Apply suggestion from @nbbrooks --- .../src/controller_manager_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp b/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp index 1659c94ad0..ff14ae1bb3 100644 --- a/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp +++ b/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp @@ -569,7 +569,7 @@ class Ros2ControlManager : public moveit_controller_manager::MoveItControllerMan { if (isActive(controller) && controller.chain_connections.size() > 1) { - RCLCPP_ERROR_STREAM(getLogger(), "Controller with name " + RCLCPP_ERROR_STREAM(LOGGER, "Controller with name " << controller.name << " chains to more than one controller. " "Chaining to more than one controller is not supported."); From f174f5a100994a5553c097d7eb858d024f39e2a9 Mon Sep 17 00:00:00 2001 From: Nathan Brooks Date: Tue, 23 Jun 2026 17:49:33 +0800 Subject: [PATCH 4/4] clang-format wrapped RCLCPP_ERROR_STREAM after LOGGER fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport's getLogger replacement left the wrapped continuation lines at the original main-branch indentation, but clang-format on humble wants them at the alignment matching humble's RCLCPP_ERROR_STREAM column. No behavioral change — just makes pre-commit's clang-format check pass. Co-Authored-By: Claude Opus 4.7 --- .../src/controller_manager_plugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp b/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp index ff14ae1bb3..f7188886d0 100644 --- a/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp +++ b/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp @@ -570,9 +570,9 @@ class Ros2ControlManager : public moveit_controller_manager::MoveItControllerMan if (isActive(controller) && controller.chain_connections.size() > 1) { RCLCPP_ERROR_STREAM(LOGGER, "Controller with name " - << controller.name - << " chains to more than one controller. " - "Chaining to more than one controller is not supported."); + << controller.name + << " chains to more than one controller. " + "Chaining to more than one controller is not supported."); return false; } for (const auto& chained_controller : controller.chain_connections)