Skip to main content

intrinsic.solutions.behavior_tree.Branch

BT node of type Branch for behavior_tree_pb2.BehaviorTree.BranchNode.

Inherits From: Node

A branch node has a condition and two designated children. On selection, it evaluates the condition. If the condition is satisfied, the then child is selected, otherwise the else child is selected.

if_condition

condition which indicates which child should be executed.

then_child

Child to execute if the condition succeeds.

else_child

Child to execute if the condition fails.

proto

The proto representation of the node.

node_type

A string label of the node type.

breakpoint

decorators

execution_mode

name

node_id

Methods

create_from_proto

View source

Instantiates a Node instance from a proto.

disable_execution

View source

Disables a node, so that it is not executed and appears to be skipped.

Args

result_state

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

Generates a graphviz subgraph with a single node for self.

Args

node_id_suffix

A little string of form _1_2, which is just a suffix to make a unique node name in the graph. If the node names clash within the graph, they are merged into one, and we do not want to merge unrelated nodes.

node_label

The label is typically just the type of the node. To use a different value, this argument can be used.

name

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

Enables a node, so that it will be executed.

Returns

Builder pattern, returns self.

generate_and_set_unique_id

View source

Generates a new random id and sets it for this node.

set_breakpoint

View source

Sets the breakpoint type on the decorator.

Args

breakpoint_type

desired breakpoint type, None to remove type.

Returns

Builder pattern, returns self.

set_decorators

View source

set_else_child

View source

set_if_condition

View source

set_then_child

View source

show

View source

visit

View source