intrinsic.solutions.execution.Operation
![]() View source on GitHub |
Class representing an active operation in the executive.
intrinsic.solutions.execution.Operation(
stub: executive_service_pb2_grpc.ExecutiveServiceStub,
operation_proto: operations_pb2.Operation
)
Attributes | |
|---|---|
Name of the operation. | |
Whether the operation has completed or not (independent of outcome). | |
Proto representation. | |
RunMetadata for an active operation containing more state information. | |
Methods
find_tree_and_node_id
View source
find_tree_and_node_id(
node_name: str
) -> intrinsic.solutions.behavior_tree.NodeIdentifierType
Searches the tree in this Operation for a node with name node_name.
| Args | |
|---|---|
| Name of a node to search for in the tree. |
| Returns | |
|---|---|
A NodeIdentifierType referencing the tree id and node id for the node. The result can be passed to calls requiring a NodeIdentifierType. |
| Raises | |
|---|---|
solution_errors.NotFoundError if there is not behavior_tree. solution_errors.NotFoundError if not matching node exists. solution_errors.InvalidArgumentError if there is more than one matching node or if the node or its tree do not have an id defined. |
find_tree_and_node_ids
View source
find_tree_and_node_ids(
node_name: str
) -> list[bt.NodeIdentifierType]
Searches the tree in this Operation for all nodes with name node_name.
| Args | |
|---|---|
| Name of a node to search for in the tree. |
| Returns | |
|---|---|
solution_errors.NotFoundError if there is not behavior_tree. A list of NodeIdentifierType referencing the tree id and node id for the node. The list contains information about all matching nodes, even if the nodes do not have a node or tree id. In that case the values are None. |
update
View source
update() -> None
Update the operation by querying the executive.
update_from_proto
View source
update_from_proto(
proto: operations_pb2.Operation
) -> None
Update information from a proto.
