diff --git a/tesseract_task_composer/core/src/task_composer_graph.cpp b/tesseract_task_composer/core/src/task_composer_graph.cpp index bf4f09c508..9bc4e282ca 100644 --- a/tesseract_task_composer/core/src/task_composer_graph.cpp +++ b/tesseract_task_composer/core/src/task_composer_graph.cpp @@ -352,15 +352,15 @@ TaskComposerGraph::dump(std::ostream& os, std::ostringstream sub_graphs; const std::string tmp = toString(uuid_); - os << "subgraph cluster_" << tmp << " {\n color=black;\n label = \"" << name_ << "\\n(" << uuid_str_ << ")"; - os << "\\n Inputs: " << input_keys_; - os << "\\n Outputs: " << output_keys_; - os << "\\n Conditional: " << ((conditional_) ? "True" : "False"); + os << "subgraph cluster_" << tmp << " {\n color=black;\n label = \"" << name_ << "\\nUUID: " << uuid_str_ << "\\n"; + os << "Inputs:\\l" << input_keys_; + os << "Outputs:\\l" << output_keys_; + os << "Conditional: " << ((conditional_) ? "True" : "False") << "\\l"; if (getType() == TaskComposerNodeType::PIPELINE || getType() == TaskComposerNodeType::GRAPH) { auto it = results_map.find(getUUID()); if (it != results_map.end()) - os << "\\nTime: " << std::fixed << std::setprecision(3) << it->second->elapsed_time << "s"; + os << "Time: " << std::fixed << std::setprecision(3) << it->second->elapsed_time << "s\\l"; } os << "\";"; for (const auto& pair : nodes_) @@ -377,12 +377,13 @@ TaskComposerGraph::dump(std::ostream& os, const std::string tmp = toString(node->uuid_, "node_"); const TaskComposerKeys& input_keys = node->getInputKeys(); const TaskComposerKeys& output_keys = node->getOutputKeys(); - os << std::endl << tmp << " [shape=box3d, label=\"Subgraph: " << node->name_ << "\\n(" << node->uuid_str_ << ")"; - os << "\\n Inputs: " << input_keys; - os << "\\n Outputs: " << output_keys; - os << "\\n Conditional: " << ((node->isConditional()) ? "True" : "False"); + os << std::endl + << tmp << " [shape=box3d, label=\"Subgraph: " << node->name_ << "\\nUUID: " << node->uuid_str_ << "\\n"; + os << "Inputs:\\l" << input_keys; + os << "Outputs:\\l" << output_keys; + os << "Conditional: " << ((node->isConditional()) ? "True" : "False") << "\\l"; if (it != results_map.end()) - os << "\\nTime: " << std::fixed << std::setprecision(3) << it->second->elapsed_time << "s"; + os << "Time: " << std::fixed << std::setprecision(3) << it->second->elapsed_time << "s\\l"; os << "\", margin=\"0.1\", color=" << color << "];\n"; // NOLINT node->dump(sub_graphs, this, results_map); diff --git a/tesseract_task_composer/core/src/task_composer_keys.cpp b/tesseract_task_composer/core/src/task_composer_keys.cpp index 653cc06984..12d3726ace 100644 --- a/tesseract_task_composer/core/src/task_composer_keys.cpp +++ b/tesseract_task_composer/core/src/task_composer_keys.cpp @@ -87,17 +87,16 @@ void TaskComposerKeys::serialize(Archive& ar, const unsigned int /*version*/) std::ostream& operator<<(std::ostream& os, const TaskComposerKeys& keys) { - os << "["; std::size_t cnt{ 0 }; for (const auto& pair : keys.data()) { if (pair.second.index() == 0) { - os << pair.first << ":" << std::get(pair.second); + os << "\t" << pair.first << ": " << std::get(pair.second); } else { - os << pair.first << ":["; + os << "\t" << pair.first << ":["; const auto& vs = std::get>(pair.second); for (std::size_t i = 0; i < vs.size(); ++i) { @@ -107,12 +106,9 @@ std::ostream& operator<<(std::ostream& os, const TaskComposerKeys& keys) } os << "]"; } - if (cnt < keys.size() - 1) - os << ", "; - + os << "\\l"; ++cnt; } - os << "]"; return os; } diff --git a/tesseract_task_composer/core/src/task_composer_node.cpp b/tesseract_task_composer/core/src/task_composer_node.cpp index fec3e0bb13..48032bb09a 100644 --- a/tesseract_task_composer/core/src/task_composer_node.cpp +++ b/tesseract_task_composer/core/src/task_composer_node.cpp @@ -363,14 +363,16 @@ TaskComposerNode::dump(std::ostream& os, if (conditional_) { os << std::endl << tmp << " [shape=diamond, label=\"" << name_ << "\\n"; - os << "Namespace: " << ns_ << "\\n(" << uuid_str_ << ")"; - os << "\\n Inputs: " << input_keys_; - os << "\\n Outputs: " << output_keys_; + os << "UUID: " << uuid_str_ << "\\n"; + os << "Namespace: " << ns_ << "\\l"; + os << "Inputs:\\l" << input_keys_; + os << "Outputs:\\l" << output_keys_; if (it != results_map.end()) { - os << "\\nTime: " << std::fixed << std::setprecision(3) << it->second->elapsed_time << "s" - << "\\n`" << std::to_string(it->second->status_code) << "::" << it->second->status_message << "`"; + os << "Time: " << std::fixed << std::setprecision(3) << it->second->elapsed_time << "s\\l" + << "Status Code: " << std::to_string(it->second->status_code) << "\\l" + << "Status Msg: " << it->second->status_message << "\\l"; } os << "\", color=black, fillcolor=" << color << ", style=filled];\n"; @@ -384,14 +386,17 @@ TaskComposerNode::dump(std::ostream& os, } else { - os << std::endl << tmp << " [label=\"" << name_ << "\\n(" << uuid_str_ << ")"; - os << "\\n Inputs: " << input_keys_; - os << "\\n Outputs: " << output_keys_; + os << std::endl << tmp << " [label=\"" << name_ << "\\n"; + os << "UUID: " << uuid_str_ << "\\n"; + os << "Namespace: " << ns_ << "\\l"; + os << "Inputs:\\l" << input_keys_; + os << "Outputs:\\l" << output_keys_; if (it != results_map.end()) { - os << "\\nTime: " << std::fixed << std::setprecision(3) << it->second->elapsed_time << "s" - << "\\n'" << std::to_string(it->second->status_code) << "::" << it->second->status_message << "'"; + os << "Time: " << std::fixed << std::setprecision(3) << it->second->elapsed_time << "s\\l" + << "Status Code: " << std::to_string(it->second->status_code) << "\\l" + << "Status Msg: " << it->second->status_message << "\\l"; } os << "\", color=black, fillcolor=" << color << ", style=filled];\n";