This is a very basic Behavior Tree framework for Python. In case you're searching for a BT library with rich features, we recommend you take a look at py_trees. However, if you want a basic library where you can easily understand the overall behavior or want to change some behavior/code without digging too deep, you might be served well here.
Install kissBT via the following command:
pip3 install git+https://github.com/UniBwTAS/kissBT.git#egg=kissBT
or
python3 -m pip install git+https://github.com/UniBwTAS/kissBT.git#egg=kissBT
The implementation provides:
- Nodes
- Control nodes
- Sequence
- Selector
- ParallelSequence
- Leaves
- Conditions
- Actions
- Decorators
- Inverter
- Control nodes
- Unicode Behavior Tree
- Tree structure
- Status feedback (with color)
- Highlighting of running actions
[⦿][→] ROOT
┊ [⦿][?] Dodging
┊ ┊ [⦿][δ] Inverter
┊ ┊ ┊ [⦿] <StaticObstacleAhead>?
┊ ┊ [ ] DodgeStaticObstacle
┊ [⦿] FollowLane <---- RUNNING
- Blackboard
- Activity monitoring
>> WRITE [FollowLane].......... distance_to_goal : 1.0
>> READ [FollowLane].......... distance_to_goal
>> READ [<<NoMember>>]........ distance_to_goal
>> READ [FollowLane].......... distance_to_goal
>> WRITE [FollowLane].......... distance_to_goal : 0.0
>> READ [FollowLane].......... distance_to_goal
>> WRITE [FollowLane].......... goal_reached : True
You can find a small example here.
If you have any ideas/suggestions on how to improve this project while keeping it simple, I would be glad if you share your opinion with me.