Ask Your Question

gazebo usage of textures / pictures

asked 2012-12-03 09:05:38 -0500

davinci gravatar image

updated 2012-12-03 10:03:26 -0500

I am trying to build a model of robot arm in simulation with checkerboards on it for image recognition. For this I use the simple arm model. Is there somewhere a good description of all the possibilities of urdf / gazebo models? Because I found from a presentation that you can use for instance patterns:

 <material name="pattern">
    <texture filename="package://roscon_urdf/logo.jpg"/>

But I could not find this back in the did not load either:

 Warning [] XML Attribute[name] in element[material] not defined in SDF, ignoring.
Error [] XML Element[texture], child of element[material] not defined in SDF. Ignoring.[material]
Error [] Error reading element
Error [] Unable to parse sdf element[gazebo]
Error [] parse as old deprecated model file failed.
Error [] Unable to read sdf string

The material script line from the simple_arm was replaced with the code above. Loaded with

 rosrun gazebo spawn_model -file simple_arm.model -gazebo -model box 
What are the differences between .model .urdf and .sdf files?

edit retag flag offensive close merge delete


Please read the support guidelines before posting. To make sure the right people get notified about your question, always tag it appropriately. Also, consider asking it on

Lorenz gravatar image Lorenz  ( 2012-12-03 09:21:13 -0500 )edit

Thanks for your response, tags added. At which part does this post not comply with the guidelines?

davinci gravatar image davinci  ( 2012-12-03 10:07:10 -0500 )edit

Just the tags... Thanks.

Lorenz gravatar image Lorenz  ( 2012-12-03 10:09:23 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-12-03 12:51:38 -0500

JonW gravatar image

A description of the SDF format can be found here while the URDF format is described here.

The code fragment you have presented looks identical to the material statements found in the materials.urdf.xacro file in PR2_description. If you just want to add a texture to an existing model you may have to create a modified ogre3D material script. I believe the current (fuerte) script is in simulator_gazebo/gazebo/gazebo/share/gazebo-1.0.2/Media/materials/scripts

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-12-03 09:05:38 -0500

Seen: 3,060 times

Last updated: Dec 03 '12