From 1d9e91f25cf3196f62718e9402096f2e26e010da 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/controller_manager/src/controller_manager.cpp b/controller_manager/src/controller_manager.cpp index 4becabb0a4..ca94ab4eb2 100644 --- a/controller_manager/src/controller_manager.cpp +++ b/controller_manager/src/controller_manager.cpp @@ -827,6 +827,10 @@ 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 +2359,8 @@ 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());