robot sinks under ground if I change origin x/y in height map
In a height map if I change the origin position from <pos>0 0 -2</pos>
to some<pos>x y -1</pos>
robot sinks inside the terrain(height map). This doesn't occur if origin x,y is at the center. Is it some kind of bug or Am I doing something wrong?
psuedo code of sdf file:
<model name='heightmap2'>
<static>true</static>
<link name='link'>
<collision name='collision'>
<geometry>
<heightmap>
<uri>file://media/slope_15deg.png</uri>
<size>25 25 5</size>
<pos>0 0 -2</pos>
</heightmap>
</geometry>
</collision>
<visual name='visual_abcedf'>
<geometry>
<heightmap>
<texture>
<diffuse>file://textures/img.png</diffuse>
<normal>file://textures/flat_normal.png</normal>
<size>1</size>
</texture>
<blend>
<min_height>2</min_height>
<fade_dist>5</fade_dist>
</blend>
<blend>
<min_height>4</min_height>
<fade_dist>5</fade_dist>
</blend>
<uri>file://media/slope_15deg.png</uri>
<size>25 25 5</size>
<pos>0 0 -2</pos>
</heightmap>
</geometry>
</visual>
</link>
</model>
I figured out that for some reason when pose is shifted only visual part of heightmap is being shifted and not the collision part. So it looks like it is sinking but it rests at the height where heightmap would be at that point if <pos>0 0 z<pos>. Is this issue normal ?? Is there a work around to this?