support srv default topic

This commit is contained in:
2025-11-28 11:45:21 +08:00
parent 1b69632c7b
commit b4b3c3b80c

View File

@@ -1105,7 +1105,7 @@ std::string CerebellumNode::ResolveTopicForSkill(const std::string & skill) cons
if (it != skills.end()) {
const auto & spec = it->second;
for (const auto & iface : spec.interfaces) {
if (iface.find(".action") != std::string::npos) {
if (iface.find(".action") != std::string::npos || iface.find(".srv") != std::string::npos) {
auto topic_it = spec.interface_default_topics.find(iface);
if (topic_it != spec.interface_default_topics.end()) {
return topic_it->second;