gazebo_plugins_interface.py
Go to the documentation of this file.
1 #! /usr/bin/env python
2 # Wrappers around the services provided by gazebo_ros_factory plugin
3 
4 import roslib; roslib.load_manifest('gazebo_plugins')
5 
6 import sys
7 
8 import rospy
9 from gazebo_plugins.msg import GazeboModel
10 from gazebo_plugins.srv import SpawnModel
11 from gazebo_plugins.srv import DeleteModel
12 from geometry_msgs.msg import Pose, Point, Quaternion
13 
14 def load_model(model_msg):
15  print "waiting for service spawn_model"
16  rospy.wait_for_service('spawn_model')
17  try:
18  spawn_model= rospy.ServiceProxy('spawn_model', SpawnModel)
19  resp1 = spawn_model(model_msg)
20  return resp1.success
21  except rospy.ServiceException, e:
22  print "Service call failed: %s"%e
23 
24 
25 
26 


gazebo_plugins
Author(s): John Hsu
autogenerated on Tue Mar 26 2019 02:31:27