顶层行为树框架代码提交,包含动作、条件节点框架
This commit is contained in:
parent
8fa3662929
commit
572340c1f3
|
@ -1,6 +1,7 @@
|
||||||
import py_trees
|
import py_trees
|
||||||
from behavior_library import *
|
from behavior_library import *
|
||||||
|
|
||||||
|
|
||||||
def LoadMainTree() -> py_trees.trees.BehaviourTree:
|
def LoadMainTree() -> py_trees.trees.BehaviourTree:
|
||||||
"""
|
"""
|
||||||
此方法用于加载固定的顶层行为树(不包括实际执行)
|
此方法用于加载固定的顶层行为树(不包括实际执行)
|
||||||
|
@ -50,9 +51,11 @@ if '__name__' == '__main__':
|
||||||
btree = LoadMainTree()
|
btree = LoadMainTree()
|
||||||
print('jjjj')
|
print('jjjj')
|
||||||
|
|
||||||
|
|
||||||
def print_tree(tree):
|
def print_tree(tree):
|
||||||
print(py_trees.display.unicode_tree(root=tree.root, show_status=True))
|
print(py_trees.display.unicode_tree(root=tree.root, show_status=True))
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
btree.tick_tock(
|
btree.tick_tock(
|
||||||
period_ms=500,
|
period_ms=500,
|
||||||
|
|
Loading…
Reference in New Issue