From fcf5f7cbe5abc16528c4455965706b634ce4aa21 Mon Sep 17 00:00:00 2001 From: Tyler Marr Date: Mon, 8 Jan 2024 14:13:45 -0600 Subject: [PATCH] Add optional namespace field to task nodes --- tesseract_task_composer/core/src/task_composer_graph.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tesseract_task_composer/core/src/task_composer_graph.cpp b/tesseract_task_composer/core/src/task_composer_graph.cpp index 56b29da5c2..92538ff631 100644 --- a/tesseract_task_composer/core/src/task_composer_graph.cpp +++ b/tesseract_task_composer/core/src/task_composer_graph.cpp @@ -79,7 +79,11 @@ TaskComposerGraph::TaskComposerGraph(std::string name, if (YAML::Node cn = node_it->second["config"]) plugin_info.config = cn; - TaskComposerNode::UPtr task_node = plugin_factory.createTaskComposerNode(node_name, plugin_info); + std::string namespace_name = node_name; + if (YAML::Node ns = node_it->second["namespace"]) + namespace_name = ns.as(); + + TaskComposerNode::UPtr task_node = plugin_factory.createTaskComposerNode(namespace_name, plugin_info); if (task_node == nullptr) throw std::runtime_error("Task Composer Graph '" + name_ + "' failed to create node '" + node_name + "'");