Home | Tutorials | Wiki | Issues
Ask Your Question
1

Setting position on heightmap creates offset between collision and visual

asked 2013-10-01 09:39:19 -0600

Hi,

when I set a position in my sdf for my heightmap I get an offset between collision and visual for the map as shown in the snapshot below. If I move the objects around I can see that the collision of the map has an offset. I'm able to move the objects into the mountains etc. All objects are affected by this not only the ones in the example snapshot. When I set the y position in the collision and visual to 0 the offset is gone. This error is a new behaviour that wasn't there 2 month ago(I haven't changed anything on the sdf files since july) so this is probably a bug... I'm not sure when this behaviour first occured because I haven't worked with an heightmap for quite a while...

I'm working with ubuntu precise and gazebo 1.9.1 from the osrf repository(not from source)

Snapshot of the BUG:

image description

Here is the SDF for the heightmap:

<?xml version='1.0'?>
<sdf version='1.4'>
<model name="my_map">
  <static>true</static>
  <link name="link">
    <collision name="collision">
      <geometry>
        <heightmap>
          <uri>file://path/to/image/terrain.png</uri>
          <size>1500 1500 450</size>
          <pos>0 -35 -71</pos>
        </heightmap>
      </geometry>
    </collision>
    <visual name="visual">
      <geometry>
        <heightmap>
          <texture>
            <diffuse>file://path/to/image/GrassFrozen.png</diffuse>
            <normal>file://path/to/image/flat_normal.png</normal>
            <size>50</size>
          </texture>
          <texture>
            <diffuse>file://path/to/image/Snow.png</diffuse>
            <normal>file://path/to/image/flat_normal.png</normal>
            <size>20</size>
          </texture>
          <texture>
            <diffuse>file://path/to/image/RockRough.png</diffuse>
            <normal>file://path/to/image/flat_normal.png</normal>
            <size>80</size>
          </texture>
          <blend>
            <min_height>-100</min_height>
            <fade_dist>5</fade_dist>
          </blend>
          <blend>
            <min_height>-50</min_height>
            <fade_dist>5</fade_dist>
          </blend>
          <uri>file://path/to/image/terrain.png</uri>
          <size>1500 1500 450</size>
          <pos>0 -35 -71</pos>
        </heightmap>
      </geometry>
    </visual>
  </link>
</model>

</sdf>
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2013-10-01 11:12:56 -0600

Carlos Agüero gravatar image

updated 2013-10-01 12:53:41 -0600

Hi evilBiber,

I'm looking at it right now. It might be a bug.

I filed a ticket to track the issue. https://bitbucket.org/osrf/gazebo/iss...

Checkout the issue_868 branch that should fix the problem and let us know.

edit flag offensive delete link more

Comments

Here is the bitbucket issue

nkoenig gravatar imagenkoenig ( 2013-10-01 12:49:38 -0600 )edit

Hi, thanks for fixing this problem so fast :D. I can't test it right now because I am not working with source Version of gazebo so I just changed my image ;) if you need testing I can compile/install gazebo from source but the fix looks reasonable THX. I mark the question as solved next time I will post such reposts directly on Bitbucket ;)

evilBiber gravatar imageevilBiber ( 2013-10-04 02:07:12 -0600 )edit

Hi, thanks for fixing this problem so fast :D

evilBiber gravatar imageevilBiber ( 2013-10-04 02:07:21 -0600 )edit

Hi, thanks for fixing this problem so fast :D

evilBiber gravatar imageevilBiber ( 2013-10-04 02:07:31 -0600 )edit

No problem evilBer. This patch will appear in the next gazebo version (2.0.0). Just confirm us that the problem is solved when you have a chance.

Carlos Agüero gravatar imageCarlos Agüero ( 2013-10-08 13:46:59 -0600 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-10-01 09:39:19 -0600

Seen: 1,165 times

Last updated: Oct 01 '13