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

gazebo usage of textures / pictures

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

davinci gravatar image

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

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 -0600 )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 -0600 )edit

Just the tags... Thanks.

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

1 Answer

Sort by ยป oldest newest most voted

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

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

Question Tools


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

Seen: 3,736 times

Last updated: Dec 03 '12