2023-11-08 15:28:01 +08:00
|
|
|
import py_trees as ptree
|
|
|
|
from typing import Any
|
|
|
|
from robowaiter.behavior_lib._base.Cond import Cond
|
|
|
|
|
|
|
|
class HasSubTask(Cond):
|
|
|
|
def __init__(self):
|
|
|
|
super().__init__()
|
|
|
|
|
|
|
|
def _update(self) -> ptree.common.Status:
|
|
|
|
# if self.scene.status?
|
2023-11-09 08:47:57 +08:00
|
|
|
if self.scene.sub_task_seq.children == []:
|
2023-11-08 15:28:01 +08:00
|
|
|
return ptree.common.Status.FAILURE
|
|
|
|
else:
|
|
|
|
return ptree.common.Status.SUCCESS
|