/gazebo/spawn_urdf_model service fails
Hi,
In ROS electric, I want to spawn models in gazebo in a programmatic way via the /gazebo/spawn_urdf_model service. So I wrote a node implementing an according client but when I try to load models I get the following error from Gazebo: 'SpawnModel: Failure - model format is not URDF (nor COLLADA).' This also happens when I try calling the service from a terminal, e.g., rosservice call /gazebo/spawn_urdf_model '{model_name: "coke_can", model_xml: "/opt/ros/electric/stacks/simulator_gazebo/gazebo_worlds/objects/coke_can.urdf", robot_namespace: "/foo", initial_pose: {position: {x: 0, y: 0, z: 0}, orientation: {x: 0, y: 0, z: 0, w: 1}}, reference_frame: "world"}'. Trying to spawn the same object via rosrun gazebo spawn_model ... works perfectly fine. The error occurs in /gazebo/src/gazeboros.cpp in the method 'bool IsURDF(std::string model_xml)'. The TiXmlDocument which is parsed there always seems to be empty. Am I doing something wrong or is this a bug?
Thanks, -Robert-