Gazebo 8 Heightmap objects clipping through collision

asked 2017-12-12 08:33:03 -0500

Raskkii gravatar image

I am using Gazebo 8 and ROS Lunar. I am using heightmap to simulate uneven terrain. I have created a greyscale .png image for my terrain and visually it gets loaded fine. The problem is with the collision. It seems like whenever an upward slope ends, there is a narrow hole in between the two polygons which allows objects to fall through.

Here is a picture to illustrate my description:

image description

So, as can be seen from the picture, I've created a simple slope and inserted a box roughly on the edge (Box dimensions are 0.28 x 0.17 x 0.15 m). Now, while something like a box stays still somewhat above the slope and only a part of it clips through, there are several objects which actually fall below the slope. For example the sphere and a cylinder. Here's another picture:

image description

Before taking this picture, I've manually moved the sphere and the cylinder to the very edge so that the centers of these objects are positioned above the end of the slope. After unpausing, these items proceed to fall through the entirely and end up in the positions shown in the picture. (sphere radius is 0.05 m)

Note that this happens with any sized slope. I've tried a slope with a gain of 0.05 meters and there still is that narrow hole at the end of the slope.

So the biggest issue that I have with this is that when I attempt to use any sort of wheeled vehicle to drive over a slope. The wheels sink into the narrow hole and since the vehicle is still moving, the wheels keep moving with it, and then the gazebo engine realises that the wheels are inside a collision and push them upwards with a strong force making the vehicle do multiple somersaults in the air.

Here is the snippet of the greyscale file (though I can reproduce this error with any slope):

image description

I have tried making the slope smoother by using a higher resolution greyscale image (as far as 1025x1025) and making the slope less steep by adding more variations of gray inbetween the two altitudes.

I have not provided any code as it is fairly easy to replicate (heightmap, any greyscale with different altitudes, insert a small box/sphere/cylinder at the edge).

I am aware that this is slightly similar to any other heightmap collision issues (for example this one: However, I've yet to see a solution or any kind of workaround to allow simulation of wheeled vehicles on uneven terrains.

edit retag flag offensive close merge delete


Do you think it would be possible to create a minimal example which reproduces the bug and ticket a new issue on Gazebo with it?

chapulina gravatar imagechapulina ( 2017-12-12 10:37:10 -0500 )edit