__bt_tools__ is a collection of software for working with behavior trees (BTs) in ROS. It contains means for interpreting, visualizing and introspecting BTs.
A Library to parse behavior trees.
To analyze past runs of a behavior tree, you need to enable the logging to fbl files. This is a feature of the BehaviorTree.CPP library but for example navigation2 does currently not support it. You can enable the support like this: https://github.com/ct2034/navigation2/commit/b019fbc49d72dd34a45128bb20d1114e9b8c2b24
Look at the behavior tree at runtime
The tool currently requires an fbl
log file, because it contains the tree definition.
But it will then visualize the tree at runtime based on the messages published unter /behavior_tree_log
.
ros2 run bt_live bt_live --ros-args -p fbl_file:=<path_to_fbl_log>
Then open a browser at http://localhost:8000 to see the visualization. It should look a little something like this:
Tools to visualize and analyze past behavior tree runs.
fbl
logros2 run bt_view bt_view --bt_log_fbl_fnames <path_to_fbl_log>
The tool will output images about
_count.png
and_states.png
to the same folder that the fbl
log is in.For example, the _states.png
file will look like this:
ros2 run bt_view bt_view --bt_log_fbl_fnames <path_to_fbl_log> --coverage-threshold <threshold>
The tool will count the percentage of nodes that have been executed in the giben fbl file(s). Iff above the threshold, it will return 0.
See Contributing.
Feedback is highly appreciated. Please open issues on new ideas, bugs, etc. here at bt_tools/issues or reach out to the maintainers.
... are welcome at any time and will be listed here. We thank Robert Schirmer for the valuable input and discussions about the design of bt_tools.
Currently, bt_tools does not come with any 3rd-party components/modules. Note that bt_tools highly depends on ROS 2, which largely comes under the permissive licenses Apache 2.0 and 3-clause BSD.
bt_tools comes under the Apache-2.0 license, see LICENSE.