Go to the documentation of this file.00001
00002
00003 import roslib
00004 roslib.load_manifest('cob_script_server')
00005 roslib.load_manifest('cob_sdh')
00006 roslib.load_manifest('cob_torso')
00007 roslib.load_manifest('cob_tray')
00008 roslib.load_manifest('cob_arm')
00009 import rospy
00010
00011 from simple_script_server import script
00012
00013 class MyScript(script):
00014 def Initialize(self):
00015 rospy.loginfo("Initializing all components...")
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 def Run(self):
00031 rospy.loginfo("Running script...")
00032
00033
00034
00035
00036 self.sss.move("torso","home")
00037 self.sss.move("head","front")
00038 self.sss.move("tray","down")
00039 self.sss.wait_for_input()
00040
00041 self.sss.move("base",[-1.3, -1.0, 3.14], mode="linear")
00042 self.sss.wait_for_input()
00043
00044
00045
00046
00047
00048
00049 self.sss.move("base",[-1.3, 1.09, 3.14],mode="linear")
00050 self.sss.move("torso",[[-0.1,0.0,-0.1]])
00051 self.sss.sleep(2)
00052 self.sss.move("torso",[[-0.2,0.0,-0.2]])
00053 self.sss.move("base",[-1.3, -0.92, 3.14], mode="linear")
00054 self.sss.sleep(2)
00055 self.sss.move("torso",[[-0.1,0.0,-0.1]])
00056 self.sss.wait_for_input()
00057 self.sss.move("base",[0, 0, 0], mode="linear")
00058
00059
00060
00061
00062 if __name__ == "__main__":
00063 SCRIPT = MyScript()
00064 SCRIPT.Start()