From db529c089928d60bd587dd7e6c0563fab9e25397 Mon Sep 17 00:00:00 2001 From: Seohyeon Ryu <51668314+wizard-coder@users.noreply.github.com> Date: Tue, 24 Dec 2024 21:12:37 +0900 Subject: [PATCH] Update controller_manager_plugin.cpp Fixing the bug where the namespace is not properly applied when using Ros2ControlMultiManager --- .../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"));