File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,11 @@ int main()
96
96
// This logger stores the execution time of each node
97
97
MinitraceLogger logger_minitrace(tree.root_node, "bt_trace.json");
98
98
99
+ #ifdef ZMQ_INSTALLED
100
+ // This logger publish status changes using ZeroMQ. Used by Groot
101
+ PublisherZMQ publisher_zmq(tree);
102
+ #endif
103
+
99
104
printTreeRecursively (tree.root_node);
100
105
101
106
//while (1)
Original file line number Diff line number Diff line change 3
3
#include " behaviortree_cpp_v3/loggers/bt_cout_logger.h"
4
4
#include " behaviortree_cpp_v3/loggers/bt_minitrace_logger.h"
5
5
#include " behaviortree_cpp_v3/loggers/bt_file_logger.h"
6
-
7
6
#include " behaviortree_cpp_v3/bt_factory.h"
8
7
9
- #ifdef ZMQ_FOUND
8
+ #ifdef ZMQ_INSTALLED
10
9
#include " behaviortree_cpp_v3/loggers/bt_zmq_publisher.h"
11
10
#endif
12
11
@@ -68,11 +67,17 @@ int main(int argc, char** argv)
68
67
// Important: when the object tree goes out of scope, all the TreeNodes are destroyed
69
68
auto tree = factory.createTreeFromText (xml_text);
70
69
71
- // Create some loggers
70
+ // This logger prints state changes on console
72
71
StdCoutLogger logger_cout (tree);
73
- MinitraceLogger logger_minitrace (tree, " bt_trace.json" );
72
+
73
+ // This logger saves state changes on file
74
74
FileLogger logger_file (tree, " bt_trace.fbl" );
75
+
76
+ // This logger stores the execution time of each node
77
+ MinitraceLogger logger_minitrace (tree, " bt_trace.json" );
78
+
75
79
#ifdef ZMQ_FOUND
80
+ // This logger publish status changes using ZeroMQ. Used by Groot
76
81
PublisherZMQ publisher_zmq (tree);
77
82
#endif
78
83
You can’t perform that action at this time.
0 commit comments