Skip to content

Commit

Permalink
use the controller reference interface info from resource manager ins…
Browse files Browse the repository at this point in the history
…tead
  • Loading branch information
saikishor committed Aug 28, 2023
1 parent a359115 commit 7791c86
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions controller_manager/src/controller_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1639,11 +1639,17 @@ void ControllerManager::list_controllers_srv_cb(
}
}
// check reference interfaces only if controller is inactive or active
auto references = controllers[i].c->export_reference_interfaces();
controller_state.reference_interfaces.reserve(references.size());
for (const auto & reference : references)
if (controllers[i].c->is_chainable())
{
controller_state.reference_interfaces.push_back(reference.get_interface_name());
auto references =
resource_manager_->get_controller_reference_interface_names(controllers[i].info.name);
controller_state.reference_interfaces.reserve(references.size());
for (const auto & reference : references)
{
const std::string prefix_name = controllers[i].c->get_node()->get_name();
const std::string interface_name = reference.substr(prefix_name.size() + 1);
controller_state.reference_interfaces.push_back(interface_name);
}
}
}
response->controller.push_back(controller_state);
Expand Down

0 comments on commit 7791c86

Please sign in to comment.