I have been analysing how gazebo (v7.0) renders a
png image when included as heightmap in a world file.
Assuming we have a
513x513 8bit png where its maximum value is
127 and its minimum
0. When I indicate the size of the collision/geometry element as
10 10 0.5:
<collision name="collision"> <geometry> <heightmap> <uri>model://worlds/steps.png</uri> <size>10 10 0.5</size> <pos>0 0 0</pos> </heightmap> </geometry> </collision>
(Note: I indicate the same size in the visual/geometry/heightmap element of the world file)
I expect the image to be rendered as a 10 x10m map with a maximum height value of
0.5 meters. However it maximum height is around
0.25m. Documentation mentions that the size either for collision or visual elements for a
heightmap indicates the scale the heightmap to which it will be rendered in gazebo. It properly renders width and length but height seems unreliable. Am I missing something regarding how
Z element in
size is treated?
I have analysed other maps (same png size but different max/min values) and some times I get the height properly rendered, specially when the max value in the png is 255 and I want to render it to 1.0m.