VRC heightmap problems
Given that the other heightmap related ticket was "resolved" and the pull-request merged I'll open a ticket to re-iterate the current heightmap problems:
Texture distortion (or some underlying problem that causes this):
The texture moves with the camera which makes it look like it's ~20cm farther away than it actually is. A video demonstrating the effect of texture moving around, notice how it moves across the edges of triangles (this is using the heightmap with just one texture and no normal map): http://www.youtube.com/watch?v=eC_1MiATQBE
A picture of the stereo point cloud of the ground in front of the robot at the same height of the robot which appears ~20cm below the actual height (red grid is at -0.2m, gray grid at 0m): http://i.imgur.com/d5IxVbb.png
Extremely poor LIDAR performance:
When turning on the LIDAR in vrc world 2 (walking), the real-time factor drops down from ~0.99 to 0.02 (no hands, no rubble). In vrc world 1 it is not as bad, there it only drops about 0.1 (e.g. from 0.5 to 0.4) and in the old world that used
drc_terrain I never noticed a difference when enabling the LIDAR as far as I can remember.
The difference between those worlds is that both
vrc2 use a heightmap with 513*513 resolution but vrc1 has a map size of 500x500x118 while
vrc2 only has a map size of 200x200x46.9. So
vrc1 is more than twice as large as
vrc2 and has a better performance for LIDAR. Assuming that Gazebo/OGRE creates one vertex per pixel, this means that
vrc2 has a higher triangle density than
vrc1 which explains why it's slower than
drc_terrain has a heightmap resolution of 257px and a map size of 2000x2000x500 which is ten times larger than
vrc2 and hence explains why those issues didn't arrise with
I converted the vrc2 heightmap into a triangle mesh, one with 132098 triangles and the other with 526338 to test speed with pure triangle meshes - I'm not sure what triangle count vrc2 has but it should be close to one of them. With the lower resolution triangle mesh my real-time factor only dropped by 0.05 and with the higher resolution mesh it only dropped by 0.1. But again I'm not sure whether either of them is close to the resolution that the heightmap rendered by Gazebo/Ogre has.
Maybe this performance drop might decrease or even disappear when switching to the GPU based LIDAR given that enabling the cameras does not affect performance that much either?
Errors/differences/bugs/.. in collision geometry:
Visual geometry and collision geometry are different at some parts of the terrain, or maybe the collision geometry is buggy. See http://youtu.be/r6aH04E_F_8 and http://youtu.be/TXkw3nV1OR0 for some examples. This makes walking on the heightmap even more difficult and unpredictable than it already is with all the other heightmap related bugs and problems listed above.
Atlas gliding, slipping, falling through heightmap:
Another day, another bug (or at least partially a variant of the one above): Atlas slips, glides, and/or falls through the heightmap when it gets close to an edge. Example of extreme slipping (or maybe small penetrations that make it slip forward): http://youtu.be/ojSBBKH9Ne8 and an example of atlas falling through the heightmap for several centimeters: http://youtu.be/5fKJtuXpIks