robot sinks under ground if I change origin x/y in height map

asked 2020-08-04 19:56:01 -0600

lakshmi gravatar image

updated 2020-08-04 20:00:29 -0600

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>
edit retag flag offensive close merge delete

Comments

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?

lakshmi gravatar imagelakshmi ( 2020-08-06 10:28:17 -0600 )edit