From 3ca3e94ec6807557239d09f69753b59fe6ef15fe Mon Sep 17 00:00:00 2001 From: Sai Kishor Kothakota Date: Fri, 23 Aug 2024 15:34:51 +0200 Subject: [PATCH] propagate gazebo remapping and other arguments to the controller node (#370) --- gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp b/gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp index 9943d20..810f9a1 100644 --- a/gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp +++ b/gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp @@ -359,12 +359,14 @@ void GazeboRosControlPlugin::Load(gazebo::physics::ModelPtr parent, sdf::Element // Create the controller manager RCLCPP_INFO(impl_->model_nh_->get_logger(), "Loading controller_manager"); + rclcpp::NodeOptions options = controller_manager::get_cm_node_options(); + options.arguments(arguments); impl_->controller_manager_.reset( new controller_manager::ControllerManager( std::move(resource_manager_), impl_->executor_, controllerManagerNodeName, - impl_->model_nh_->get_namespace())); + impl_->model_nh_->get_namespace(), options)); impl_->executor_->add_node(impl_->controller_manager_); auto cm_update_rate = impl_->controller_manager_->get_update_rate();