This is a Behavior Tree library meant to be an alternative to BehaviorTree.cpp, SMACH, FlexBE and the like.
It includes a ReactJS-based web GUI and all the building blocks you need to build advanced mission control Behavior Trees without writing a single line of code!
ros_bt_py is a plug-and-play solution for all your ROS 2 deliberation needs including:
- Intuitive interfacing with ROS Actions and Services through run-time configurable Node Classes
- Explicit and type-safe Dataflow utilizing a drag-and-drop based datagraph.
- Easy customization and expansion of the available Node Classes as Python Modules
ros_bt_py has been the subject of multiple publications:
- Distributed Behavior Trees for Heterogeneous Robot Teams
- Behavior Tree Capabilities for Dynamic Multi-Robot Task Allocation with Heterogeneous Robot Teams
Learn about how to get started, API and tutorials in our documentation.
If you have specific questions or ideas feel free to write an issue or start a discussion.
To actually start using ros_bt_py, you need to install its dependencies first:
$ cd colcon_workspace
$ rosdep install --from-paths src --ignore-src -r -y
Then you can just build the package with your preferred method i.e. colcon build
ros_bt_py is under active development so things on the main branch might not be stable.
To make sure you do use a stable version check out the latest release.
The command
$ ros2 launch ros_bt_py ros_bt_py.launch.py enable_web_interface:=True
will start a BT server and the rosbridge and webserver needed for the
GUI.
Afterwards, you can open http://localhost:8085/index.html
to use the editor.
Launch Argument | Description | Default Value |
---|---|---|
robot_namespace | Namespace to launch all ros_bt_py nodes in! | / |
node_modules | List of python packages that contain nodes to be loaded on startup. | "['ros_bt_py.nodes','ros_bt_py.ros_nodes']" |
tree_storage_paths | List of storage paths for trees. | "['$HOME/.ros']" |
enable_web_interface | Start web GUI on startup. | False |
show_traceback_on_exception | Show error traceback when an exception rises. | True |
diagnostics_frequency_hz | Publishing frequency for diagnostics msgs. | 1.0 |
load_default_tree | Load the default tree on startup! | False |
load_default_tree_permissive | Load the default tree in permissive mode on startup! | False |
default_tree_path | Path to the default tree to load on startup! | |
default_tree_tick_frequency_hz | Frequency with which to tick the default tree loaded on startup! | 10.0 |
default_tree_control_command | Command to execute per default after loading the default tree on startup! | 2 |
web_server_port | Port to use for the web interface. | 8085 |
web_server_address | IP address to use for the web interface. Default value uses all IP addresses of the host. | 0.0.0.0 |
The web interface can be launched stand alone of the library, using the following command:
$ ros2 launch ros_bt_py_web_gui ros_bt_py_web_gui.launch.py web_server_port:=8085 web_server_address:=0.0.0.0