00001
00002
00003
00004 import roslib; roslib.load_manifest('gazebo_plugins')
00005
00006 import sys
00007
00008 import rospy
00009 from gazebo_plugins.msg import GazeboModel
00010 from gazebo_plugins.srv import SpawnModel
00011 from gazebo_plugins.srv import DeleteModel
00012 from geometry_msgs.msg import Pose, Point, Quaternion
00013
00014 def load_model(model_msg):
00015 print "waiting for service spawn_model"
00016 rospy.wait_for_service('spawn_model')
00017 try:
00018 spawn_model= rospy.ServiceProxy('spawn_model', SpawnModel)
00019 resp1 = spawn_model(model_msg)
00020 return resp1.success
00021 except rospy.ServiceException, e:
00022 print "Service call failed: %s"%e
00023
00024
00025
00026