Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Translating heighmap creates offset between collision and visual

When using the <pos> tag inside the <heightmap> to get my heightmap aligned with my coordinate system of choice, it appears to be translating correctly when I open the client, but when I place an object on the heightmap, it is as if the collision frame did not translate.

This portion of the world file looks as follows. There appears to have been a similar issue that was resolved a few years ago (http://answers.gazebosim.org/question/4555/setting-position-on-heightmap-creates-offset-between-collision-and-visual/, https://bitbucket.org/osrf/gazebo/commits/807c528), but I still seem to be exhibiting the problem.

Any ideas? I am on Gazebo 7.5, installed from binaries.

 <model name="heightmap">
      <static>true</static>
      <link name="height">
        <collision name="collision">
          <geometry>
            <heightmap>
              <uri>file://media/heightmaps/terrain.png</uri>
              <size> 540 540 60 </size>
              <pos> -55 -72 0 </pos>
            </heightmap>
          </geometry>
          <surface>
            <friction>
              <ode>
                <mu>100000</mu>
                <mu2>500000</mu2>
              </ode>
            </friction>
            <bounce/>
            <contact>
              <ode/>
            </contact>
          </surface>
          <max_contacts>10</max_contacts>
        </collision>
        <visual name="visual_abcedf">
          <geometry>
            <heightmap>
              <use_terrain_paging>false</use_terrain_paging>
              <texture>
                <diffuse>file://media/heightmaps/terrain_tex.png</diffuse>
                <normal>file://media/materials/textures/flat_normal.png</normal>
                <size> 540 </size>
              </texture>
              <uri>file://media/heightmaps/terrain.png</uri>
              <size> 540 540 60 </size>
              <pos> -55 -72 0 </pos>
            </heightmap>
          </geometry>
        </visual>
      </link>
    </model>