File tree Expand file tree Collapse file tree 1 file changed +7
-20
lines changed Expand file tree Collapse file tree 1 file changed +7
-20
lines changed Original file line number Diff line number Diff line change 1
1
#include " behaviortree_cpp_v3/bt_factory.h"
2
-
3
- #include " dummy_nodes.h"
4
- #include " movebase_node.h"
5
-
6
2
using namespace BT ;
7
3
8
4
// clang-format off
@@ -56,28 +52,19 @@ class SayRuntimePort : public BT::SyncActionNode
56
52
57
53
int main ()
58
54
{
59
- using namespace DummyNodes ;
60
-
61
55
BehaviorTreeFactory factory;
62
56
63
- // -------- register ports that might defined at runtime --------
64
- {
65
- // more verbose way
66
- PortsList ports = {BT::OutputPort<std::string>(" text" )};
67
- factory.registerBuilder (CreateManifest<ThinkRuntimePort>(" ThinkRuntimePort" , ports),
57
+ // -------- register ports that might be defined at runtime --------
58
+ // more verbose way
59
+ PortsList think_ports = {BT::OutputPort<std::string>(" text" )};
60
+ factory.registerBuilder (CreateManifest<ThinkRuntimePort>(" ThinkRuntimePort" , think_ports),
68
61
CreateBuilder<ThinkRuntimePort>());
69
- }
70
-
71
- {
72
- // less verbose way
73
- PortsList ports = {BT::InputPort<std::string>(" message" )};
74
- factory.registerNodeType <SayRuntimePort>(" SayRuntimePort" , ports);
75
- }
62
+ // less verbose way
63
+ PortsList say_ports = {BT::InputPort<std::string>(" message" )};
64
+ factory.registerNodeType <SayRuntimePort>(" SayRuntimePort" , say_ports);
76
65
77
66
auto tree = factory.createTreeFromText (xml_text);
78
-
79
67
tree.root_node ->executeTick ();
80
-
81
68
return 0 ;
82
69
}
83
70
You can’t perform that action at this time.
0 commit comments