Go to the documentation of this file.00001
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
00015
00016
00017
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
00022
00023
00024
00025
00026
00027
00028 req_set.model_state.reference_frame = "map"
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
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
00053
00054
00055
00056
00057
00058
00059
00060