From 4a3c7a56f2455821d13a747a1260c76c179ebac3 Mon Sep 17 00:00:00 2001 From: Tatsuro Sakaguchi Date: Fri, 29 Nov 2024 10:43:09 +0900 Subject: [PATCH] Add remap option to controller manager --- gz_ros2_control/src/gz_ros2_control_plugin.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gz_ros2_control/src/gz_ros2_control_plugin.cpp b/gz_ros2_control/src/gz_ros2_control_plugin.cpp index 14e594ca..d38ce556 100644 --- a/gz_ros2_control/src/gz_ros2_control_plugin.cpp +++ b/gz_ros2_control/src/gz_ros2_control_plugin.cpp @@ -437,6 +437,10 @@ void GazeboSimROS2ControlPlugin::Configure( // Create the controller manager RCLCPP_INFO(this->dataPtr->node_->get_logger(), "Loading controller_manager"); rclcpp::NodeOptions options = controller_manager::get_cm_node_options(); + arguments.push_back("-r"); + arguments.push_back("__node:=" + controllerManagerNodeName); + arguments.push_back("-r"); + arguments.push_back("__ns:=" + ns); options.arguments(arguments); this->dataPtr->controller_manager_.reset( new controller_manager::ControllerManager(