Skip to content

luricl/roboMAX_BTs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Behaviour Trees Sample Implementations

RoboMAX

The implementations included in this repository are based on the RoboMAX artifact, a extensible collection of robotic mission adaptation exemplars.

Docs

Please check the BT.CPP v3 Docs for additional references.

Installation

  1. Install the ROS2 Humble and nav2 packages

  2. Install Groot (BT editing tool)

sudo apt install -y git qtbase5-dev libqt5svg5-dev libzmq3-dev libdw-dev cmake build-essential python3-catkin-pkg-modules
git clone https://github.com/BehaviorTree/Groot.git
cd Groot && git submodule update --init --recursive && mkdir build && cd build && cmake .. && make
  1. Build the rome_bt and rome_sim ROS2 packages.

First, make sure you are using Python 3.10:

python3 --version
# Expect: Python 3.10.x

If not 3.10, install and create a venv with Python 3.10 (recommended):

sudo apt update
sudo apt install -y python3.10 python3.10-venv
python3.10 -m venv ~/.venv/ros_py310
source ~/.venv/ros_py310/bin/activate
pip install -U pip setuptools colcon-common-extensions

If your system python3 is already 3.10 you can skip the venv step. Then build:

source /opt/ros/humble/setup.bash
colcon build
  1. Source the package installs.
source install/setup.bash

BT.CPP

The trees at src/rome_bt/behavior_trees can be executed with the following command:

ros2 launch rome_bt execute_bt.launch.py bt:="full/path/to/tree"

Executing a BT

The provided rome_bt package is used to develop and run behavior trees. Usually to develop nodes we create a header file with all our definitions in /include and the actual code implementation in the /src directory.

To execute a node we need to register it to the BT.CPP dynamic loader to load it during runtime.

Try to execute the rome_sim package and then run rome_bt with one of the behavior trees in another terminal.

ros2 launch rome_sim tb4_sim_bringup.launch.py
ros2 launch rome_bt execute_bt.launch.py bt:="$(ros2 pkg prefix rome_bt)/share/rome_bt/behavior_trees/[BT].xml"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published