0
$\begingroup$

Gazebo Answers logo

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?


Originally posted by r0nald on Gazebo Answers with karma: 62 on 2013-01-09

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

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


Originally posted by nkoenig with karma: 7676 on 2013-01-09

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by klowrey on 2013-01-17:
I'm also getting this problem, even with the DRC_terrain. I will run atlas_utils atlas.launch, and try to import the drc_terrain model to get this problem. Custom heightmaps similarly will not work.

Comment by klowrey on 2013-01-17:
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.

Comment by nkoenig on 2013-01-19:
Can you run the heightmap.world that is shipped with Gazebo? gazebo /usr/local/share/gazebo-1.3/worlds/heightmap.world

Comment by Daniel Vaz on 2013-02-04:
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??

Comment by Daniel Vaz on 2013-02-04:
What is the difference between load a model inside a .world file and inserting a model at runtime in the gazebo?

Comment by nkoenig on 2013-02-04:
the error message "No mesh specified" can be ignored. The heightmap should still run.

Comment by Daniel Vaz on 2013-02-05:
I open an issue in osrf/gazebo. https://bitbucket.org/osrf/gazebo/issue/481/problems-with-gui-displaying-heightmap

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.