Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I created sdf models with my collada files and saved them in the $GAZEBO_MODEL_PATH. In my program i access the sdf files like this:

f = open(self.gazebo_model_path + model_folder_name + '/model.sdf', 'r')
sdff = f.read()
f.close()

Now you can use the gazebo/spawn_sdf_model service:

rospy.wait_for_service('gazebo/spawn_sdf_model')
spawn_model_prox = rospy.ServiceProxy('gazebo/spawn_sdf_model', SpawnModel)
spawn_model_prox(unique_name, sdff, "~/SpawnedObjects", initial_pose, "world")