I am quite new to pybullet and I was wondering if I could retrieve the heightfield data which I used to generate the p.createCollisionShape() object.
Code: Select all
if heightfieldSource==useTerrainFromPNG:
terrainShape = p.createCollisionShape(shapeType = p.GEOM_HEIGHTFIELD, meshScale=[.02,.02,2.4],fileName = "heightmaps/wm_height_out.png")
textureId = p.loadTexture("heightmaps/gimp_overlay_out.png")
terrain = p.createMultiBody(0, terrainShape)
p.changeVisualShape(terrain, -1, textureUniqueId = textureId)
p.resetBasePositionAndOrientation(terrain,[0.2,0.5,0.12], [0,0,0,1])
p.changeVisualShape(terrain, -1, rgbaColor=[1,1,1,1])
I wanted a matrix of heights with respect to my robot's current position and orientation.
Will that be possible anyhow?