def get_goal_observation(self): temp_angles=goal_angle() if len(self.angles)==0 or not like(temp_angles,self.angles[0]): self.angles.append(temp_angles) else: self.focus_one() self.ending=True
def update(self): if has_fallen(): return "fallen" if vision.has_new_goal_observation(): if like(goal_angle()[0],0): return "done" else: return "standing in front of the goal" self.current_head_position=robotbody.get_head_position() if like(self.current_head_position,pi/2): return "can't find the goal" if like(self.wanted_head_position,self.current_head_position): self.update_head_position()