Gazebo | Ignition | Community
Ask Your Question
1

Heightmap with Gazebo 1.3

asked 2013-01-09 13:15:58 -0500

r0nald gravatar image

The Gazebo heightmap tutorial is for Gazebo 1.0 and the example is not directly applicable to Gazebo 1.3.

I tried to create my own heightmap model file :

<?xml version="1.0"?>
<sdf version="1.3">
  <model name="ground_plane">
    <static>true</static>
    <link name="link">
      <collision name="collision">
        <geometry>
          <heightmap>
        <uri>file://myheightmap.png</uri>
            <size>20.0 2.0 5.0</size>
          </heightmap>
        </geometry>
        <surface>
          <friction>
            <ode>
              <mu>100</mu>
              <mu2>50</mu2>
            </ode>
          </friction>
        </surface>
      </collision>
      <visual name="visual">
        <cast_shadows>false</cast_shadows>
        <geometry>
          <heightmap>
        <uri>file://myheightmap.png</uri>
            <size>20.0 2.0 5.0</size>
          </heightmap>
        </geometry>
        <material>
          <script>
            <uri>file://media/materials/scripts/gazebo.material</uri>
            <name>Gazebo/Grey</name>
          </script>
        </material>
      </visual>
    </link>
  </model>
</sdf>

When adding this to simulation, the Gazebo console reports

Error [Visual.cc:1946] No mesh specified

I took a look at the sourcecode. From there it seems to me, that in case of the < heightmap > tag, the tmpElem object is invalid and that is why the < uri > value is not found.

Is there something wrong with the model file for the heightmap? Is there a better way for doing a heightmap?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-01-09 15:32:26 -0500

nkoenig gravatar image

The URI value for your PNG is probably incorrect. The URI must specify a file, including the path, that is relative to a path specified in the GAZEBO_RESOURCE_PATH environment variable:

env | grep GAZEBO_RESOURCE_PATH

edit flag offensive delete link more

Comments

I'm also getting this problem, even with the DRCterrain. I will run atlasutils atlas.launch, and try to import the drc_terrain model to get this problem. Custom heightmaps similarly will not work.

klowrey gravatar imageklowrey ( 2013-01-17 13:12:50 -0500 )edit

However, if i run atlasutils drcsimv0.launch, the terrain map loads correctly. this terrain map i cannot delete (it should just be another model, right?) and I get the "no mesh specified" error if I try to load the terrain heightmap again.

klowrey gravatar imageklowrey ( 2013-01-17 13:26:33 -0500 )edit

Can you run the heightmap.world that is shipped with Gazebo? gazebo /usr/local/share/gazebo-1.3/worlds/heightmap.world

nkoenig gravatar imagenkoenig ( 2013-01-19 17:39:38 -0500 )edit

I can run the heightmap.world, but if I copy the code of model from this .world file and create a separate .model file, the same code can't run. The following message appear in console: Error [Visual.cc:1936] No mesh specified. Tips??

Daniel Vaz gravatar imageDaniel Vaz ( 2013-02-04 04:32:01 -0500 )edit

What is the difference between load a model inside a .world file and inserting a model at runtime in the gazebo?

Daniel Vaz gravatar imageDaniel Vaz ( 2013-02-04 04:50:38 -0500 )edit

the error message "No mesh specified" can be ignored. The heightmap should still run.

nkoenig gravatar imagenkoenig ( 2013-02-04 19:46:48 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-01-09 13:15:58 -0500

Seen: 2,179 times

Last updated: Jan 09 '13