leggedrobotics / raisimLib

RAISIM, A PHYSICS ENGINE FOR ROBOTICS AND AI RESEARCH
http://www.raisim.com
325 stars 50 forks source link

Heightmaps setPose (and friends) give wrong behaviour #33

Closed wpumacay closed 4 years ago

wpumacay commented 4 years ago

Hi, thanks for the great physics engine. I found this issue while working with heightmaps created using data from a std::vector. Below I've attached some extra information.

Using hm->setPosition (collision fails)

gif_issue_heightmaps_pose_1

Using centerX, centerY

gif_issue_heightmaps_pose_2

This happens with both the constructor from std::vector data, and the one using TerrainProperties.

Note: A workaround I'm using is to set both centerX and centerY with the x-y position required, and offset all my heights by the z-position I wanted the heightmap to be. So far it works ok, but if using TerrainProperties, there's no offset parameter exposed (as in the fromPng constructor), so in that case I can't place the heightmap exactly where I need it.

jhwangbo commented 4 years ago

Thank you for reporting a bug. This bug is fixed in the latest commit.