File tree Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,6 @@ static const char* xml_text = R"(
27
27
28
28
int main ()
29
29
{
30
- // Simple tree: a sequence of two asycnhronous actions,
31
- // but the second will be halted because of the timeout.
32
-
33
30
BehaviorTreeFactory factory;
34
31
factory.registerNodeType <DummyNodes::SaySomething>(" SaySomething" );
35
32
Original file line number Diff line number Diff line change @@ -57,12 +57,12 @@ int main(int argc, char** argv)
57
57
58
58
factory.registerNodeType <SaySomething>(" SaySomething" );
59
59
60
- // We use lambdasand registerSimpleAction, to create
60
+ // We use lambdas and registerSimpleAction, to create
61
61
// a "dummy" node, that we want to create instead of a given one.
62
62
63
63
// Simple node that just prints its name and return SUCCESS
64
- factory.registerSimpleAction (" TestAction " , [](BT::TreeNode& self){
65
- std::cout << " TestAction substituting: " << self.name () << std::endl;
64
+ factory.registerSimpleAction (" DummyAction " , [](BT::TreeNode& self){
65
+ std::cout << " DummyAction substituting: " << self.name () << std::endl;
66
66
return BT::NodeStatus::SUCCESS;
67
67
});
68
68
@@ -84,7 +84,7 @@ int main(int argc, char** argv)
84
84
85
85
if (!skip_substitution)
86
86
{
87
- // we can use a JSOn file to configure the substitution rules
87
+ // we can use a JSON file to configure the substitution rules
88
88
// or do it manually
89
89
bool const USE_JSON = true ;
90
90
Original file line number Diff line number Diff line change @@ -49,22 +49,20 @@ int main()
49
49
cross_door.registerNodes (factory);
50
50
51
51
// Groot2 editor requires a model of your registered Nodes.
52
- // You don't need to write that by hand, if can be automatically
53
- // generated using this command and imported.
54
-
52
+ // You don't need to write that by hand, it can be automatically
53
+ // generated using the following command.
55
54
std::string xml_models = BT::writeTreeNodesModelXML (factory);
56
55
57
56
factory.registerBehaviorTreeFromText (xml_text);
58
57
auto tree = factory.createTree (" MainTree" );
59
58
60
- std::cout << " ---------- XML file ----------\n "
59
+ std::cout << " - ---------- XML file ----------\n "
61
60
<< BT::WriteTreeToXML (tree, false )
62
61
<< " --------------------------------\n " ;
63
62
64
63
// Connect the Groot2Publisher. This will allow Groot2 to
65
64
// get the tree and poll status updates.
66
65
BT::Groot2Publisher publisher (tree);
67
- BT::SqliteLogger logger (tree, " test_sqlite.db3" , true );
68
66
69
67
while (1 )
70
68
{
You can’t perform that action at this time.
0 commit comments