From 256646748452430ed064c48ce86a670bbf2116ec Mon Sep 17 00:00:00 2001 From: Seohyeon Ryu <51668314+wizard-coder@users.noreply.github.com> Date: Fri, 10 Jan 2025 12:59:58 +0900 Subject: [PATCH] Update controller_manager_plugin.cpp (#3179) Fixing the bug where the namespace is not properly applied when using Ros2ControlMultiManager Co-authored-by: Sebastian Jahr --- .../src/controller_manager_plugin.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 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 42d5378d0e..7672e09656 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 @@ -264,7 +264,7 @@ class Ros2ControlManager : public moveit_controller_manager::MoveItControllerMan void initialize(const rclcpp::Node::SharedPtr& node) override { node_ = node; - if (!ns_.empty()) + if (ns_.empty()) { if (!node_->has_parameter("ros_control_namespace")) { @@ -275,11 +275,6 @@ class Ros2ControlManager : public moveit_controller_manager::MoveItControllerMan node_->get_parameter("ros_control_namespace", ns_); } } - else if (node->has_parameter("ros_control_namespace")) - { - node_->get_parameter("ros_control_namespace", ns_); - RCLCPP_INFO_STREAM(getLogger(), "Namespace for controller manager was specified, namespace: " << ns_); - } list_controllers_service_ = node_->create_client( getAbsName("controller_manager/list_controllers"));