RecordCube.py
Go to the documentation of this file.
00001 #!/usr/bin/python
00002 import sys
00003 import roslib
00004 roslib.load_manifest('cob_3d_mapping_gazebo')
00005 
00006 import rospy
00007 import os
00008 
00009 from gazebo.srv import *
00010 from simple_script_server import script
00011 
00012 class MyScript(script):
00013         def Run(self):
00014 #               self.sss.move("torso",[[-0.2,0,-0.2]])
00015 #               self.sss.move("head","front")
00016 #               self.sss.move("tray","down")
00017                 # Move training table on top of gripper
00018                 srv_set_model_state = rospy.ServiceProxy('/gazebo/set_model_state', SetModelState)
00019                 req_set = SetModelStateRequest()
00020                 req_set.model_state.model_name = "robot"
00021 #               req_set.model_state.pose.position.x = -2.5
00022 #               req_set.model_state.pose.position.y = 0
00023 #               req_set.model_state.pose.position.z = 0
00024 #               req_set.model_state.pose.orientation.w = 0
00025 #               req_set.model_state.pose.orientation.x = 0
00026 #               req_set.model_state.pose.orientation.y = 0
00027 #               req_set.model_state.pose.orientation.z = 0
00028                 req_set.model_state.reference_frame = "map"     
00029 #               res_set = srv_set_model_state(req_set)
00030 #               self.sss.wait_for_input()
00031 #               req_set.model_state.pose.position.x = -2.17
00032 #               req_set.model_state.pose.position.y = 1.25
00033 #               req_set.model_state.pose.position.z = 0
00034 #               req_set.model_state.pose.orientation.w = 0.965925826
00035 #               req_set.model_state.pose.orientation.x = 0
00036 #               req_set.model_state.pose.orientation.y = 0
00037 #               req_set.model_state.pose.orientation.z = -0.258819045
00038 #               res_set = srv_set_model_state(req_set)
00039                 req_set.model_state.pose.position.x = -1.77
00040                 req_set.model_state.pose.position.y = 1.77
00041                 req_set.model_state.pose.position.z = 0
00042                 req_set.model_state.pose.orientation.w = 0.923879533
00043                 req_set.model_state.pose.orientation.x = 0
00044                 req_set.model_state.pose.orientation.y = 0
00045                 req_set.model_state.pose.orientation.z = -0.382683432
00046                 res_set = srv_set_model_state(req_set)
00047 
00048                 
00049 if __name__ == "__main__":
00050         SCRIPT = MyScript()
00051         SCRIPT.Start()
00052         #if len(sys.argv) < 2:
00053         #       print '[Train_LoadObject.py] Please specify the name of the urdf model to be loaded'
00054         #       sys.exit()
00055         
00056 
00057                 
00058 
00059 
00060 


cob_3d_mapping_gazebo
Author(s): Georg Arbeiter
autogenerated on Wed Aug 26 2015 11:04:44