Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a0dff27

Browse files
author
Davide Faconti
committed
preparing for release
1 parent f139887 commit a0dff27

File tree

5 files changed

+79
-17
lines changed

5 files changed

+79
-17
lines changed

README.md

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,60 @@
11
![License MIT](https://img.shields.io/dub/l/vibe-d.svg)
2-
![Version](https://img.shields.io/badge/version-v2.5-green.svg)
3-
[![Build Status](https://travis-ci.org/BehaviorTree/BehaviorTree.CPP.svg?branch=master)](https://travis-ci.org/BehaviorTree/BehaviorTree.CPP)
2+
![Version](https://img.shields.io/badge/version-v3.0-green.svg)
3+
[![Build Status](https://travis-ci.org/BehaviorTree/BehaviorTree.CPP.svg?branch=main)](https://travis-ci.org/BehaviorTree/BehaviorTree.CPP)
44

55
Question? [![Join the chat at https://gitter.im/BehaviorTree-ROS/Lobby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/BehaviorTree-ROS/Lobby?utm_source=badge&utm_medium=badge&utm_content=badge)
66

77
# About BehaviorTree.CPP
88

99
This __C++__ library provides a framework to create BehaviorTrees.
10-
It was designed to be flexible, easy to use and fast.
10+
It was designed to be flexible, easy to use, reactive and fast.
1111

1212
Even if our main use-case is __robotics__, you can use this library to build
1313
__AI for games__, or to replace Finite State Machines in you application.
1414

1515
__BehaviorTree.CPP__ has many interesting features, when compared to other implementations:
1616

1717
- It makes asynchronous Actions, i.e. non-blocking, a first-class citizen.
18-
- It allows the creation of trees at run-time, using a textual representation (XML).
18+
19+
- You can build reactive behaviors that execute multiple Actions concurrently.
20+
21+
- It allows the creation of Trees at run-time, using a textual representation (XML);
22+
the fact that is written in C++ __does not__ imply that Trees are hard-coded.
23+
1924
- You can link staticaly you custom TreeNodes or convert them into plugins
2025
which are loaded at run-time.
26+
2127
- It includes a __logging/profiling__ infrastructure that allows the user
2228
to visualize, record, replay and analyze state transitions.
2329

30+
- It provides a type-safe and flexible mechanism to do dataflow between
31+
Nodes of the Tree.
32+
2433
# Documentation
2534

2635
https://behaviortree.github.io/BehaviorTree.CPP/
2736

37+
# About version 3.X
38+
39+
The main goal of this project is to create a Behavior Tree implementation
40+
that uses the principles of Model Driven Development to separate the role
41+
of the __Component Developer__ from the __Behavior Designer__.
42+
43+
In practice, this means that:
44+
45+
- Custom TreeNodes must be reusable building blocks.
46+
You should be able to implement them once and reuse them in many contextes.
47+
48+
- To build a Behavior Tree out of TreeNodes, the Behavior Designer must
49+
not need to read nor modify the source code of the a given TreeNode.
50+
51+
Version 3 of this library introduce some dramatic changes in the API, but
52+
it was necessary to reach this goal.
53+
54+
if you used version 2.X in the past, you can find
55+
[here](https://behaviortree.github.io/BehaviorTree.CPP/MigrationGuide).
56+
the Migration Guide.
57+
2858
# GUI Editor
2959

3060
Editing a BehaviorTree is as simple as editing a XML file in your favourite text editor.
@@ -55,7 +85,8 @@ You can easily install the package with the command
5585

5686
sudo apt-get install ros-$ROS_DISTRO-behaviortree-cpp
5787
58-
If you want to compile it with catkin, just include this package in your catkin warkspace as usual.
88+
If you want to compile it with catkin, you __must__ include this package
89+
to your catkin workspace.
5990

6091
# Acknowledgement
6192

@@ -71,21 +102,24 @@ Union’s Horizon 2020 Research and Innovation Programme.
71102

72103
- Introductory article: [Behavior trees for AI: How they work](http://www.gamasutra.com/blogs/ChrisSimpson/20140717/221339/Behavior_trees_for_AI_How_they_work.php)
73104

74-
- **How Behavior Trees Modularize Hybrid Control Systems and Generalize Sequential Behavior Compositions, the Subsumption Architecture,
75-
and Decision Trees.** Michele Colledanchise and Petter Ogren. IEEE Transaction on Robotics 2017.
105+
- **How Behavior Trees Modularize Hybrid Control Systems and Generalize
106+
Sequential Behavior Compositions, the Subsumption Architecture,
107+
and Decision Trees.**
108+
Michele Colledanchise and Petter Ogren. IEEE Transaction on Robotics 2017.
76109

77-
- **Behavior Trees in Robotics and AI**, published by CRC Press Taylor & Francis, available for purchase
110+
- **Behavior Trees in Robotics and AI**,
111+
published by CRC Press Taylor & Francis, available for purchase
78112
(ebook and hardcover) on the CRC Press Store or Amazon.
79113

80-
The Preprint version (free) is available here: https://arxiv.org/abs/1709.00084
114+
The Preprint version (free) is available here: https://arxiv.org/abs/1709.00084
81115

82116

83117
# License
84118

85119
The MIT License (MIT)
86120

87121
Copyright (c) 2014-2018 Michele Colledanchise
88-
Copyright (c) 2018 Davide Faconti
122+
Copyright (c) 2018-2019 Davide Faconti
89123

90124
Permission is hereby granted, free of charge, to any person obtaining a copy
91125
of this software and associated documentation files (the "Software"), to deal

docs/getting_started.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ your favourite distributed middleware, such as __ROS__ or __SmartSoft__.
55

66
You can statically link it into your application (for example a game).
77

8-
There are some main concepts which you need to understand first.
8+
These are the main concepts which you need to understand first.
99

1010
## Nodes vs Trees
1111

@@ -15,8 +15,8 @@ this library helps you to compose them easily into trees.
1515
Think about the LeafNodes as the building blocks which you need to compose
1616
a complex system.
1717

18-
By definition, your custom Nodes are (or should be) highly reusable.
19-
But, at the beginning some wrapping interfaces might be needed to
18+
By definition, your custom Nodes are (or should be) highly __reusable__.
19+
But, at the beginning, some wrapping interfaces might be needed to
2020
adapt your legacy code.
2121

2222

@@ -30,7 +30,7 @@ print messages on console or sleep for a certain amount of time to simulate
3030
a long calculation.
3131

3232
In production code, especially in Model Driven Development and Component
33-
Based Software Engineering, an Action/Condition would probably communiate
33+
Based Software Engineering, an Action/Condition would probably communicate
3434
to other _components_ or _services_ of the system.
3535

3636
## Inheritance vs dependency injection.
@@ -55,9 +55,12 @@ and [third](tutorial_03_generic_ports.md) tutorials.
5555
For the time being, it is important to know that:
5656

5757
- A __Blackboard__ is a _key/value_ storage shared by all the Nodes of a Tree.
58+
5859
- __Ports__ are a mechanism that Nodes can use to exchange information between
5960
each other.
61+
6062
- Ports are _"connected"_ using the same _key_ of the blackboard.
63+
6164
- The number, name and kind of ports of a Node must be known at _compilation-time_ (C++);
6265
connections between ports are done at _deployment-time_ (XML).
6366

docs/xml_format.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ You may notice that:
2323

2424
- The tag `<BehaviorTree>` should have the attribute `[ID]`.
2525

26-
- The tag `<root>` should contain the attribute `[main_tree_to_execute]`,refering the ID of the main tree.
26+
- The tag `<root>` should contain the attribute `[main_tree_to_execute]`.
2727

2828
- The attribute `[main_tree_to_execute]` is mandatory if the file contains multiple `<BehaviorTree>`,
2929
optional otherwise.
@@ -40,6 +40,31 @@ You may notice that:
4040
- `ControlNodes` contain __1 to N children__.
4141
- `DecoratorNodes` and Subtrees contain __only 1 child__.
4242
- `ActionNodes` and `ConditionNodes` have __no child__.
43+
44+
## Ports Remapping and pointers to Blackboards entries
45+
46+
As explained in the [second tutorial](tutorial_02_basic_ports.md)
47+
input/output ports can be remapped using the name of an entry in the
48+
Blackboard, in other words, the __key__ of a __key/value__ pair of the BB.
49+
50+
An BB key is represented using this syntax: `{key_name}`.
51+
52+
In the following example:
53+
54+
- the first child of the Sequence prints "Hello",
55+
- the second child reads and wrints the value contained in the entry of
56+
the blackboard called "my_message";
57+
58+
``` XML
59+
<root main_tree_to_execute = "MainTree" >
60+
<BehaviorTree ID="MainTree">
61+
<Sequence name="root_sequence">
62+
<SaySomething message="Hello"/>
63+
<SaySomething message="{my_message}"/>
64+
</Sequence>
65+
</BehaviorTree>
66+
</root>
67+
```
4368
4469

4570
## Compact vs Explicit representation

src/decorators/repeat_node.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ NodeStatus RepeatNode::tick()
7878
}
7979

8080
try_index_ = 0;
81-
return (NodeStatus::SUCCESS);
81+
return NodeStatus::SUCCESS;
8282
}
8383

8484
void RepeatNode::halt()

src/decorators/retry_node.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ NodeStatus RetryNode::tick()
8383
}
8484

8585
try_index_ = 0;
86-
return (NodeStatus::FAILURE);
86+
return NodeStatus::FAILURE;
8787
}
8888

8989
}

0 commit comments

Comments
 (0)