2023-11-08 10:03:40 +08:00
|
|
|
import py_trees as ptree
|
|
|
|
from typing import Any
|
|
|
|
from robowaiter.behavior_lib._base.Behavior import Bahavior, Status
|
|
|
|
|
|
|
|
class Cond(Bahavior):
|
2023-11-08 15:28:01 +08:00
|
|
|
print_name_prefix = "cond "
|
2023-11-09 16:07:02 +08:00
|
|
|
type = 'Cond'
|
2023-11-08 15:28:01 +08:00
|
|
|
|
|
|
|
def __init__(self,*args):
|
|
|
|
super().__init__(*args)
|
2023-11-08 10:03:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
def _update(self) -> ptree.common.Status:
|
|
|
|
# if self.scene.status?
|
|
|
|
if self.scene.state['chat_list'] == []:
|
|
|
|
return Status.FAILURE
|
|
|
|
else:
|
|
|
|
return Status.SUCCESS
|