00001
00002
00003 import roslib
00004 roslib.load_manifest('cob_script_server')
00005 import rospy
00006
00007 from simple_script_server import script
00008
00009 class TestScript(script):
00010
00011 def Initialize(self):
00012 self.sss.init("tray")
00013
00014
00015
00016 self.sss.set_light("red")
00017
00018 def Run(self):
00019
00020
00021
00022
00023 handle01 = self.sss.move("arm","folded",False)
00024 self.sss.move("torso","home",False)
00025 self.sss.move("sdh","home",False)
00026 self.sss.move("tray","down")
00027 handle01.wait()
00028 self.sss.move("base","home")
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 self.sss.move("base","kitchen")
00039 handle01 = self.sss.move("arm","pregrasp",False)
00040 self.sss.move("sdh","cylopen")
00041 handle01.wait()
00042 self.sss.move("arm","grasp")
00043
00044 self.sss.move("sdh","cylclosed")
00045
00046
00047 handle01 = self.sss.move("arm","grasp-to-tablet",False)
00048 self.sss.move("tray","up",False)
00049 handle01.wait()
00050
00051 self.sss.move("sdh","cylopen")
00052
00053
00054 handle03 = self.sss.move("arm","tablet-to-folded",False)
00055 self.sss.sleep(3)
00056 self.sss.move("sdh","home",False)
00057 handle03.wait()
00058
00059
00060 self.sss.move("base","order")
00061 self.sss.move("torso","nod")
00062 self.sss.wait_for_input()
00063 self.sss.sleep(3)
00064
00065
00066 self.sss.move("tray","down",False)
00067 self.sss.move("base","home")
00068
00069 if __name__ == "__main__":
00070 SCRIPT = TestScript()
00071 SCRIPT.Start()
00072
00073 import roslib
00074 roslib.load_manifest('cob_script_server')
00075 import rospy
00076
00077 from simple_script_server import script
00078
00079 class TestScript(script):
00080
00081 def Initialize(self):
00082 self.sss.init("tray")
00083
00084
00085
00086 self.sss.set_light("red")
00087
00088 def Run(self):
00089
00090
00091 handle_arm = self.sss.move_cart_rel("arm",[[0, -0.1, 0],[0, 0, 0]])
00092
00093 if __name__ == "__main__":
00094 SCRIPT = TestScript()
00095 SCRIPT.Start()