Skip to content
Snippets Groups Projects
Commit c91548ef authored by Alejandro Lopez Gestoso's avatar Alejandro Lopez Gestoso
Browse files

[WORK IN PROGRESS] Updated documentation

parent 3af10d67
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -37,4 +37,4 @@ class IriAsyncActionNode : public BT::ActionNodeBase
TickFunctor tick_functor_;
};
#endif
\ No newline at end of file
#endif
......@@ -25,4 +25,4 @@ class IriBehaviorTreeFactory : public BT::BehaviorTreeFactory
BT::PortsList ports = {});
};
#endif
\ No newline at end of file
#endif
......@@ -28,4 +28,4 @@ BT::NodeStatus IriAsyncActionNode::tick()
setStatus(status);
}
return status;
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment