Commit 4376cef0 authored by Patrick Holthaus's avatar Patrick Holthaus

add waypoint after visiting kitchen

parent 894b9183
......@@ -29,6 +29,8 @@ base:
vn: [-3.2, -0.4, -0.8]
prepare:
kitchen: [0, 2.12, 0]
after:
kitchen: [1.6, 2.2, 3.14]
inspect:
kitchen: [2.3, 2.2, 0]
living_1: [0.4, -1.5, -1]
......
......@@ -229,7 +229,7 @@ class ExperimentControl(object):
self.await_signal()
def set_state(self, cur_state):
rospy.loginfo("[SCRIPT] EXPERIMENT ID '%s', COND '%s' ENTER PHASE: %s -> %s.", self.experiment_id, self.condition, self.state, cur_state)
rospy.loginfo("[SCRIPT] EXPERIMENT ID '%s', COND '%s' ENTER PHASE: '%s' -> '%s'", self.experiment_id, self.condition, self.state, cur_state)
rospy.set_param('/safety_security/experiment_trials/' + self.experiment_id + '/state', cur_state)
self.state = cur_state
......@@ -254,7 +254,7 @@ class ExperimentControl(object):
thread = ExtendedBehaviour(monitor_class, monitor)
self.acted = self.await_signal()
self.set_state("INTERRUPT/DISMISSED(%s)." % item)
self.set_state("INTERRUPT/DISMISSED(%s)" % item)
if not thread is None and thread.isAlive():
thread.stop()
......@@ -265,7 +265,8 @@ class ExperimentControl(object):
self.search("inspect/living_1")
self.base.goto("prepare/kitchen")
self.search("inspect/kitchen")
self.interrupt_person(item, via=["prepare/kitchen"])
self.base.goto("after/kitchen")
self.interrupt_person(item)
def inspect_b(self):
item = "plugs"
......@@ -274,13 +275,13 @@ class ExperimentControl(object):
self.search()
self.base.goto("prepare/kitchen")
self.search("inspect/kitchen")
self.base.goto("after/kitchen")
self.interrupt_person(item,
monitor={672: "Off",
750: "Off",
752: "Off",
755: "Off",
},
via=["prepare/kitchen"])
})
self.actuators.setActuator(672, 0)
self.actuators.setActuator(673, 0)
self.actuators.setActuator(750, 0)
......@@ -298,7 +299,8 @@ class ExperimentControl(object):
self.actuators.setActuator(752, 100)
self.base.goto("prepare/kitchen")
self.search("inspect/kitchen")
self.interrupt_person(item, monitor={752: "Off"}, via=["prepare/kitchen"])
self.base.goto("after/kitchen")
self.interrupt_person(item, monitor={752: "Off"})
def inspect_d(self):
item = "pepper"
......@@ -364,7 +366,7 @@ class ExperimentControl(object):
self.inspect_b()
self.inspect_c()
self.inspect_d()
self.prepare("standby", phrase="standby", position="init", wait=0)
self.prepare("standby", phrase="standby", position="intro", wait=0)
self.set_state("COMPLETED")
msg.data ="stop/script"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment