From a7007aeea7f8538d2ec30d014e3cc150a40c17e4 Mon Sep 17 00:00:00 2001 From: Caiyishuai <39987654+Caiyishuai@users.noreply.github.com> Date: Mon, 13 Nov 2023 14:48:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=BA=86obea=E7=9A=84sequenc?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- robowaiter/behavior_tree/obtea/OptimalBTExpansionAlgorithm.py | 4 ++-- sub_task.ptml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/robowaiter/behavior_tree/obtea/OptimalBTExpansionAlgorithm.py b/robowaiter/behavior_tree/obtea/OptimalBTExpansionAlgorithm.py index 6ec11d5..7f0010f 100644 --- a/robowaiter/behavior_tree/obtea/OptimalBTExpansionAlgorithm.py +++ b/robowaiter/behavior_tree/obtea/OptimalBTExpansionAlgorithm.py @@ -185,10 +185,10 @@ class OptBTExpAlgorithm: elif child.type == 'act': self.ptml_string += 'act '+child.content.name+"\n" elif isinstance(child, ControlBT): - if parnode.type == '?': + if child.type == '?': self.ptml_string += "selector{\n" self.dfs_ptml(parnode=child) - elif parnode.type == '>': + elif child.type == '>': self.ptml_string += "sequence{\n" self.dfs_ptml( parnode=child) self.ptml_string += '}\n' diff --git a/sub_task.ptml b/sub_task.ptml index b8bf4e1..adcea35 100644 --- a/sub_task.ptml +++ b/sub_task.ptml @@ -1,6 +1,6 @@ selector{ cond At(Coffee,Bar) -selector{ +sequence{ cond At(Robot,CoffeeMachine) act MakeCoffee() }