diff --git a/README.md b/README.md index 87144a27f1c5810d67871edec0dccc9dcaa020b6..8cc399944e24d047dd6ea1538eba6086ccdb208c 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,21 @@ IRI BehaviorTree ## Description -It's a library to adapt the [behaviortree](https://github.com/BehaviorTree/BehaviorTree.CPP) library to the use -of [IRI modules](https://gitlab.iri.upc.edu/labrobotica/ros/iri_core/iri_ros_tools). +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 the possibility of creating asynchronous actions without the need of creating a class. Its *tick* -function is called from the main thread. There isn't implemented any *halt* function. + 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*. + +* 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 wrapper for the [IRI modules](https://gitlab.iri.upc.edu/labrobotica/ros/iri_core/iri_ros_tools#iri-ros-modules). -Additionally, it provides some basic common BT nodes. ## ROS dependencies diff --git a/include/iri_async_action.h b/include/iri_async_action.h index f5730383425d0012260b2bf40a2c5dfea0d1ee0b..95609b734650a52d5883a263e4b55b7da3a47522 100644 --- a/include/iri_async_action.h +++ b/include/iri_async_action.h @@ -37,4 +37,4 @@ class IriAsyncActionNode : public BT::ActionNodeBase TickFunctor tick_functor_; }; -#endif \ No newline at end of file +#endif diff --git a/include/iri_bt_factory.h b/include/iri_bt_factory.h index e2be4478b67ca1dc14f4a7d42db5dbe09d65faab..e271826dd7d435f4386001e51d6d3841ff5f4333 100644 --- a/include/iri_bt_factory.h +++ b/include/iri_bt_factory.h @@ -25,4 +25,4 @@ class IriBehaviorTreeFactory : public BT::BehaviorTreeFactory BT::PortsList ports = {}); }; -#endif \ No newline at end of file +#endif diff --git a/src/iri_async_action.cpp b/src/iri_async_action.cpp index 30848954deb35b26c745bf7abb2094dec0bd1999..2a2eb86ddca16c863c93916b21b5b7db87bb3ab9 100644 --- a/src/iri_async_action.cpp +++ b/src/iri_async_action.cpp @@ -28,4 +28,4 @@ BT::NodeStatus IriAsyncActionNode::tick() setStatus(status); } return status; -} \ No newline at end of file +}