Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

problem adding an image as texture to an object

I want to display an image in the gazebo environment. Looking at a few answers suggested that I've to add an object & lay the image as texture over the object.

I followed what's suggested in the answers of this post, but no avail. Then I created a collada mesh as suggested by this tutorial. Still no luck. The object gets inserted like a grey plane as shown below. image description

What I did until now:

1) I created a directory for the model with the name ~/.gazebo/models/aruco_marker. This is how the folder looks like:

image description

2) contents of model.sdf:

<?xml version="1.0"?> <sdf version="1.4"> <model name="aruco_marker">   <static>true</static>
    <link name="link">
      <collision name="collision">
            <normal>0 0 1</normal>
            <size>10 10</size>
      <visual name="visual">
            <normal>0 0 1</normal>
            <size>10 10</size>    </plane>    <mesh>
    </link>   </model> </sdf>

3) contents of model.config

    <name>Aruco Marker</name>
    <sdf version="1.4">model.sdf</sdf>
        My textured ground plane.

4) contents of materials/scripts/aruco_marker.material

material ArucoMarker/Image
      ambient 0.5 0.5 0.5 1.0
      diffuse 1.0 1.0 1.0 1.0
      specular 0.0 0.0 0.0 1.0 0.5
        texture 4x4_1000-25_side50.jpg
        filtering trilinear

5) This is the .jpg file: image description

I generated a .dae file for it using an online converter

Any help is greatly appreciated, thanks!