gazebo_plugins_interface.py
Go to the documentation of this file.
00001 #! /usr/bin/env python
00002 # Wrappers around the services provided by gazebo_ros_factory plugin
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 


gazebo_plugins
Author(s): Sachin Chitta, Stu Glaser, John Hsu
autogenerated on Mon Oct 6 2014 12:15:43