intrinsic.solutions.behavior_tree.Sequence
![]() View source on GitHub |
A BT node of type Sequence.
Inherits From: NodeWithChildren, Node
intrinsic.solutions.behavior_tree.Sequence(
children: Optional[SequenceType[Union['Node', actions.ActionBase]]] = None,
name: Optional[str] = None
)
Represented in the proto as behavior_tree_pb2.BehaviorTree.SequenceNode.
The child nodes are executed sequentially. If any of the children fail, the node fails. If all the children succeed, the node succeeds.
Attributes | |
|---|---|
The list of child nodes of the given node, inherited from the parent class. | |
The proto representation of the node. | |
A string label of the node type. | |
Methods
create_from_proto
View source
@classmethodcreate_from_proto( proto_object: behavior_tree_pb2.BehaviorTree.Node ) -> 'Node'
Instantiates a Node instance from a proto.
disable_execution
View source
disable_execution(
result_state: Optional[intrinsic.solutions.behavior_tree.DisabledResultState] = None
) -> 'Node'
Disables a node, so that it is not executed and appears to be skipped.
| Args | |
|---|---|
| Optionally force the result of the execution to this state. If not set, the resulting state is automatically determined, so that the node is skipped. |
| Returns | |
|---|---|
Builder pattern, returns self. |
dot_graph
View source
dot_graph(
node_id_suffix: str = ''
) -> Tuple[graphviz.Digraph, str]
Generates a graphviz subgraph with a single node for self.
| Args | |
|---|---|
| A little string of form |
| The label is typically just the type of the node. To use a different value, this argument can be used. |
| name of the node as set by the user. |
| Returns | |
|---|---|
A tuple of the generated graphviz dot graph and the name of the graph's root node. |
enable_execution
View source
enable_execution() -> 'Node'
Enables a node, so that it will be executed.
| Returns | |
|---|---|
Builder pattern, returns self. |
generate_and_set_unique_id
View source
generate_and_set_unique_id() -> int
Generates a new random id and sets it for this node.
set_breakpoint
View source
set_breakpoint(
breakpoint_type: Optional['BreakpointType']
) -> 'Node'
Sets the breakpoint type on the decorator.
| Args | |
|---|---|
| desired breakpoint type, None to remove type. |
| Returns | |
|---|---|
Builder pattern, returns self. |
set_children
View source
set_children(
*children
) -> 'Node'
set_decorators
View source
set_decorators(
decorators: Optional['Decorators']
) -> 'Node'
show
View source
show() -> None
visit
View source
visit(
containing_tree: 'BehaviorTree',
callback: Callable[['BehaviorTree', Union['BehaviorTree', 'Node', 'Condition']], None]
) -> None