From d920b64140afecd96ac469c34d6b27b63c64e721 Mon Sep 17 00:00:00 2001 From: Paul Gesel Date: Fri, 2 Feb 2024 10:56:09 -0700 Subject: [PATCH] fix interfaces available Signed-off-by: Paul Gesel --- controller_manager/src/controller_manager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controller_manager/src/controller_manager.cpp b/controller_manager/src/controller_manager.cpp index 4becabb0a4b..cab5271a91b 100644 --- a/controller_manager/src/controller_manager.cpp +++ b/controller_manager/src/controller_manager.cpp @@ -827,6 +827,9 @@ void ControllerManager::clear_requests() { deactivate_request_.clear(); activate_request_.clear(); + for (const auto & controller_name : to_chained_mode_request_) { + resource_manager_->make_controller_reference_interfaces_unavailable(controller_name); + } to_chained_mode_request_.clear(); from_chained_mode_request_.clear(); activate_command_interface_request_.clear(); @@ -2355,6 +2358,7 @@ controller_interface::return_type ControllerManager::check_following_controllers if (found_it == to_chained_mode_request_.end()) { to_chained_mode_request_.push_back(following_ctrl_it->info.name); + resource_manager_->make_controller_reference_interfaces_available(following_ctrl_it->info.name); RCLCPP_DEBUG( get_logger(), "Adding controller '%s' in 'to chained mode' request.", following_ctrl_it->info.name.c_str());