Behavior Trees
vultron.bt
vultron.bt.base
This package implements a basic Behavior Tree library.
vultron.bt.behaviors
file: behaviors author: adh created_at: 4/26/22 1:49 PM
vultron.bt.fuzzer
file: cvd_proto_fuzzer author: adh created_at: 4/26/22 10:59 AM
vultron.bt.states
Provides state management for the Vultron Behavior Tree
vultron.bt.errors
file: errors author: adh created_at: 5/23/22 11:59 AM
vultron.bt.common
This module provides common Behavior Tree nodes for the Vultron package.
EnumStateTransition
dataclass
Represents a transition between two states in an enum-based state machine
Source code in vultron/bt/common.py
37 38 39 40 41 42 43 44 |
|
show_graph(node_cls)
Show the graph for the given node_cls
Source code in vultron/bt/common.py
136 137 138 |
|
state_change(key, transition)
Factory method that returns a FallbackNode object that returns SUCCESS when the blackboard[key] starts in one of start_states and changes to end_state, and FAILURE otherwise
Source code in vultron/bt/common.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
|
state_in(key, state)
Factory method that returns a ConditionCheck class that checks if the blackboard[key] == state
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
str
|
the blackboard key to check |
required |
state |
Enum
|
the state to check for |
required |
Returns:
Type | Description |
---|---|
Type[ConditionCheck]
|
A ConditionCheck class that checks if the blackboard[key] == state |
Source code in vultron/bt/common.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
to_end_state_factory(key, state)
Factory method that returns an ActionNode class that updates key to state.
Source code in vultron/bt/common.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
|