Functions | Variables
convert_v3_to_v4 Namespace Reference

Functions

None convert_all_nodes (ET.Element root_node)
 
None convert_single_node (ET.Element node)
 
def convert_stream (typing.TextIO in_stream, typing.TextIO out_stream)
 
def main ()
 
bool strtobool (typing.Union[str, int, bool] val)
 

Variables

 logger = logging.getLogger(__name__)
 
list SCRIPT_DIRECTIVES
 

Detailed Description

Converts BehaviorTree.CPP V3 compatible tree xml files to V4 format.

Function Documentation

◆ convert_all_nodes()

None convert_v3_to_v4.convert_all_nodes ( ET.Element  root_node)
recursively converts all nodes inside a root node.
Args:
    root_node (ET.Element): the root node to start the conversion.

Definition at line 93 of file convert_v3_to_v4.py.

◆ convert_single_node()

None convert_v3_to_v4.convert_single_node ( ET.Element  node)
converts a leaf node from V3 to V4.
Args:
    node (ET.Element): the node to convert.

Definition at line 35 of file convert_v3_to_v4.py.

◆ convert_stream()

def convert_v3_to_v4.convert_stream ( typing.TextIO  in_stream,
typing.TextIO  out_stream 
)
Converts the behavior tree V3 xml from in_file to V4, and writes to out_file.
Args:
    in_stream (typing.TextIO): The input file stream.
    out_stream (typing.TextIO): The output file stream.

Definition at line 107 of file convert_v3_to_v4.py.

◆ main()

def convert_v3_to_v4.main ( )
the main function when used in cli mode

Definition at line 129 of file convert_v3_to_v4.py.

◆ strtobool()

bool convert_v3_to_v4.strtobool ( typing.Union[str, int, bool]  val)
``distutils.util.strtobool`` equivalent, since it will be deprecated.
origin: https://stackoverflow.com/a/715468/17094594

Definition at line 15 of file convert_v3_to_v4.py.

Variable Documentation

◆ logger

convert_v3_to_v4.logger = logging.getLogger(__name__)

Definition at line 12 of file convert_v3_to_v4.py.

◆ SCRIPT_DIRECTIVES

list convert_v3_to_v4.SCRIPT_DIRECTIVES
Initial value:
1 = [
2  "_successIf",
3  "_failureIf",
4  "_skipIf",
5  "_while",
6  "_onSuccess",
7  "_onFailure",
8  "_onHalted",
9  "_post",
10 ]

Definition at line 23 of file convert_v3_to_v4.py.



behaviortree_cpp_v4
Author(s): Davide Faconti
autogenerated on Sun Sep 22 2024 02:19:17