Skip to main content

intrinsic.solutions.behavior_tree.Data

BT node of type Data for behavior_tree_pb2.DataNode.

Inherits From: Node

A data node can be used to create, update, or remove data from the blackboard. Information stored there can be created by a CEL expression, a specific proto or a list of protos, or from a world query.

blackboard_key

blackboard key the node operates on

cel_expression

CEL expression for create or update operation

world_query

World query for create or update operation

input_proto

Proto for create or update operation

input_protos

Protos for create or update operation

operation

describing the operation the data node will perform

proto

The proto representation of the node.

node_type

A string label of the node type.

result

blackboard value to pass on the modified blackboard key.

breakpoint

decorators

execution_mode

name

node_id

Child Classes

class OperationType

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

Converts this node suitable for inclusion in a dot graph.

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.

Returns

Dot graph representation for this 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_blackboard_key

View source

Sets the blackboard key for this operation.

Args

blackboard_key

blackboard key by which the value can be accessed in other nodes.

Returns

self (for builder pattern)

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_cel_expression

View source

Sets the CEL expression to create or update a blackboard value.

Args

cel_expression

CEL expression that may reference other blackboard values.

Returns

self (for builder pattern)

set_decorators

View source

Sets decorators for this node.

set_input_proto

View source

Sets a specific proto for creating or updating a blackboard value.

Args

proto

The proto to store in the blackboard

Returns

self (for builder pattern)

set_input_protos

View source

Sets list of specific protos for creating or updating a blackboard value.

Args

protos

The protos to store in the blackboard (will be wrapped in an intrinsic_proto.executive.AnyList.

Returns

self (for builder pattern)

set_operation

View source

Sets the mode of the performed operation.

Args

operation

operation to perform, see enum.

Returns

self (for builder pattern)

set_world_query

View source

show

View source

validate

View source

Validates the current input.

This checks if one and only one input is set for the Data node.

Raises

InvalidArgumentError

raised if the node is in a state that could not be converted to a valid proto.

visit

View source