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 as e:
22  print("Service call failed: %s" % e)
gazebo_plugins.gazebo_plugins_interface.load_model
def load_model(model_msg)
Definition: gazebo_plugins_interface.py:14


gazebo_plugins
Author(s): John Hsu
autogenerated on Thu Sep 5 2024 02:49:55