Skip to content

Commit

Permalink
Add optional namespace field to task nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
marrts committed Jan 8, 2024
1 parent 2e1e31c commit fcf5f7c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tesseract_task_composer/core/src/task_composer_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string>();

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 + "'");

Expand Down

0 comments on commit fcf5f7c

Please sign in to comment.