def __init__(self, object_name, pap, oracle): Action.__init__(self, arg_info(currentframe(), ignore=['self', 'oracle'])) Reachable.__init__(self, pap.grasp_config) self.conditions = { HOLDING_VAR: Holding(object_name, pap.grasp) } self.effects = { object_name: pap.pose, HOLDING_VAR: False, ROBOT_VAR: pap.grasp_config } self.is_goal_operator = False if oracle.problem.goal_holding == object_name: self.effects['in_hand'] = False if object_name in oracle.problem.goal_poses and pap.pose == oracle.problem.goal_poses[object_name]: self.is_goal_operator = True regions = oracle.sinks + oracle.stoves if object_name in oracle.problem.goal_regions: regions.append(oracle.problem.goal_regions[object_name]) self.is_goal_operator = True for region in regions: # oracle.regions if oracle.region_contains(region, object_name, pap.pose): self.effects[(object_name, 'in', region)] = True
def __init__(self, config): Action.__init__(self, arg_info(currentframe())) Reachable.__init__(self, config) self.conditions = {} self.effects = { ROBOT_VAR: config } self.is_goal_operator = True