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 moderately advanced mission control Behavior Trees without writing a single line of code!
The main documentation effort is found in the doc
folder.
Simply execute the following commands in your shell to get browsable HTML documentation, including some tutorials:
$ cd ros_bt_py/doc
$ make html
$ cd build
$ python -m http.server & xdg-open http://localhost:8000/html
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 prefered method i.e. colcon build
Note: Do not build the workspace using --symlink-install
as this is currently not working
with generate_parameter_library. You will get an error when running ModuleNotFoundError: No module named 'ros_bt_py.parameters'
.
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']" |
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