2023-11-08 16:20:02 +08:00
|
|
|
import py_trees as ptree
|
|
|
|
from typing import Any
|
|
|
|
from robowaiter.behavior_lib._base.Cond import Cond
|
|
|
|
|
2023-11-13 10:32:56 +08:00
|
|
|
class EnvExplored(Cond):
|
2023-11-08 16:20:02 +08:00
|
|
|
def __init__(self):
|
|
|
|
super().__init__()
|
|
|
|
|
|
|
|
def _update(self) -> ptree.common.Status:
|
2023-11-13 10:32:56 +08:00
|
|
|
arg_str = self.arg_str
|
|
|
|
|
|
|
|
if f'EnvExplored()' not in self.scene.state["condition_set"]:
|
2023-11-08 16:20:02 +08:00
|
|
|
return ptree.common.Status.SUCCESS
|
2023-11-13 10:32:56 +08:00
|
|
|
else:
|
|
|
|
return ptree.common.Status.FAILURE
|
|
|
|
|
|
|
|
|
|
|
|
# if self.scene.status?
|
|
|
|
# if self.scene.state['map']['2d'] == None:
|
|
|
|
# return ptree.common.Status.FAILURE
|
|
|
|
# else:
|
|
|
|
# return ptree.common.Status.SUCCESS
|