Ask Your Question
0

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"/>
</material>

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

 Warning [parser.cc:458] XML Attribute[name] in element[material] not defined in SDF, ignoring.
Error [parser.cc:566] XML Element[texture], child of element[material] not defined in SDF. Ignoring.[material]
Error [parser.cc:557] Error reading element
Error [parser.cc:340] Unable to parse sdf element[gazebo]
Error [parser.cc:299] parse as old deprecated model file failed.
Error [World.cc:1099] 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

Comments

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 http://answers.gazebosim.org/

Lorenz gravatar imageLorenz ( 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 imagedavinci ( 2012-12-03 10:07:10 -0500 )edit

Just the tags... Thanks.

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

1 Answer

Sort by ยป oldest newest most voted
0

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

Stats

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

Seen: 2,241 times

Last updated: Dec 03 '12