The examples in this repository run a simple wire cut and strip machine, using the BehaviorTree.CPP library.
The easiest way to play with the example is to run it with Docker. The docker file creates the latest Ubuntu image, installs a few development tools and clones and compiles BehaviorTree.CPP.
- Modify the
.env
file to match your environment.HOST_ROOT_PATH
refers to the location of the clone of this repository. - Run docker
docker compose build
docker compose up -d
docker exec -itd btcpp-env terminator
# without an X-Window server just run
docker exec -it btcpp-env bash
If this works, the Terminator
(or the bash) terminal app launches.
# change directory to demo, where demo is the name of the example
cd behavior-tree-cpp/<demo>
mkdir build
# On WSL, I had to run the cmake command the first time with <sudo> and then again without <sudo>.
# Someone knows how to fix this?
cmake -S ./src -B ./build
cd build
make
# execute demo, where demo is the name of the example
./<demo> [path_to_tree.xml]
cd ~/build/examples
./<example>
The docker image contains already the downloaded installer file in the home directory. Launch the installer and follow the instructions.
Note: Using WSL2, I wasn't able to connect Groot2 with the tree execution app.