btlib.bts

Module Contents

Functions

_get_siblings

_get_unique_id

_get_attrs

_get_node_category

_add_node

xml_to_networkx

Read a BehaviorTree XML file into a networkx graph.

fbl_to_networkx

Read a fbl file into a networkx graph.

assemble_subtrees

Assemble subtrees into the one graph.

make_demo_value

Generate a value map for the demo graph.

Data

logger

NAME

API

btlib.bts.logger = 'getLogger(...)'
btlib.bts.NAME = 'NAME'
btlib.bts._get_siblings(elm)
btlib.bts._get_unique_id(elm: bs4.BeautifulSoup, tree_id: int) int
btlib.bts._get_attrs(elm: bs4.BeautifulSoup) dict
btlib.bts._get_node_category(node: bs4.BeautifulSoup) btlib.common.NODE_CAT
btlib.bts._add_node(g: networkx.Graph, xml_per_id: btlib.XML_PER_ID, node: bs4.BeautifulSoup, tree_id: int) Tuple[networkx.Graph, btlib.XML_PER_ID]
btlib.bts.xml_to_networkx(fname: str) networkx.Graph

Read a BehaviorTree XML file into a networkx graph.

btlib.bts.fbl_to_networkx(fname: str) networkx.Graph

Read a fbl file into a networkx graph.

btlib.bts.assemble_subtrees(g: networkx.Graph, xpi: btlib.XML_PER_ID) networkx.Graph

Assemble subtrees into the one graph.

btlib.bts.make_demo_value(g: networkx.Graph) btlib.VALUE_MAP

Generate a value map for the demo graph.