0
$\begingroup$

Rosanswers logo

I'm following the gazebo tutorial on spawning additional objects into a world.

The tutorial states that a coffee cup can be spawned using the following command:

$ roslaunch gazebo_worlds coffee_cup.launch

Unfortunately, the following error occurs when spawning the coffee cup:

Warning [parser.cc:291] DEPRECATED GAZEBO MODEL FILE
On July 1st, 2012, this formate will no longer by supported
Convert your files using the gzsdf command line tool
You have been warned!

When /opt/ros/fuerte/stacks/simulator_gazebo/gazebo/gazebo/bin/gzsdf is executed, it shows three commands:

Commands:
    describe   Print the SDF format.
    check      Check the SDF format for the given file.
    print      Prints SDF, useful for debugging parser and as a conversion tool.

Unfortunately, the print and check commands report the same error when applied to coffee_cup.model. How do I convert coffee_cup.model into a format compatible with gazebo?

I'm using a freshly installed version of ROS Fuerte on Ubuntu Linux 12.04.


Originally posted by liangfok on ROS Answers with karma: 328 on 2012-10-03

Post score: 1

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

I already tried posting this answer on http://answers.gazebosim.org/ ,it's in the moderation queue over there, so I post here in the interest of making the answer available ASAP.

It appears the coffee cup model uses the old gazebo (pre 1.0) model format and the parser used in fuerte isn't able to understand the syntax of that anymore. The error messages by gazebo on spawning the model at least suggest the mesh definition cannot be read:

namespace error : Namespace prefix model on physical is not defined
<!-- The trimesh coffee cup --><model:physical name="coffee_cup"><body:trimesh n
                                                                ^
namespace error : Namespace prefix body on trimesh is not defined
h coffee cup --><model:physical name="coffee_cup"><body:trimesh name="cup1_body"
                                                                               ^
namespace error : Namespace prefix geom on trimesh is not defined
izz>0.01</izz><cx>0.0</cx><cy>0.1</cy><cz>0.0</cz><geom:trimesh name="cup1_geom"
                                                                               ^
namespace error : Namespace prefix model on physical is not defined
<!-- The trimesh coffee cup --><model:physical name="coffee_cup"><body:trimesh n
                                                                ^
namespace error : Namespace prefix body on trimesh is not defined
h coffee cup --><model:physical name="coffee_cup"><body:trimesh name="cup1_body"

A conversion to SDF would be needed to properly be able to spawn the model.

The differences are readily visible when comparing two simple models:

Coffee cup (not working in fuerte): Coffee cup

Coke can (working): Coke Can

There's quite a bit of non-working legacy launch files/models in the gazebo packages and outdated tutorials on ros.org and the described issues are an example of that. Any volunteers willing to improve the situation would be welcome I guess. For the moment, I added a disclaimer to the tutorial notifying readers that spawning the cup does not work in ROS versions more recent than electric.


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2012-10-14

This answer was ACCEPTED on the original site

Post score: 3

$\endgroup$
0
$\begingroup$

Rosanswers logo

This question should have been posted to http://answers.gazebosim.org/. A similar question was asked here.


Originally posted by liangfok with karma: 328 on 2012-10-03

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.