Gazebo | Ignition | Community
Ask Your Question
0

How to add an image as ground plane in Citadel

asked 2021-09-17 14:43:43 -0600

kakcalu13 gravatar image

So, I tried to follow several like this link And this

Then I tried to follow this, but I'm convinced that this is for classic gazebo only, not Citadel.

I still can't find why it couldn't load the image.

Here is the current plane:

image description

The goal is to have this image description

I downloaded directly from this link

The directories is like this; image description

So the sdf with worlds is this:

      <model name='conde_world'>
  <static>true</static>
  <link name='link_ground'>
    <visual name='visual_ground'>
      <geometry>
        <plane>
          <normal>0 0 1</normal>
          <size>174 417</size>
        </plane>
      </geometry>
      <material>
        <script>
          <uri>model://conde_world/materials/scripts</uri>
          <uri>model://conde_world/materials/textures</uri>
          <name>Floor/Image</name>
        </script>
      </material>
    </visual>
    <collision name='collision'>
      <geometry>
        <plane>
          <normal>0 0 1</normal>
          <size>174 417</size>
        </plane>
      </geometry>
    </collision>
  </link>
</model>

The question is why can't I load it? Is it a bug?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2021-09-21 15:39:49 -0600

kakcalu13 gravatar image

Thanks to @chapulina for give me a new route to explore,

I finally manage to find a way to import an image. Here is the snippet of how you import.

  <material>
    <ambient>0.8 0.8 0.8 1</ambient>
    <diffuse>0.8 0.8 0.8 1</diffuse>
    <specular>1 0.8 0.8 1</specular>
    <pbr>
        <metal>
          <albedo_map>floor.png</albedo_map>
          <normal_map>floor.png</normal_map>
        </metal>
      </pbr>
  </material>

Keep that in mind, this will find where the model.sdf is in. Just add your picture to there.

Also <Specular> is a bug atm.

edit flag offensive delete link more
1

answered 2021-09-17 15:50:07 -0600

chapulina gravatar image

Take a look at the tutorial Migrating SDF files from Gazebo classic to Ignition.

Material scripts aren't supported on Ignition, so you'll nee to use the <pbr> tag.

edit flag offensive delete link more

Comments

Thank you! I'm very honored to have your reply!

Anyway,

Related to <pbr>

I followed similar to the link which results as this

        <pbr>
            <metal>
                <albedo_map>floor.png</albedo_map>
            </metal>
        </pbr>

which results as this image description

So I removed <metal> and it is same. So I reverted <material> <pbr> </pbr></material>

I'm looking to import an image only without OBJ MTL COLLAD

kakcalu13 gravatar imagekakcalu13 ( 2021-09-17 16:17:51 -0600 )edit

Characters limit reached.

Anyway is there any docs or tutorial more details about <pbr>? I'm interested to learn more about it or even <materials>

kakcalu13 gravatar imagekakcalu13 ( 2021-09-17 16:19:12 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2021-09-17 14:43:43 -0600

Seen: 58 times

Last updated: Sep 21