ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Unable to Spawn a coffee_cup in a Gazebo World

asked 2012-10-03 13:30:25 -0600

liangfok gravatar image

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.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2012-10-14 00:22:58 -0600

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.

edit flag offensive delete link more
1

answered 2012-10-03 19:51:27 -0600

liangfok gravatar image

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

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-10-03 13:30:25 -0600

Seen: 994 times

Last updated: Oct 14 '12