I have a correct Gazebo 1.2 model, slightly modified from the Gazebo tutorial. If that model with it's manifest.xml is in ~/.gazebo/models, then Gazebo of ROS can see and load this model.
Now I would like to load this model with the spawn_model script of ROS gazebo package.
I have tried this command:
rosrun gazebo spawn_model -gazebo -file /home/ronald/catkin_ws/src/gazebo_heightmap/Media/models/robot1/model.sdf -model myrobot
and tried with this launch file
<launch>
<param name="robot_model" textfile="$(find gazebo_heightmap)/Media/models/robot1/model.sdf" />
<node name="spawn_robot1" pkg="gazebo" type="spawn_model" args="-gazebo -param robot_model -model myrobot" respawn="false" output="screen" />
</launch>
In both cases, Gazebo node gives error messages
Error [parser.cc:675] XML Element[origin], child of element[model] not defined in SDF. Ignoring.[model]
Error [parser.cc:666] Error reading element <model>
Error [parser.cc:366] Unable to read element <gazebo>
Error: Could not find the 'robot' element in the xml file
at line 61 in /tmp/buildd/ros-groovy-urdfdom-0.2.6-1precise-20121225-1343/urdf_parser/src/model.cpp
Error [parser_urdf.cc:1659] Unable to call parseURDF on robot model
Warning [parser.cc:374] Gazebo SDF has no <gazebo> element in file[urdf string]
Error [parser.cc:318] parse as old urdf model file failed.
Error [World.cc:1190] Unable to read sdf string
To me it seems that the model description files must be different to load it with spawn_model, but how?
Update: The model does not contain element, as suggested. The model also loads if it is included in a world description file. Just the spawn_model does not work.
Originally posted by r0nald on ROS Answers with karma: 268 on 2013-01-12
Post score: 1
Original comments
Comment by 130s on 2013-01-15:
Starting since Sep 2012, all gazebo
related questions should be asked on new gazebo
specific QA community. Thank you for your cooperation!
See also this thread.
Comment by 130s on 2013-01-15:
I keep, however, the thread open since the discussion has already been going on.
Comment by r0nald on 2013-01-27:
But Gazebo can load this model easily, it seems just the spawn_model node that can't load the model. Isn't this node part of ROS?
Comment by 130s on 2013-01-27:
Personally I agree with you. But the developers of Gazebo want all Qs to move to the new QA site. Please see the link I cited.