diff --git a/README.md b/README.md index c06535459b9bc49b6f47a915d1fbfa50ed4279d0..a29f8eb7e0bb73b6adea853e8581418126a91de5 100644 --- a/README.md +++ b/README.md @@ -4,19 +4,25 @@ IRI BehaviorTree ## Description This library is intendend to expand the [behaviortree](https://github.com/BehaviorTree/BehaviorTree.CPP) library to provide the following new features: -* It provides a way to implement an Asynchronous Action throught a callback function instead of having to create an inherited class. +* It provides a way to implement an *Asynchronous Action* throught a callback function instead of having to create an inherited class. This is acomplished with the definition of the new class **IriAsyncActionNode**. This class is exactly the same that **SimpleActionNode** provided by the original library but with the possibility of returning the *RUNNING* state. Another difference with the original Asynchronous action is that no *halt* function can be implemented. * It provides a way to register this new Asynchronous actions. - This is acomplished with the definition of the new class **IriBehaviorTreeFactory**. This class jus implements the *registerIriAsyncAction* function to register any *IriAsyncActionNode* in the same way a *SimpleActionNode* would be registered using *registerSimpleAction*. + This is acomplished with the definition of the new class **IriBehaviorTreeFactory**. This class just implements the *registerIriAsyncAction* function to register any *IriAsyncActionNode* in the same way a *SimpleActionNode* would be registered using *registerSimpleAction*. * It also provides a set of basic BehaviorTree nodes (BT nodes) and the function to register them. This is acomplished with the definition of a new class **IriBehaviorTreeBasicNodes** that implements this basic BT nodes and provides a function called *init* to register these BT nodes. -These new features allow us to adapt the use of BehaviorTrees to the IRI framework and to add a BehaviorTree layer for the [IRI modules](https://gitlab.iri.upc.edu/labrobotica/ros/iri_core/iri_ros_tools#iri-ros-modules). This module BT layer is just a shared library that provides a BehaviorTree wrapper for each function provided by the C++ Module. + On the following image a general overview of the inheritance is shown: + +<img src="doc/images/general_overview.png" alt="Image: General overview"> + +These new features allow us to adapt the use of BehaviorTrees to the IRI framework and to add a BehaviorTree layer for the [IRI modules](https://gitlab.iri.upc.edu/labrobotica/ros/iri_core/iri_ros_tools#iri-ros-modules). This module BT layer is just a shared library that wraps the C++ Module API providing a set of BehaviorTree actions and conditions to allow the user to use the module inside a behavior tree. On the following image, a sketch of this wrapper ism shown: + +<img src="doc/images/bt_module_layer.png" alt="Image: BT module layer sketch"> ## ROS dependencies diff --git a/doc/images/bt_module_layer.png b/doc/images/bt_module_layer.png new file mode 100644 index 0000000000000000000000000000000000000000..9fb1c65c1b054f9b8fceaa57e448415715cc439f Binary files /dev/null and b/doc/images/bt_module_layer.png differ diff --git a/doc/images/general_overview.png b/doc/images/general_overview.png new file mode 100644 index 0000000000000000000000000000000000000000..c8927f743ee4d1d03696f5b78303466b0112f4f5 Binary files /dev/null and b/doc/images/general_overview.png differ