Welcome to the webpage of the book Behavior Trees in Robotics and AI
Here you will find the instructions to run the Youbot example of Chapter 2. You will be able to design the AI of the robot designing your own Behavior Tree (BT) via a Graphical User Interface (GUI).
Below you can find the instructions according to your operating system.
1) Install Dependencies:
2) Download the repository:
git clone https://github.com/btirai/youbot.git
3) Build the Software:
Run CMake, set the project (youbot) root folder and the desired build folder (your choice). Configure and generate project solution for your favorite IDE (e.g. Visual Studio 13). Then open the solution from your IDE and build the project.
1) Install Dependencies:
sudo apt-get install build-essential libgl1-mesa-dev python3-tk qtdeclarative5-dev
2) Download the repository:
git clone https://github.com/btirai/youbot.git
3) Build the Software:
Run in a terminal the following commands:
cd youbot
mkdir build
cd build
cmake ..
make
sh vrep.sh
./youbot_behavior_tree_editor
Right Click in the editor to add a node.
Leaf nodes have a text field to fill. You can fill in either an object’s name or a location name. The nodes have the following meanings:
Name | Type | Description |
---|---|---|
IsRobotCloseTo (Object) | Condition | Returns Success if the robot is close to the object defined in the text field is close to the robot (closer than 0.2 m). |
IsObjectGrasped (Object) | Condition | Returns Success if the object defined in the text field is grasped. |
IsObjectAt (Object, Location) | Condition | Returns Success if the object is at location (e.g. IsObjectAt (greenCube, goalLocation)). |
IsPathToObjectCollisionFree (Object) | Condition | Returns Success if the robot is close to the object defined in the text field. |
MoveCloseTo (Object/location) | Action | Moves the robot close to the object/location defined in the text field. |
GraspObject (Object) | Action | Grasps the object defined in the text field. |
PutInFront(Object) | Action | Drops the currently grasped object. |
PutAside(Object) | Action | Place on the side the currently grasped object. |
Example of available objects are:
Example of available locations are:
You can add new objects in the scene in VREP, make sure you put in the text field in the BT the name as it appears in the VREP’s Scene Hierarchy (on the left)
NOTE: A BT must have the root node. It cannot have loose nodes (non-connected nodes).